transformer

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class string

func (*Class) Name

func (c *Class) Name() string

func (*Class) Version

func (c *Class) Version() string

type Factory

type Factory struct{}

Factory returns a list of transformers from a list of string identifiers

func (*Factory) Get

func (tf *Factory) Get(c Class, config *structpb.Struct) (Transformer, error)

Get returns a transformer for the given class, initialized with the supplied config. Pass nil config when the policy declared none; each transformer applies its own defaults.

type Info

type Info struct {
	Identifier string
	Version    string
	Hashes     map[string]string
}

type InputRecord

type InputRecord struct {
	Type     attestation.PredicateType
	Subjects attestation.Subject
	Hashes   map[string]string
}

InputRecord records the inputs that went into a predicate transformation process.

type OutputRecord

type OutputRecord struct {
	Hashes map[string]string
	Type   attestation.PredicateType
}

OutputRecord is a struct that catpures metadata about the outputs resulting from a tranformer run.

type Record

type Record struct {
	Date        *time.Time
	Transformer Info
	Inputs      []InputRecord
	Output      []OutputRecord
}

Record is a struct that records a run of a transformer.

type Transformer

type Transformer interface {
	// Init configures the transformer from policy-supplied config. Implementations
	// must tolerate a nil config and apply defaults.
	Init(*structpb.Struct) error
	Mutate(attestation.Subject, []attestation.Predicate) (attestation.Subject, []attestation.Predicate, error)
}

Transformer is an interface that models a predicate transformer

Directories

Path Synopsis
Package vex is a transformer that reads in a vulnerability report and a number of VEX documents and suppresses those that do not affect the subject
Package vex is a transformer that reads in a vulnerability report and a number of VEX documents and suppresses those that do not affect the subject
Package vulnreport implements a transformer that normalizes scanner reports (Trivy, Grype, OSV-Scanner) into the OSV results format, and optionally projects them onto the in-toto vulns/v0.2 predicate.
Package vulnreport implements a transformer that normalizes scanner reports (Trivy, Grype, OSV-Scanner) into the OSV results format, and optionally projects them onto the in-toto vulns/v0.2 predicate.

Jump to

Keyboard shortcuts

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