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

Support nosec comments #20

Open
scop opened this issue Aug 15, 2021 · 0 comments
Open

Support nosec comments #20

scop opened this issue Aug 15, 2021 · 0 comments

Comments

@scop
Copy link

scop commented Aug 15, 2021

Currently if one wants to skip a bandit message for "raw" bandit checks (using the bandit executable) in addition to ones done via flake8-bandit, both the noqa and nosec comments need to be used. For example:

assert True  # noqa: S101 # nosec: B101

The noqa: S101 is required for flake8 to not flag the use of assert, but that's not enough for "raw" bandit. For that the nosec: B101 is needed. But that has no effect on flake8-bandit, so both are needed.

Would be good if the nosec comment was enough for both, maybe flake8-bandit can do something about it?

scop added a commit to scop/hashpipe that referenced this issue Aug 15, 2021
For one config block fewer, run also by tools only aware of flake8 and
not bandit specifically.

Too bad the `nosec: B101` does not seem enough when ran through
flake8-bandit, tylerwince/flake8-bandit#20
Leaving both in for now so raw CLI `bandit` runs get it filtered, too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant