Agent skill

Auditing Python Dependencies

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Audit a Python project's installed dependencies for known CVEs by wrapping pip-audit (PyPA's official vulnerability auditor) and emitting findings in the canonical penetration-tester schema.

MITAuto-check: notesSecurity

Install Auditing Python Dependencies

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill auditing-python-dependencies -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace auditing-python-dependencies --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/auditing-python-dependencies .claude/skills/auditing-python-dependencies && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
auditing-python-dependencies
GitHub stars
2.8k
Token cost
~2.3k tokens
SKILL.md length
831 words
Files
4 (incl. scripts, references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Audit a Python project's installed dependencies for known CVEs by wrapping pip-audit (PyPA's official vulnerability auditor) and emitting findings in the canonical penetration-tester schema.

  • Works in 4 steps: Identify the scan target → Run the audit → Interpret findings → …
  • : pre-merge gate on a Python project
  • SKILL.md covers Overview, When the skill produces findings, Prerequisites and Instructions, plus 4 more sections
  • Runs Python scripts from its folder; calls pip, python3 and poetry

What it does

Auditing Python Dependencies is an agent skill from jeremylongshore/tons-of-skills-marketplace. Audit a Python project's installed dependencies for known CVEs by wrapping pip-audit (PyPA's official vulnerability auditor) and emitting findings in the canonical penetration-tester schema. Detects vulnerable direct AND transitive packages, normalizes pip-audit's severity output via OSV severity bands, falls back to pip list --outdated when pip-audit isn't installed, and supports requirements.txt, pyproject.toml (PEP 621), Pipfile.lock, and poetry.lock as input sources. Use when: pre-merge gate on a Python…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/PLAYBOOK.md`, `references/THEORY.md` and `scripts/audit_python.py`). Compatibility notes: Designed for Claude Code

It sits in Security, covering Vulnerability scanning, Digital forensics and SOC 2 and security compliance. It works with Python. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • : pre-merge gate on a Python project
  • Post-incident sweep after a PyPI compromise (e.g
  • With: audit python deps
  • Pip vulnerability scan

Example prompts

  • “s installed dependencies for known CVEs by wrapping pip-audit (PyPA”
  • “audit python deps”
  • “pip vulnerability scan”
  • “/auditing-python-dependencies”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Bash(pip:*), Bash(pip-audit:*), Bash(python3:*), Glob

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Identify the scan target
  2. Run the audit
  3. Interpret findings
  4. Remediation

What it can do on your machine

Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash(pip:*)
    • Bash(pip-audit:*)
    • Bash(python3:*)
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • python3
    • poetry
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Auditing Python Dependencies loads about 2.3k tokens when it runs, and up to ~5.1k if it reads all its reference files. Until then it costs about 239 tokens; SKILL.md has 831 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~239
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:30
    - Write(.env)
  • NoteMentions a .env fileSKILL.md:31
    - Edit(.env)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 831 words, ~2,274 tokens.

Download SKILL.mdSave it as .claude/skills/auditing-python-dependencies/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
auditing-python-dependencies
description
Audit a Python project's installed dependencies for known CVEs by wrapping pip-audit (PyPA's official vulnerability auditor) and emitting findings in the canonical penetration-tester schema. Detects vulnerable direct AND transitive packages, normalizes pip-audit's severity output via OSV severity bands, falls back to pip list --outdated when pip-audit isn't installed, and supports requirements.txt, pyproject.toml (PEP 621), Pipfile.lock, and poetry.lock as input sources. Use when: pre-merge gate on a Python project, post-incident sweep after a PyPI compromise (e.g. ctx, request-toolbelt typosquats, ultralytics 8.3.42 compromise), SOC2 evidence collection, or inheriting an unfamiliar Python codebase. Threshold: any HIGH or CRITICAL CVE in the resolved dependency tree. MODERATE / LOW reported informationally. Trigger with: "audit python deps", "pip vulnerability scan", "check pypi packages for CVEs", "pip-audit run".
allowed-tools
Read, Bash(pip:*), Bash(pip-audit:*), Bash(python3:*), Glob
compatibility
Designed for Claude Code
disallowed-tools
Bash(rm:*), Bash(curl:*), Bash(wget:*), Write(.env), Edit(.env), Bash(pip install:*), Bash(pip uninstall:*)
version
3.30.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
security, dependency-audit, python, pypi, cve, pentest

Auditing Python Dependencies

Overview

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.

When the skill produces findings

FindingSeverityThresholdAffected control
Critical CVE in installed packageCRITICALOSV severity band corresponds to CVSS ≥ 9.0CWE-1104
High CVE in installed packageHIGHOSV severity band corresponds to CVSS 7.0–8.9CWE-1104
Medium CVE in installed packageMEDIUMOSV severity band corresponds to CVSS 4.0–6.9CWE-1104
Low CVE in installed packageLOWOSV severity band corresponds to CVSS 0.1–3.9CWE-1104
Vulnerable package with no patchHIGHfinding has no fix_versions and severity ≥ mediumCWE-1395
Outdated package (no CVE)INFOpip list --outdated reports a newer version(operational)
pip-audit not installedINFObinary not on PATH; scanner fell back to pip list(operational)
Audit DB unreachableINFOpip-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.

Prerequisites

  • Python 3.9+
  • pip-audit installed (pip install pip-audit); skill falls back to pip list --outdated if absent
  • Target project containing at minimum one of: requirements.txt, pyproject.toml, Pipfile.lock, poetry.lock
  • Network access to OSV (api.osv.dev) and PyPI (pypi.org)

Instructions

Step 1 — Identify the scan target

Locate the project directory. The scanner auto-detects requirement files in order of preference:

  1. poetry.lock (most precise — exact resolved tree)
  2. Pipfile.lock
  3. requirements.txt (and requirements-*.txt siblings)
  4. pyproject.toml (PEP 621 dependencies)
  5. Installed environment via pip list (last resort)
Step 2 — Run the audit
bash
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
Step 3 — Interpret findings

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.

Show full SKILL.md (396 more words)Show less
Step 4 — Remediation

For a vulnerable package with fix_versions:

  1. Bump the version pin in your requirements file:

    diff
    - requests==2.20.0
    + requests==2.31.0
  2. Run pip install -r requirements.txt --upgrade (or poetry lock --no-update && poetry update <pkg>).

  3. Run the test suite. CVE fixes occasionally include behavioral changes you didn't expect.

  4. Commit the lock file diff alongside the requirements bump.

For a vulnerable transitive dep (one you didn't declare directly):

  1. Find the parent: pip show <vulnerable-package> lists the parents in its "Required-by" line.

  2. Check whether bumping the parent picks up the fix. pip index versions <parent> lists available versions.

  3. 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:

  1. Subscribe to PyPA advisory notifications for that package.

  2. If the vulnerability is exploitable in your usage, either replace the package or vendor + patch locally.

  3. Document the exception in your security register with a re-evaluation date.

Examples

Example 1 — Pre-merge gate
bash
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; }
Example 2 — CI scan on every push
yaml
- 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
Example 3 — SOC2 evidence collection
bash
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.

Output

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 / INFO
  • category — dependency-vulnerability
  • summary — short CVE / GHSA title
  • evidence — affected package, affected version, fix versions, advisory ID
  • references — OSV URL, CVE URL, PyPA advisory URL

Error Handling

  • pip-audit not installed → falls back to pip list --outdated, emits an INFO Finding flagging the degraded scan, and proceeds.
  • No requirement file found → emits an INFO Finding "no Python project structure recognized" and exits 2.
  • OSV API unreachable → emits an INFO Finding documenting the outage and exits 0 (no actionable security finding).
  • pip-audit returns malformed JSON → emits an INFO Finding with the raw output truncated to 500 chars and exits 2.

Resources

  • 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-offs
  • references/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 retention

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/.curated/auditing-python-dependencies of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/PLAYBOOK.md
  • references/THEORY.md
  • scripts/audit_python.py

Open the folder on GitHubat commit 23ea8d4

Compare with similar skills

Auditing Python Dependencies next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Auditing Python Dependencies compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Auditing Python Dependencies this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.3kAutomated safety check: NotesMIT
Senior Secopsborghei/Claude-Skills881—~1.7kAutomated safety check: PassMIT
Security Auditoreigent-ai/eigent15k—~1.8kAutomated safety check: NotesApache-2.0
CodeQL Security Scantrailofbits/skills7.4k—~4.6kAutomated safety check: NotesCC-BY-SA-4.0
Vulners API Python SDKvulnersCom/api375—~2.3kAutomated safety check: PassMIT
Security Verification Gatefengshao1227/ccg-workflow5.9k—~621Automated safety check: NotesMIT

Similar skills

  • Senior Secops

    borghei/Claude-Skills

    SecOps for application security, vulnerability management, compliance, and secure development.

    881 GitHub stars~1.7k tokensUpdated yesterday
    SecurityAuto-check passed
  • Security Auditor

    eigent-ai/eigent

    Audits source code, dependencies and config files for vulnerabilities and hardcoded secrets, using two bundled Python scanners and an OWASP Top 10 checklist.

    15k GitHub stars~1.8k tokensUpdated today
    SecurityAuto-check: notes
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated yesterday
    SecurityAuto-check: notes
  • A skill your agent uses when modifying, testing, documenting, or reviewing the Vulners Python SDK.

    375 GitHub stars~2.3k tokensUpdated 9 days ago
    SecurityAuto-check passed
  • Security Verification Gate

    fengshao1227/ccg-workflow

    Scans code with a bundled Node script for injection, secrets, XSS and other risky patterns, ranks findings by severity and checks that security decisions are documented.

    5.9k GitHub stars~621 tokensUpdated 23 days ago
    SecurityAuto-check: notes
  • Pyspector Security Audit

    ParzivalHack/PySpector

    Run a full Python codebase security audit using PySpector (https://github.com/ParzivalHack/PySpector), a Rust-core SAST scanner.

    151 GitHub stars~3.5k tokensUpdated yesterday
    SecurityAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Analyzing Text With NLP

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.

    2.8k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • Building Neural Networks

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Detecting Data Anomalies

    jeremylongshore/tons-of-skills-marketplace

    Process identify anomalies and outliers in datasets using machine learning algorithms.

    2.8k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Explaining Machine Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Optimizing Prompts

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Works with

Categories

Questions about Auditing Python Dependencies

What does Auditing Python Dependencies do?

Audit a Python project's installed dependencies for known CVEs by wrapping pip-audit (PyPA's official vulnerability auditor) and emitting findings in the canonical penetration-tester schema. Auditing Python Dependencies is an agent skill from jeremylongshore/tons-of-skills-marketplace. Audit a Python project's installed dependencies for known CVEs by wrapping pip-audit (PyPA's official vulnerability auditor) and emitting findings in the canonical penetration-tester schema.

When should I use Auditing Python Dependencies?

Auditing Python Dependencies fits situations like: : pre-merge gate on a Python project; post-incident sweep after a PyPI compromise (e.g; with: audit python deps; pip vulnerability scan.

How do I install Auditing Python Dependencies in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill auditing-python-dependencies -a claude-code`. Or copy the skill folder (skills/.curated/auditing-python-dependencies in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/auditing-python-dependencies in your project. Claude Code loads it when a task matches its description.

How do I install Auditing Python Dependencies in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill auditing-python-dependencies -a codex`. Or copy the skill folder (skills/.curated/auditing-python-dependencies in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/auditing-python-dependencies in your project. Codex loads it when a task matches its description.

Can I use Auditing Python Dependencies in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill auditing-python-dependencies -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/auditing-python-dependencies, .gemini/skills/auditing-python-dependencies, .github/skills/auditing-python-dependencies and .opencode/skills/auditing-python-dependencies in your project.

What does Auditing Python Dependencies need to run?

Going by SKILL.md and its folder, Auditing Python Dependencies needs Python for the scripts in its folder and the command-line tools its instructions call (pip, python3, poetry and jq). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Bash(pip:*), Bash(pip-audit:*), Bash(python3:*), Glob. Compatibility (from SKILL.md): Designed for Claude Code.

Does Auditing Python Dependencies access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Auditing Python Dependencies safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Auditing Python Dependencies use?

Auditing Python Dependencies is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Auditing Python Dependencies use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.8k tokens, read only when the agent opens those files.

What are the alternatives to Auditing Python Dependencies?

Skills that share tags, products or a category with Auditing Python Dependencies: Senior Secops (borghei/Claude-Skills, 881 stars), Security Auditor (eigent-ai/eigent, 15k stars), CodeQL Security Scan (trailofbits/skills, 7.4k stars) and Vulners API Python SDK (vulnersCom/api, 375 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Auditing Python Dependencies?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.