Bandit
github.com
- Free plan
- Open source
- macOS
- Linux
- Browser extension
- Self-hosted
What Bandit is
Bandit is a free security linter for Python source code. It builds an abstract syntax tree from files and runs plugins against the tree’s nodes to identify common security issues, then produces a scan report. The project recommends installing it from PyPI with pip. Optional installation extras add TOML support, a command-line tool for working with JSON baselines, and SARIF output formatting. A baseline can help teams set aside findings they already consider non-issues. Bandit can run as a pre-commit hook, and documented integrations include Visual Studio Code, Sublime Text, Vim and Neovim, Emacs, GitHub Actions, Jenkins, Ruff, and Flake8. The project also publishes container images for amd64, arm64, armv7, and armv8, and says they are signed with Sigstore Cosign. Bandit runs on Linux and macOS and can be self-hosted. It is licensed under Apache License 2.0; support links include a GitHub issue tracker and Discord community. The free plan is free.
Who it suits
Bandit suits developers and teams looking to scan Python code for common security issues. Its editor, pre-commit, and CI integrations can fit into development workflows.
Good to know, and what to watch
- Scans Python source for common security issues.
- Supports JSON baselines for known findings.
- Integrates with editors and CI tools.
- Offers container images for four architectures.
- Focused on Python code.
- Optional capabilities require installation extras.
Plans
Every plan and priceBandit
Free
Free plan
The verdict
Bandit provides a focused way to identify common security issues in Python source and produce reports. Its baseline and documented integrations offer ways to fit scans into existing workflows.
What the maker publishes
- Baseline
- A JSON baseline report can be used to ignore known findings considered non-issues. source
- Baselines
- Bandit can compare a scan with a JSON baseline report to suppress known findings. source
- Community listing rating
- HelloGitHub shows 0 ratings for the PyCQA/bandit repository. source
- Configuration
- Optional installation extras provide TOML support, the bandit-baseline CLI, and SARIF output formatting. source
- Configuration
- Configuration files can select or skip tests, change plugin settings, exclude paths, and define profiles. source
- Container
- The project publishes a container image on ghcr.io for amd64, arm64, armv7, and armv8 architectures. source
- Container
- Official container images are published on ghcr.io for amd64, arm64, armv7, and armv8. source
- Documentation depth
- The documentation site includes getting started, configuration, integrations, plugin references, formatter references, CI/CD guidance, FAQs, and API modules. source
- Formatter extensibility
- Report formatters are themselves plugins and additional formatter entry points can be registered through setuptools or pbr. source
- GitHub Action
- The official GitHub Action supports Python version, profile, tests, skips, severity, confidence, exclusions, baseline, ini, and target inputs. source
- Image verification
- The project says every container image is signed with Sigstore Cosign and provides a command to verify its source of origin. source
- Installation
- Bandit is distributed on PyPI and the documentation recommends installing it with pip. source
- Installation
- The documented primary installation method is pip, with optional extras for TOML, baseline, and SARIF support. source
- Integrations
- The documentation lists integrations for Visual Studio Code, Sublime Text, Vim/Neovim, Emacs, GitHub Actions, Jenkins, Ruff, and Flake8. source
- Integrations
- Official integration documentation lists VS Code, Sublime Text, Vim/Neovim, Emacs, GitHub Actions, Jenkins, Ruff, and Flake8. source
- Intended use
- The project describes Bandit as a security linter for Python code. source
- License
- The documentation identifies the Bandit library license as Apache License 2.0. source
- License
- The project is distributed under the Apache License 2.0. source
- Limit: no platform governance
- Independent guidance describes Bandit as a local CLI without centralized dashboards, policy management, or cross-project reporting. source
- Limit: Python-only scope
- Independent reviews identify the Python-only, source-pattern focus as a limitation for polyglot repositories. source
- Limit: shallow analysis
- Independent guidance says Bandit cannot follow dynamic behavior or provide deep interprocedural dataflow analysis. source
- Maker structure
- PyCQA expands to Python Code Quality Authority and is described by its own documentation as a loose organization of project maintainers. source
- Operating systems
- PyPI classifies the package for macOS and POSIX/Linux environments. source
- Plugin extensibility
- Third-party test plugins are registered through bandit.plugins entry points and receive a context object and AST node. source
Checked against the maker's pages on 21 Oct 2026.