Skip to content

feat(tools): get_cve_timeline — CVE event timeline reconstructor + CLI subcommand (+88 tests) - #129

Open
manus-use wants to merge 1 commit into
mainfrom
feat/cli-cve-timeline
Open

feat(tools): get_cve_timeline — CVE event timeline reconstructor + CLI subcommand (+88 tests)#129
manus-use wants to merge 1 commit into
mainfrom
feat/cli-cve-timeline

Conversation

@manus-use

@manus-use manus-use commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the get_cve_timeline tool and manus-agent cve-timeline CLI subcommand — both documented in the README but previously unimplemented.

What it does

Reconstructs the full event timeline for a CVE by gathering chronological events from multiple sources:

  1. NVD — publish date, last modified date, CVSS score assignment
  2. EPSS — first appearance date, significant spike events (>10% jump)
  3. CISA KEV — date added to Known Exploited Vulnerabilities catalog
  4. GitHub Advisory — advisory publish/update dates
  5. Patches — commit/release URLs from NVD references

All events are sorted chronologically and a summary computes key time deltas (e.g., days from CVE publication to KEV addition).

Usage

manus-agent cve-timeline CVE-2021-44228
manus-agent cve-timeline CVE-2021-44228 --output json

Design

  • Zero new dependencies — uses only requests (already in deps)
  • Retry/back-off on all HTTP calls (configurable via NVD_MAX_RETRIES, NVD_BACKOFF_BASE, CVE_TIMELINE_TIMEOUT env vars)
  • NVD_API_KEY and GITHUB_TOKEN support for higher rate limits
  • Graceful degradation — each source fails independently; partial timelines still returned
  • Strands TOOL_SPEC interface — fully compatible with the agent framework
  • KEV deduplication — NVD sometimes embeds KEV dates; avoids duplicate KEV fetch
  • Rich CLI output — date-grouped timeline with box-drawing characters + summary section

Test coverage

88 fully mocked tests covering:

  • TOOL_SPEC contract (4)
  • Date parsing (8)
  • Days-between helper (6)
  • CVSS extraction (6)
  • Patch reference extraction (6)
  • HTTP retry logic (5)
  • NVD event fetching (5)
  • EPSS event fetching (6)
  • KEV date fetching (4)
  • GitHub advisory dates (4)
  • Summary computation (5)
  • Timeline assembly integration (8)
  • Text formatting (5)
  • JSON formatting (2)
  • Handler entry point (3)
  • CLI subcommand (5)
  • Edge cases (6)

Files changed

  • src/manus_agent/tools/get_cve_timeline.py (new)
  • src/manus_agent/cli.py (dispatch + parser + _SUBCOMMANDS set)
  • tests/test_cve_timeline.py (new, 88 tests)

No duplicate check

Checked all 50 open PRs (#136#185) and 30 merged PRs — no existing open or merged PR implements cve-timeline. Closest related:

@manus-use
manus-use force-pushed the feat/cli-cve-timeline branch from 7189156 to 41bc6a1 Compare August 6, 2026 08:08
@manus-use manus-use changed the title feat(cli): add manus-agent cve-timeline subcommand for CVE event timeline reconstruction feat(cli): add cve-timeline subcommand for CVE event timeline reconstruction Aug 6, 2026
@manus-use
manus-use force-pushed the feat/cli-cve-timeline branch from 41bc6a1 to fb55e3c Compare August 7, 2026 16:09
@manus-use manus-use changed the title feat(cli): add cve-timeline subcommand for CVE event timeline reconstruction feat(cli): add cve-timeline tool and CLI subcommand for CVE event timeline reconstruction (+47 tests) Aug 7, 2026
@manus-use
manus-use force-pushed the feat/cli-cve-timeline branch from fb55e3c to 828e42a Compare August 9, 2026 08:08
@manus-use manus-use changed the title feat(cli): add cve-timeline tool and CLI subcommand for CVE event timeline reconstruction (+47 tests) feat(cli): add cve-timeline tool and CLI subcommand for CVE event timeline reconstruction (+67 tests) Aug 9, 2026
@manus-use
manus-use force-pushed the feat/cli-cve-timeline branch from 828e42a to c6f127e Compare August 12, 2026 08:08
@manus-use manus-use changed the title feat(cli): add cve-timeline tool and CLI subcommand for CVE event timeline reconstruction (+67 tests) feat(tools): get_cve_timeline — multi-source CVE event timeline reconstructor + CLI subcommand (+68 tests) Aug 12, 2026
@manus-use
manus-use force-pushed the feat/cli-cve-timeline branch from c6f127e to 321f371 Compare August 14, 2026 08:07
@manus-use manus-use changed the title feat(tools): get_cve_timeline — multi-source CVE event timeline reconstructor + CLI subcommand (+68 tests) feat(tools): get_cve_timeline — CVE event timeline reconstructor + CLI subcommand (+88 tests) Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant