Documentation ¶
Index ¶
- Constants
- func AddSLSATaskDescriptor(tr *objects.TaskRunObjectV1) (*intoto.ResourceDescriptor, error)
- func AddTektonTaskDescriptor(tr *objects.TaskRunObjectV1) (*intoto.ResourceDescriptor, error)
- func ConvertMaterialsToResolvedDependencies(mats []common.ProvenanceMaterial, name string) []*intoto.ResourceDescriptor
- func PipelineRun(ctx context.Context, pro *objects.PipelineRunObjectV1, ...) ([]*intoto.ResourceDescriptor, error)
- func RemoveDuplicateResolvedDependencies(resolvedDependencies []*intoto.ResourceDescriptor) ([]*intoto.ResourceDescriptor, error)
- func TaskRun(ctx context.Context, opts ResolveOptions, tro *objects.TaskRunObjectV1) ([]*intoto.ResourceDescriptor, error)
- type AddTaskDescriptorContent
- type ResolveOptions
Constants ¶
const ( // PipelineConfigName is the name of the resolved dependency of the pipelineRef. PipelineConfigName = "pipeline" // TaskConfigName is the name of the resolved dependency of the top level taskRef. TaskConfigName = "task" // PipelineTaskConfigName is the name of the resolved dependency of the pipeline task. PipelineTaskConfigName = "pipelineTask" // InputResultName is the name of the resolved dependency generated from Type hinted parameters or results. InputResultName = "inputs/result" // PipelineResourceName is the name of the resolved dependency of pipeline resource. PipelineResourceName = "pipelineResource" )
Variables ¶
This section is empty.
Functions ¶
func AddSLSATaskDescriptor ¶ added in v0.21.0
func AddSLSATaskDescriptor(tr *objects.TaskRunObjectV1) (*intoto.ResourceDescriptor, error)
AddSLSATaskDescriptor resolves dependency content for the more generic slsa verifiers. just logs the name, uri and digest.
func AddTektonTaskDescriptor ¶ added in v0.21.0
func AddTektonTaskDescriptor(tr *objects.TaskRunObjectV1) (*intoto.ResourceDescriptor, error)
AddTektonTaskDescriptor returns the more verbose resolved dependency content. this adds the name, uri, digest and content if possible.
func ConvertMaterialsToResolvedDependencies ¶
func ConvertMaterialsToResolvedDependencies(mats []common.ProvenanceMaterial, name string) []*intoto.ResourceDescriptor
ConvertMaterialToResolvedDependency converts a SLSAv0.2 Material to a resolved dependency
func PipelineRun ¶ added in v0.21.0
func PipelineRun(ctx context.Context, pro *objects.PipelineRunObjectV1, slsaconfig *slsaconfig.SlsaConfig, opts ResolveOptions, addTasks AddTaskDescriptorContent) ([]*intoto.ResourceDescriptor, error)
PipelineRun constructs `predicate.resolvedDependencies` section by collecting all the artifacts that influence a pipeline run such as source code repo and step&sidecar base images.
func RemoveDuplicateResolvedDependencies ¶
func RemoveDuplicateResolvedDependencies(resolvedDependencies []*intoto.ResourceDescriptor) ([]*intoto.ResourceDescriptor, error)
RemoveDuplicateResolvedDependencies removes duplicate resolved dependencies from the slice of resolved dependencies. Original order of resolved dependencies is retained.
func TaskRun ¶ added in v0.21.0
func TaskRun(ctx context.Context, opts ResolveOptions, tro *objects.TaskRunObjectV1) ([]*intoto.ResourceDescriptor, error)
TaskRun constructs `predicate.resolvedDependencies` section by collecting all the artifacts that influence a taskrun such as source code repo and step&sidecar base images.
Types ¶
type AddTaskDescriptorContent ¶ added in v0.21.0
type AddTaskDescriptorContent func(*objects.TaskRunObjectV1) (*intoto.ResourceDescriptor, error)
AddTaskDescriptorContent is used to toggle the fields in see AddTektonTaskDescriptor and AddSLSATaskDescriptor
func GetTaskDescriptor ¶ added in v0.21.0
func GetTaskDescriptor(buildDefinition string) (AddTaskDescriptorContent, error)
GetTaskDescriptor returns the conrresponding addTaskDescriptor function according to the given build type.
type ResolveOptions ¶ added in v0.21.0
type ResolveOptions struct { // Indicates if StepActions type-hinted results should be read to resolve dependecies. WithStepActionsResults bool }
ResolveOptions represents the configuration to be use to resolve dependencies.