materials

package
v1.104.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 65 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"
)
View Source
const (
	AnnotationToolNameKey    = "chainloop.material.tool.name"
	AnnotationToolVersionKey = "chainloop.material.tool.version"
	AnnotationToolsKey       = "chainloop.material.tools"
	AnnotationMaterialSize   = "chainloop.material.size"
	// AnnotationMaterialReferences links a material to one or more other
	// materials in the same attestation by their name (comma-separated).
	// Modeled on the OCI referrers API: the edge is stored on the referrer
	// (e.g. the EVIDENCE file) pointing at its subject(s); the reverse
	// direction is resolved by lookup. Generic across material kinds.
	AnnotationMaterialReferences = "chainloop.material.references"
	// AnnotationPolicyInput records, on an EVIDENCE material sourced via
	// --policy-input-from-file, the name of the policy input the file fed
	// (e.g. "ignored_paths"). The material name cannot carry it because input
	// names may contain underscores, which material names disallow.
	AnnotationPolicyInput = "chainloop.material.policy_input"
)
View Source
const AnnotationRadamsaCrashesCount = "chainloop.material.radamsa.crashes.count"

AnnotationRadamsaCrashesCount is the annotation holding the number of crashing inputs recorded in a RADAMSA_CRASHES material (0 means no crash).

Variables

View Source
var (
	// ErrTooManyEntries is returned when an archive has more qualifying entries
	// than the configured maximum.
	ErrTooManyEntries = errors.New("archive exceeds the maximum number of entries")
	// ErrArchiveTooLarge is returned when the running uncompressed size of an
	// archive exceeds the configured maximum.
	ErrArchiveTooLarge = errors.New("archive exceeds the maximum uncompressed size")
	// ErrUnsafeEntry is returned when an archive entry's path is absolute or escapes the extraction root.
	ErrUnsafeEntry = errors.New("unsafe entry path in archive")
)
View Source
var (
	// ErrInvalidMaterialType is returned when the provided material type
	// is not from the kind we are expecting
	ErrInvalidMaterialType = fmt.Errorf("unexpected material type")
	// ErrBaseUploadAndCraft is returned as a base error when the upload and craft of a material fails
	ErrBaseUploadAndCraft = errors.New("upload and craft error")
)

Functions

func ArchiveEntryBaseName added in v1.104.0

func ArchiveEntryBaseName(name string) string

ArchiveEntryBaseName returns the final element of an archive entry name using archive ("/") path semantics, independent of the host OS. Archive entry names are "/"-separated by spec; backslashes are normalized first so names produced on Windows resolve to the same basename everywhere (filepath.Base would treat "\\" as a separator only on Windows, yielding OS-dependent results).

func Craft

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

func IsExplodableKind added in v1.104.0

func IsExplodableKind(kind string) bool

IsExplodableKind reports whether an archive provided for kind should be expanded into one material per entry (true) or recorded whole (false).

func IsLegacyAnnotation added in v1.50.0

func IsLegacyAnnotation(key string) bool

IsLegacyAnnotation returns true if the annotation key is a legacy annotation

func SanitizeMaterialName added in v1.104.0

func SanitizeMaterialName(s string) string

SanitizeMaterialName converts s into a valid DNS-1123 material-name component: lowercase, with every run of characters outside [a-z0-9] collapsed to a single "-" and leading/trailing "-" trimmed. It returns "" when nothing usable remains; callers supply their own fallback.

func SetToolsAnnotation added in v1.50.0

func SetToolsAnnotation(m *api.Attestation_Material, tools []Tool)

SetToolsAnnotation sets the tools annotation as a JSON array in "name@version" format

func WalkArchiveEntries added in v1.104.0

func WalkArchiveEntries(path string, format ArchiveFormat, limits ArchiveLimits, yield func(name string, r io.Reader) error) error

WalkArchiveEntries calls yield for every regular file in the archive, enforcing the limits and skipping directories, symlinks, hardlinks, empty entries, and path-traversal entries.

Types

type AccessChkCrafter added in v1.100.3

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

AccessChkCrafter stores the text output of the Sysinternals AccessChk tool as supply-chain evidence. The raw text is stored as-is; the text-to-JSON projection used by the policy engine happens later, at evaluation time.

func NewAccessChkCrafter added in v1.100.3

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

func (*AccessChkCrafter) Craft added in v1.100.3

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

type ArchiveFormat added in v1.104.0

type ArchiveFormat int

ArchiveFormat identifies a supported archive container.

const (
	ArchiveNone ArchiveFormat = iota
	ArchiveZip
	ArchiveTar
	ArchiveTarGz
)

func DetectArchive added in v1.104.0

func DetectArchive(path string) (ArchiveFormat, error)

DetectArchive reports whether path is a supported archive and, if so, its format. Detection is by extension first; for files whose extension does not match, magic bytes are used as a backstop so renamed archives are still caught. A non-archive returns (ArchiveNone, nil).

type ArchiveLimits added in v1.104.0

type ArchiveLimits struct {
	MaxEntries   int
	MaxTotalSize int64
}

ArchiveLimits bounds archive expansion to guard against zip bombs.

func DefaultArchiveLimits added in v1.104.0

func DefaultArchiveLimits() ArchiveLimits

DefaultArchiveLimits returns the safe defaults: 10000 entries and 1 GiB total uncompressed size.

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 AsyncAPICraftOpt added in v1.95.2

type AsyncAPICraftOpt func(*AsyncAPICrafter)

func WithAsyncAPINoStrictValidation added in v1.95.2

func WithAsyncAPINoStrictValidation(noStrict bool) AsyncAPICraftOpt

type AsyncAPICrafter added in v1.95.2

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

func NewAsyncAPICrafter added in v1.95.2

func NewAsyncAPICrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger, opts ...AsyncAPICraftOpt) (*AsyncAPICrafter, error)

func (*AsyncAPICrafter) Craft added in v1.95.2

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

type AttestationCrafter

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

func NewAttestationCrafter

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

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 BlackduckSCAJSONCrafter added in v0.96.14

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

func NewBlackduckSCAJSONCrafter added in v0.96.14

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

func (*BlackduckSCAJSONCrafter) Craft added in v0.96.14

type CSAFCrafter

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

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

NewCSAFInformationalAdvisoryCrafter creates a new CSAF Informational Advisory crafter

func NewCSAFSecurityAdvisoryCrafter

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

NewCSAFSecurityAdvisoryCrafter creates a new CSAF Security Advisory crafter

func NewCSAFSecurityIncidentResponseCrafter

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

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

NewCSAFVEXCrafter creates a new CSAF VEX crafter

func (*CSAFCrafter) Craft

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

type ChainloopAIAgentConfigCrafter added in v1.82.0

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

func NewChainloopAIAgentConfigCrafter added in v1.82.0

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

NewChainloopAIAgentConfigCrafter generates a new CHAINLOOP_AI_AGENT_CONFIG material. This material type contains AI agent configuration data collected during attestation.

func (*ChainloopAIAgentConfigCrafter) Craft added in v1.82.0

Craft validates the AI agent config against the JSON schema, calculates the digest, uploads it and returns the material definition.

type ChainloopAICodingSessionCrafter added in v1.88.0

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

func NewChainloopAICodingSessionCrafter added in v1.88.0

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

NewChainloopAICodingSessionCrafter generates a new CHAINLOOP_AI_CODING_SESSION material. This material type contains AI coding session telemetry collected during attestation.

func (*ChainloopAICodingSessionCrafter) Craft added in v1.88.0

Craft validates the AI coding session against the JSON schema, calculates the digest, uploads it and returns the material definition.

type ChainloopPRInfoCrafter added in v1.63.0

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

func NewChainloopPRInfoCrafter added in v1.63.0

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

NewChainloopPRInfoCrafter generates a new CHAINLOOP_PR_INFO material. This material type contains Pull Request or Merge Request metadata collected automatically during attestation in a PR/MR context.

func (*ChainloopPRInfoCrafter) Craft added in v1.63.0

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

Craft will validate the PR info against the JSON schema, calculate the digest of the artifact, upload it and return the material definition.

type Craftable

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

type CraftingOpts added in v1.75.1

type CraftingOpts struct {
	NoStrictValidation bool
}

CraftingOpts contains options for crafting materials

type CycloneDXCraftOpt added in v1.75.1

type CycloneDXCraftOpt func(*CyclonedxJSONCrafter)

CycloneDXCraftOpt is a functional option for CyclonedxJSONCrafter

