> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bandit

> Bandit is a security linter for Python codebases. Bandit flags problems like hard-coded passwords, injection vulnerabilities, and the use of insecure libraries.

[**Bandit**](https://github.com/PyCQA/bandit) is a linter for Python.

You can enable the Bandit linter with:

```shell theme={null}
trunk check enable bandit
```

<Frame caption="Bandit example output">
  <img src="https://mintcdn.com/trunk-4cab4936/WAR0qJ1WO0rtUlqz/assets/code-quality/overview/linters/supported/bandit.gif?s=99f55e3d8a8ba1dbb236793c0eef79f2" alt="bandit example output" width="1000" height="600" data-path="assets/code-quality/overview/linters/supported/bandit.gif" />
</Frame>

## Auto Enabling

Bandit will be auto-enabled if any *Python* files are present.

## Settings

Bandit supports the following config files:

* `.bandit`

You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linters](../configure-linters#moving-linters) for more info.

## Links

* [Bandit site](https://github.com/PyCQA/bandit)
* Bandit Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/bandit)
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
