pygrep-hooks icon indicating copy to clipboard operation
pygrep-hooks copied to clipboard

Add `python-check-blanket-nosec` hook for bandit

Open mkniewallner opened this issue 3 years ago • 1 comments

Version 1.7.3 of Python SAST tool bandit added support for disabling individual tests in https://github.com/PyCQA/bandit/pull/597.

It is now possible to disable specific codes like so:

# nosec: B101, B102
# nosec: B101 subprocess_popen_with_shell_equals_true

I thought that this could be a nice thing to have in this project.

mkniewallner avatar Mar 01 '22 21:03 mkniewallner

I just posted a nearly identical PR before seeing this one. 🤦 Here is the regex I came up with: https://github.com/pre-commit/pygrep-hooks/blob/092e4e0dc54eb441afc9342e6a7e28e022951fb2/.pre-commit-hooks.yaml#L10

ericbuehl avatar Sep 20 '23 17:09 ericbuehl