PyCQA / PyCQA/bandit

config file as described in README.rst does not work

Open
#317 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. create .bandit file with content:
[bandit]
tests: B101,B102,B301

  1. run bandit -c .bandit -r module/
  2. get error:
    [main] ERROR .bandit : Error parsing file.

Expected behavior
working as described in readme

Bandit version

bandit 1.4.0

Additional context
Docs say it should be YAML and not INI. https://bandit.readthedocs.io/en/latest/config.html

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

Compare the configuration example in README.rst and the linked config documentation with the command bandit -c .bandit -r module/. Check how the .bandit file is parsed and determine whether the documented format or the parser is incorrect. Done means the documented example works without the parsing error and the documentation matches the supported format.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, yaml
Domain
devtools, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.