alma

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alma

type Alma struct {
	db.Operation
}

Alma implements the DB interface

func (*Alma) Get

func (a *Alma) Get(release, pkgName string) ([]types.Advisory, error)

func (*Alma) Put

func (a *Alma) Put(tx *bolt.Tx, input PutInput) error

type DB

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

type Date

type Date struct {
	Date int64 `json:"$date"`
}

type Erratum

type Erratum struct {
	ID           OID         `json:"_id"`
	BsRepoID     OID         `json:"bs_repo_id"`
	UpdateinfoID string      `json:"updateinfo_id"`
	Description  string      `json:"description"`
	Fromstr      string      `json:"fromstr"`
	IssuedDate   Date        `json:"issued_date"`
	Pkglist      Pkglist     `json:"pkglist"`
	Pushcount    string      `json:"pushcount"`
	References   []Reference `json:"references"`
	Release      string      `json:"release"`
	Rights       string      `json:"rights"`
	Severity     string      `json:"severity"`
	Solution     string      `json:"solution"`
	Status       string      `json:"status"`
	Summary      string      `json:"summary"`
	Title        string      `json:"title"`
	Type         string      `json:"type"`
	UpdatedDate  Date        `json:"updated_date"`
	Version      string      `json:"version"`
}

type Module

type Module struct {
	Stream  string `json:"stream,omitempty"`
	Name    string `json:"name,omitempty"`
	Version int64  `json:"version,omitempty"`
	Arch    string `json:"arch,omitempty"`
	Context string `json:"context,omitempty"`
}

type OID

type OID struct {
	OID string `json:"$oid,omitempty"`
}

type Package

type Package struct {
	Name            string      `json:"name"`
	Version         string      `json:"version"`
	Release         string      `json:"release"`
	Epoch           string      `json:"epoch"`
	Arch            string      `json:"arch"`
	Src             string      `json:"src"`
	Filename        string      `json:"filename"`
	Sum             string      `json:"sum"`
	SumType         interface{} `json:"sum_type"`
	RebootSuggested int         `json:"reboot_suggested"`
}

type Pkglist

type Pkglist struct {
	Name      string    `json:"name"`
	Shortname string    `json:"shortname"`
	Packages  []Package `json:"packages"`
	Module    Module    `json:"module"`
}

type PutInput

type PutInput struct {
	PlatformName string
	CveID        string
	Vuln         types.VulnerabilityDetail
	Advisories   map[string]types.Advisory
	Erratum      Erratum // for extensibility, not used in trivy-db
}

type Reference

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

type VulnSrc

type VulnSrc struct {
	DB // Those who want to customize Trivy DB can override put/get methods.
}

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