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: get local image hash from ImageID when RepoDigest is missing #510

Merged
merged 8 commits into from
Sep 28, 2023

Conversation

FrimIdan
Copy link
Member

@FrimIdan FrimIdan commented Sep 27, 2023

Description

The PR fixes an issue with local images sbom generation, when analyzing a local image the RepoDigests are missing so there is a need to use a common hash for the artifact, the code here takes the image ID (https://github.com/opencontainers/image-spec/blob/main/config.md/#imageid) as the identifier since it exists in both trivy and syft.

The PR fixes #498 and also update the changes done in #497

Type of Change

[X] Bug Fix
[ ] New Feature
[ ] Breaking Change
[ ] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@FrimIdan FrimIdan changed the title fix: get local image hashes from ImageID (https://github.com/opencont… fix: get local image hashes from ImageID when RepoDigest is missing Sep 27, 2023
@FrimIdan FrimIdan changed the title fix: get local image hashes from ImageID when RepoDigest is missing fix: get local image hashe from ImageID when RepoDigest is missing Sep 27, 2023
…yzer (for oci-dir, oci-archive and docker-archive)
@FrimIdan FrimIdan marked this pull request as ready for review September 27, 2023 14:37
@FrimIdan FrimIdan requested a review from a team as a code owner September 27, 2023 14:37
@FrimIdan FrimIdan changed the title fix: get local image hashe from ImageID when RepoDigest is missing fix: get local image hash from ImageID when RepoDigest is missing Sep 28, 2023
@pbalogh-sa
Copy link
Member

after fixing small comments, LGTM

@FrimIdan FrimIdan added this pull request to the merge queue Sep 28, 2023
Merged via the queue into main with commit 5d94285 Sep 28, 2023
10 checks passed
@FrimIdan FrimIdan deleted the local-image-image-id branch September 28, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Failed to analyze local images with trivy
3 participants