Packs / cybersecurity-public
dependency-advisory-match
Match a project's pinned Python dependencies against an offline OSV advisory export and list the vulnerable ones
Install
logicpacks pack use cybersecurity-public/dependency-advisory-matchget_pack cybersecurity-public/dependency-advisory-matchThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
local-pythonpip-audit - Checks: 1 in
outcome/checks.yaml - Code:
osv_match.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A list of our pinned packages that fall in an advisory's affected range, with the advisory id and the first fixed version, computed offline.
Verified by: Fixture: 3 pinned packages, 2 advisories; exactly the one package inside an affected range is reported with its fixed version.
Steps
- Pin dependencies (
pip freeze > requirements.txt). - Download advisories once (e.g.
curl -O https://osv-vulnerabilities.storage.googleapis.com/PyPI/all.zipand unzip to advisories/). - Run
python3 code/osv_match.py requirements.txt advisories/. - Upgrade to the fixed version, re-run tests. For an online check use
pip-auditif installed.
Edge cases
- Unpinned (>=) requirements are skipped with a note: pin first.
- Version comparison is numeric dotted; pre-release tags are compared as strings (approximation).
Don'ts
- Don't upgrade everything blindly; read the advisory and run tests.
- The check itself is offline; downloading the advisory feed is a separate, optional step.