Skip to content

Commit 6ecefcd

Browse files
authored
Don't set the PROVENANCE_AVAILABLE since to now (#273)
This commit removes the now() date when computing PROVENANCE_AVAILABLE as it always moves the compliance date to the time the latest attestation was generated. Signed-off-by: Adolfo Garcia Veytia (puerco) <[email protected]>
1 parent 8858663 commit 6ecefcd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/attest/provenance.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,14 @@ func (pa ProvenanceAttestor) createCurrentProvenance(ctx context.Context, commit
139139
curProvPred.Controls = controlStatus.Controls
140140

141141
// At the very least provenance is available starting now. :)
142-
curProvPred.AddControl(&provenance.Control{Name: slsa.ProvenanceAvailable.String(), Since: timestamppb.New(curTime)})
142+
// ... indeed, but don't set the `since`` date because doing so breaks
143+
// checking against policies.
144+
// See https://github.com/slsa-framework/slsa-source-poc/issues/272
145+
curProvPred.AddControl(
146+
&provenance.Control{
147+
Name: slsa.ProvenanceAvailable.String(),
148+
},
149+
)
143150

144151
return addPredToStatement(&curProvPred, provenance.SourceProvPredicateType, commit)
145152
}

0 commit comments

Comments
 (0)