provenance

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceProvPredicateType = "https://github.com/slsa-framework/slsa-source-poc/source-provenance/v1-draft"
	TagProvPredicateType    = "https://github.com/slsa-framework/slsa-source-poc/tag-provenance/v1-draft"
)

Variables

View Source
var File_provenance_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Control

type Control struct {

	// The name of the control
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The time from which this control has been continuously enforced/observed.
	Since *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=since,proto3" json:"since,omitempty"`
	// contains filtered or unexported fields
}

func (*Control) Descriptor deprecated

func (*Control) Descriptor() ([]byte, []int)

Deprecated: Use Control.ProtoReflect.Descriptor instead.

func (*Control) GetName

func (x *Control) GetName() string

func (*Control) GetSince

func (x *Control) GetSince() *timestamppb.Timestamp

func (*Control) MarshalJSON

func (ctl *Control) MarshalJSON() ([]byte, error)

func (*Control) ProtoMessage

func (*Control) ProtoMessage()

func (*Control) ProtoReflect

func (x *Control) ProtoReflect() protoreflect.Message

func (*Control) Reset

func (x *Control) Reset()

func (*Control) String

func (x *Control) String() string

type SourceProvenancePred

type SourceProvenancePred struct {

	// The commit preceding 'Commit' in the current context.
	PrevCommit   string                 `protobuf:"bytes,1,opt,name=prev_commit,json=prevCommit,proto3" json:"prev_commit,omitempty"`
	RepoUri      string                 `protobuf:"bytes,2,opt,name=repo_uri,json=repoUri,proto3" json:"repo_uri,omitempty"`
	ActivityType string                 `protobuf:"bytes,3,opt,name=activity_type,json=activityType,proto3" json:"activity_type,omitempty"`
	Actor        string                 `protobuf:"bytes,4,opt,name=actor,proto3" json:"actor,omitempty"`
	Branch       string                 `protobuf:"bytes,5,opt,name=branch,proto3" json:"branch,omitempty"`
	CreatedOn    *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_on,json=createdOn,proto3,oneof" json:"created_on,omitempty"` // TODO: get the author of the PR (if this was from a PR).
	// The controls enabled at the time this commit was pushed.
	Controls []*Control `protobuf:"bytes,7,rep,name=controls,proto3" json:"controls,omitempty"`
	// contains filtered or unexported fields
}

The predicate that encodes source provenance data. The git commit this corresponds to is encoded in the surrounding statement.

func (*SourceProvenancePred) AddControl

func (pred *SourceProvenancePred) AddControl(newControls ...*Control)

AddControl adds a new control to the predicate.

func (*SourceProvenancePred) Descriptor deprecated

func (*SourceProvenancePred) Descriptor() ([]byte, []int)

Deprecated: Use SourceProvenancePred.ProtoReflect.Descriptor instead.

func (*SourceProvenancePred) GetActivityType

func (x *SourceProvenancePred) GetActivityType() string

func (*SourceProvenancePred) GetActor

func (x *SourceProvenancePred) GetActor() string

func (*SourceProvenancePred) GetBranch

func (x *SourceProvenancePred) GetBranch() string

func (*SourceProvenancePred) GetControl

func (pred *SourceProvenancePred) GetControl(name string) *Control

GetControl looks for a control by name in the predicate.

func (*SourceProvenancePred) GetControls

func (x *SourceProvenancePred) GetControls() []*Control

func (*SourceProvenancePred) GetCreatedOn

func (x *SourceProvenancePred) GetCreatedOn() *timestamppb.Timestamp

func (*SourceProvenancePred) GetPrevCommit

func (x *SourceProvenancePred) GetPrevCommit() string

func (*SourceProvenancePred) GetRepoUri

func (x *SourceProvenancePred) GetRepoUri() string

func (*SourceProvenancePred) MarshalJSON

func (pred *SourceProvenancePred) MarshalJSON() ([]byte, error)

func (*SourceProvenancePred) ProtoMessage

func (*SourceProvenancePred) ProtoMessage()

func (*SourceProvenancePred) ProtoReflect

func (x *SourceProvenancePred) ProtoReflect() protoreflect.Message

func (*SourceProvenancePred) Reset

func (x *SourceProvenancePred) Reset()

func (*SourceProvenancePred) String

func (x *SourceProvenancePred) String() string

type TagProvenancePred

type TagProvenancePred struct {
	RepoUri   string                 `protobuf:"bytes,1,opt,name=repo_uri,json=repoUri,proto3" json:"repo_uri,omitempty"`
	Actor     string                 `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"`
	Tag       string                 `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	CreatedOn *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_on,json=createdOn,proto3,oneof" json:"created_on,omitempty"`
	// The tag related controls enabled at the time this tag was created/updated.
	Controls     []*Control    `protobuf:"bytes,7,rep,name=controls,proto3" json:"controls,omitempty"`
	VsaSummaries []*VsaSummary `protobuf:"bytes,8,rep,name=vsa_summaries,json=vsaSummaries,proto3" json:"vsa_summaries,omitempty"`
	// contains filtered or unexported fields
}

func (*TagProvenancePred) Descriptor deprecated

func (*TagProvenancePred) Descriptor() ([]byte, []int)

Deprecated: Use TagProvenancePred.ProtoReflect.Descriptor instead.

func (*TagProvenancePred) GetActor

func (x *TagProvenancePred) GetActor() string

func (*TagProvenancePred) GetControls

func (x *TagProvenancePred) GetControls() []*Control

func (*TagProvenancePred) GetCreatedOn

func (x *TagProvenancePred) GetCreatedOn() *timestamppb.Timestamp

func (*TagProvenancePred) GetRepoUri

func (x *TagProvenancePred) GetRepoUri() string

func (*TagProvenancePred) GetTag

func (x *TagProvenancePred) GetTag() string

func (*TagProvenancePred) GetVsaSummaries

func (x *TagProvenancePred) GetVsaSummaries() []*VsaSummary

func (*TagProvenancePred) ProtoMessage

func (*TagProvenancePred) ProtoMessage()

func (*TagProvenancePred) ProtoReflect

func (x *TagProvenancePred) ProtoReflect() protoreflect.Message

func (*TagProvenancePred) Reset

func (x *TagProvenancePred) Reset()

func (*TagProvenancePred) String

func (x *TagProvenancePred) String() string

type VsaSummary

type VsaSummary struct {
	SourceRefs     []string `protobuf:"bytes,1,rep,name=source_refs,json=sourceRefs,proto3" json:"source_refs,omitempty"`
	VerifiedLevels []string `protobuf:"bytes,2,rep,name=verified_levels,json=verifiedLevels,proto3" json:"verified_levels,omitempty"`
	// contains filtered or unexported fields
}

Summary of a summary

func (*VsaSummary) Descriptor deprecated

func (*VsaSummary) Descriptor() ([]byte, []int)

Deprecated: Use VsaSummary.ProtoReflect.Descriptor instead.

func (*VsaSummary) GetSourceRefs

func (x *VsaSummary) GetSourceRefs() []string

func (*VsaSummary) GetVerifiedLevels

func (x *VsaSummary) GetVerifiedLevels() []string

func (*VsaSummary) ProtoMessage

func (*VsaSummary) ProtoMessage()

func (*VsaSummary) ProtoReflect

func (x *VsaSummary) ProtoReflect() protoreflect.Message

func (*VsaSummary) Reset

func (x *VsaSummary) Reset()

func (*VsaSummary) String

func (x *VsaSummary) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL