← ClaudeAtlas

fix-security-failureslisted

Fix pip-audit security vulnerability failures. Use when CI fails due to pip-audit findings (CVE/GHSA). Handles both fixable and unfixable (upstream-only) vulnerabilities with graceful exit.
VectorInstitute/aieng-bot · ★ 0 · AI & Automation · score 68
Install: claude install-skill VectorInstitute/aieng-bot
# Fix Security Failures (pip-audit) ## Step 1: Parse the Vulnerability Report Search the failure logs for pip-audit findings: ```bash grep -i "CVE-\|GHSA-\|vulnerability\|Found.*vulnerability\|pip-audit" .failure-logs.txt | head -100 ``` Extract for each finding: - **Package name** (e.g., `requests`) - **Installed version** (e.g., `2.28.0`) - **Vulnerability ID** (e.g., `GHSA-xxxx-xxxx-xxxx` or `CVE-2024-xxxxx`) - **Fix version** if listed (pip-audit often states `Fix versions: X.Y.Z`) pip-audit output format to recognize: ``` requests 2.28.0 GHSA-xxxx Fix versions: 2.31.0 filelock 3.12.0 CVE-2024-x Fix versions: (none) ``` ## Step 2: For Each Vulnerable Package — Check PyPI for a Patched Version ### 2a. If pip-audit already lists fix versions Use those directly — skip to Step 3. ### 2b. If no fix version is listed, check PyPI ```bash # Check all available versions on PyPI pip index versions <package-name> 2>/dev/null | head -5 # Or query the PyPI JSON API directly curl -s "https://pypi.org/pypi/<package-name>/json" | python3 -c " import sys, json data = json.load(sys.stdin) versions = sorted(data['releases'].keys()) print('Available versions:', versions[-10:]) print('Latest:', data['info']['version']) " ``` ### 2c. Determine if a patch exists A patch exists if there is **any published version higher than the installed version** that is NOT listed in the vulnerability's `fixed_in` exclusions. **No patch exists** if: - pip-audit explicitly states `Fix ve