v1

package
v0.87.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CraftingSchema_Runner_RunnerType_name = map[int32]string{
		0: "RUNNER_TYPE_UNSPECIFIED",
		1: "GITHUB_ACTION",
		2: "GITLAB_PIPELINE",
		3: "AZURE_PIPELINE",
		4: "JENKINS_JOB",
		5: "CIRCLECI_BUILD",
		6: "DAGGER_PIPELINE",
	}
	CraftingSchema_Runner_RunnerType_value = map[string]int32{
		"RUNNER_TYPE_UNSPECIFIED": 0,
		"GITHUB_ACTION":           1,
		"GITLAB_PIPELINE":         2,
		"AZURE_PIPELINE":          3,
		"JENKINS_JOB":             4,
		"CIRCLECI_BUILD":          5,
		"DAGGER_PIPELINE":         6,
	}
)

Enum value maps for CraftingSchema_Runner_RunnerType.

View Source
var (
	CraftingSchema_Material_MaterialType_name = map[int32]string{
		0:  "MATERIAL_TYPE_UNSPECIFIED",
		1:  "STRING",
		2:  "CONTAINER_IMAGE",
		3:  "ARTIFACT",
		4:  "SBOM_CYCLONEDX_JSON",
		5:  "SBOM_SPDX_JSON",
		6:  "JUNIT_XML",
		7:  "OPENVEX",
		10: "HELM_CHART",
		9:  "SARIF",
		11: "EVIDENCE",
		12: "ATTESTATION",
		8:  "CSAF_VEX",
		13: "CSAF_INFORMATIONAL_ADVISORY",
		14: "CSAF_SECURITY_ADVISORY",
		15: "CSAF_SECURITY_INCIDENT_RESPONSE",
	}
	CraftingSchema_Material_MaterialType_value = map[string]int32{
		"MATERIAL_TYPE_UNSPECIFIED":       0,
		"STRING":                          1,
		"CONTAINER_IMAGE":                 2,
		"ARTIFACT":                        3,
		"SBOM_CYCLONEDX_JSON":             4,
		"SBOM_SPDX_JSON":                  5,
		"JUNIT_XML":                       6,
		"OPENVEX":                         7,
		"HELM_CHART":                      10,
		"SARIF":                           9,
		"EVIDENCE":                        11,
		"ATTESTATION":                     12,
		"CSAF_VEX":                        8,
		"CSAF_INFORMATIONAL_ADVISORY":     13,
		"CSAF_SECURITY_ADVISORY":          14,
		"CSAF_SECURITY_INCIDENT_RESPONSE": 15,
	}
)

Enum value maps for CraftingSchema_Material_MaterialType.

View Source
var File_workflowcontract_v1_crafting_schema_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Annotation added in v0.15.0

type Annotation struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Single word optionally separated with _
	// This value can be set in the contract or provided during the attestation
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Annotation) Descriptor deprecated added in v0.15.0

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

Deprecated: Use Annotation.ProtoReflect.Descriptor instead.

func (*Annotation) GetName added in v0.15.0

func (x *Annotation) GetName() string

func (*Annotation) GetValue added in v0.15.0

func (x *Annotation) GetValue() string

func (*Annotation) ProtoMessage added in v0.15.0

func (*Annotation) ProtoMessage()

func (*Annotation) ProtoReflect added in v0.15.0

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

func (*Annotation) Reset added in v0.15.0

func (x *Annotation) Reset()

func (*Annotation) String added in v0.15.0

func (x *Annotation) String() string

type CraftingSchema

type CraftingSchema struct {

	// Version of the schema, do not confuse with the revision of the content
	SchemaVersion string                     `protobuf:"bytes,1,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`
	Materials     []*CraftingSchema_Material `protobuf:"bytes,2,rep,name=materials,proto3" json:"materials,omitempty"`
	EnvAllowList  []string                   `protobuf:"bytes,3,rep,name=env_allow_list,json=envAllowList,proto3" json:"env_allow_list,omitempty"`
	Runner        *CraftingSchema_Runner     `protobuf:"bytes,4,opt,name=runner,proto3" json:"runner,omitempty"`
	// List of annotations that can be used to add metadata to the attestation
	// this metadata can be used later on by the integrations engine to filter and interpolate data
	// It works in addition to the annotations defined in the materials and the runner
	Annotations []*Annotation `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty"`
	// contains filtered or unexported fields
}

