arabelatso/time-aware-dependency-cve-scanner
Scan repositories for newly disclosed CVEs in dependencies after a specific cutoff date. Takes a repository path, cutoff date (YYYY-MM-DD), and optional parameters for transitive dependencies. Parses dependency manifests (package.json, pom.xml, requirements.txt, go.mod, Cargo.toml) and lockfiles to extract exact versions. Queries vulnerability databases (OSV.dev, NVD, GitHub Advisory) to identify CVEs disclosed strictly after the cutoff date. Distinguishes between newly disclosed CVEs and previously known CVEs. Use when: (1) Performing security audits to find new vulnerabilities since last review, (2) Checking if new CVEs affect a historical codebase version, (3) Generating compliance reports showing vulnerability status at specific dates, (4) Tracking security posture changes over time. Supports npm, Maven, pip, Go modules, Cargo, and other major ecosystems.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill time-aware-dependency-cve-scanner
Scan repositories for newly disclosed CVEs affecting dependencies after a specific cutoff date. This skill helps track when vulnerabilities were introduced and distinguish between pre-existing and newly disclosed security issues.
Basic scan:
python scripts/scan_repository.py /path/to/repo 2023-01-01
Scan only direct dependencies:
python scripts/scan_repository.py /path/to/repo 2023-01-01 --no-transitive
Output as JSON:
python scripts/scan_repository.py /path/to/repo 2023-01-01 --json > report.json
The scanner automatically detects and parses dependency manifests:
Supported ecosystems:
Manual parsing (if needed):
python scripts/parse_dependencies.py /path/to/repo
This extracts:
For detailed manifest formats, see references/dependency_formats.md
The scanner queries multiple databases to find CVEs:
Primary source: OSV.dev (Open Source Vulnerabilities)
Additional sources:
Manual CVE query (for testing):
python scripts/query_cves.py lodash 4.17.20 npm 2023-01-01
For database details and API usage, see references/vulnerability_databases.md
The scanner filters CVEs to include only those disclosed after the cutoff date:
published date from vulnerability databasesExample:
The scanner produces a comprehensive report with:
Summary statistics:
Detailed CVE list:
For each CVE:
Clear status: If no new CVEs found, explicitly reports "dependency set is clear since the given date"
Scenario: Periodic security review to find vulnerabilities disclosed since last audit
# Last audit was on 2023-06-01, check for new CVEs since then
python scripts/scan_repository.py /path/to/repo 2023-06-01
Output: List of all CVEs disclosed after June 1, 2023 that affect your dependencies
Scenario: Check if new CVEs affect a specific historical codebase version
# Check if any CVEs disclosed after 2023-01-01 affect code from that date
git checkout <commit-from-2023-01-01>
python scripts/scan_repository.py . 2023-01-01
Output: Shows which vulnerabilities were discovered after the code was written
Scenario: Generate reports showing vulnerability status at specific dates
# Generate quarterly reports
python scripts/scan_repository.py /path/to/repo 2023-01-01 --json > q1_report.json
python scripts/scan_repository.py /path/to/repo 2023-04-01 --json > q2_report.json
python scripts/scan_repository.py /path/to/repo 2023-07-01 --json > q3_report.json
Output: Time-series data showing when vulnerabilities were disclosed
Scenario: Monitor how security posture changes over time
# Compare vulnerability counts at different dates
python scripts/scan_repository.py /path/to/repo 2022-01-01 | grep "new CVE"
python scripts/scan_repository.py /path/to/repo 2023-01-01 | grep "new CVE"
python scripts/scan_repository.py /path/to/repo 2024-01-01 | grep "new CVE"
Output: Trend analysis of vulnerability accumulation
For large repositories, limit the number of dependencies scanned:
python scripts/scan_repository.py /path/to/repo 2023-01-01 --max-deps 50
Skip transitive dependencies to focus on direct dependencies:
python scripts/scan_repository.py /path/to/repo 2023-01-01 --no-transitive
Output structured JSON for integration with other tools:
python scripts/scan_repository.py /path/to/repo 2023-01-01 --json | jq '.summary'
TIME-AWARE DEPENDENCY CVE SCAN REPORT
======================================================================
Repository: /path/to/repo
Cutoff Date: 2023-01-01
Scan Time: 2024-02-19T10:30:00
DEPENDENCY SUMMARY
----------------------------------------------------------------------
Total Dependencies: 150
- Direct: 25
- Transitive: 125
CVE SUMMARY
----------------------------------------------------------------------
⚠ 5 new CVE(s) found after 2023-01-01
- Affecting direct dependencies: 2
- Affecting transitive dependencies: 3
Severity Breakdown:
- CRITICAL: 1
- HIGH: 2
- MEDIUM: 2
DETAILED CVE LIST
----------------------------------------------------------------------
CVE-2023-12345 [CRITICAL]
Package: lodash (npm)
Disclosed: 2023-06-15
Affected Versions: >=4.0.0, <4.17.21
Summary: Prototype pollution vulnerability...
tomli for Python TOML files)The scanner scripts require:
requests library: pip install requeststomli for TOML parsing: pip install tomliTake arabelatso/time-aware-dependency-cve-scanner from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.