New exclude_regex
Filter to Address False Positives on Password Tests
#973
Labels
enhancement
New feature or request
exclude_regex
Filter to Address False Positives on Password Tests
#973
Is your feature request related to a problem? Please describe.
Consistent issues arise on false positives of "token"-matched variable names in tests B105 and B106.
See: #498, #842, #843, #211
Describe the solution you'd like
It would be useful to have an
exclude_regex
field available to filter variable names, and not just excludes at the files and tests level.Describe alternatives you've considered
exclude
andexclude_dirs
skips entire files/folders and are too permissiveskips
completely skips entire tests and are too permissive# nosec
entries clutter source code when there are excessive false positivesAdditional context
Ideally, coupling an
exclude_regex
withexclude
would be ideal granularity.Example
pyproject.toml
to exclude "token" variable name filtering only in files under "tests/" folders for B106:👍?
The text was updated successfully, but these errors were encountered: