본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHub
설치 방법 보기

포함된 파일(6)

  • SKILL.md8.2 KB
  • references/dependency_formats.md6.0 KB
  • references/vulnerability_databases.md6.1 KB
  • scripts/parse_dependencies.py9.5 KB
  • scripts/query_cves.py9.0 KB
  • scripts/scan_repository.py8.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.

Quick Start

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

Workflow

1. Parse Dependencies

The scanner automatically detects and parses dependency manifests:

Supported ecosystems:

  • npm: package.json, package-lock.json, yarn.lock
  • Maven: pom.xml
  • Python: requirements.txt, Pipfile.lock, poetry.lock
  • Go: go.mod, go.sum
  • Cargo: Cargo.toml, Cargo.lock

Manual parsing (if needed):

python scripts/parse_dependencies.py /path/to/repo

This extracts:

  • Package names and exact versions
  • Direct vs transitive dependency classification
  • Ecosystem identification

For detailed manifest formats, see references/dependency_formats.md

2. Query Vulnerability Databases

The scanner queries multiple databases to find CVEs:

Primary source: OSV.dev (Open Source Vulnerabilities)

  • No authentication required
  • Broad ecosystem coverage (npm, PyPI, Maven, Go, crates.io, etc.)
  • Built-in version matching
  • Real-time updates

Additional sources:

  • NVD (National Vulnerability Database) - Official CVE records
  • GitHub Security Advisory - GitHub-curated vulnerabilities

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

3. Filter by Cutoff Date

The scanner filters CVEs to include only those disclosed after the cutoff date:

  • Uses the published date from vulnerability databases
  • Excludes CVEs disclosed before or on the cutoff date
  • Distinguishes newly disclosed vulnerabilities from pre-existing ones

Example:

  • Cutoff date: 2023-01-01
  • CVE-2023-12345 published: 2023-06-15 → Included ✓
  • CVE-2022-98765 published: 2022-11-20 → Excluded ✗

4. Generate Report

The scanner produces a comprehensive report with:

Summary statistics:

  • Total dependencies (direct vs transitive)
  • Number of new CVEs found
  • CVEs affecting direct vs transitive dependencies
  • Severity breakdown (CRITICAL, HIGH, MEDIUM, LOW)

Detailed CVE list: For each CVE:

  • CVE identifier (CVE-XXXX-XXXXX or GHSA-XXXX-XXXX-XXXX)
  • Affected package and ecosystem
  • Version range affected
  • Severity score
  • Disclosure date
  • Summary description

Clear status: If no new CVEs found, explicitly reports "dependency set is clear since the given date"

Use Cases

Security Audit

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

Regression Testing

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

Compliance Reporting

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

Tracking Security Posture

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

Advanced Options

Limit Scan Scope

For large repositories, limit the number of dependencies scanned:

python scripts/scan_repository.py /path/to/repo 2023-01-01 --max-deps 50

Direct Dependencies Only

Skip transitive dependencies to focus on direct dependencies:

python scripts/scan_repository.py /path/to/repo 2023-01-01 --no-transitive

JSON Output for Automation

Output structured JSON for integration with other tools:

python scripts/scan_repository.py /path/to/repo 2023-01-01 --json | jq '.summary'

Understanding Results

Report Structure

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...

Interpreting Severity

  • CRITICAL: Immediate action required, actively exploited
  • HIGH: Serious vulnerability, patch soon
  • MEDIUM: Moderate risk, plan remediation
  • LOW: Minor issue, low priority
  • UNKNOWN: Severity not yet assessed

Next Steps After Scan

  1. Review CVEs: Examine each vulnerability's details
  2. Check exploitability: Determine if your code uses affected functionality
  3. Update dependencies: Upgrade to patched versions
  4. Re-scan: Verify fixes with another scan
  5. Document: Record findings and remediation actions

Troubleshooting

No dependencies found

  • Ensure you're in the repository root
  • Check that manifest files exist (package.json, pom.xml, etc.)
  • Verify file permissions

API rate limits

Parsing errors

  • Ensure manifest files are valid JSON/XML/TOML
  • Check for syntax errors in dependency declarations
  • Some ecosystems may require additional tools (e.g., tomli for Python TOML files)

Dependencies

The scanner scripts require:

  • Python 3.7+
  • requests library: pip install requests
  • Optional: tomli for TOML parsing: pip install tomli

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and relationships. Use when analyzing program properties, inferring loop invariants, detecting potential errors, or understanding variable relationships through static analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ArabelaTso/Skills-4-SE2582026년 8월 21일 업데이트

Uses abstract interpretation to automatically infer loop invariants, function preconditions, and postconditions for formal verification. Generates invariants that capture program behavior and support correctness proofs in Dafny, Isabelle, Coq, and other verification systems. Use when adding formal specifications to code, generating verification conditions, inferring contracts for functions, or discovering loop invariants for proofs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ArabelaTso/Skills-4-SE2582026년 8월 21일 업데이트

Performs abstract interpretation over source code to infer possible program states, variable ranges, and data properties without executing the program. Reports potential runtime errors including out-of-bounds accesses, null dereferences, type inconsistencies, division by zero, and integer overflows. Use when analyzing code for potential runtime errors, performing static analysis, checking safety properties, or verifying program behavior without execution.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ArabelaTso/Skills-4-SE2582026년 8월 21일 업데이트

Performs abstract interpretation to produce summarized execution traces and high-level program behavior representations. Highlights key control flow paths, variable relationships, loop invariants, function summaries, and potential runtime states using abstract domains (intervals, signs, nullness, etc.). Use when analyzing program behavior, understanding execution paths, computing loop invariants, tracking variable ranges, detecting potential runtime errors, or generating program summaries without concrete execution.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ArabelaTso/Skills-4-SE2582026년 8월 21일 업데이트

Create ACSL (ANSI/ISO C Specification Language) formal annotations for C/C++ programs. Use this skill when working with formal verification, adding function contracts (requires/ensures), loop invariants, assertions, memory safety annotations, or any ACSL specifications. Supports Frama-C verification and generates comprehensive formal specifications for C/C++ code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ArabelaTso/Skills-4-SE2582026년 8월 21일 업데이트

CLI-based browser automation with persistent page state using ref-based element interaction. Use when users ask to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ArabelaTso/Skills-4-SE2582026년 8월 21일 업데이트

ArabelaTso의 스킬 모두 보기

이 스킬의 문제 신고