> For the complete documentation index, see [llms.txt](https://skills.books.c-k.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skills.books.c-k.dev/bandit-check-your-codes-safeness/banditfile.md).

# Banditfile

You can use a .banditfile to declare what tests and which folder you would like to test. Put the .banditfile into your project directory.

An optional config file may be supplied and may include:

* lists of tests which should or shouldn’t be run
* exclude\_dirs - sections of the path, that if matched, will be excluded from scanning
* overridden plugin settings - may provide different settings for some plugins

### Per Project Command Line Args

Projects may include a .bandit file that specifies command line arguments that should be supplied for that project. The currently supported arguments are:

> * targets: comma separated list of target dirs/files to run bandit on
> * exclude: comma separated list of excluded paths
> * skips: comma separated list of tests to skip
> * tests: comma separated list of tests to run

### Example of .banditfile content

```
[bandit]
exclude: /test
tests: B101,B102,B301
```
