fix: preserve digest in image summary lookups#479
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes V13S image vulnerability/SBOM lookups for digest-bearing image references by preserving the digest portion during lookups, and adds regression coverage via unit and integration tests.
Changes:
- Introduce
splitImageRefForLookupto preservetag@digest(ordigest-only) for V13S lookups. - Switch V13S lookups in the vulnerability dataloader and image vulnerability listing to use the new lookup-splitting helper.
- Extend unit/integration tests and fixtures to cover digest-bearing image references.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/vulnerability/dataloader.go | Uses digest-preserving image ref splitting when fetching image summaries from V13S. |
| internal/vulnerability/queries.go | Adds splitImageRefForLookup and updates image vulnerability listing to preserve digest in lookups. |
| internal/vulnerability/queries_test.go | Updates split tests and adds coverage for digest-preserving lookup splitting. |
| integration_tests/k8s_resources/vulnerability/dev/slug-1/app.yaml | Changes test workload image to include :tag@sha256:digest. |
| integration_tests/vulnerabilities.lua | Updates integration assertion to validate digest-preserved image tag and non-null vulnerability data. |
Contributor
Author
|
Måtte oppdatere prometheus, annars feilet mise:check |
thokra
approved these changes
Jun 26, 2026
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.
What
tag@digestfor image-based vulnerability lookupsWhy
The API dropped the digest when looking up image summaries in V13S.
That caused refs like:
image@sha256:abcimage:tag@sha256:abcto return:
sbom.status = NO_SBOMvulnerabilitySummary = nulleven when V13S had valid data for the full ref.
Changed
internal/vulnerability/dataloader.gointernal/vulnerability/queries.gointernal/vulnerability/queries_test.gointegration_tests/k8s_resources/vulnerability/dev/slug-1/app.yamlintegration_tests/vulnerabilities.lua