Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-c setup.cfg error [config] ERROR expected '<document start>', but found '<scalar>' #1035

Open
Woocash7 opened this issue Jul 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Woocash7
Copy link

Woocash7 commented Jul 5, 2023

Describe the bug

Bandit throws error when giving explicitly config file setup.cfg

Reproduction steps

  1. set setup.cfg file:
[isort]
profile = black

...

[tool.bandit]
skips = ["B101", "B601"]

or

...
[tool.bandit.assert_used]
skips = ['*_test.py', '*/test_*.py']
  1. run $ bandit -c setup.cfg -r .
  2. output:
[config]        ERROR   expected '<document start>', but found '<scalar>'
  in "setup.cfg", line 2, column 1
[main]  ERROR   setup.cfg : Error parsing file.

Expected behavior

Running properly with given config file in according to https://bandit.readthedocs.io/en/latest/config.html#bandit-settings

Bandit version

1.7.5 (Default)

Python version

3.8

Additional context

No response

@Woocash7 Woocash7 added the bug Something isn't working label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant