nvd

package
v0.21.1-0...-a3b014d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Negate   *bool     `json:"negate,omitempty"`
	Nodes    []Node    `json:"nodes"`
	Operator *Operator `json:"operator,omitempty"`
}

type CpeMatch

type CpeMatch struct {
	Criteria              string  `json:"criteria"`
	MatchCriteriaID       string  `json:"matchCriteriaId"`
	VersionEndExcluding   *string `json:"versionEndExcluding,omitempty"`
	VersionEndIncluding   *string `json:"versionEndIncluding,omitempty"`
	VersionStartExcluding *string `json:"versionStartExcluding,omitempty"`
	VersionStartIncluding *string `json:"versionStartIncluding,omitempty"`
	Vulnerable            bool    `json:"vulnerable"`
}

type CveItem

type CveItem struct {
	ID string `json:"id"`
	// CisaActionDue         *string         `json:"cisaActionDue,omitempty"`
	// CisaExploitAdd        *string         `json:"cisaExploitAdd,omitempty"`
	// CisaRequiredAction    *string         `json:"cisaRequiredAction,omitempty"`
	// CisaVulnerabilityName *string         `json:"cisaVulnerabilityName,omitempty"`
	Configurations []Configuration `json:"configurations,omitempty"`
	Descriptions   []LangString    `json:"descriptions"`
	// EvaluatorComment      *string         `json:"evaluatorComment,omitempty"`
	// EvaluatorImpact       *string         `json:"evaluatorImpact,omitempty"`
	// EvaluatorSolution     *string         `json:"evaluatorSolution,omitempty"`
	LastModified string      `json:"lastModified"`
	Metrics      *Metrics    `json:"metrics,omitempty"`
	Published    string      `json:"published"`
	References   []Reference `json:"references"`
	// SourceIdentifier      *string         `json:"sourceIdentifier,omitempty"`
	// VendorComments        []VendorComment `json:"vendorComments,omitempty"`
	VulnStatus *string `json:"vulnStatus,omitempty"`
}

func (CveItem) CVSS

func (o CveItem) CVSS() []CvssSummary

func (CveItem) Description

func (o CveItem) Description() string

type CvssSummaries

type CvssSummaries []CvssSummary

func (CvssSummaries) Len

func (o CvssSummaries) Len() int

func (CvssSummaries) Less

func (o CvssSummaries) Less(i, j int) bool

func (CvssSummaries) Severity

func (o CvssSummaries) Severity() string

func (CvssSummaries) Sorted

func (o CvssSummaries) Sorted() CvssSummaries

func (CvssSummaries) Swap

func (o CvssSummaries) Swap(i, j int)

type CvssSummary

type CvssSummary struct {
	Source              string
	Type                CvssType
	Version             string
	Vector              string
	BaseScore           float64
	ExploitabilityScore *float64
	ImpactScore         *float64
	// contains filtered or unexported fields
}

func (CvssSummary) Severity

func (o CvssSummary) Severity() string

type CvssType

type CvssType string

"type identifies whether the organization is a primary or secondary source. Primary sources include the NVD and CNA who have reached the provider level in CVMAP. 10% of provider level submissions are audited by the NVD. If a submission has been audited the NVD will appear as the primary source and the provider level CNA will appear as the secondary source."

const (
	Primary   CvssType = "Primary"
	Secondary CvssType = "Secondary"
)

type CvssV2

type CvssV2 struct {
	// ACInsufInfo             *bool         `json:"acInsufInfo,omitempty"`
	BaseSeverity        *string       `json:"baseSeverity,omitempty"`
	CvssData            cvss20.Cvss20 `json:"cvssData"`
	ExploitabilityScore *float64      `json:"exploitabilityScore,omitempty"`
	ImpactScore         *float64      `json:"impactScore,omitempty"`
	// ObtainAllPrivilege      *bool         `json:"obtainAllPrivilege,omitempty"`
	// ObtainOtherPrivilege    *bool         `json:"obtainOtherPrivilege,omitempty"`
	// ObtainUserPrivilege     *bool         `json:"obtainUserPrivilege,omitempty"`
	Source string   `json:"source"`
	Type   CvssType `json:"type"`
}

type CvssV30

type CvssV30 struct {
	CvssData            cvss30.Cvss30 `json:"cvssData"`
	ExploitabilityScore *float64      `json:"exploitabilityScore,omitempty"`
	ImpactScore         *float64      `json:"impactScore,omitempty"`
	Source              string        `json:"source"`
	Type                CvssType      `json:"type"`
}

type CvssV31

type CvssV31 struct {
	CvssData            cvss31.Cvss31 `json:"cvssData"`
	ExploitabilityScore *float64      `json:"exploitabilityScore,omitempty"`
	ImpactScore         *float64      `json:"impactScore,omitempty"`
	Source              string        `json:"source"`
	Type                CvssType      `json:"type"`
}

type LangString

type LangString struct {
	Lang  string `json:"lang"`
	Value string `json:"value"`
}

type Metrics

type Metrics struct {
	CvssMetricV2  []CvssV2  `json:"cvssMetricV2,omitempty"`  // CVSS V2.0 score.
	CvssMetricV30 []CvssV30 `json:"cvssMetricV30,omitempty"` // CVSS V3.0 score.
	CvssMetricV31 []CvssV31 `json:"cvssMetricV31,omitempty"` // CVSS V3.1 score.
}

Metric scores for a vulnerability as found on NVD.

type Node

type Node struct {
	CpeMatch []CpeMatch `json:"cpeMatch"`
	Negate   *bool      `json:"negate,omitempty"`
	Operator Operator   `json:"operator"`
}

type Operator

type Operator string
const (
	And Operator = "AND"
	Or  Operator = "OR"
)

type Reference

type Reference struct {
	Source *string  `json:"source,omitempty"`
	Tags   []string `json:"tags,omitempty"`
	URL    string   `json:"url"`
}

type Vulnerability

type Vulnerability struct {
	Cve CveItem `json:"cve"`
}

func (Vulnerability) IsEmpty

func (o Vulnerability) IsEmpty() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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