Skip to content
THREATWIRE

Bandit

Security linter for Python code

Static analyser from the PyCQA that builds an AST of each Python file and runs plugins to flag common security issues.

Open sourceApache-2.0
Alternative toVeracodeCheckmarx One
Homepage of Bandit
Official website (bandit.readthedocs.io), captured by ThreatWire.

What Bandit does

Bandit parses Python source into an abstract syntax tree and runs a set of plugins against it, flagging issues such as use of insecure functions, weak cryptography, hard-coded passwords and unsafe deserialisation. Findings come with a severity and a confidence level.

It is maintained by the Python Code Quality Authority and is easy to drop into pre-commit hooks and CI pipelines.

Key features

  • AST-based checks for common Python security issues
  • Severity and confidence ratings
  • Baseline files to track only new issues
  • Configuration via pyproject.toml or YAML
  • SARIF, JSON and other report formats

Licence

Apache-2.0 · Apache License 2.0 · Open source

Checked by ThreatWire against the repository's licence file on 2026-10-20. GitHub detects: Apache-2.0.

Security of Bandit itself

No published advisory found for Bandit in GitHub repository advisories and OSV.dev. That does not mean the tool has no vulnerabilities.

Sources: GitHub repository advisories, OSV.dev · checked 2026-10-20.

Categories and tags

Static code analysis (SAST)#python#static-analysis#ci#pycqa#linter#bandit#security-tools#security-scanner#security#static-code-analysis

Related tools

  • Semgrep

    Lightweight, pattern-based static analysis

    Fast static analysis engine where rules look like the code they match, supporting many languages; the open-source Community Edition runs locally and in CI.

    Stars
    17k
    Forks
    1.1k
    Last commit
    5 days ago
    LGPL-2.1-onlyOpen sourceStatic code analysis (SAST)
    Alternative toVeracodeCheckmarx One+1
  • gosec

    Security checker for Go source code

    Inspects Go source code through its AST and SSA representation to find security problems such as injection, weak crypto and unsafe file handling.

    Stars
    9k
    Forks
    722
    Last commit
    today
    Apache-2.0Open sourceStatic code analysis (SAST)
    Alternative toVeracodeCheckmarx One
  • Slither

    Static analyser for Solidity and Vyper

    Trail of Bits' static analysis framework for Solidity and Vyper with dozens of vulnerability detectors, printers and an API for custom analyses.

    Stars
    6.4k
    Forks
    1.2k
    Last commit
    2 months ago
    AGPL-3.0-onlyOpen sourceSmart contract security
  • Aderyn

    Rust-based Solidity static analyser

    Cyfrin's static analyser for Solidity written in Rust, with detectors, Markdown audit-style reports and editor integration.

    Stars
    797
    Forks
    121
    Last commit
    5 months ago
    GPL-3.0-onlyOpen sourceSmart contract security
Share on X@threatwire_https://www.threatwire.tech/tools/bandit