Documentation
¶
Overview ¶
Package provenance exposes the SLSA source provenance predicate types.
The message definitions live in the shared slsa-framework/protos module; this package aliases them so callers keep a descriptive import name and adds the predicate type URIs and a few helpers around the generated code.
Index ¶
Constants ¶
const ( SourceProvPredicateType = sourcetoolv1.PredicateTypeSourceProvenance TagProvPredicateType = sourcetoolv1.PredicateTypeTagProvenance SourceProvPredicateTypeDraft = sourcetoolv1.PredicateTypeSourceProvenanceDraft TagProvPredicateTypeDraft = sourcetoolv1.PredicateTypeTagProvenanceDraft )
Predicate types of the statements source-tool issues. The draft types are what source-tool wrote before the predicates were promoted to v1; the payload is the same, and attestations already issued under them remain valid, so readers accept both while writers only emit the v1 types.
Variables ¶
This section is empty.
Functions ¶
func AddControl ¶ added in v0.7.1
func AddControl(pred *SourceProvenancePred, newControls ...*Control)
AddControl adds new controls to the predicate, skipping nil entries.
func IsSourceProvPredicateType ¶ added in v0.7.1
IsSourceProvPredicateType returns true when predicateType identifies a statement carrying a SourceProvenancePred, in any of its versions.
func IsTagProvPredicateType ¶ added in v0.7.1
IsTagProvPredicateType returns true when predicateType identifies a statement carrying a TagProvenancePred, in any of its versions.
Types ¶
type Control ¶
type Control = sourcetoolv1.Control
Control records a control enforced on the source and since when.
func GetControl ¶ added in v0.7.1
func GetControl(pred *SourceProvenancePred, name string) *Control
GetControl looks for a control by name in the predicate.
type SourceProvenancePred ¶
type SourceProvenancePred = sourcetoolv1.SourceProvenancePred
SourceProvenancePred is the source provenance predicate.
type TagProvenancePred ¶
type TagProvenancePred = sourcetoolv1.TagProvenancePred
TagProvenancePred is the tag provenance predicate.
type VsaSummary ¶
type VsaSummary = sourcetoolv1.VsaSummary
VsaSummary summarizes a VSA referenced from tag provenance.