Add source-review-coverage predicate - #581
Open
DrVelvetFog wants to merge 1 commit into
Open
Conversation
Carries the evidence needed to decide, independently of the system that produced it, whether a source revision was covered by the review it claims: which tree each approval covered, which tree shipped, and how one became the other. SLSA v1.2 Source Track requires two-party review of the final revision submitted, but leaves source provenance attestations undefined and does not address how squash merges or rebases interact with approval. The property is therefore asserted by the source control system to a consumer who cannot check it. Signed-off-by: Antoni Jagodka <tjagodka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposes a new predicate,
source-review-coverage, per the new predicate guidelines. Answering the four questions asked there:What's your use case?
SLSA v1.2 Source Track Level 4 requires that changes to protected branches "be agreed to by two or more trusted persons prior to submission," and requires this of the final revision submitted — with re-review if changes occur during review. That requirement currently has no verifier. SLSA states that it "leaves source provenance attestations undefined and up to the SCSs to determine what works best," and does not address how squash merges or rebases interact with approval, nor how post-approval changes are detected.
So the property is asserted by the source control system that performed the merge, to a consumer who cannot check it. This predicate carries what a third party needs to recompute it: the tree each approval covered, the tree that shipped, and how one became the other.
Why don't existing predicates cover this?
What does it look like?
See the Schema and Example sections. The Example is a complete Statement taken from a real repository, not composed by hand. Subjects use the existing
gitCommitandgitTreedigest types, so the central claim needs no new encoding.What policy questions does it answer?
Each is answerable offline from the repository, without calling the system that produced the claim.
Measured before proposing
The replay model was checked against production history rather than reasoned about, on Git 2.50.1:
810 merges, every one accounted for as
identity,replay, or a named residual — no third category and no special cases. All 64 residuals are conflict resolutions: unreviewed by construction, and ordinary. Zero merge commits carried content absent from their parents.Notes for reviewers
Type URI. The specification is currently self-hosted at
https://drvelvetfog.github.io/source-review-coverage/v0.1, because the predicate is already being issued and verified. If you would prefer it underin-toto.io/attestation/source-review-coverage/v0.1, I am happy to switch it and file the redirect PR — the namespace is yours to decide, and I did not want to assume it.Protobuf. A definition exists and compiles under protoc 35.1, with the emitted JSON validated against it. I have left it out of this PR because generated bindings for four languages are committed in this repository, and it seemed better to have the design reviewed before adding that surface. Happy to open it as a follow-up, or add it here if you would rather review both together.
Reference implementation. Issues and verifies these attestations, including Sigstore signing by a workflow identity: https://github.com/DrVelvetFog/source-review-coverage.
One implementation note that may interest maintainers:
sigstore-pythonrejects Statements whose subject usesgitCommitorgitTree, since itsDigestSetis restricted to SHA-2 and SHA-3. That is a deliberate choice on their side (sigstore/sigstore-python#1018) rather than a problem with this predicate, but it does mean such statements cannot currently travel in a DSSE envelope signed by that client.