osv

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDir

func WithDir(dir string) option

func WithEcosystem

func WithEcosystem(ecosystemDir map[string]string) option

func WithURL

func WithURL(url string) option

Types

type Affected

type Affected struct {
	Package   Package     `json:"package,omitempty"`
	Ranges    []Range     `json:"ranges,omitempty"`
	Versions  []string    `json:"versions,omitempty"`
	Ecosystem interface{} `json:"ecosystem_specific,omitempty"` //The meaning of the values within the object is entirely defined by the ecosystem
	Database  interface{} `json:"database_specific,omitempty"`  //The meaning of the values within the object is entirely defined by the database

}

type Database

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

func NewOsv

func NewOsv(opts ...option) Database

func (*Database) Update

func (osv *Database) Update() error

type Event

type Event struct {
	Introduced string `json:"introduced,omitempty"`
	Fixed      string `json:"fixed,omitempty"`
}

type OSV

type OSV struct {
	ID         string      `json:"id,omitempty"`
	Modified   string      `json:"modified,omitempty"`
	Published  string      `json:"published,omitempty"`
	Withdrawn  string      `json:"withdrawn,omitempty"`
	Aliases    []string    `json:"aliases,omitempty"`
	Related    []string    `json:"related,omitempty"`
	Summary    string      `json:"summary,omitempty"`
	Details    string      `json:"details,omitempty"`
	Affected   []Affected  `json:"affected,omitempty"` //collection based on https://ossf.github.io/osv-schema/
	References []Reference `json:"references,omitempty"`
}

OSV represents Open Source Vulnerability format ref. https://ossf.github.io/osv-schema

type Package

type Package struct {
	Ecosystem string `json:"ecosystem,omitempty"`
	Name      string `json:"name,omitempty"`
	Purl      string `json:"purl,omitempty"`
}

type Range

type Range struct {
	Type   string  `json:"type,omitempty"`
	Repo   string  `json:"repo,omitempty"`
	Events []Event `json:"events,omitempty"`
}

type Reference

type Reference struct {
	Type string `json:"type,omitempty"`
	Url  string `json:"url,omitempty"`
}

Jump to

Keyboard shortcuts

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