predicate

package
v0.58.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosignVulnPredicate

type CosignVulnPredicate struct {
	Invocation Invocation `json:"invocation"`
	Scanner    Scanner    `json:"scanner"`
	Metadata   Metadata   `json:"metadata"`
}

CosignVulnPredicate represents the Cosign Vulnerability Scan Record. CosignVulnPredicate is based on structures in the Cosign repository. We defined them ourselves to reduce our dependence on the repository. cf. https://github.com/sigstore/cosign/blob/e0547cff64f98585a837a524ff77ff6b47ff5609/pkg/cosign/attestation/attestation.go#L45-L50

type DB

type DB struct {
	URI     string `json:"uri"`
	Version string `json:"version"`
}

type Invocation

type Invocation struct {
	Parameters any    `json:"parameters"`
	URI        string `json:"uri"`
	EventID    string `json:"event_id"`
	BuilderID  string `json:"builder.id"`
}

type Metadata

type Metadata struct {
	ScanStartedOn  time.Time `json:"scanStartedOn"`
	ScanFinishedOn time.Time `json:"scanFinishedOn"`
}

type Scanner

type Scanner struct {
	URI     string       `json:"uri"`
	Version string       `json:"version"`
	DB      DB           `json:"db"`
	Result  types.Report `json:"result"`
}

type VulnWriter

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

func NewVulnWriter

func NewVulnWriter(output io.Writer, version string) VulnWriter

func (VulnWriter) Write

func (w VulnWriter) Write(ctx context.Context, report types.Report) error

Jump to

Keyboard shortcuts

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