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

B605 found: Test for starting a process with a shell #292

Open
jbampton opened this issue Nov 5, 2024 · 0 comments
Open

B605 found: Test for starting a process with a shell #292

jbampton opened this issue Nov 5, 2024 · 0 comments

Comments

@jbampton
Copy link
Member

jbampton commented Nov 5, 2024

https://bandit.readthedocs.io/en/latest/plugins/b605_start_process_with_a_shell.html

@BaseMax can you look into this ? I have skipped the B605 check to make pre-commit pass in #291

bandit...................................................................Failed
- hook id: bandit
- exit code: 1

[main]  INFO    profile include tests: None
[main]  INFO    profile exclude tests: None
[main]  INFO    cli include tests: None
[main]  INFO    cli exclude tests: None
[main]  INFO    using config: pyproject.toml
[main]  INFO    running on Python 3.11.4
Run started:2024-11-05 18:32:36.325431

Test results:
>> Issue: [B605:start_process_with_a_shell] Starting a process with a shell, possible injection detected, security issue.
   Severity: High   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b605_start_process_with_a_shell.html
   Location: ./test/tests.py:30:8
29          if parent_layout_file.exists():
30              os.system(f"{salam_bin} {parent_layout_file} > /dev/null 2>&1")
31          else:

--------------------------------------------------

Code scanned:
        Total lines of code: 173
        Total lines skipped (#nosec): 0

Run metrics:
        Total issues (by severity):
                Undefined: 0
                Low: 0
                Medium: 0
                High: 1
        Total issues (by confidence):
                Undefined: 0
                Low: 0
                Medium: 0
                High: 1
Files skipped (0):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants