nvd

package
v0.0.0-...-7a72f0a Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CVE

type CVE struct {
	Entries []Entry `xml:"entry"`
}

func Get_CVE_feed

func Get_CVE_feed(feedurl string, cakeyfile string) CVE

func Unmarshal_CVE

func Unmarshal_CVE(data []byte) CVE

type CWE

type CWE struct {
	Weaknesses []Weakness `xml:"Weaknesses>Weakness"`
}

func Get_CWEs

func Get_CWEs(filename string) CWE

func Unmarshal_CWE

func Unmarshal_CWE(data []byte) CWE

type Cvss

type Cvss struct {
	Score                  string    `xml:"base_metrics>score"`
	Access_Vector          string    `xml:"base_metrics>access-vector"`
	Access_Complexity      string    `xml:"base_metrics>access-complexity"`
	Authentication         string    `xml:"base_metrics>authentication"`
	Confidentiality_Impact string    `xml:"base_metrics>confidentiality-impact"`
	Integrity_Impact       string    `xml:"base_metrics>integrity-impact"`
	Availability_Impact    string    `xml:"base_metrics>availability-impact"`
	Source                 string    `xml:"base_metrics>source"`
	Generated_On           time.Time `xml:"base_metrics>generated-on-datetime"`
}

type Cwe

type Cwe struct {
	Id         string `xml:"id,attr"`
	CWECatalog *CWE
}

To use a>b,attr directly in Entry would have been cleaner, but Unmarshal doesn't support that

func (Cwe) CWE_Definition

func (c Cwe) CWE_Definition() string

Description for the CWE

func (c Cwe) Definition_Link() string

Links CWE to mitre.org

type Entry

type Entry struct {
	Id            string      `xml:"cve-id"`
	Products      []string    `xml:"vulnerable-software-list>product"`
	Published     time.Time   `xml:"published-datetime"`
	Last_Modified time.Time   `xml:"last-modified-datetime"`
	CVSS          Cvss        `xml:"cvss"`
	CWE           Cwe         `xml:"cwe"`
	References    []Reference `xml:"references"`
	Summary       string      `xml:"summary"`
}

Ignored elements: vuln:vulnerable-configuration, most often just repeats vuln:vulnerable-software-list

type Reference

type Reference struct {
	Type   string           `xml:"reference_type,attr"`
	Source string           `xml:"source"`
	Target Reference_Target `xml:"reference"`
}

type Reference_Target

type Reference_Target struct {
	URL  string `xml:"href,attr"`
	Text string `xml:",chardata"`
}

type Weakness

type Weakness struct {
	ID          string `xml:"ID,attr"`
	Description string `xml:"Description>Description_Summary"`
}

Jump to

Keyboard shortcuts

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