You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, cosign sign --key takes a file or a KMS URL. A file isn't 100% ideal for CI, since you don't want to chance other build steps (which run with the same permissions usually) to be able to read it.
Specifically, consider the scenario where the private key comes into GitHub actions as a secret. It'll be exposed to the build step as an environment variable.
Two possible solutions come to mind:
Add an env:// handler for cosign keys cosign sign --key env://MY_ENV_VAR
Let --key take - to indicate STDIN. This may cause issues because cosign sign sometimes prompts. Maybe cosign sign --key - --force would work here.
The text was updated successfully, but these errors were encountered:
This is a great option for avoiding on-disk creds in CI, ironically for our DoD customers we are now having to work the opposite direction thanks to https://stigviewer.com/stig/kubernetes/2021-04-14/finding/V-242415. Basically the DoD believes env var secrets are evil now 😭. We ended up using KMS for CI.
Right now,
cosign sign --key
takes a file or a KMS URL. A file isn't 100% ideal for CI, since you don't want to chance other build steps (which run with the same permissions usually) to be able to read it.Specifically, consider the scenario where the private key comes into GitHub actions as a secret. It'll be exposed to the build step as an environment variable.
Two possible solutions come to mind:
env://
handler for cosign keyscosign sign --key env://MY_ENV_VAR
--key
take-
to indicate STDIN. This may cause issues becausecosign sign
sometimes prompts. Maybecosign sign --key - --force
would work here.The text was updated successfully, but these errors were encountered: