Skip to content

Use .gitignore as basis of default excludes #826

Open
@ericwb

Description

@ericwb

Is your feature request related to a problem? Please describe.
Currently, constants.py defines some standard excludes hardcoded in a file. While this hasn't generally been an issue thus far, it does get complicated if someone wishes to override those values.

Describe the solution you'd like
Rather than hardcode in Bandit source, make use of a project's defined .gitignore file instead. It's very common to only scan the source that is part of the git repo anyway.

Describe alternatives you've considered
This solution would apply only to Git source control. So if someone uses SVN, CVS, etc, it may not be of much help.

Additional context
https://git-scm.com/docs/gitignore
https://github.com/PyCQA/bandit/blob/7fbf9d517b900936ac97e7debbd16dc7e532bc27/bandit/core/constants.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions