rocky

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	db.Operation
	Put(*bolt.Tx, PutInput) error
	Get(release, pkgName, arch string) ([]types.Advisory, error)
}

type Date

type Date struct {
	Date string `json:"date"`
}

type Package

type Package struct {
	Name     string `json:"name,omitempty"`
	Epoch    string `json:"epoch,omitempty"`
	Version  string `json:"version,omitempty"`
	Release  string `json:"release,omitempty"`
	Arch     string `json:"arch,omitempty"`
	Filename string `json:"filename,omitempty"`
}

Package has affected package information

type PutInput

type PutInput struct {
	PlatformName string
	CveID        string
	Vuln         types.VulnerabilityDetail
	Advisories   map[string]types.Advisories // pkg name => advisory
	Erratum      RLSA                        // for extensibility, not used in trivy-db
}

type RLSA

type RLSA struct {
	ID          string      `json:"id,omitempty"`
	Title       string      `json:"title,omitempty"`
	Severity    string      `json:"severity,omitempty"`
	Description string      `json:"description,omitempty"`
	Packages    []Package   `json:"packages,omitempty"`
	References  []Reference `json:"references,omitempty"`
	CveIDs      []string    `json:"cveids,omitempty"`
	IssuedDate  Date        `json:"issued,omitempty"`
}

RLSA has detailed data of RLSA

type Reference

type Reference struct {
	Href  string `json:"href,omitempty"`
	ID    string `json:"id,omitempty"`
	Title string `json:"title,omitempty"`
	Type  string `json:"type,omitempty"`
}

Reference has reference information

type Rocky

type Rocky struct {
	db.Operation
}

func (*Rocky) Get

func (r *Rocky) Get(release, pkgName, arch string) ([]types.Advisory, error)

func (*Rocky) Put

func (r *Rocky) Put(tx *bolt.Tx, input PutInput) error

type VulnSrc

type VulnSrc struct {
	DB
}

func NewVulnSrc

func NewVulnSrc() *VulnSrc

func (*VulnSrc) Name

func (vs *VulnSrc) Name() types.SourceID

func (*VulnSrc) Update

func (vs *VulnSrc) Update(dir string) error

Jump to

Keyboard shortcuts

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