Schema definition provided by the user to the tool that defines the schema of the workflowRun

func (*CraftingSchema) Descriptor deprecated

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

Deprecated: Use CraftingSchema.ProtoReflect.Descriptor instead.

func (*CraftingSchema) GetAnnotations added in v0.15.0

func (x *CraftingSchema) GetAnnotations() []*Annotation

func (*CraftingSchema) GetEnvAllowList

func (x *CraftingSchema) GetEnvAllowList() []string

func (*CraftingSchema) GetMaterials

func (x *CraftingSchema) GetMaterials() []*CraftingSchema_Material

func (*CraftingSchema) GetRunner

func (x *CraftingSchema) GetRunner() *CraftingSchema_Runner

func (*CraftingSchema) GetSchemaVersion

func (x *CraftingSchema) GetSchemaVersion() string

func (*CraftingSchema) ProtoMessage

func (*CraftingSchema) ProtoMessage()

func (*CraftingSchema) ProtoReflect

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

func (*CraftingSchema) Reset

func (x *CraftingSchema) Reset()

func (*CraftingSchema) String

func (x *CraftingSchema) String() string

func (*CraftingSchema) ValidateUniqueMaterialName

func (schema *CraftingSchema) ValidateUniqueMaterialName() error

ValidateUniqueMaterialName validates that only one material definition with the same ID is present in the schema

type CraftingSchema_Material

type CraftingSchema_Material struct {
	Type     CraftingSchema_Material_MaterialType `protobuf:"varint,1,opt,name=type,proto3,enum=workflowcontract.v1.CraftingSchema_Material_MaterialType" json:"type,omitempty"`
	Name     string                               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Single word optionally separated with _ or -
	Optional bool                                 `protobuf:"varint,3,opt,name=optional,proto3" json:"optional,omitempty"`
	// If a material is set as output it will get added to the subject in the statement
	Output bool `protobuf:"varint,4,opt,name=output,proto3" json:"output,omitempty"`
	// List of annotations that can be used to add metadata to the material
	// this metadata can be used later on by the integrations engine to filter and interpolate data
	Annotations []*Annotation `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty"`
	// contains filtered or unexported fields
}

func (*CraftingSchema_Material) Descriptor deprecated

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

Deprecated: Use CraftingSchema_Material.ProtoReflect.Descriptor instead.

func (*CraftingSchema_Material) GetAnnotations added in v0.15.0

func (x *CraftingSchema_Material) GetAnnotations() []*Annotation

func (*CraftingSchema_Material) GetName

func (x *CraftingSchema_Material) GetName() string

func (*CraftingSchema_Material) GetOptional

func (x *CraftingSchema_Material) GetOptional() bool

func (*CraftingSchema_Material) GetOutput

func (x *CraftingSchema_Material) GetOutput() bool

func (*CraftingSchema_Material) GetType

func (*CraftingSchema_Material) ProtoMessage

func (*CraftingSchema_Material) ProtoMessage()

func (*CraftingSchema_Material) ProtoReflect

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

func (*CraftingSchema_Material) Reset

func (x *CraftingSchema_Material) Reset()

func (*CraftingSchema_Material) String

func (x *CraftingSchema_Material) String() string

type CraftingSchema_Material_MaterialType

