vulnreport

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

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.

The conversion logic lives in the carabiner-dev/osv library; this transformer is a thin adapter that routes each input predicate to the right converter and wraps the result as a predicate.

Index

Constants

View Source
const (
	OutputOSV        = "osv"
	OutputVulnReport = "vulnreport"
)

Output formats the vulnreport transformer can emit.

View Source
const GrypePredicateType = attestation.PredicateType("https://github.com/anchore/grype")

GrypePredicateType identifies a Grype JSON report. Grype does not define an official in-toto predicate type, so we adopt the tool's repository URL.

Variables

View Source
var ClassName = "vulnreport"
View Source
var PredicateTypes = []attestation.PredicateType{
	ctrivy.PredicateType,
	cosv.PredicateType,
	legacyOSVPredicateType,
	GrypePredicateType,
}

PredicateTypes are the scanner report predicate types this transformer accepts as input.

Functions

This section is empty.

Types

type Config added in v1.1.5

type Config struct {
	// Output selects the predicate format emitted by Mutate.
	// Defaults to "osv". "vulnreport" emits an in-toto vulns/v0.2 predicate.
	Output string `json:"output"`
}

Config is the user-facing configuration for the vulnreport transformer.

type Transformer

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

Transformer implements the normalizer from scanner reports to OSV / vulns.

func New added in v1.1.5

func New() *Transformer

func (*Transformer) Init added in v1.1.5

func (t *Transformer) Init(raw *structpb.Struct) error

Init parses the policy-supplied config and applies defaults.

func (*Transformer) Mutate

Jump to

Keyboard shortcuts

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