func WithCycloneDXNoStrictValidation added in v1.75.1

func WithCycloneDXNoStrictValidation(noStrict bool) CycloneDXCraftOpt

WithCycloneDXNoStrictValidation sets the noStrictValidation option

type CyclonedxJSONCrafter

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

func NewCyclonedxJSONCrafter

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

func (*CyclonedxJSONCrafter) Craft

type DetectSecretsCrafter added in v1.100.1

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

func NewDetectSecretsCrafter added in v1.100.1

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

func (*DetectSecretsCrafter) Craft added in v1.100.1

type DranzerCrafter added in v1.100.9

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

DranzerCrafter stores the text report of the CERT/CC dranzer ActiveX/COM control tester as supply-chain evidence. The raw text is stored as-is; the text-to-JSON projection used by the policy engine happens later, at evaluation time.

func NewDranzerCrafter added in v1.100.9

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

func (*DranzerCrafter) Craft added in v1.100.9

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

type EvidenceCrafter

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

func NewEvidenceCrafter

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

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 If the evidence is in JSON format with id, data (and optionally schema) fields, it will extract those as annotations

type GHASCodeScanCrafter added in v0.97.2

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

func NewGHASCodeScanCrafter added in v0.97.2

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

func (*GHASCodeScanCrafter) Craft added in v0.97.2

Craft will validate the CodeScan alerts report and craft the material

type GHASDependencyScanCrafter added in v0.97.2

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

func NewGHASDependencyScanCrafter added in v0.97.2

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

func (*GHASDependencyScanCrafter) Craft added in v0.97.2

Craft will validate the CodeScan alerts report and craft the material

type GHASSecretScanCrafter added in v0.97.2

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

func NewGHASSecretScanCrafter added in v0.97.2

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

func (*GHASSecretScanCrafter) Craft added in v0.97.2

Craft will validate the CodeScan alerts report and craft the material

type GitlabCrafter added in v0.96.10

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

func NewGitlabCrafter added in v0.96.10

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

func (*GitlabCrafter) Craft added in v0.96.10

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

type GitleaksReportCrafter added in v1.74.0

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

func NewGitleaksReportCrafter added in v1.74.0

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

func (*GitleaksReportCrafter) Craft added in v1.74.0

type GraphQLCrafter added in v1.95.2

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

func NewGraphQLCrafter added in v1.95.2

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

func (*GraphQLCrafter) Craft added in v1.95.2

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

type HelmChartCrafter

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

func NewHelmChartCrafter

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

func (*HelmChartCrafter) Craft

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

type JUnitXMLCrafter

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

func (*JUnitXMLCrafter) Craft

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

type JacocoCrafter added in v0.136.0

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

func NewJacocoCrafter added in v0.136.0

func NewJacocoCrafter(schema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) *JacocoCrafter

func (*JacocoCrafter) Craft added in v0.136.0

func (c *JacocoCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)

type NameAllocator added in v1.104.0

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

NameAllocator hands out sequential, unique DNS-1123 material names of the form "<prefix>-<n>" (n starting at 1). It is seeded with names already present in the attestation so derived names never overwrite existing materials.

func NewNameAllocator added in v1.104.0

func NewNameAllocator(existing []string) *NameAllocator

NewNameAllocator seeds the allocator with existing material names.

func (*NameAllocator) AllocateSequential added in v1.104.0

func (a *NameAllocator) AllocateSequential(prefix string) string

AllocateSequential returns the next unused "<prefix>-<n>" material name, where n is a zero-based counter that advances across calls and skips names already in use. prefix is sanitized to DNS-1123; an empty or symbol-only prefix yields the base "material" (so entries are named material-0, material-1, …).

type OCICraftOpt added in v0.100.0

type OCICraftOpt func(*OCIImageCrafter)

func WithArtifactTypeValidation added in v0.100.0

func WithArtifactTypeValidation(artifactTypeValidation string) OCICraftOpt

type OCIImageCrafter

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

func NewOCIImageCrafter

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

func (*OCIImageCrafter) Craft

func (i *OCIImageCrafter) Craft(ctx context.Context, imageRef string) (*api.Attestation_Material, error)

type OSSFScorecardCraftOpt added in v1.100.10

type OSSFScorecardCraftOpt func(*OSSFScorecardCrafter)

func WithOSSFScorecardNoStrictValidation added in v1.100.10

func WithOSSFScorecardNoStrictValidation(noStrict bool) OSSFScorecardCraftOpt

type OSSFScorecardCrafter added in v1.100.10

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

func NewOSSFScorecardCrafter added in v1.100.10

func NewOSSFScorecardCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger, opts ...OSSFScorecardCraftOpt) (*OSSFScorecardCrafter, error)

func (*OSSFScorecardCrafter) Craft added in v1.100.10

type OpenAPICraftOpt added in v1.95.2

type OpenAPICraftOpt func(*OpenAPICrafter)

func WithOpenAPINoStrictValidation added in v1.95.2

func WithOpenAPINoStrictValidation(noStrict bool) OpenAPICraftOpt

type OpenAPICrafter added in v1.95.2

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

func NewOpenAPICrafter added in v1.95.2

func NewOpenAPICrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger, opts ...OpenAPICraftOpt) (*OpenAPICrafter, error)

func (*OpenAPICrafter) Craft added in v1.95.2

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

type OpenVEXCrafter

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

func NewOpenVEXCrafter

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

func (*OpenVEXCrafter) Craft

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

type RadamsaCrashesCrafter added in v1.100.10

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

RadamsaCrashesCrafter crafts a RADAMSA_CRASHES material out of either a single crashing input or a crashes/ archive (tar.gz or zip). It is metadata-only: the crash count is recorded as an annotation rather than evaluated as content.

func NewRadamsaCrashesCrafter added in v1.100.10

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

func (*RadamsaCrashesCrafter) Craft added in v1.100.10

type RadamsaReportCrafter added in v1.100.10

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

RadamsaReportCrafter crafts a RADAMSA_REPORT material out of radamsa's -M metadata log.

func NewRadamsaReportCrafter added in v1.100.10

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

func (*RadamsaReportCrafter) Craft added in v1.100.10

type RunnerContextCrafter added in v1.25.0

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

func NewRunnerContextCrafter added in v1.25.0

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

func (*RunnerContextCrafter) Craft added in v1.25.0

type SARIFCrafter

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

func NewSARIFCrafter

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

func (*SARIFCrafter) Craft

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

type SLSAProvenanceCrafter added in v0.184.0

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

func NewSLSAProvenanceCrafter added in v0.184.0

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

SLSA Provenance in the form of Sigstore Bundle https://slsa.dev/spec/v1.0/provenance https://docs.sigstore.dev/about/bundle/

func (*SLSAProvenanceCrafter) Craft added in v0.184.0

func (i *SLSAProvenanceCrafter) 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 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 SigcheckCrafter added in v1.100.2

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

func NewSigcheckCrafter added in v1.100.2

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

func (*SigcheckCrafter) Craft added in v1.100.2

func (i *SigcheckCrafter) 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

type Tool added in v1.50.0

type Tool struct {
	Name    string
	Version string
}

Tool represents a tool with name and version

type TwistCLIScanCrafter added in v0.96.14

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

func NewTwistCLIScanCrafter added in v0.96.14

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

func (*TwistCLIScanCrafter) Craft added in v0.96.14

type ZAPCrafter added in v0.96.14

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

func NewZAPCrafter added in v0.96.14

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

func (*ZAPCrafter) Craft added in v0.96.14

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

Craft will extract the ZAP JSON report from the zip file and upload it to the CAS

Directories

Path Synopsis
Package accesschk parses the text output of the Sysinternals AccessChk tool (https://learn.microsoft.com/en-us/sysinternals/downloads/accesschk) into a structured representation.
Package accesschk parses the text output of the Sysinternals AccessChk tool (https://learn.microsoft.com/en-us/sysinternals/downloads/accesschk) into a structured representation.
Package dranzer parses the plain-text report produced by the CERT/CC dranzer tool (https://github.com/CERTCC/dranzer), which fuzz-tests ActiveX/COM controls.
Package dranzer parses the plain-text report produced by the CERT/CC dranzer tool (https://github.com/CERTCC/dranzer), which fuzz-tests ActiveX/COM controls.
Package radamsa parses radamsa's -M metadata log into structured records.
Package radamsa parses radamsa's -M metadata log into structured records.

Jump to

Keyboard shortcuts

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