osv

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 Advisory added in v0.0.6

type Advisory struct {
	Ecosystem       types.Ecosystem
	PkgName         string
	VulnerabilityID string
	Aliases         []string

	// Advisory detail
	VulnerableVersions []string
	PatchedVersions    []string

	// Vulnerability detail
	Severity     types.Severity
	Title        string
	Description  string
	References   []string
	CVSSScoreV3  float64
	CVSSVectorV3 string
}

type Affected added in v0.0.6

type Affected struct {
	Package           Package           `json:"package"`
	Severities        []Severity        `json:"severity,omitempty"`
	Ranges            []Range           `json:"ranges,omitempty"`
	Versions          []string          `json:"versions,omitempty"`
	EcosystemSpecific EcosystemSpecific `json:"ecosystem_specific"`
}

type Credit added in v0.0.6

type Credit struct {
	Name string `json:"name"`
}

type Ecosystem added in v0.0.6

type Ecosystem string

type EcosystemSpecific added in v0.0.6

type EcosystemSpecific struct {
	Imports []Import `json:"imports,omitempty"`
}

type Entry

type Entry struct {
	SchemaVersion    string          `json:"schema_version,omitempty"`
	ID               string          `json:"id"`
	Modified         time.Time       `json:"modified,omitempty"`
	Published        time.Time       `json:"published,omitempty"`
	Withdrawn        *time.Time      `json:"withdrawn,omitempty"`
	Aliases          []string        `json:"aliases,omitempty"`
	Summary          string          `json:"summary,omitempty"`
	Details          string          `json:"details"`
	Severities       []Severity      `json:"severity"`
	Affected         []Affected      `json:"affected"`
	References       []Reference     `json:"references,omitempty"`
	Credits          []Credit        `json:"credits,omitempty"`
	DatabaseSpecific json.RawMessage `json:"database_specific,omitempty"`
}

source: https://ossf.github.io/osv-schema

type Import added in v0.0.6

type Import struct {
	Path    string   `json:"path,omitempty"`
	GOOS    []string `json:"goos,omitempty"`
	GOARCH  []string `json:"goarch,omitempty"`
	Symbols []string `json:"symbols,omitempty"`
}

type OSV added in v0.0.6

type OSV struct {
	// contains filtered or unexported fields
}

func New added in v0.0.6

func New(dir string, sourceID types.SourceID, dataSources map[types.Ecosystem]types.DataSource, transformer Transformer) OSV

func (OSV) Name added in v0.0.6

func (o OSV) Name() types.SourceID

func (OSV) Update added in v0.0.6

func (o OSV) Update(root string) error

type Package added in v0.0.6

type Package struct {
	Name      string    `json:"name"`
	Ecosystem Ecosystem `json:"ecosystem"`
}

type Range added in v0.0.6

type Range struct {
	Type   RangeType    `json:"type"`
	Events []RangeEvent `json:"events"`
}

type RangeEvent added in v0.0.6

type RangeEvent struct {
	Introduced   string `json:"introduced,omitempty"`
	Fixed        string `json:"fixed,omitempty"`
	LastAffected string `json:"last_affected,omitempty"`
}

type RangeType added in v0.0.6

type RangeType string
const RangeTypeGit RangeType = "GIT"

type Reference added in v0.0.6

type Reference struct {
	Type ReferenceType `json:"type"`
	URL  string        `json:"url"`
}

type ReferenceType added in v0.0.6

type ReferenceType string

type Severity added in v0.0.6

type Severity struct {
	Type  string `json:"type"`
	Score string `json:"score"`
}

type Transformer added in v0.0.6

type Transformer interface {
	TransformAdvisories([]Advisory, Entry) ([]Advisory, error)
}

Jump to

Keyboard shortcuts

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