Unable to find qualified name
See original GitHub issueDescribe the bug
Running bandit on a single source file in the current directory does not seem to work. It produces a warning:
WARNING Unable to find qualified name for module
I am not sure what the warning is trying to achieve?
Reproduction steps
1. $ touch dummy.py
2. $ bandit dummy.py # produces the warning
3. $ bandit ./dummy.py # does not produce the warning
Expected behavior
No warning should be produced.
Bandit version
1.7.4 (Default)
Python version
3.8
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Unable to find qualified name for module · Discussion #725
I'm encountering an info message as mentioned in the discussion title. Does this hinder the actual progress of the security scanning? Details are...
Read more >Simplest way to get fully qualified name of a module
Try something like this: from bar.baz import spam print(spam.__name__). If the name being imported is not a module, you can get the module ......
Read more >Getting started with Bandit -
12 [node_visitor] INFO Unable to find qualified name for module: blog_ex.py Run started:2017-01-11 20:47:39.901651 Test results: >> Issue: [B506 ...
Read more >PEP 395 – Qualified Names for Modules
To fix this problem, it is proposed to make use of the new module level __qualname__ attributes to determine the real module location...
Read more >Finding insecure Python code with bandit
... Unable to find qualified name for module: bad.py Run started:2021-05-09 13:02:31.961401 Test results: >> Issue: [B102:exec_used] Use of exec detected.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess it would make sense to increase the logging level to ERROR in quiet mode – would be consistent with the CLI help message
only show output in the case of an error
(source) and the manager docstring:param quiet: Whether to only show output in the case of an error
(source).OK. I have some driver scripts that sit at the top-level of my source tree and every bandit run produces this warning. Could it be suppressed with
-q
?