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

Sign provenance files #92

Open
3 tasks
marcofranssen opened this issue Nov 18, 2021 · 6 comments
Open
3 tasks

Sign provenance files #92

marcofranssen opened this issue Nov 18, 2021 · 6 comments

Comments

@marcofranssen
Copy link
Member

Signing of provenance files should allow for compatibility with:

Both Cosign and notation allow for attaching additional artefacts to the image. Eventually this signed provenance should also be attachable to the container image (#88). That would allow us to fetch the provenance for a given docker image and use the tooling (notation/cosign) to verify the signature.

@pieterlexis
Copy link
Contributor

I'm using the DSSE signing implementation of sigstore in #91 which indeed generates the payload and signatures as defined in in-toto.

I think the integration of the generated, signed provenance is beyond the scope of what I intended to implement in #91.

@marcofranssen
Copy link
Member Author

@pieterlexis yes integrating the attaching to docker images or auto uploading to Github releases can be done from separate PR.

@ChaosInTheCRD
Copy link

I would be interested in working on this PR ✋ 😄

@ChaosInTheCRD
Copy link

For Docker Images, I have been looking at the implementation within Tekton Chains... and I can see it could be possible to do something similar here too

https://github.com/tektoncd/chains/blob/a7e0557bf10abbe1d4f3f90e947857ba87890194/pkg/chains/storage/oci/oci.go#L100

I wonder if this should be integrated as part of the sign-provenance action that @pieterlexis has written. In an ideal world, you would be able to have all of this completed within a single command, like:

  • Declare the repo, digest, tags etc.
  • Generate Provenance
  • Sign the Provenance
  • Push the Provenance to the remote

That way, you can be sure that the attestation has not been modified / compromised before it makes it to the registry.

I wonder if it would be worthwhile for me to expand on #88 so someone can just call a flag that allows a user to achieve all of this for a docker image. As far as I can see with SLSA, this is a common flow for anyone wanting to generate Level 2 Provenance for an image.

@marcofranssen
Copy link
Member Author

@ChaosInTheCRD what you have shared in your workflow tryout https://github.com/ChaosInTheCRD/mic-test/runs/4514052305?check_suite_focus=true is exactly what we would like to achieve once this PR and #88 are merged in a single line command. @pieterlexis could you also have a look at @ChaosInTheCRD his workflow we can achieve this with the combination of both PR's?

@pieterlexis
Copy link
Contributor

The sign action I implemented can sign any json that looks like provenance. Signing actual container images might be out of scope for this (and cosign does that just fine).

If you want to sign the provenance about the container, my action could do that as long as the provenance is in the same format.

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

No branches or pull requests

3 participants