model

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 1 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

View Source
const (
	SourceGrype = "grype"
	SourceOSV   = "osv"
)
View Source
const (
	FixStateFixed    = "fixed"
	FixStateNotFixed = "not-fixed"
	FixStateWontFix  = "wont-fix"
	FixStateUnknown  = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	ID             string   `json:"id"`
	Aliases        []string `json:"aliases,omitempty"`
	Package        Package  `json:"package"`
	Severity       Severity `json:"severity"`
	CVSS           float64  `json:"cvss,omitempty"`
	CVSSVector     string   `json:"cvss_vector,omitempty"`
	EPSS           float64  `json:"epss,omitempty"`
	EPSSPercentile float64  `json:"epss_percentile,omitempty"`
	KEV            bool     `json:"kev"`
	FixVersions    []string `json:"fix_versions,omitempty"`
	FixState       string   `json:"fix_state"`
	Description    string   `json:"description,omitempty"`
	URLs           []string `json:"urls,omitempty"`
	Sources        []string `json:"sources"`
	Fresh          bool     `json:"fresh"`
	Score          int      `json:"score"`
}

func (Finding) HasFix

func (f Finding) HasFix() bool

func (Finding) IDs

func (f Finding) IDs() []string

type Package

type Package struct {
	Name      string   `json:"name"`
	Version   string   `json:"version"`
	Type      string   `json:"type"`
	PURL      string   `json:"purl,omitempty"`
	Locations []string `json:"locations,omitempty"`
}

func (Package) Key

func (p Package) Key() string

type Scan

type Scan struct {
	Target       string    `json:"target"`
	Packages     int       `json:"packages"`
	Inventory    []Package `json:"-"`
	Findings     []Finding `json:"findings"`
	Sources      []string  `json:"sources"`
	Warnings     []string  `json:"warnings,omitempty"`
	Distro       string    `json:"distro,omitempty"`
	GrypeVersion string    `json:"grype_version,omitempty"`
	DBBuilt      string    `json:"db_built,omitempty"`
}

type Severity

type Severity string
const (
	SeverityCritical   Severity = "CRITICAL"
	SeverityHigh       Severity = "HIGH"
	SeverityMedium     Severity = "MEDIUM"
	SeverityLow        Severity = "LOW"
	SeverityNegligible Severity = "NEGLIGIBLE"
	SeverityUnknown    Severity = "UNKNOWN"
)

func ParseSeverity

func ParseSeverity(s string) Severity

Jump to

Keyboard shortcuts

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