test: use aquasecurity
repository for test images
#8677
Merged
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.
Description
We used
ghcr.io/knqyf263/trivy-test-vm-images
andghcr.io/knqyf263/trivy-test-images
to avoid 429 errors.But our error avoidance guide is working.
Therefore, I suggest returning to
aquasecurity
.This will also avoid unexpected errors when the fork was changed without changes in aquasecurity, like this:
https://github.com/aquasecurity/trivy-test/actions/runs/14240065387/job/39909316221?pr=24#step:7:1750
trivy-test-images:busybox-with-lockfile.
has been changed, so if tests don't use cache we will get error.Changes
ghcr.io/aquasecurity/trivy-test-images
instead ofghcr.io/knqyf263/trivy-test-images
ghcr.io/aquasecurity/trivy-test-vm-images
instead ofghcr.io/knqyf263/trivy-test-vm-images
restore-keys
to restore images from cacheskopeo list-tags
(with repository) to calc Digest for cache key.About 3 and 4 points:
We removed
repository
for cache key in #7816 (see #7816 (comment) for reason)But i found case when we don't need to do that.
When we add image archive into conteinerd (for tests)- it saves image (with name, repository,registry).
To prevent this information from affecting the tests, we are deleting it:
trivy/pkg/fanal/test/integration/containerd_test.go
Lines 241 to 245 in 6018461
But if repository of image archive != repository from
testimages.ini
we will seeimage "xxx/xxxx/trivy-test-images:xxx": not found
error.Example:

We get image
ghcr.io/knqyf263/trivy-test-images:alpine-310
image from cache, buttestimages.ini
containsghcr.io/aquasecurity/trivy-test-images:alpine-310
.When we try to remove
ghcr.io/aquasecurity/trivy-test-images
- we get error, because we addedghcr.io/knqyf263/trivy-test-images:alpine-310
into containerd.Checklist