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
> bandit test.py
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.8.3
[node_visitor] INFO Unable to find qualified name for module: test.py
[tester] ERROR Bandit internal error running: blacklist on file test.py at line 4: list index out of rangeTraceback (most recent call last):
File "[MASKED]/venv/lib64/python3.8/site-packages/bandit/core/tester.py", line 52, in run_tests
result = test(context, test._config)
File "[MASKED]/venv/lib64/python3.8/site- packages/bandit/core/blacklisting.py", line 50, in blacklist
name = context.call_args[0]
IndexError: list index out of range
Observe the error
Expected behavior
I'd expect it to scan the file with no errors.
Bandit version
bandit 1.7.0
python version = 3.8.3 (default, Feb 26 2020, 00:00:00) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)]
* #694 Bandit fails when using importlib with named arguments
* add missing tests
* improvement in the tests
Co-authored-by: Luke Hinds <7058938+lukehinds@users.noreply.github.com>
…QA#701)
* PyCQA#694 Bandit fails when using importlib with named arguments
* add missing tests
* improvement in the tests
Co-authored-by: Luke Hinds <7058938+lukehinds@users.noreply.github.com>
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
test.py
fileExpected behavior
I'd expect it to scan the file with no errors.
Bandit version
Additional context
This line: https://github.com/PyCQA/bandit/blob/master/bandit/core/blacklisting.py#L50 only expects module name passed directly, and not as named argument.
The text was updated successfully, but these errors were encountered: