You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Python 3.9 and bandit 1.7.3 the code throws a traceback when trying to parse:
hashlib.sha256()
It works correctly with Python 3.8.
[tester] ERROR Bandit internal error running: hashlib on file src/oic\oic\__init__.py at line 1329: 'name'Traceback (most recent call last):
File "c:\users\me\.virtualenvs\pyoidc_offical-l5_fcrz7\lib\site-packages\bandit\core\tester.py", line 53, in run_tests
result = test(context)
File "c:\users\me\.virtualenvs\pyoidc_offical-l5_fcrz7\lib\site-packages\bandit\plugins\hashlib_insecure_functions.py", line 115, in hashlib
return _hashlib_func(context)
File "c:\users\me\.virtualenvs\pyoidc_offical-l5_fcrz7\lib\site-packages\bandit\plugins\hashlib_insecure_functions.py", line 57, in _hashlib_func
name = args[0] if args else keywords["name"]
KeyError: 'name'
Reproduction steps
Install Python 3.9
Install bandit 1.7.3
Create trivial file:
import hashlib
hashlib.sha256()
Run bandit and get a traceback
Expected behavior
No traceback. It should work with both hashlib.sha256 and hashlib.new("sha256").
Bandit version
1.7.3 (Default)
Python version
3.9
Additional context
No response
The text was updated successfully, but these errors were encountered:
* Fix Black
Black wants it different now.
* Fix problem after requests update
requests changed the error message
* Fix Bandit
- Bandit is a bit too eager flagging hardcoded secrets.
- Bandit 1.7.3 breaks with Py 3.9 PyCQA/bandit#838
* Update pylama.ini
complexity check of mccabe seems to ignore configuration, so ignore for now
Describe the bug
Using Python 3.9 and bandit 1.7.3 the code throws a traceback when trying to parse:
hashlib.sha256()
It works correctly with Python 3.8.
Reproduction steps
Expected behavior
No traceback. It should work with both
hashlib.sha256
andhashlib.new("sha256")
.Bandit version
1.7.3 (Default)
Python version
3.9
Additional context
No response
The text was updated successfully, but these errors were encountered: