Repository navigation
feat(cve): an endpoint listing CVE findings across all images - #19
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/cve/findings: every per-arch image scan that currently has HIGH or CRITICAL findings, across all images, each with itsproject,packageand findings. Clean images are left out.?project=is a project prefix:ppg:stagingkeepsppg:stagingandppg:staging:…, notppg:staging2. It is compared literally and case-sensitively; no match returns[]./api/cve/scans.cve_scansrow reader inbackend/internal/store/cve.gobecome one, shared byQueryCveScans,AttachCveScansand the newQueryVulnerableScans.Testing
go test ./...inbackend/passes, with new store tests (prefix boundary, clean scans omitted, LIKE wildcards literal) and handler/route tests.