Skip to content

Packs / cybersecurity-public

dependency-advisory-match

Match a project's pinned Python dependencies against an offline OSV advisory export and list the vulnerable ones

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-cybersecurity-public

Install

logicpacks pack use cybersecurity-public/dependency-advisory-match
get_pack cybersecurity-public/dependency-advisory-match

The 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

  1. Pin dependencies (pip freeze > requirements.txt).
  2. Download advisories once (e.g. curl -O https://osv-vulnerabilities.storage.googleapis.com/PyPI/all.zip and unzip to advisories/).
  3. Run python3 code/osv_match.py requirements.txt advisories/.
  4. Upgrade to the fixed version, re-run tests. For an online check use pip-audit if 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.