kb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applicability

type Applicability struct {
	OSFamilies     []string `yaml:"osFamilies" json:"osFamilies"`
	Distributions  []string `yaml:"distributions" json:"distributions"`
	OSVersionRange string   `yaml:"osVersionRange" json:"osVersionRange"`
	Architectures  []string `yaml:"architectures" json:"architectures"`
}

type CveMapping

type CveMapping struct {
	CVEID         string         `yaml:"cveId" json:"cveId"`
	TemplateID    string         `yaml:"templateId" json:"templateId"`
	Parameters    map[string]any `yaml:"parameters" json:"parameters"`
	Applicability Applicability  `yaml:"applicability" json:"applicability"`
	Notes         string         `yaml:"notes" json:"notes"`
	Source        SourceInfo     `yaml:"source" json:"source"`
	SourcePath    string         `yaml:"-" json:"-"`
}

func LoadCveMappingsFromDir

func LoadCveMappingsFromDir(root string) ([]*CveMapping, error)

LoadCveMappingsFromDir loads all CVE mappings from YAML files under a directory.

func (*CveMapping) Validate

func (m *CveMapping) Validate() []error

Validate ensures the CVE mapping has required fields.

type PackageRelease

type PackageRelease struct {
	OSFamily     string     `yaml:"osFamily" json:"osFamily"`
	Distribution string     `yaml:"distribution" json:"distribution"`
	Release      string     `yaml:"release" json:"release"`
	Architecture string     `yaml:"architecture" json:"architecture"`
	PackageName  string     `yaml:"packageName" json:"packageName"`
	Version      string     `yaml:"version" json:"version"`
	FixesCVEs    []string   `yaml:"fixesCves" json:"fixesCves"`
	Source       SourceInfo `yaml:"source" json:"source"`
	SourcePath   string     `yaml:"-" json:"-"`
}

func LoadPackageReleasesFromDir

func LoadPackageReleasesFromDir(root string) ([]*PackageRelease, error)

LoadPackageReleasesFromDir loads all package releases from YAML files under a directory.

func (*PackageRelease) Validate

func (p *PackageRelease) Validate() []error

Validate ensures the package release has required fields.

type SourceInfo

type SourceInfo struct {
	Kind       string `yaml:"kind" json:"kind"`
	Reference  string `yaml:"reference" json:"reference"`
	ImportedAt string `yaml:"importedAt" json:"importedAt"`
}

Jump to

Keyboard shortcuts

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