Skip to content

feat(cve): an endpoint listing CVE findings across all images - #19

Merged
rjd15372 merged 1 commit into
mainfrom
feat/cve-findings-endpoint
Nov 17, 2026
Merged

rjd15372 merged 1 commit into
mainfrom
feat/cve-findings-endpoint

Conversation

@rjd15372

Copy link
Copy Markdown
Collaborator

Summary

  • Adds GET /api/cve/findings: every per-arch image scan that currently has HIGH or CRITICAL findings, across all images, each with its project, package and findings. Clean images are left out.
  • Optional ?project= is a project prefix: ppg:staging keeps ppg:staging and ppg:staging:…, not ppg:staging2. It is compared literally and case-sensitively; no match returns [].
  • Public, like /api/cve/scans.
  • The three copies of the cve_scans row reader in backend/internal/store/cve.go become one, shared by QueryCveScans, AttachCveScans and the new QueryVulnerableScans.

Testing

  • go test ./... in backend/ passes, with new store tests (prefix boundary, clean scans omitted, LIKE wildcards literal) and handler/route tests.

GET /api/cve/findings returns every per-arch image scan that currently
has HIGH or CRITICAL findings, each with its project, package and
findings. An optional ?project= prefix such as ppg:staging keeps that
project and its subprojects; the prefix is compared literally, on a
project-segment boundary.

The three copies of the cve_scans row reader become one, shared by
QueryCveScans, AttachCveScans and the new QueryVulnerableScans.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
@rjd15372
rjd15372 merged commit 4a6a9a0 into main Nov 17, 2026
5 checks passed
@rjd15372
rjd15372 deleted the feat/cve-findings-endpoint branch November 17, 2026 10:18
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