type CraftingSchema_Material_MaterialType int32
const (
	CraftingSchema_Material_MATERIAL_TYPE_UNSPECIFIED CraftingSchema_Material_MaterialType = 0
	CraftingSchema_Material_STRING                    CraftingSchema_Material_MaterialType = 1
	CraftingSchema_Material_CONTAINER_IMAGE           CraftingSchema_Material_MaterialType = 2
	CraftingSchema_Material_ARTIFACT                  CraftingSchema_Material_MaterialType = 3
	CraftingSchema_Material_SBOM_CYCLONEDX_JSON       CraftingSchema_Material_MaterialType = 4
	CraftingSchema_Material_SBOM_SPDX_JSON            CraftingSchema_Material_MaterialType = 5
	CraftingSchema_Material_JUNIT_XML                 CraftingSchema_Material_MaterialType = 6
	// https://github.com/openvex/spec
	CraftingSchema_Material_OPENVEX CraftingSchema_Material_MaterialType = 7
	// Static analysis output format
	// https://github.com/microsoft/sarif-tutorials/blob/main/docs/1-Introduction.md
	CraftingSchema_Material_HELM_CHART CraftingSchema_Material_MaterialType = 10
	CraftingSchema_Material_SARIF      CraftingSchema_Material_MaterialType = 9
	// Pieces of evidences represent generic, additional context that don't fit
	// into one of the well known material types. For example, a custom approval report (in json), ...
	CraftingSchema_Material_EVIDENCE CraftingSchema_Material_MaterialType = 11
	// Chainloop attestation coming from a different workflow.
	CraftingSchema_Material_ATTESTATION CraftingSchema_Material_MaterialType = 12
	// https://docs.oasis-open.org/csaf/csaf/v2.0/cs03/csaf-v2.0-cs03.html
	CraftingSchema_Material_CSAF_VEX                        CraftingSchema_Material_MaterialType = 8
	CraftingSchema_Material_CSAF_INFORMATIONAL_ADVISORY     CraftingSchema_Material_MaterialType = 13
	CraftingSchema_Material_CSAF_SECURITY_ADVISORY          CraftingSchema_Material_MaterialType = 14
	CraftingSchema_Material_CSAF_SECURITY_INCIDENT_RESPONSE CraftingSchema_Material_MaterialType = 15
)

func (CraftingSchema_Material_MaterialType) Descriptor

func (CraftingSchema_Material_MaterialType) Enum

func (CraftingSchema_Material_MaterialType) EnumDescriptor deprecated

func (CraftingSchema_Material_MaterialType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CraftingSchema_Material_MaterialType.Descriptor instead.

func (CraftingSchema_Material_MaterialType) Number

func (CraftingSchema_Material_MaterialType) String

func (CraftingSchema_Material_MaterialType) Type

type CraftingSchema_Runner

type CraftingSchema_Runner struct {
	Type CraftingSchema_Runner_RunnerType `protobuf:"varint,1,opt,name=type,proto3,enum=workflowcontract.v1.CraftingSchema_Runner_RunnerType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*CraftingSchema_Runner) Descriptor deprecated

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

Deprecated: Use CraftingSchema_Runner.ProtoReflect.Descriptor instead.

func (*CraftingSchema_Runner) GetType

func (*CraftingSchema_Runner) ProtoMessage

func (*CraftingSchema_Runner) ProtoMessage()

func (*CraftingSchema_Runner) ProtoReflect

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

func (*CraftingSchema_Runner) Reset

func (x *CraftingSchema_Runner) Reset()

func (*CraftingSchema_Runner) String

func (x *CraftingSchema_Runner) String() string

type CraftingSchema_Runner_RunnerType

type CraftingSchema_Runner_RunnerType int32
const (
	CraftingSchema_Runner_RUNNER_TYPE_UNSPECIFIED CraftingSchema_Runner_RunnerType = 0
	CraftingSchema_Runner_GITHUB_ACTION           CraftingSchema_Runner_RunnerType = 1
	CraftingSchema_Runner_GITLAB_PIPELINE         CraftingSchema_Runner_RunnerType = 2
	CraftingSchema_Runner_AZURE_PIPELINE          CraftingSchema_Runner_RunnerType = 3
	CraftingSchema_Runner_JENKINS_JOB             CraftingSchema_Runner_RunnerType = 4
	CraftingSchema_Runner_CIRCLECI_BUILD          CraftingSchema_Runner_RunnerType = 5
	CraftingSchema_Runner_DAGGER_PIPELINE         CraftingSchema_Runner_RunnerType = 6
)

func (CraftingSchema_Runner_RunnerType) Descriptor

func (CraftingSchema_Runner_RunnerType) Enum

func (CraftingSchema_Runner_RunnerType) EnumDescriptor deprecated

func (CraftingSchema_Runner_RunnerType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CraftingSchema_Runner_RunnerType.Descriptor instead.

func (CraftingSchema_Runner_RunnerType) Number

func (CraftingSchema_Runner_RunnerType) String

func (CraftingSchema_Runner_RunnerType) Type

Jump to

Keyboard shortcuts

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