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

Allow keyed signing without writing to disk #1776

Closed
znewman01 opened this issue Apr 19, 2022 · 3 comments · Fixed by #1794
Closed

Allow keyed signing without writing to disk #1776

znewman01 opened this issue Apr 19, 2022 · 3 comments · Fixed by #1794
Labels
enhancement New feature or request

Comments

@znewman01
Copy link
Contributor

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:

  1. Add an env:// handler for cosign keys cosign sign --key env://MY_ENV_VAR
  2. Let --key take - to indicate STDIN. This may cause issues because cosign sign sometimes prompts. Maybe cosign sign --key - --force would work here.
@znewman01 znewman01 added the enhancement New feature or request label Apr 19, 2022
@dlorenc
Copy link
Member

dlorenc commented Apr 23, 2022

i like env://

@jeff-mccoy
Copy link

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.

@znewman01
Copy link
Contributor Author

i like env://

Great, draft PR #1794 does that. I need to wait for sigstore/sigstore#407 to get merged first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants