-
Notifications
You must be signed in to change notification settings - Fork 547
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
Add warning to use digest instead of tags to other cosign commands #2650
Conversation
internal/ui/warnings.go
Outdated
|
||
const TagReferenceMessage string = `Image reference %s uses a tag, not a digest, to identify the image to sign. | ||
|
||
This can lead you to sign a different image than the intended one. Please use a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to keep the indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! bad copy paste
Signed-off-by: Priya Wadhwa <priya@chainguard.dev>
27af19d
to
ec45258
Compare
…igstore#2650) Signed-off-by: Priya Wadhwa <priya@chainguard.dev> Signed-off-by: Priya Wadhwa <priya@chainguard.dev>
if _, ok := srcRef.(name.Digest); !ok { | ||
msg := fmt.Sprintf(ui.TagReferenceMessage, srcImg) | ||
ui.Warnf(ctx, msg) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the better recommendation to copy multi-arch images with signature if not using tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I think that copy
and save
may have been collateral damage here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…igstore#2650) Signed-off-by: Priya Wadhwa <priya@chainguard.dev> Signed-off-by: Priya Wadhwa <priya@chainguard.dev>
fixes #2047 for 2.0
Signed-off-by: Priya Wadhwa priya@chainguard.dev