PyCQA / PyCQA/bandit

missing directories should be cause for alarm

Open
#575 1 comment 0 reactions 1 assignee View on GitHub

@lukehinds is already working on this.

Since Feb 26, 2020.

bug
Dominant language
Python
Stars
8.3k
Forks
835
Avg merge
5d 3h
Merged PRs (30d)
1

Description

Describe the bug
bandit does not consider missing items to be a problem. That means that renaming a directory without adjusting the CI-scripts will take it off the radar with zero complaint. It will even "fix" all of your old security problems.

To Reproduce
tell bandit to scan a directory which does not exist.
bandit fnord
and it will tell you that everything is okay (exit-code 0).
while there is a mention of the problem, it is no cause for alarm:

Files skipped (1):
        fnord (No such file or directory)
...
 echo $?
0

Expected behavior
The test should fail with a non-zero exit-code. That will fail the CI and cause humans to look at the problem. Misconfigurations will be caught and corrected.

Bandit version

bandit 1.6.2
  python version = 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0]

Additional context
Thanks for bandit :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.