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

Feature - Sign scorecard container with cosign #309

Closed
naveensrinivasan opened this issue Mar 26, 2021 · 13 comments
Closed

Feature - Sign scorecard container with cosign #309

naveensrinivasan opened this issue Mar 26, 2021 · 13 comments
Assignees
Labels
kind/enhancement New feature or request

Comments

@naveensrinivasan
Copy link
Member

Is your feature request related to a problem? Please describe.
Sign scorecard containers with cosign

@naveensrinivasan naveensrinivasan added the kind/enhancement New feature or request label Mar 26, 2021
@naveensrinivasan
Copy link
Member Author

Now that https://github.com/sigstore/cosign 1.0 we could use it for signing.

Thoughts @inferno-chromium @azeemshaikh38

@azeemshaikh38
Copy link
Contributor

On a high-level the idea sounds good to me. I don't understand cosign a 100% though. Do you mind sketching out what this would look like, ie. would this be done through CloudBuild, any major changes that would be required etc.?

@azeemshaikh38
Copy link
Contributor

@naveensrinivasan assigning this to you as per yesterday's discussion. Lets come up with a one-pager proposal here to submit in the TAC meeting

@developer-guy
Copy link
Contributor

I have the following recommendations:

@naveensrinivasan
Copy link
Member Author

Thank you @developer-guy! We are tracking this part of this larger issue #1051

We want to come up with a plan of it being SLSA compliant.

  • We still haven't yet decided on whether to use GitHub for signing the keys or use google for signing the keys and also the provenance that comes along for it to be SLSA compliant.
  • Once we decide that then it should be easy.
  • If you have any recommendations more than happy to hear on the Feature: scorecard builds comply with SLSA #1051

@laurentsimon
Copy link
Contributor

Would OIDC be an option? This way we don't need a special workflow to generate keys and store them in GH secrets, and we also get built-in key rotation.

@laurentsimon
Copy link
Contributor

@asraa FYI

@naveensrinivasan
Copy link
Member Author

Yes, that would be a great option for signing containers.

Signing blob(scorecard binary) is easy. But verifying is jumping through lots of hoops. I am trying that the tooling isn’t there yet.

Also we need to understand if it suffices the SLDA requirements.

@developer-guy
Copy link
Contributor

hello @azeemshaikh38 @naveensrinivasan, here is the keyless image signing example with GoReleaser recently created as a sample project1, thanks to @caarlos0, of course, you can find an example of signing checksum also, here is the related tweet2

Sample 1: Signing Container Images

docker_signs:
  - cmd: cosign
    env:
    - COSIGN_EXPERIMENTAL=1
    artifacts: images
    args:
    - 'sign'
    - '--oidc-issuer={{if index .Env "CI"}}https://token.actions.githubusercontent.com{{else}}https://oauth2.sigstore.dev/auth{{end}}'
    - '${artifact}'

Sample 2: Signing checksums.txt file

docker_signs:
  - cmd: cosign
    env:
    - COSIGN_EXPERIMENTAL=1
    artifacts: images
    args:
    - 'sign'
    - '--oidc-issuer={{if index .Env "CI"}}https://token.actions.githubusercontent.com{{else}}https://oauth2.sigstore.dev/auth{{end}}'
    - '${artifact}'

Footnotes

  1. https://github.com/caarlos0-graveyard/gorel-keyless

  2. https://twitter.com/caarlos0/status/1462609279156994056?s=20

@justaugustus
Copy link
Member

Cross-linking a few things from Kubernetes tracking:

@developer-guy
Copy link
Contributor

kindly ping @naveensrinivasan, what needs to be done? 🙏

@laurentsimon
Copy link
Contributor

We could also wait for the slsa-generator to have support for container (laster this month), and use that with GoReleaser.
I think some of our images use ko as well.

/cc @ianlewis

@afmarcum
Copy link
Contributor

Is this something that still needs to be discussed?
If there is no feedback in the next 7 days on whether this remains important for the project, then this issue will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

6 participants