# dependency-advisory-match

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

- **Space:** cybersecurity-public (https://github.com/Tech-Realm/space-cybersecurity-public/tree/main/dependency-advisory-match)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3
- **Routes:** local-python, pip-audit; checks: 1
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use cybersecurity-public/dependency-advisory-match` or MCP `get_pack cybersecurity-public/dependency-advisory-match`
- **Files:** CHANGELOG.md, code/osv_match.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/advisories/EXAMPLE-0001.json, outcome/fixtures/advisories/EXAMPLE-0002.json, outcome/fixtures/requirements.txt, outcome/results.json, pack.yaml, spec/SPEC.md, spec/source.md

## Purpose (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.



---

Canonical URL: https://logicpacks.io/packs/cybersecurity-public/dependency-advisory-match

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
