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 bug in uploading signatures to OCI #298

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/chains/storage/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (b *Backend) uploadSignature(format simple.SimpleContainerImage, rawPayload
if err != nil {
return errors.Wrap(err, "getting digest")
}
image, err := ociremote.SignedImage(ref)
se, err := ociremote.SignedEntity(ref)
if err != nil {
return errors.Wrap(err, "getting signed image")
}
Expand All @@ -123,7 +123,7 @@ func (b *Backend) uploadSignature(format simple.SimpleContainerImage, rawPayload
return err
}
// Attach the signature to the entity.
newSE, err := mutate.AttachSignatureToImage(image, sig)
newSE, err := mutate.AttachSignatureToEntity(se, sig)
if err != nil {
return err
}
Expand Down Expand Up @@ -163,7 +163,7 @@ func (b *Backend) uploadAttestation(attestation in_toto.Statement, rawPayload []
return errors.Wrapf(err, "%s is not a valid repository", b.cfg.Storage.OCI.Repository)
}
}
image, err := ociremote.SignedImage(ref)
se, err := ociremote.SignedEntity(ref)
if err != nil {
return errors.Wrap(err, "getting signed image")
}
Expand All @@ -176,7 +176,7 @@ func (b *Backend) uploadAttestation(attestation in_toto.Statement, rawPayload []
if err != nil {
return err
}
newImage, err := mutate.AttachAttestationToImage(image, att)
newImage, err := mutate.AttachAttestationToEntity(se, att)
if err != nil {
return err
}
Expand Down