materials

package
v0.89.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CategorySecurityIncidentResponse = "csaf_security_incident_response"
	CategoryInformationalAdvisory    = "csaf_informational_advisory"
	CategorySecurityAdvisory         = "csaf_security_advisory"
	CategoryVEX                      = "csaf_vex"
)

Variables

View Source
var ErrInvalidMaterialType = fmt.Errorf("unexpected material type")

ErrInvalidMaterialType is returned when the provided material type is not from the kind we are expecting

Functions

func Craft

func Craft(ctx context.Context, materialSchema *schemaapi.CraftingSchema_Material, value string, casBackend *casclient.CASBackend, ociAuth authn.Keychain, logger *zerolog.Logger) (*api.Attestation_Material, error)

Types

type ArtifactCrafter

type ArtifactCrafter struct {
	// contains filtered or unexported fields
}

func (*ArtifactCrafter) Craft

func (i *ArtifactCrafter) Craft(ctx context.Context, artifactPath string) (*api.Attestation_Material, error)

Craft will calculate the digest of the artifact, simulate an upload and return the material definition

type AttestationCrafter added in v0.85.0

type AttestationCrafter struct {
	// contains filtered or unexported fields
}

func NewAttestationCrafter added in v0.85.0

func NewAttestationCrafter(schema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*AttestationCrafter, error)

NewAttestationCrafter generates a new Attestation material. Attestation materials represent a chainloop attestation submitted in a different workflow. This is useful to link related workflow runs. For instance, the deployment of different microservices coming from a common build workflow.

func (*AttestationCrafter) Craft added in v0.85.0

func (i *AttestationCrafter) Craft(ctx context.Context, artifactPath string) (*api.Attestation_Material, error)

Craft will calculate the digest of the artifact, simulate an upload and return the material definition

type CSAFCrafter added in v0.86.0

type CSAFCrafter struct {
	// contains filtered or unexported fields
}

CSAFCrafter is a crafter for CSAF VEX, CSAF Informational Advisory, CSAF Security Incident Response, and CSAF Security Advisory material types. It implements the Crafter interface.

func NewCSAFInformationalAdvisoryCrafter added in v0.86.0

func NewCSAFInformationalAdvisoryCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*CSAFCrafter, error)

NewCSAFInformationalAdvisoryCrafter creates a new CSAF Informational Advisory crafter

func NewCSAFSecurityAdvisoryCrafter added in v0.86.0

func NewCSAFSecurityAdvisoryCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*CSAFCrafter, error)

NewCSAFSecurityAdvisoryCrafter creates a new CSAF Security Advisory crafter

func NewCSAFSecurityIncidentResponseCrafter added in v0.86.0

func NewCSAFSecurityIncidentResponseCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*CSAFCrafter, error)

NewCSAFSecurityIncidentResponseCrafter creates a new CSAF Security Incident Response crafter

func NewCSAFVEXCrafter added in v0.19.0

func NewCSAFVEXCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*CSAFCrafter, error)

NewCSAFVEXCrafter creates a new CSAF VEX crafter

func (*CSAFCrafter) Craft added in v0.86.0

func (i *CSAFCrafter) Craft(ctx context.Context, filepath string) (*api.Attestation_Material, error)

type Craftable

type Craftable interface {
	Craft(ctx context.Context, value string) (*api.Attestation_Material, error)
}

type CyclonedxJSONCrafter

type CyclonedxJSONCrafter struct {
	// contains filtered or unexported fields
}

func NewCyclonedxJSONCrafter

func NewCyclonedxJSONCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*CyclonedxJSONCrafter, error)

func (*CyclonedxJSONCrafter) Craft

type EvidenceCrafter added in v0.85.0

type EvidenceCrafter struct {
	// contains filtered or unexported fields
}

func NewEvidenceCrafter added in v0.85.0

func NewEvidenceCrafter(schema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*EvidenceCrafter, error)

NewEvidenceCrafter generates a new Evidence material. 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), ...

func (*EvidenceCrafter) Craft added in v0.85.0

func (i *EvidenceCrafter) Craft(ctx context.Context, artifactPath string) (*api.Attestation_Material, error)

Craft will calculate the digest of the artifact, simulate an upload and return the material definition

type HelmChartCrafter added in v0.83.0

type HelmChartCrafter struct {
	// contains filtered or unexported fields
}

func NewHelmChartCrafter added in v0.83.0

func NewHelmChartCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend,
	l *zerolog.Logger) (*HelmChartCrafter, error)

func (*HelmChartCrafter) Craft added in v0.83.0

func (c *HelmChartCrafter) Craft(ctx context.Context, filepath string) (*api.Attestation_Material, error)

type JUnitXMLCrafter added in v0.10.0

type JUnitXMLCrafter struct {
	// contains filtered or unexported fields
}

func NewJUnitXMLCrafter added in v0.10.0

func NewJUnitXMLCrafter(schema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*JUnitXMLCrafter, error)

func (*JUnitXMLCrafter) Craft added in v0.10.0

func (i *JUnitXMLCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)

type OCIImageCrafter

type OCIImageCrafter struct {
	// contains filtered or unexported fields
}

func NewOCIImageCrafter

func NewOCIImageCrafter(schema *schemaapi.CraftingSchema_Material, ociAuth authn.Keychain, l *zerolog.Logger) (*OCIImageCrafter, error)

func (*OCIImageCrafter) Craft

type OpenVEXCrafter added in v0.19.0

type OpenVEXCrafter struct {
	// contains filtered or unexported fields
}

func NewOpenVEXCrafter added in v0.19.0

func NewOpenVEXCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*OpenVEXCrafter, error)

func (*OpenVEXCrafter) Craft added in v0.19.0

func (i *OpenVEXCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)

type SARIFCrafter added in v0.19.0

type SARIFCrafter struct {
	// contains filtered or unexported fields
}

func NewSARIFCrafter added in v0.19.0

func NewSARIFCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*SARIFCrafter, error)

func (*SARIFCrafter) Craft added in v0.19.0

func (i *SARIFCrafter) Craft(ctx context.Context, filepath string) (*api.Attestation_Material, error)

type SPDXJSONCrafter

type SPDXJSONCrafter struct {
	// contains filtered or unexported fields
}

func NewSPDXJSONCrafter

func NewSPDXJSONCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*SPDXJSONCrafter, error)

func (*SPDXJSONCrafter) Craft

func (i *SPDXJSONCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)

type StringCrafter

type StringCrafter struct {
	// contains filtered or unexported fields
}

func NewStringCrafter

func NewStringCrafter(materialSchema *schemaapi.CraftingSchema_Material) (*StringCrafter, error)

func (*StringCrafter) Craft

Jump to

Keyboard shortcuts

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