Clarify how multiple attestations may be needed to verify "source" requirements
Related somewhat to: #129
Even though the provenance spec does allow you to point to source control for "materials," it doesn't allow for the ability to attest to "verified history," "retained indefinitely," or "two-person reviewed." You can implicitly assume if you have a source control uri like git that it's "version controlled."
Another related thing, and I'm unsure if there's an issue for this already but I think the documentation makes it unclear if the expectation is to have multiple attestations associated with an artifact to then allow the client to make a SLSA level judgement or if everything is intended to be included as part of a single attestation. In the case of multiple attestations would a source based one even include a "builder"?
I bring up the above because in secure CI environments you might have separate "builders" performing different tasks for an artifact build. Those builders might have their own identities and the build service might sign provenance based on those identities, e.g. SPIFFE/Spire.
For example, a flow like:
- builder A downloads source to shared volume
- builder B downloads dependencies to shared volume
- builder C with no internet access, etc. (to be hermetic) compiles/packages artifact
- builder D publishes artifact to artifact repo
This is what I was hoping to address in https://github.com/in-toto/attestation/issues/47 (before we moved SLSA provenance back to this project).
I had a proposal I was running past @joshuagl but we never actually finished it up. I've shared with you to get your feedback too.
Should we continue discussion here or in https://github.com/in-toto/attestation/issues/47 ?
Right, forgot that was over there. Probably makes sense to continue over there for now but maybe leave this ticket open just so people know to look at it the discussion in-toto/attestation#47?
@TomHennen does it make sense to create another github issue for the other thing described above? There might be the need to multiple attestations associated with an artifact based on who is making what claims?
IMO it makes sense to have this issue be about the general high level problem ("Another related thing...") while in-toto/attestation#47 is about the specific Source Control predicate.
On that topic I'd suggest we expect there to be multiple different attestations. I think that should make it easier to the processes issuing the attestations to have first-hand knowledge about what it is they're signing.
In your example I think it could work like this:
- builder A downloads source & the source control attestation (which builder C can later include in the bundle). It doesn't need to attest to anything.
- builder B downloads dependencies to shared volume. It could potentially get the attestations for the dependencies that it's downloading or it could issue an attestation that basically says "builder B downloaded these (so you know they haven't been tampered with since they were downloaded), or maybe it does both?
- builder C builds the things from the hermetic location, creates & signs SLSA provenance, and puts it in a bundle with the attestations created/fetched by A&B.
- builder D could either: a. Check all the attestations (which it gets from C) against some policy before it publishes the artifact. b. Upload all the attestations to the repo (so others can check them against some policy). c. Both a & b (preferred)
WDYT?
Yeah, I was thinking similar.