vulnerability

package
v1.4.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 3 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

Overview

Package vulnerability defines the backend-agnostic contract for vulnerability scanning. Backends (e.g. Trustify, Quay) implement Scanner and return Finding DTOs owned by this package; the sync task converts them to persistence models centrally, so backends never depend on the store schema.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequiresSBOMUpload

func RequiresSBOMUpload(b config.VulnerabilityBackend) bool

RequiresSBOMUpload reports whether the given (already-resolved) backend needs client-side SBOM upload. Unknown backends return false so callers default to "skip upload".

Types

type BackendCapabilities

type BackendCapabilities struct {
	// RequiresSBOMUpload reports whether the backend needs client-side SBOM
	// upload (e.g. Trustify) rather than indexing images natively (e.g. Quay).
	RequiresSBOMUpload bool
}

BackendCapabilities describes static, compile-time properties of a vulnerability backend that consumers need without constructing a Scanner.

type Finding

type Finding struct {
	CveID       string
	ImageDigest string
	Severity    string
	CvssScore   *float64
	Status      string
	Issuer      *Issuer
	AdvisoryID  *string
	Description string
	PublishedAt *time.Time
}

Finding is a backend-agnostic vulnerability finding for a single image digest.

type ImageRef

type ImageRef struct {
	Digest string
	Image  string
}

ImageRef pairs a deployed image's digest with its full image reference. Digest is always populated; Image may be empty when a device reports a digest but no image reference.

type Issuer

type Issuer struct {
	ID      string
	Name    string
	CpeKey  *string
	Website *string
}

Issuer identifies the publisher of an advisory (e.g. "Red Hat", "NVD").

type Scanner

type Scanner interface {
	// ScanImages returns findings keyed by image digest for the given images.
	ScanImages(ctx context.Context, images []ImageRef) (map[string][]Finding, error)
}

Scanner retrieves vulnerability findings for a set of deployed images.

Directories

Path Synopsis
Package backends wires the concrete vulnerability scanner backends to the backend-agnostic vulnerability.Scanner contract.
Package backends wires the concrete vulnerability scanner backends to the backend-agnostic vulnerability.Scanner contract.

Jump to

Keyboard shortcuts

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