question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to find qualified name

See original GitHub issue

Describe 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:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mportesdevcommented, Jul 13, 2022

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).

0reactions
bje-commented, Jun 10, 2022

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found