Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5867094
added signature support for oci layout
bitoku Sep 2, 2025
2e50f7a
Check pre-existing signatures
bitoku Sep 3, 2025
9385213
Don't raise error when signature is not found
bitoku Sep 3, 2025
d17b607
Check whether algorithm is available
bitoku Sep 3, 2025
7fb5001
Use getBlob
bitoku Sep 3, 2025
cfefbe3
Delete old signature manifest config
bitoku Sep 3, 2025
590fda6
Fix oci delete test
bitoku Sep 3, 2025
9b3cca2
Fix oci dest test
bitoku Sep 3, 2025
c365899
Don't store old signature manifest
bitoku Sep 3, 2025
5e92317
Fix lint error
bitoku Sep 3, 2025
ef902ef
Ignore signature when getManifestDescriptor
bitoku Sep 5, 2025
75c616d
Improve sigstore tag validation with strings.CutSuffix
bitoku Sep 24, 2025
506fbd4
Refactor getOCIDescriptorContents to use digest.Digest parameter
bitoku Sep 24, 2025
6f6cd38
Simplify signature retrieval by refactoring to use getOCIDescriptorCo…
bitoku Sep 24, 2025
04bb65f
Refactor blob deletion logic by renaming `blobsToDelete` to `blobDele…
bitoku Sep 24, 2025
41a6028
Add the same comment as appendSignaturesFromSigstoreAttachments in Ge…
bitoku Sep 24, 2025
391ab6c
Add getManifestDescriptor tests for the new code path.
bitoku Sep 24, 2025
a30076b
Move `manifestDigest` assignment in `ociImageDestination`
bitoku Sep 24, 2025
6f9b1c0
Remove pointer usage for digest in getDescriptor.
bitoku Sep 24, 2025
e555fef
Refactor `TestPutSignaturesWithFormat` to use table-driven tests for …
bitoku Sep 24, 2025
278c5db
Refactor signature handling in `putSignaturesToSigstoreAttachment` an…
bitoku Sep 29, 2025
f74ad30
Refactor blob deletion logic
bitoku Sep 29, 2025
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
2 changes: 1 addition & 1 deletion image/internal/imagedestination/stubs/signatures.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (stub NoSignaturesInitialize) PutSignaturesWithFormat(ctx context.Context,
return nil
}

// SupportsSignatures implements SupportsSignatures() that returns nil.
// AlwaysSupportsSignatures implements SupportsSignatures() that returns nil.
// Note that it might be even more useful to return a value dynamically detected based on
type AlwaysSupportsSignatures struct{}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"architecture":"","os":"","config":{},"rootfs":{"type":"layers","diff_ids":["sha256:6f06dd0e26608013eff30bb1e951cda7de3fdd9e78e907470e0dd5c0ed25e273"]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"architecture":"","os":"","config":{},"rootfs":{"type":"","diff_ids":["sha256:6f06dd0e26608013eff30bb1e951cda7de3fdd9e78e907470e0dd5c0ed25e273"]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #9811
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-payload2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-payload
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:20:20.894140623Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:4693057ce2364720d39e57e85a5b8e0bd9ac3573716237736d6470ec5b7b7230"]},"history":[{"created":"2023-08-07T19:20:20.71894984Z","created_by":"/bin/sh -c #(nop) ADD file:32ff5e7a78b890996ee4681cc0a26185d3e9acdb4eb1e2aaccb2411f922fed6b in / "},{"created":"2023-08-07T19:20:20.894140623Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8",
"size": 584
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:557ac7d133b7770216a8101268640edf4e88beab1b4e1e1bfc9b1891a1cab861",
"size": 33
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5",
"size": 525,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:f6d60fd529b234d3e28837e15294d935f55da58ce57c4f9218cad38d0be82ce3",
"size": 525,
"platform": {
"architecture": "386",
"os": "linux"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:38:27.007952531Z","architecture":"386","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:f05b0759429ba12d5fda46c196f253cc1cab8f56cd874e9e7be674fc1b8337de"]},"history":[{"created":"2023-08-07T19:38:26.69689892Z","created_by":"/bin/sh -c #(nop) ADD file:4b33c52e11b19fde30197c62ead0b77bde28d34edaa08346a5302cd892d3cebe in / "},{"created":"2023-08-07T19:38:27.007952531Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:06047b0580a020bb2d90af148a0d76459d390fea17f70e5af3c5833321d1939c",
"size": 153
},
"layers": [
{
"mediaType": "application/vnd.dev.cosign.simplesigning.v1+json",
"digest": "sha256:6bc6d9a506e2c6452307700aa79e5a8331095c422999387f9d52351009fcd801",
"size": 13,
"annotations": {
"dev.cosignproject.cosign/signature": "test-signature"
}
}
],
"subject": {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:f6d60fd529b234d3e28837e15294d935f55da58ce57c4f9218cad38d0be82ce3",
"size": 1506,
"annotations": {
"org.opencontainers.image.ref.name": "latest"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #28017
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:44353f0bf0dd9507c2e9daea7ad4f8a5f0e23bc16068d612227507e54599c18a",
"size": 147
},
"layers": [
{
"mediaType": "application/vnd.dev.cosign.simplesigning.v1+json",
"digest": "sha256:6f06dd0e26608013eff30bb1e951cda7de3fdd9e78e907470e0dd5c0ed25e273",
"size": 12,
"annotations": {
"dev.cosignproject.cosign/signature": "test-signature"
}
}
],
"subject": {
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "latest"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:aab808b283c3f654d84358a40ce8766ecd552249305141de88f0ca61f3d1368f",
"size": 582
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:e19729d5a968c71b4b691d60f4a6f85f93c303bb88635dcfef36e23b76cb7b3a",
"size": 34
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"schemaVersion": 2,
"manifests": [
{
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "latest"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size": 704,
"annotations": {
"org.opencontainers.image.ref.name": "sha256-a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1.sig"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:d1fd915a475c7d56aa31bc67aef503b48ad51b32248511326474eed59f2fa38c",
"size": 700,
"annotations": {
"org.opencontainers.image.ref.name": "sha256-f6d60fd529b234d3e28837e15294d935f55da58ce57c4f9218cad38d0be82ce3.sig"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"imageLayoutVersion": "1.0.0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"architecture":"","os":"","config":{},"rootfs":{"type":"","diff_ids":["sha256:6f06dd0e26608013eff30bb1e951cda7de3fdd9e78e907470e0dd5c0ed25e273"]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #9811
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-payload
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:20:20.894140623Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:4693057ce2364720d39e57e85a5b8e0bd9ac3573716237736d6470ec5b7b7230"]},"history":[{"created":"2023-08-07T19:20:20.71894984Z","created_by":"/bin/sh -c #(nop) ADD file:32ff5e7a78b890996ee4681cc0a26185d3e9acdb4eb1e2aaccb2411f922fed6b in / "},{"created":"2023-08-07T19:20:20.894140623Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8",
"size": 584
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:557ac7d133b7770216a8101268640edf4e88beab1b4e1e1bfc9b1891a1cab861",
"size": 33
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5",
"size": 525,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:f6d60fd529b234d3e28837e15294d935f55da58ce57c4f9218cad38d0be82ce3",
"size": 525,
"platform": {
"architecture": "386",
"os": "linux"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:38:27.007952531Z","architecture":"386","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:f05b0759429ba12d5fda46c196f253cc1cab8f56cd874e9e7be674fc1b8337de"]},"history":[{"created":"2023-08-07T19:38:26.69689892Z","created_by":"/bin/sh -c #(nop) ADD file:4b33c52e11b19fde30197c62ead0b77bde28d34edaa08346a5302cd892d3cebe in / "},{"created":"2023-08-07T19:38:27.007952531Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #28017
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:44353f0bf0dd9507c2e9daea7ad4f8a5f0e23bc16068d612227507e54599c18a",
"size": 147
},
"layers": [
{
"mediaType": "application/vnd.dev.cosign.simplesigning.v1+json",
"digest": "sha256:6f06dd0e26608013eff30bb1e951cda7de3fdd9e78e907470e0dd5c0ed25e273",
"size": 12,
"annotations": {
"dev.cosignproject.cosign/signature": "test-signature"
}
}
],
"subject": {
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "latest"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:aab808b283c3f654d84358a40ce8766ecd552249305141de88f0ca61f3d1368f",
"size": 582
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:e19729d5a968c71b4b691d60f4a6f85f93c303bb88635dcfef36e23b76cb7b3a",
"size": 34
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"schemaVersion": 2,
"manifests": [
{
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "latest"
}
},
{
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "3.18.3"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size": 704,
"annotations": {
"org.opencontainers.image.ref.name": "sha256-a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1.sig"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"imageLayoutVersion": "1.0.0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #9671
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"architecture":"","os":"","config":{},"rootfs":{"type":"","diff_ids":["sha256:6f06dd0e26608013eff30bb1e951cda7de3fdd9e78e907470e0dd5c0ed25e273"]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-payload
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"created": "2019-08-20T20:19:55.211423266Z",
"architecture": "amd64",
"os": "linux",
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh"
]
},
"rootfs": {
"type": "layers",
"diff_ids": [
"sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
]
},
"history": [
{
"created": "2019-08-20T20:19:55.062606894Z",
"created_by": "/bin/sh -c #(nop) ADD file:fe64057fbb83dccb960efabbf1cd8777920ef279a7fa8dbca0a8801c651bdf7c in / "
},
{
"created": "2019-08-20T20:19:55.211423266Z",
"created_by": "/bin/sh -c #(nop) CMD [\"/bin/sh\"]",
"empty_layer": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:44353f0bf0dd9507c2e9daea7ad4f8a5f0e23bc16068d612227507e54599c18a",
"size": 147
},
"layers": [
{
"mediaType": "application/vnd.dev.cosign.simplesigning.v1+json",
"digest": "sha256:6f06dd0e26608013eff30bb1e951cda7de3fdd9e78e907470e0dd5c0ed25e273",
"size": 12,
"annotations": {
"dev.cosignproject.cosign/signature": "test-signature"
}
}
],
"subject": {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:eaa95f3cfaac07c8a5153eb77c933269586ad0226c83405776be08547e4d2a18",
"size": 1506,
"annotations": {
"org.opencontainers.image.ref.name": "latest"
}
}
}
Loading
Loading