inspector2util

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FindingDescription                      = "find_desc"
	FindingSeverity                         = "find_severity"
	ImageHash                               = "image_hash"
	ImageRepositoryName                     = "image_repo_name"
	ImageNameVulnerabilityID                = "image_name_vuln_id"
	VulnerabilityCreated                    = "vuln_created"
	VulnerabilityCreatedYear                = "vuln_created_year"
	VulnerabilityCreatedAgeMonthsInt        = "vuln_created_age_months_int"
	VulnerabilitySLADueDate                 = "vuln_sla_due_date"
	VulnerabilityID                         = "vuln_id"
	VulnerabilitySeverity                   = "vuln_severity"
	VulnerabilitySourceURL                  = "vuln_url"
	VulnerabilityReferenceURLs              = "vuln_ref_urls"
	PackageInfoFilepath                     = "pkg_filepath"
	PackageInfoName                         = "pkg_name"
	PackageInfoVersion                      = "pkg_version"
	PackageInfoVersionFixed                 = "pkg_version_fixed"
	PackagesFilepathsAtVersion              = "pkgs_filepaths_version"
	PackagesFilepathsAtVersionFixed         = "pkgs_filepaths_version_fixed"
	PackagesNamesAtVersion                  = "pkgs_names_version"
	PackagesNamesAtVersionsFixed            = "pkgs_names_version_fixed"
	PackagesNamesAndFilepathsAtVersion      = "pkgs_names_filepaths_version"
	PackagesNamesAndFilepathsAtVersionFixed = "pkgs_names_filepaths_version_fixed"
)

Variables

This section is empty.

Functions

func CanonicalSeverity

func CanonicalSeverity(s string) string

func ReadFileListFindingsOutput

func ReadFileListFindingsOutput(filename string) (inspector2.ListFindingsOutput, error)

func TableColumnsImageVulnerabilities

func TableColumnsImageVulnerabilities() ([]string, map[int]string)

TableColumnsImageVulnerabilities returns rows where each row is an image+vulnerability.

func TableColumnsImageVulnerabilityPackages

func TableColumnsImageVulnerabilityPackages() []string

TableColumnsImageVulnerabilityPackages returns rows where each row is an image+vulnerability+package.

Types

type Finding

type Finding types.Finding

func (Finding) FilePaths

func (f Finding) FilePaths() []string

func (Finding) FilePathsInclPOMProperties

func (f Finding) FilePathsInclPOMProperties() bool

func (Finding) FindingOrVendorSeverity added in v0.7.2

func (f Finding) FindingOrVendorSeverity(canonical bool) string

func (Finding) FindingSeverity

func (f Finding) FindingSeverity(canonical bool) string

func (Finding) ImageHashes

func (f Finding) ImageHashes() []string

func (Finding) ImageRepoNameVulnIDs

func (f Finding) ImageRepoNameVulnIDs(sep string) []string

ImageRepoNameVulnID is used as a unique key across images.

func (Finding) ImageRepositoryNames

func (f Finding) ImageRepositoryNames() []string

func (Finding) MustVulnerabilityField

func (f Finding) MustVulnerabilityField(field, def string, opts *govex.ValueOpts) string

func (Finding) PackageSlices

func (f Finding) PackageSlices(fields []string, opts *govex.ValueOpts) ([][]string, error)

PackageSlices returns one slice per vulnerable package.

func (Finding) VendorCreatedAt

func (f Finding) VendorCreatedAt() *time.Time

func (Finding) VendorCreatedAtAgeMonths

func (f Finding) VendorCreatedAtAgeMonths() *float32

func (Finding) VendorSeverity

func (f Finding) VendorSeverity(canonical bool) string

func (Finding) VulnerabilityField

func (f Finding) VulnerabilityField(field string, opts *govex.ValueOpts) (string, error)

func (Finding) VulnerabilityFields

func (f Finding) VulnerabilityFields(fields []string, opts *govex.ValueOpts) ([]string, error)

VulnerabilitySlices returns one slice per vulnerable package.

func (Finding) VulnerabilityID

func (f Finding) VulnerabilityID() string

func (Finding) VulnerablePackages

func (f Finding) VulnerablePackages() []types.VulnerablePackage

type Findings

type Findings []types.Finding

func (Findings) FilterImageHashes

func (fs Findings) FilterImageHashes(hashesIncl []string) Findings

func (Findings) FilterPOMPropertiesExcl

func (fs Findings) FilterPOMPropertiesExcl() Findings

func (Findings) FindingOneRawMatch

func (fs Findings) FindingOneRawMatch(s string) *Finding

func (Findings) HistogramSets

func (fs Findings) HistogramSets() *histogram.HistogramSets

HistogramSets returns histogram sets using the fields

func (Findings) ImageRepoNameVulnIDs

func (fs Findings) ImageRepoNameVulnIDs(sep string) []string

ImageRepoNameVulnID is used as a unique key across images.

func (Findings) ImageRepositoryNames

func (fs Findings) ImageRepositoryNames() []string

ImageRepositoryNames returns a list of unique repo names

func (Findings) Stats

func (fs Findings) Stats() FindingsStats

func (Findings) TableImageVulnerabilities

func (fs Findings) TableImageVulnerabilities(cols []string, fmtMap map[int]string, opts *ReportOptions) (*table.Table, error)

func (Findings) TableImagenameSeverityYear

func (fs Findings) TableImagenameSeverityYear(opts *ReportOptions) (*table.Table, error)

func (Findings) TablePackages

func (fs Findings) TablePackages(cols []string, opts *govex.ValueOpts) (*table.Table, error)

Table is used as a unique key across images.

func (Findings) TablePivotImagenameSeverityCounts

func (fs Findings) TablePivotImagenameSeverityCounts(opts *ReportOptions) (*table.Table, error)

func (Findings) TableSetVulnerabilities

func (fs Findings) TableSetVulnerabilities(opts *ReportOptions) (*table.TableSet, error)

type FindingsStats

type FindingsStats struct {
	Findings Findings
}

func (FindingsStats) FindingVulnerablePackageCounts

func (stats FindingsStats) FindingVulnerablePackageCounts() map[string]int

func (FindingsStats) ImagenameVulnidCounts

func (stats FindingsStats) ImagenameVulnidCounts() map[string]int

ImageRepoNameVulnID is used as a unique key across images.

func (FindingsStats) ImagenameVulnidRevCounts

func (stats FindingsStats) ImagenameVulnidRevCounts() map[string]int

func (FindingsStats) VendorCreatedAtMonthly

func (stats FindingsStats) VendorCreatedAtMonthly() map[string]int

func (FindingsStats) VendorCreatedAtYearly

func (stats FindingsStats) VendorCreatedAtYearly() map[string]int

func (FindingsStats) VendorSeverities

func (stats FindingsStats) VendorSeverities(canonicalSev bool) map[string]int

type Package

type Package types.VulnerablePackage

func (Package) FilepathAtVersion

func (p Package) FilepathAtVersion() string

func (Package) FilepathAtVersionFixed

func (p Package) FilepathAtVersionFixed() string

func (Package) FilepathString

func (p Package) FilepathString() string

func (Package) NameAndFilepathAtVersion

func (p Package) NameAndFilepathAtVersion() string

func (Package) NameAndFilepathAtVersionFixed

func (p Package) NameAndFilepathAtVersionFixed() string

func (Package) NameAtVersion

func (p Package) NameAtVersion() string

func (Package) NameAtVersionFixed

func (p Package) NameAtVersionFixed() string

func (Package) NameString

func (p Package) NameString() string

func (Package) VersionFixedString

func (p Package) VersionFixedString() string

func (Package) VersionString

func (p Package) VersionString() string

type Packages

type Packages []types.VulnerablePackage

func (Packages) FilepathsAtVersion

func (ps Packages) FilepathsAtVersion() string

func (Packages) FilepathsAtVersionFixed

func (ps Packages) FilepathsAtVersionFixed() string

func (Packages) NamesAndFilepathsAtVersion

func (ps Packages) NamesAndFilepathsAtVersion() string

func (Packages) NamesAndFilepathsAtVersionFixed

func (ps Packages) NamesAndFilepathsAtVersionFixed() string

type ReportOptions added in v0.7.2

type ReportOptions struct {
	ColumnInsertOptions       []table.ColumnInsertOpts
	VulnerabilityValueOptions *govex.ValueOpts
}

type Resource

type Resource types.Resource

func (Resource) ImageHash

func (r Resource) ImageHash() string

func (Resource) ImageRepositoryName

func (r Resource) ImageRepositoryName() string

func (Resource) ImageTagFirst

func (r Resource) ImageTagFirst() string

Jump to

Keyboard shortcuts

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