Skip to content

Commit aac07e9

Browse files
committed
containers/image: remove signatures when copying in to OCI layout
This does not affect signature validation, and we do not need to preserve signatures _after_ validation because we will never need to propagate those signatures to another image transport/destination. Signed-off-by: Joe Lanford <[email protected]>
1 parent bec5c5c commit aac07e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/image/containersimageregistry/registry.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ func (r *Registry) Pull(ctx context.Context, ref orimage.Reference) error {
161161
SourceCtx: sourceCtx,
162162
DestinationCtx: r.cache.getSystemContext(),
163163
OptimizeDestinationImageAlreadyExists: true,
164+
165+
// We use the OCI layout as a temporary storage and
166+
// pushing signatures for OCI images is not supported
167+
// so we remove the source signatures when copying.
168+
// Signature validation will still be performed
169+
// accordingly to a provided policy context.
170+
RemoveSignatures: true,
164171
}); err != nil {
165172
return err
166173
}

0 commit comments

Comments
 (0)