False-positive B107:hardcoded_password_default
with None
parameter
#1227
Labels
bug
Something isn't working
B107:hardcoded_password_default
with None
parameter
#1227
Describe the bug
Given a function such as:
Bandit will flag it as
However, this is clearly not correct, as there is no value applied (
None
).This occurs only starting from https://github.com/PyCQA/bandit/releases/tag/1.8.1. All corresponding code works without issue and is not flagged by
bandit
in earlier versions.Reproduction steps
Expected behavior
Explicit
None
are not considered as hardcoded password strings.Using
None
is very typical when defining keyword arguments where passwords might not be mandatory.Bandit version
1.8.1
Python version
3.10
Additional context
No response
The text was updated successfully, but these errors were encountered: