Documentation
¶
Index ¶
- Constants
- Variables
- func GetAsString(environment map[string]any, field string) (string, error)
- func GetBranch(environment map[string]any, predicateType string) (string, error)
- func GetEventPayload(environment map[string]any, predicateType string) (map[string]any, error)
- func GetTag(environment map[string]any, predicateType string) (string, error)
- func GetWorkflowInputs(environment map[string]any, predicateType string) (map[string]any, error)
- type Provenance
Constants ¶
View Source
const ( ProvenanceV1DraftType = "https://slsa.dev/provenance/v1.0?draft" ProvenanceV02Type = "https://slsa.dev/provenance/v0.2" )
Variables ¶
View Source
var ProvenanceMap sync.Map
ProvenanceMap stores the different provenance version types.
Functions ¶
func GetEventPayload ¶
GetEventPayload retrieves the GitHub event payload from the environment map that contains the GitHub context payload.
Types ¶
type Provenance ¶
type Provenance interface { // BuilderID returns the builder id in the predicate. BuilderID() (string, error) // SourceURI is the full URI (including tag) of the source material. SourceURI() (string, error) // ConfigURI is the full URI (including tag) of the configuration material. ConfigURI() (string, error) // Subject is the list of intoto subjects in the provenance. Subjects() ([]intoto.Subject, error) // GetBranch retrieves the branch name of the source from the provenance. GetBranch() (string, error) // GetTag retrieves the tag of the source from the provenance. GetTag() (string, error) // GetWorkflowInputs retrieves the inputs from the provenance. Only succeeds for event // relevant event types (workflow_inputs). GetWorkflowInputs() (map[string]interface{}, error) }
func ProvenanceFromEnvelope ¶
func ProvenanceFromEnvelope(env *dsselib.Envelope) (Provenance, error)
Provenance interface that each type may implement.
Click to show internal directories.
Click to hide internal directories.