PyCQA / PyCQA/bandit

fail over non-existing files

Open
#797 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem? Please describe.
bandit does not fail over non-existing files. It does print a message but this is invisible with -q option. Its exit code is 0 indicating success.

Describe the solution you'd like
bandit must fail (with an appropriate message and exit code != 0) when given non-existing files.

Additional context
bandit 1.7.0
python version = 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 09:44:33) [MSC v.1900 32 bit (Intel)]

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.

Research direction

No file, test, or entry point is named in the issue. Start by locating Bandit's command-line handling for input paths and the existing message and exit-code behavior, then check how -q affects it. Done means a non-existing file produces an appropriate message and a nonzero exit code, including when -q is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.