Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(security): Secure commands on namespace deletion #27

Open
germainlefebvre4 opened this issue Feb 5, 2021 · 0 comments
Open

fix(security): Secure commands on namespace deletion #27

germainlefebvre4 opened this issue Feb 5, 2021 · 0 comments
Labels
enhancement New feature or request
Projects

Comments

@germainlefebvre4
Copy link
Owner

Current status: Kubernetes namespaces are deleting using os library.

$ pipenv run bandit -r handler.py
>> Issue: [B605:start_process_with_a_shell] Starting a process with a shell, possible injection detected, security issue.
   Severity: High   Confidence: High
   Location: handler.py:56
   More Info: https://bandit.readthedocs.io/en/latest/plugins/b605_start_process_with_a_shell.html
55              if not DRYRUN:
56                  os.system("kubectl delete namespace {}".format(ns_name))
57

Solution:

  • Use kubernetes client library
@germainlefebvre4 germainlefebvre4 added the enhancement New feature or request label Feb 5, 2021
@germainlefebvre4 germainlefebvre4 added this to To do in Dashboard via automation Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Dashboard
  
To do
Development

No branches or pull requests

1 participant