-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: configure image signing (#34)
- Loading branch information
Showing
5 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Sign OCI Image | ||
description: Signs an OCI image using cosign | ||
|
||
inputs: | ||
cosign-version: | ||
description: 'The version of cosign to use' | ||
required: false | ||
default: 'v2.2.0' | ||
registry: | ||
description: 'The registry to push the signed image to' | ||
required: true | ||
digest: | ||
description: 'The digest of the image to sign' | ||
required: true | ||
private-key: | ||
description: 'The private key to use for signing' | ||
required: true | ||
private-key-passphrase: | ||
description: 'The passphrase for the private key' | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Cosign | ||
uses: sigstore/[email protected] | ||
with: | ||
cosign-release: ${{ inputs.cosign-version }} | ||
|
||
- name: Sign OCI Image | ||
shell: bash | ||
run: | | ||
cosign sign -y --key env://COSIGN_PRIVATE_KEY $REGISTRY@$DIGEST | ||
env: | ||
REGISTRY: ${{ inputs.registry }} | ||
DIGEST: ${{ inputs.digest }} | ||
COSIGN_PRIVATE_KEY: ${{ inputs.private-key }} | ||
COSIGN_PASSWORD: ${{ inputs.private-key-passphrase }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"default": [ | ||
{ | ||
"type": "reject" | ||
} | ||
], | ||
"transports": { | ||
"docker": { | ||
"registry.access.redhat.com": [ | ||
{ | ||
"type": "signedBy", | ||
"keyType": "GPGKeys", | ||
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" | ||
} | ||
], | ||
"registry.redhat.io": [ | ||
{ | ||
"type": "signedBy", | ||
"keyType": "GPGKeys", | ||
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" | ||
} | ||
], | ||
"ghcr.io/rsturla/eternal-linux": [ | ||
{ | ||
"type": "sigstoreSigned", | ||
"keyPath": "/usr/etc/pki/containers/eternal-linux.pub", | ||
"signedIdentity": { | ||
"type": "matchRepository" | ||
} | ||
} | ||
], | ||
"": [ | ||
{ | ||
"type": "insecureAcceptAnything" | ||
} | ||
] | ||
}, | ||
"docker-daemon": { | ||
"": [ | ||
{ | ||
"type": "insecureAcceptAnything" | ||
} | ||
] | ||
}, | ||
"atomic": { | ||
"": [ | ||
{ | ||
"type": "insecureAcceptAnything" | ||
} | ||
] | ||
}, | ||
"dir": { | ||
"": [ | ||
{ | ||
"type": "insecureAcceptAnything" | ||
} | ||
] | ||
}, | ||
"oci": { | ||
"": [ | ||
{ | ||
"type": "insecureAcceptAnything" | ||
} | ||
] | ||
}, | ||
"tarball": { | ||
"": [ | ||
{ | ||
"type": "insecureAcceptAnything" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docker: | ||
ghcr.io/rsturla/eternal-linux: | ||
use-sigstore-attachments: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEwX/aIrD4r9D+KPfpN7thao0GdNHd | ||
PscEonsyLDWGQL+rRNuOXfW91sF1HLbkCG5/8O+8nqtiJbVQbRPvwq4utA== | ||
-----END PUBLIC KEY----- |