# Bandit

> A security linter for Python code

Source: https://talira.ai/catalog/bandit-1x0tdn1g
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [security / static analysis](https://talira.ai/categories/security/static-analysis)
- Platforms: linux, macos, windows[^3]
- Licence: Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source.
- Free tier: yes[^1]
- Plugins: yes[^2]
- Backed by: [PyCQA](https://talira.ai/orgs/pycqa.md)

Bandit finds common security issues in Python code: it builds an abstract syntax tree from each file, runs plugins against its nodes (hard-coded passwords, shell injection, insecure use of pickle, yaml.load, weak cryptography, SQL built from strings and more) and writes a report with each issue's severity and confidence. It runs from the command line, in pre-commit and in CI, can be configured to skip tests or files, and outputs text, JSON, SARIF and other formats. It began in the OpenStack Security Project and is now maintained by PyCQA.

## Links

- GitHub: https://github.com/PyCQA/bandit
- Docs: https://bandit.readthedocs.io/

## Problems it solves

- find security issues in my Python code before it ships
- flag hard-coded passwords and shell injection in a Python codebase
- add a Python security scan to CI
- a free static analysis tool for Python security

## Features

- AST-based security checks for Python
- severity and confidence for each issue
- plugins for common issue types
- configurable tests, skips and baselines
- runs in pre-commit and CI
- text, JSON, SARIF and other report formats

## Capabilities

- Has a command line tool: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.62 out of 1.
Signals: maintenance 0.64, adoption 0.78, momentum 0.58, community 0.92, backing 0.30, extensibility 0.40.

- last commit 14 days ago
- 6 commits in the last 90 days
- latest release 1.9.4 9 months ago
- 8.4k GitHub stars
- 197 contributors
- accepts sponsorship (Github, Custom, Tidelift)
- backed by PyCQA
- has a plugin system

## Alternatives

- [Semgrep](https://talira.ai/catalog/semgrep-v0kqhvdn.md): Code security: SAST, supply chain and secrets scanning with rules that look like code
- [CodeQL](https://talira.ai/catalog/codeql-8rqre4qe.md): GitHub's semantic code analysis engine for finding vulnerabilities
- [SonarQube](https://talira.ai/catalog/sonarqube-hv6cp5td.md): Code confidence for the agentic software factory
- [DeepSource](https://talira.ai/catalog/deepsource-fd2qg7dz.md): AI code review platform that combines static analysis with AI review agents
- [Bearer CLI](https://talira.ai/catalog/bearer-cli-4r29s52f.md): Code security scanning tool (SAST) to discover, filter and prioritize security and privacy risks
- [Codacy](https://talira.ai/catalog/codacy-s2xbtvn1.md): Code Quality & Security for AI-Assisted Engineering

## Sources

[^1]: https://github.com/PyCQA/bandit/blob/main/LICENSE (checked 24 Nov 2026)
[^2]: https://github.com/PyCQA/bandit (checked 24 Nov 2026)
[^3]: https://pypi.org/project/bandit/ (checked 24 Nov 2026)
