schema

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFixed

func IsFixed(fixState string) bool

IsFixed returns true if the state string describe a CVE resolution meaning a packaged isn't vulnerable.

Types

type AffectedRelease

type AffectedRelease struct {
	ProductName string `json:"product_name,omitempty"`
	ReleaseDate string `json:"release_date,omitempty"`
	Advisory    string `json:"advisory,omitempty"`
	Package     string `json:"package,omitempty"`
	CPE         string `json:"cpe,omitempty"`
}

type AffectedReleases

type AffectedReleases []*AffectedRelease

func (*AffectedReleases) UnmarshalJSON

func (ars *AffectedReleases) UnmarshalJSON(b []byte) error

type CVE

type CVE struct {
	Name           string `json:"name,omitempty"`
	ThreatSeverity string `json:"threat_severity,omitempty"`
	PublicDate     string `json:"public_date,omitempty"`
	Bugzilla       *struct {
		Description string `json:"description,omitempty"`
		ID          string `json:"id,omitempty"`
		URL         string `json:"url,omitempty"`
	} `json:"bugzilla,omitempty"`
	CVSS *struct {
		BaseScore string `json:"cvss_base_score,omitempty"`
		Vector    string `json:"cvss_scoring_vector,omitempty"`
		Status    string `json:"status,omitempty"`
	} `json:"CVSS,omitempty"`
	CVSS3 *struct {
		BaseScore string `json:"cvss3_base_score,omitempty"`
		Vector    string `json:"cvss3_scoring_vector,omitempty"`
		Status    string `json:"status,omitempty"`
	} `json:"CVSS3,omitempty"`
	CWE             string   `json:"cwe,omitempty"`
	Details         []string `json:"details,omitempty"`
	Statement       string   `json:"statement,omitempty"`
	References      []string `json:"references,omitempty"`
	Acknowledgement string   `json:"acknowledgement,omitempty"`
	Mitigation      *struct {
		Value string `json:"value"`
		Lang  string `json:"lang"`
	} `json:"mitigation,omitempty"`
	UpstreamFix string `json:"upstream_fix,omitempty"`

	AffectedRelease AffectedReleases `json:"affected_release,omitempty"`
	PackageState    PackageStates    `json:"package_state,omitempty"`
}

func (*CVE) Convert

func (cve *CVE) Convert() (*nvd.NVDCVEFeedJSON10DefCVEItem, error)

func (*CVE) ID

func (cve *CVE) ID() string

type CVEList

type CVEList []struct {
	CVE string `json:"cve"`
}

type PackageState

type PackageState struct {
	ProductName string `json:"product_name,omitempty"`
	FixState    string `json:"fix_state,omitempty"`
	PackageName string `json:"package_name,omitempty"`
	CPE         string `json:"cpe,omitempty"`
}

type PackageStates

type PackageStates []*PackageState

func (*PackageStates) UnmarshalJSON

func (pss *PackageStates) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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