Add the ability to skip files and directories to other tests
Nobody has claimed this yet.
- 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.
Specifically I'd like to be able to apply the skips: [ ] configuration to B105/6/7 but I imagine it would be useful for all tests.
Describe the solution you'd like
In the bandit.yaml file I would like to be able to do:
hardcoded_password_string:
skips: ["*/test_*.py"]
Describe alternatives you've considered
I could disable the test for the whole project but that seems like a very black and white approach to take.
There are also tests listed in the generated yaml config file that aren't in the docs, such as B311 : random that may benefit from selective skipping.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how bandit.yaml is loaded and how individual tests select files, including the generated YAML configuration and the B105/B106/B107 implementations. Define the behavior for skips containing file and directory patterns, then add coverage showing that matching paths are excluded while other tests and paths still run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100