Skip to content

Assume latest tag when not provided#10

Merged
wagoodman merged 1 commit intomainfrom
assume-latest-tag
Mar 30, 2022
Merged

Assume latest tag when not provided#10
wagoodman merged 1 commit intomainfrom
assume-latest-tag

Conversation

@wagoodman
Copy link
Copy Markdown
Collaborator

In cases where you have multiple images for a single repository already pulled and you specify an image without a tag to docker sbom then you will get back from docker image save a tar that has multiple images / manifests. This is a problem sense we are trying to create a SBOM description for a single image, and multiple images are not supported.

This PR adjusts input validation to parse the image reference and if a tag or digest is not found, then a latest is assumed. This should result in a single manifest at the docker image save step since platform and OS have sane defaults as well. The only remaining case that is not covered would be if multiple manifests are created for the same tag manually, which is unlikely, and not supported yet (they will need to use a digest in these cases).

@wagoodman wagoodman added the bug Something isn't working label Mar 30, 2022
@wagoodman wagoodman self-assigned this Mar 30, 2022
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
@wagoodman wagoodman merged commit 552f916 into main Mar 30, 2022
@wagoodman wagoodman deleted the assume-latest-tag branch March 30, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant