pip-audit

PyPA

Audits installed Python packages against the Python Advisory Database.

Application & Supply Chain Free & Open Source CLI Learning Cross-platform

Cyber Kill Chain & Defender Lifecycle

Attacker — Kill Chain
1 Reconnaissance
2 Weaponization
3 Delivery
4 Exploitation
5 Installation
6 Command & Control
7 Actions on Objectives
Defender — IR Lifecycle
8 Preparation
9 Detection & Analysis
10 Containment, Eradication & Recovery
11 Post-Incident Activity

Description

pip-audit resolves the dependency tree and checks every package against PyPI's advisory database, reporting the CVE and the version that fixes it. Maintained by the Python Packaging Authority, which is what makes it the default choice over the alternatives.

It addresses OWASP A06: Vulnerable and Outdated Components — the category that needs no exploit skill at all, because the vulnerability arrives through a requirements.txt line nobody re-read.

Use cases

  • CI gate that fails on a known-vulnerable dependency
  • Auditing a requirements.txt inherited with a project
  • Producing the evidence trail for a dependency upgrade

Example

pip-audit --requirement requirements.txt --strict