-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
bandit check seems to link arguments not function call #9994
Comments
Interesting, will take a look. |
It seems like $ bat src/S603.py
File: src/S603.py
1 import subprocess
2
3 out = subprocess.check_output(
4 ["git", "rev-parse", "HEAD"],
5 )
$ flake8 src/S603.py
src/S603.py:1:1: S404 Consider possible security implications associated with the subprocess module.
src/S603.py:3:1: S607 Starting a process with a partial executable path
src/S603.py:3:1: S603 subprocess call - check for execution of untrusted input. A simple fix would be to use the same location. |
Note that in general, using |
You can use our own implementation of |
@dhruvmanila - I'm not totally sure which (if any) of these rules should have their ranges adjusted -- would need to look... |
It seems that Ruff reports wrong lines for this bandit issue
in fact, it creates deadlock as
yesqa
removesnoqa
s from line 2 as it expects them with line 1, but then ruff reports line 2adding a dummy line to the argument, and it seems to be baked with the first argument as this
still reports line 2 but the next one
reports line 3
--
using pre-commit with
The text was updated successfully, but these errors were encountered: