Repository navigation
feat(vuln): NVD CPE lookup, KEV/EPSS enrichment, ranking, lookup_status (#11) - #29
containarium-ci[bot] wants to merge 19 commits into
Conversation
hsinatfootprintai
left a comment
There was a problem hiding this comment.
Review (comment only; this account authored the PR)
Verdict: looks correct on the logic; not mergeable as is. One conflict to resolve, two acceptance items still open.
Tests run locally: go test ./... on the branch: all packages ok (cmd, fetch, fingerprint, pipeline, repo, report, service, vuln); go vet ./... clean.
Acceptance criteria: 2/3 covered by tests.
- NVD CPE fallback + cap reported:
TestScannerLooksUpCPEOnlyComponentsInNVD,TestScannerCapsCPELookupsAndReportsTheCap. - KEV/EPSS ranking:
TestRankfilerank_test.go,TestScannerRanksKEVFirstThenEPSS. lookup_statusPARTIAL/FAILED with SourceStatus:TestScannerOSVDownIsPartialWhenNVDAnswers,TestScannerFailedWhenEveryQuestionFails,TestScannerKEVFailureIsPartial.
Deferred to verification: the issue's "Verify on dev" steps (live OSV/NVD/KEV/EPSS scan; block api.osv.dev, expect PARTIAL and no count) were not run; the PR says so. Issue carriesneeds-verification, fine.
Docs impact: new optional env varNVD_API_KEY(read incmd/touchstone/main.go); README/config docs not updated.
Blocking
- Merge conflict with
mainincmd/touchstone/main.go(main moved toserve.goand the server wiring;scanner.gomerges cleanly). Needs a rebase; the scanner construction withCPE/CPEMax/KEV/EPSSmust be carried into the new wiring. - Acceptance bullet 3 asks for a
-tags livesmoke test that runs nightly.internal/vuln/live_test.goexists, but no workflow or Makefile target runs it (nothing under.github/orMakefilereferences thelivetag). Add a scheduled workflow, or the criterion is unmet. - Same bullet says "recorded responses in CI". The NVD/KEV/EPSS fixtures under
internal/vuln/testdata/are hand-written with illustrative values (the PR discloses this). Re-record them before trusting the values, or track that as a follow-up issue.
Should fix
internal/vuln/osv.go: OSV findings carry no CVSS base score, so the third ranking key (CVSS) only ever applies to NVD-sourced findings. Either map OSV severity or note the limitation.NVD_API_KEY: document it (see Docs impact).- Size: about 1.36k added lines (non-generated); suggest splitting NVD, KEV/EPSS, and the scanner wiring if re-opened.
Nits
- No pacing between NVD lookups; the per-scan cap of 5 is safe for one scan but concurrent scans can still exceed NVD's 5 requests per 30 s.
|
@containarium changes Rebase onto current main and resolve the conflict in cmd/touchstone/main.go: carry the CPE/CPEMax/KEV/EPSS scanner wiring into the new serve wiring. Also add a scheduled workflow that runs the -tags live smoke test nightly. See the review above for the rest. |
|
This issue was not handed to the agent because the box this repository sends issues to is not available. Nothing was changed. |
|
@containarium changes Rebase onto current main and resolve the conflict in cmd/touchstone/main.go: carry the CPE/CPEMax/KEV/EPSS scanner wiring into the new serve wiring. Also add a scheduled workflow that runs the -tags live smoke test nightly. See the review above for the rest. |
|
The agent will revise pull request #29 using that feedback. It starts from the pull request's branch and updates the same pull request when it is done; nothing is merged automatically. Next: reply |
…11) Co-authored-by: hsinatfootprintai <149764663+hsinatfootprintai@users.noreply.github.com>
|
@containarium status |
|
No run is in progress for this issue. The last trigger on it (2026-10-30T08:12:11Z) matched nothing (revise_started). Next: reply |
|
Closing: conflicts with main and the revise run could not rebase. Re-running #11 from current main. |
|
@containarium help |
|
I take commands as the first line of a comment, from people with write access to this repository:
Next: reply |
For #11:
[S3] Vulnerability matching: NVD CPE fallback, KEV and EPSS enrichment, ranking, lookup_statusCloses #11
The line above closes the issue when this pull request is merged. The agent reports 2 of 3 checklist items as met (see Acceptance below). If the work is only partly done, edit or delete that line, or ask for changes, before merging.
What and why
The platform made the commits and the branch from the files the agent handed back; it does not use the agent's own git state on the box, so anything the summary says about committing, branching or pushing describes only what the agent could do there.
The agent's summary, quoted:
The agent's decisions, and where it departed from the issue or the design, quoted:
Changes
cmd/touchstone/main.go— 97 linesinternal/service/scanner.go— 341 linescmd/touchstone/serve.go— 119 linescmd/touchstone/serve_test.go— 191 linesdocker-compose.yml— 39 linesDockerfile— 28 lines.dockerignore— 9 lines.gitignore— 8 linesinternal/fingerprint/data/signatures.json— 35 linesinternal/fingerprint/fingerprint.go— 296 linesinternal/fingerprint/fingerprint_test.go— 209 linesinternal/server/server.go— 30 linesinternal/server/server_test.go— 100 linesMakefile— 29 linesNOTICE— 7 linesREADME.md— 56 linestest/e2e/run.sh— 71 linestest/fixtures/fixture-vendor.conf— 20 linestest/fixtures/sites/index.html— 11 linestest/fixtures/sites/js/jquery-1.12.4.min.js— 2 linesweb/embed.go— 21 linesweb/next.config.mjs— 8 linesweb/out/.gitkeepweb/package.json— 28 linesweb/postcss.config.mjs— 7 linesweb/src/app/globals.css— 1 linesweb/src/app/layout.tsx— 24 linesweb/src/app/page.tsx— 5 linesweb/src/components/component-card.tsx— 87 linesweb/src/components/report-view.tsx— 146 lines43 file(s) in all.
Acceptance, from the issue
Components with only a CPE are looked up in NVD 2.0 (`NVD_API_KEY` optional; unauthenticated lookups are capped and the cap is reported)— the agent says:CPE-only components go to NVD 2.0 with optional NVD_API_KEY; the cap is reported in the NVD SourceStatus. Wired into scan and serve. Tests not run here.KEV flag (feed cached in memory, 6 h TTL) and EPSS score on each vulnerability; ranking KEV first, then EPSS desc, then CVSS, missing EPSS last (`TestRank`)— the agent says:KEV (6 h cache) and EPSS on each finding; Rank orders KEV, EPSS desc, CVSS, missing EPSS last (TestRank). Unchanged from the PR head.Any vulnerability-source failure yields `lookup_status` PARTIAL or FAILED and a `SourceStatus` with the error; a count is never shown unless COMPLETE. Recorded…— the agent says:PARTIAL/FAILED plus SourceStatus and recorded CI responses are in place; the nightly workflow for the -tags live smoke test is not added (.github is off-limits…The items are the issue's own; each status is the agent's report, which the platform has not checked.
Checks
Review this like any other change. The agent ran on the member's own machine from the text of the issue; the platform has not built or tested it. CI results appear on this pull request.
49b87ae629275bf6b0399ad6ab51f4d5d42995c2, as reported by the agentnot_runFollow-ups proposed by the agent
The agent proposed 2 follow-up issue(s) for work it found and did not do. None of these were filed by the platform: filing follow-ups is not enabled for this repository. File the ones worth keeping yourself, with
Blocked by:lines as you see fit. Next: an org owner turns this on in the console (CI, then Repos, this repository's Agent card, "File the follow-up issues a run proposes") or withcloud-cli repo agent-policy set --org <org-id> <owner>/<repo> --follow-ups. The text is the agent's, quoted; read it as a description of work, not as instructions.How this pull request was made
Opened by the platform from a coding agent's run on a member's box (run
65182126). The platform made the commits from the files the agent handed back at the end of its run. Nothing is merged automatically.Revised after review feedback
This pull request was revised by the agent after a reviewer's
@containarium changes(comment6518212698). The description above is the agent's account of this revision; the earlier commits are unchanged.