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
Describe the bug
hardcoded_password_default check with ast.arg on python2
To Reproduce
Steps to reproduce the behaviour:
Run bandit with python2
Create a file with:
def my_funct((a, b)):
pass
Expected behaviour
Check the python version before check with ast.arg
Bandit version
bandit 1.5.1
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
Traceback
[tester] ERROR Bandit internal error running: hardcoded_password_default on file test.py at line 1: 'module' object has no attribute 'arg'Traceback (most recent call last):
File "/home/vtorre/.virtualenvs/bandit/local/lib/python2.7/site-packages/bandit/core/tester.py", line 64, in run_tests
result = test(context)
File "/home/vtorre/.virtualenvs/bandit/local/lib/python2.7/site-packages/bandit/plugins/general_hardcoded_password.py", line 212, in hardcoded_password_default
if isinstance(key, ast.Name) or isinstance(key, ast.arg):
AttributeError: 'module' object has no attribute 'arg'
The text was updated successfully, but these errors were encountered:
Describe the bug
hardcoded_password_default check with ast.arg on python2
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Check the python version before check with ast.arg
Bandit version
Traceback
The text was updated successfully, but these errors were encountered: