Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return the image manifest digest instead of image id #2399

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

dkulchinsky
Copy link
Contributor

Description

This PR supersedes #2310, fixes tests and adds safety around the image manifest digest extraction from the report

@afdesk for you review

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@dkulchinsky dkulchinsky changed the title correctly return the image manifest digest instead of image id fix: return the image manifest digest instead of image id Jan 27, 2025
@github-actions github-actions bot added the bug label Jan 27, 2025
@dkulchinsky dkulchinsky mentioned this pull request Jan 27, 2025
4 tasks
@dkulchinsky
Copy link
Contributor Author

looks like integration tests are failing because of dockerhub rate limits:

remote error: GET https://index.docker.io/v2/library/nginx/manifests/1.16: TOOMANYREQUESTS: You have reached your pull rate limit.

not sure if there's anything we can do, except to just retry?

@dkulchinsky
Copy link
Contributor Author

retried CI, but hit with a new error which doesn't appear to be related to any of the changes I've introduced.

@dkulchinsky
Copy link
Contributor Author

@afdesk FWIW, I ran the integration tests locally from my branch and all tests passed:

Ran 9 of 9 Specs in 287.035 seconds
SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
coverage: 52.1% of statements in github.com/aquasecurity/trivy-operator/pkg/operator, github.com/aquasecurity/trivy-operator/pkg/operator/predicate, github.com/aquasecurity/trivy-operator/pkg/operator/controller, github.com/aquasecurity/trivy-operator/pkg/plugin, github.com/aquasecurity/trivy-operator/pkg/plugin/trivy, github.com/aquasecurity/trivy-operator/pkg/configauditreport, github.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport
composite coverage: 51.9% of statements

Ginkgo ran 1 suite in 5m30.7559755s
Test Suite Passed

@afdesk
Copy link
Contributor

afdesk commented Jan 28, 2025

@dkulchinsky thanks for your contribution
I've rerun tests.
etcdserver: request is too large" is known error there (

Copy link
Contributor

@afdesk afdesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks!

@afdesk afdesk requested a review from simar7 January 28, 2025 18:47
@dkulchinsky
Copy link
Contributor Author

dkulchinsky commented Jan 28, 2025

woot! thanks for the review and approval @afdesk , can we get this merged with a failing CI check?

@afdesk
Copy link
Contributor

afdesk commented Jan 28, 2025

woot! thanks for the review and approval @afdesk , can we get this merged with a failing CI check?

I'd like to pass the test, it's on my side now

@dkulchinsky
Copy link
Contributor Author

yay! looks like all checks are 🟢

Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR!

@simar7 simar7 merged commit fe40535 into aquasecurity:main Jan 29, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vulnerability Report's report.artifact.digest field is the artifact's image_id not digest
3 participants