# PyCQA/bandit

Bandit is a tool designed to find common security issues in Python code.

Repository: https://github.com/PyCQA/bandit
Canonical: https://ross.abutalabs.com/products/bandit
Homepage: https://bandit.readthedocs.io
Language: Python
License: Apache-2.0
License Family: permissive
Topics: linter, bandit, security-tools, security-scanner, security, static-code-analysis, python
Last push: 2026-08-24T11:13:47+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 60, longevity 100
- inputs: {"age_days": 3051, "days_push": 9, "days_rel": 189, "gap_med": 36.0, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8242, forks 827 (observed 2026-08-28T04:10:19.814845+00:00)

## What it is
Bandit is a security-oriented static analysis tool that finds common security issues in Python code. It parses each file into an AST, runs plugin checks against the AST nodes, and generates a report of findings.

## Use cases
- scan python code for security vulnerabilities
- find hardcoded passwords and insecure function calls in python
- add security linting to a ci pipeline
- detect use of insecure libraries like pickle or md5 in python code
- run static security analysis before code review
- audit python project for common security mistakes

## When to choose
- you want automated, AST-based detection of common Python security anti-patterns
- you need a lightweight security scanner that integrates into CI/CD
- you want a plugin-extensible linter focused on security rather than style

## When to avoid
- you need dynamic analysis or runtime vulnerability detection
- you need dependency vulnerability scanning (use pip-audit or safety instead)
- you need general-purpose style or type linting (use flake8, ruff, or mypy)

## Facets
- artifact type: cli-tool
- maturity: active
- function: linter, security, vulnerability-scanning, ci-cd
- domain: security, developer-tools
- platform: python, cli, cross-platform
- tags: static-analysis, security-scanner, ast-based, code-quality, sast, static-code-analysis, python, docker

## Member repositories
- PyCQA/bandit (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:19.814845+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:29:29.270376+00:00, confidence not recorded.
  - readme: https://github.com/PyCQA/bandit (fetched 2026-08-28T04:10:19.814845+00:00, sha 92a589ff8175)
  - homepage: https://bandit.readthedocs.io (fetched 2026-08-29T08:27:56.916788+00:00, sha 49d0e06351fe)
  - registry_pypi: https://pypi.org/pypi/bandit/json (fetched 2026-08-29T08:27:56.925831+00:00, sha 2d77bcd570bc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
