/penetration-tester:auditing-python-dependenciesfrom penetration-tester
Audits Python project dependencies for known CVEs using pip-audit, detecting vulnerable direct and transitive packages, with fallback to pip list --outdated.
Ships in penetration-tester. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
PyPI hosts north of 500,000 packages, with several thousand new
releases every day. The package-install model is identical to npm in
the relevant ways: a pip install resolves a transitive graph,
runs each package's setup.py (which executes arbitrary Python at
install time), and writes the result to your site-packages. The CVE
attack surface is therefore the same shape: known vulnerabilities,
maintainer-account takeovers, typosquats, and protestware.
The PyPA-blessed auditor is pip-audit. It queries the Open Source
Vulnerabilities (OSV) database (which mirrors PyPA's advisory feed
plus aggregated CVE / GHSA records) and reports per-package
vulnerable versions. pip-audit integrates with requirements.txt,
pyproject.toml, Pipfile.lock, and poetry.lock, so most Python
project layouts are first-class.
This skill wraps pip-audit, normalizes its severity vocabulary to
the shared Severity enum, and emits Findings in the canonical
penetration-tester schema. If pip-audit isn't installed on the
host, the skill falls back to pip list --outdated and emits
INFO-level findings recommending the operator install pip-audit
for accurate vulnerability detection.
| Finding | Severity | Threshold | Affected control |
|---|---|---|---|
| Critical CVE in installed package | CRITICAL | OSV severity band corresponds to CVSS ≥ 9.0 | CWE-1104 |
| High CVE in installed package | HIGH | OSV severity band corresponds to CVSS 7.0–8.9 | CWE-1104 |
| Medium CVE in installed package | MEDIUM | OSV severity band corresponds to CVSS 4.0–6.9 | CWE-1104 |
| Low CVE in installed package | LOW | OSV severity band corresponds to CVSS 0.1–3.9 | CWE-1104 |
| Vulnerable package with no patch | HIGH | finding has no fix_versions and severity ≥ medium | CWE-1395 |
| Outdated package (no CVE) | INFO | pip list --outdated reports a newer version | (operational) |
| pip-audit not installed | INFO | binary not on PATH; scanner fell back to pip list | (operational) |
| Audit DB unreachable | INFO | pip-audit network error reaching OSV | (operational) |
OSV is the upstream of record. pip-audit also consults the PyPA advisory database for Python-specific records that may not yet have a CVE assigned.
pip-audit installed (pip install pip-audit); skill falls back
to pip list --outdated if absentrequirements.txt,
pyproject.toml, Pipfile.lock, poetry.lockapi.osv.dev) and PyPI (pypi.org)Locate the project directory. The scanner auto-detects requirement files in order of preference:
poetry.lock (most precise — exact resolved tree)Pipfile.lockrequirements.txt (and requirements-*.txt siblings)pyproject.toml (PEP 621 dependencies)pip list (last resort)python3 ./scripts/audit_python.py /path/to/python-project
Options:
Usage: audit_python.py PATH [OPTIONS]
Options:
--output FILE Write findings to FILE (default: stdout)
--format FMT json | jsonl | markdown (default: markdown)
--min-severity SEV (default: info)
--requirement FILE Override auto-detection; specify a particular
requirements file (repeatable)
--include-dev Include development dependencies (default: prod
only when project layout allows the distinction)
--strict Treat pip-audit warnings as errors
CRITICAL / HIGH = block release.
MEDIUM / LOW = track but don't block; many Python advisories report edge-case theoretical issues that don't apply to your usage.
INFO = log only; e.g. "outdated but no known CVE" is information for your release cadence, not a security action.
For a vulnerable package with fix_versions:
Bump the version pin in your requirements file:
- requests==2.20.0
+ requests==2.31.0
Run pip install -r requirements.txt --upgrade (or
poetry lock --no-update && poetry update <pkg>).
Run the test suite. CVE fixes occasionally include behavioral changes you didn't expect.
Commit the lock file diff alongside the requirements bump.
For a vulnerable transitive dep (one you didn't declare directly):
Find the parent: pip show <vulnerable-package> lists the parents
in its "Required-by" line.
Check whether bumping the parent picks up the fix. pip index versions <parent> lists available versions.
If parent doesn't have a newer release that floors the vulnerable dep above the fix version, pin the transitive dep yourself in your requirements file. pip will use the more specific pin.
For a vulnerable package with NO fix available:
Subscribe to PyPA advisory notifications for that package.
If the vulnerability is exploitable in your usage, either replace the package or vendor + patch locally.
Document the exception in your security register with a re-evaluation date.
python3 ./scripts/audit_python.py . --min-severity high --format json --output audit.json
jq -e '. == []' audit.json || { echo "High/critical Python CVE — fix before merge"; exit 1; }
- name: pip-audit
run: pip install pip-audit
- name: Run audit
run: |
python3 plugins/security/penetration-tester/skills/auditing-python-dependencies/scripts/audit_python.py \
. --min-severity high --format markdown --output py-audit.md
mkdir -p evidence/CC7/
python3 ./scripts/audit_python.py . --include-dev --format json \
--output evidence/CC7/py-audit-$(date +%Y%m%d).json
--include-dev for SOC2: include dev/test deps so auditors see the
full surface, not just production.
JSON / JSONL / Markdown per lib/report.py. Exit codes: 0 clean, 1
high/critical, 2 error.
Each Finding includes:
id — synthesized as pypi-audit::<cve-id> (or pypi-audit::<ghsa> / pypi-audit::<pypa-id> when no CVE)severity — CRITICAL / HIGH / MEDIUM / LOW / INFOcategory — dependency-vulnerabilitysummary — short CVE / GHSA titleevidence — affected package, affected version, fix versions, advisory IDreferences — OSV URL, CVE URL, PyPA advisory URLpip list --outdated,
emits an INFO Finding flagging the degraded scan, and proceeds.references/THEORY.md — PyPI supply-chain history, OSV vs NVD vs
PyPA advisory scopes, why ecosystem-specific severity matters,
Python-specific install-time risks (setup.py execution, eager
dependency resolution), pip-audit vs Safety vs Snyk trade-offsreferences/PLAYBOOK.md — Per-toolchain remediation patterns
(pip + requirements.txt, poetry, pipenv, uv, conda), monorepo /
workspace scanning, override-equivalent patterns in Python
ecosystem, GitHub Dependabot ecosystem mapping, SOC2 evidence
retentionWhat SKILL.md sets; muted values are Claude Code's defaults
26 skills in this plugin
/analyzing-tls-configAnalyze a target's TLS configuration — negotiated protocol version, cipher
suite, certificate chain, expiry, and downgrade vectors.
Use when: SOC2 auditor flagged your endpoint for "weak TLS" but you don't
know which control failed (TSC CC6.7 transmission integrity vs CC6.6
encryption) or which cipher is the problem.
Threshold: any negotiated TLSv1.0 or TLSv1.1, OR a cipher with RC4 / 3DES /
null / EXPORT, OR a cert with under 30 days to expiry, OR a chain that fails
hostname verification.
Trigger with: "audit tls", "check ssl config", "weak tls", "analyze tls".
/auditing-cors-policyAudit a target's CORS posture — Access-Control-Allow-Origin handling,
reflected-origin bypass, credentials+wildcard mismatch, preflight
OPTIONS behavior, Vary header correctness.
Use when: a third-party integration is failing CORS preflight and
someone proposes "just set Allow-Origin to *" as the fix, OR your
bug-bounty inbox has a credential-reuse exploit chain.
Threshold: any reflection of arbitrary Origin into Allow-Origin,
Allow-Credentials:true with wildcard origin (browser-rejected combo
but server config wrong), missing Vary:Origin on per-origin responses,
preflight cached over 86400s, OR Allow-Origin trust of attacker-
controlled subdomain pattern.
Trigger with: "audit cors", "check cors policy", "cors bypass",
"preflight check".
/auditing-npm-dependenciesAudit a Node.js project's installed npm dependency tree for known
CVEs by wrapping the npm audit JSON output and emitting findings in
the canonical penetration-tester schema. Detects direct AND transitive
vulnerabilities, normalizes npm's severity scale (info/low/moderate/
high/critical) to the shared Severity enum, and parses both v1 and
v2 audit output formats so the skill works against npm 6 and npm
7+ lockfiles.
Use when: pre-merge gate on a Node project, post-incident sweep
after a transitive package compromise (e.g. event-stream, ua-parser,
node-ipc, color.js), SOC2 vendor-management evidence collection,
or auditing an inherited or acquired Node codebase.
Threshold: any HIGH or CRITICAL CVE in the resolved dependency
tree. MODERATE / LOW reported informationally.
Trigger with: "audit npm deps", "npm vulnerability scan", "check
node packages for CVEs", "npm audit".
/checking-http-security-headersAudit a target's HTTP security headers — CSP, HSTS, X-Frame-Options,
X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and the
Cross-Origin trio (COOP, COEP, CORP).
Use when: SOC2 / PCI auditor flagged "missing security headers" or a
Mozilla Observatory grade is below B, OR you need HSTS preload
eligibility for chrome://net-internals.
Threshold: any missing required header on production HTML response,
HSTS max-age below 31536000s (preload requirement), CSP with
'unsafe-inline' or 'unsafe-eval', X-Frame-Options absent AND CSP
frame-ancestors absent (clickjacking), Cache-Control allowing public
cache on authenticated endpoint.
Trigger with: "audit security headers", "check csp", "hsts check",
"header posture".
/checking-license-complianceAudit a project's dependency licenses against an explicit policy
(allow-list / deny-list / review-required) and flag incompatibilities
before they ship to production. Reads SPDX license identifiers from
npm package manifests, Python METADATA / PKG-INFO files, and
pyproject.toml; classifies each license by family (permissive,
weak-copyleft, strong-copyleft, proprietary, unknown); detects
copyleft contamination and SPDX-incompatible license combinations.
Use when: pre-release legal review, M&A code-audit due diligence,
preparing an OSS attribution NOTICE file, or switching a project's
own license.
Threshold: any GPL-family license in a project declaring MIT or
Apache-2.0; any UNKNOWN-license package; any metadata-vs-source
license mismatch.
Trigger with: "check licenses", "license compliance audit",
"SPDX scan", "GPL contamination check".
/composing-vulnerability-reportRead findings JSONL files from cluster 1-4 skills, deduplicate
by fingerprint, group by severity, and compose a deliverable-
grade markdown vulnerability report with per-finding sections
(title, severity, target, detail, remediation, evidence) and a
top-level summary table. The canonical written artifact a customer
receives at engagement close; precise, reproducible, machine-
checkable against source findings.
Use when: closing an engagement, generating an interim report,
regenerating after CVE or OWASP enrichment, or producing the
input for generating-executive-summary.
Threshold: findings missing required fields are dropped. HIGH
and CRITICAL findings highlighted in the summary section.
Trigger with: "compose vuln report", "write pentest report",
"generate vulnerability deliverable", "render findings to report".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin penetration-testerOther plugins' skills for the same job