Skip to content

.bandit ignored for single files #332

@grizz

Description

@grizz

When doing a single file, bandit doesn't use the .bandit file in the directory. If it's agreed that it should work like this, I'm happy to do a PR to fix it.

With a config file tests/.bandit, running

bandit -r tests/

has different results than

bandit -r tests/test_cli.py

Expected behavior
I would expect bandit to search each directory to root for a .bandit file and apply the first found to the test run.

Bandit version

bandit 1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions