Documentation
¶
Overview ¶
Package report contains parsers and helpers for vulnerability scan reports (e.g., Trivy).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindOptimalFixedVersionWithPatchLevel ¶ added in v0.12.0
func FindOptimalFixedVersionWithPatchLevel(installedVersion string, fixedVersions []string, libraryPatchLevel string) string
FindOptimalFixedVersionWithPatchLevel finds the best version that fixes all CVEs based on library patch level preference. libraryPatchLevel can be "patch", "minor", or "major": - "patch": only updates to patch versions (same major.minor), no fallback to minor/major - "minor": only updates to patch or minor versions, never major versions - "major": behavior depends on version format:
- If comma-separated versions exist: prefers patch > minor > major for compatibility
- If no comma-separated versions: chooses highest available version to fix all CVEs
func TryParseScanReport ¶
func TryParseScanReport(file, scanner, pkgTypes, libraryPatchLevel string) (*unversioned.UpdateManifest, error)
Types ¶
type ErrorUnsupported ¶
type ErrorUnsupported struct {
// contains filtered or unexported fields
}
func (*ErrorUnsupported) Error ¶
func (e *ErrorUnsupported) Error() string
type ScanReportParser ¶
type ScanReportParser interface {
Parse(string) (*unversioned.UpdateManifest, error)
ParseWithLibraryPatchLevel(string, string) (*unversioned.UpdateManifest, error)
}
type TrivyParser ¶
type TrivyParser struct{}
func NewTrivyParser ¶ added in v0.5.0
func NewTrivyParser() *TrivyParser
func (*TrivyParser) Parse ¶
func (t *TrivyParser) Parse(file string) (*unversioned.UpdateManifest, error)
func (*TrivyParser) ParseWithLibraryPatchLevel ¶ added in v0.12.0
func (t *TrivyParser) ParseWithLibraryPatchLevel(file, libraryPatchLevel string) (*unversioned.UpdateManifest, error)
Click to show internal directories.
Click to hide internal directories.