cve-repo — Source Repository Resolver
Goal: find the repository that CONTAINS the vulnerable code at a checkable version. Not PoC repos, not advisory databases.
Step 1: Run resolver script
python3 ${CLAUDE_SKILL_DIR}/../../scripts/resolve.py $ARGUMENTS
Output: JSON array. Each record contains:
cve_id,repo_url,repo_type(github|gitlab|bitbucket|wordpress|null)confidence:high|medium|low|none|closed-source|errorsource:ref-project|ghsa-api|known-mapping|desc-known-mapping|vendor-product|wp-slug|description|ref-ambiguous|known-closed-source|nullaffected_versions: version constraints from CVE data (e.g.["<= 2.4.2", "< 2.11.0"])vulnerable_tag: git tag of the latest affected version (checkout target for reproduction)fix_commit: SHA of the patch commit (from GHSA or reference URLs)pre_fix_commit: parent of fix commit (alternative checkout target containing the vulnerability)candidates: all candidate repos found (including rejected report repos)needs_agent:truewhen script could not resolve with high/medium confidencehints: vendor, product, versions, description snippet (whenneeds_agentis true)
Script resolution layers (in order):
- L1 ref-project: commit, PR, release, security advisory URLs →
high - L2 ghsa-api: GHSA advisory ID →
gh api→ source_code_location + fix commit →high - L3 known-mapping: vendor/product → hardcoded table (Magento, PrestaShop, etc.) →
high - L3b desc-known-mapping: description keywords → known repo (when vendor/product are n/a) →
high - L4 vendor-product: vendor/product → GitHub HEAD check →
medium - L4.5 wp-slug: product name → WordPress SVN slug → HEAD check →
medium - L5 description: project name from description → GitHub HEAD check →
low
Post-resolution:
- Tag resolution: maps
affected_versions→ actual git tags viagh apiwith--paginate - Fix commit: extracted from GHSA advisory or commit URLs in references
- Pre-fix commit: parent of fix commit via GitHub API
Report/PoC repos (containing PoC, exploit, CVE-, CVEs, vulnerability in name) are classified as ref-report and excluded. Known closed-source products (SAP Commerce Cloud, Bdtask Bhojon) return confidence: closed-source.
Step 2: Agent fallback
Process only records where needs_agent is true.
For confidence: low (ambiguous or description-inferred)
- Review
hints.description_snippetto understand the vulnerable product. - Search:
"{hints.vendor}" "{hints.product}" site:github.comvia WebSearch. - If WordPress plugin, also search:
"{hints.product}" wordpress.org plugin. - Verify the found repo matches the CVE description.
For confidence: none (no repo found)
- Search:
"{hints.vendor}" "{hints.product}" source code repositoryvia WebSearch. - Try platform-specific: GitHub, GitLab, Packagist, WordPress.org, SourceForge.
- If
hints.versionsavailable, verify the repo has matching tags/releases. - Check if the product is closed-source (no public repo exists).
Report format for agent-resolved repos:
Mark as confidence: agent in the output.
If confirmed closed-source with no public repo: report confidence: closed-source.
Step 3: Present results
For each CVE:
## {cve_id}
- **Repo**: {repo_url}
- **Type**: {repo_type}
- **Confidence**: {confidence} ({source})
- **Affected versions**: {affected_versions joined}
- **Vulnerable tag**: {vulnerable_tag} (checkout target)
- **Fix commit**: {fix_commit}
- **Pre-fix commit**: {pre_fix_commit}
- **Candidates**: {count} found
Step 4: Summary table
| CVE ID | Repo URL | Confidence | Vulnerable Tag | Fix Commit | Pre-fix Commit |