vuldef

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2018 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//MaxItems is max of items for "getVulnDetailInfo" API
	MaxItems = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type VULDEF

type VULDEF struct {
	Vulinfo []struct {
		VulinfoID   string `xml:"VulinfoID" json:"VulinfoID"`
		VulinfoData struct {
			Title    string `xml:"Title" json:"Title"`
			Overview string `xml:"VulinfoDescription>Overview" json:"Overview"`
			Affected []struct {
				Name        string `xml:"Name" json:"Name"`
				ProductName string `xml:"ProductName" json:"ProductName"`
				Cpe         struct {
					Version string `xml:"version,attr" json:"version"`
					Value   string `xml:",chardata" json:"value"`
				} `xml:"Cpe" json:"Cpe"`
				VersionNumber []string `xml:"VersionNumber" json:"VersionNumber"`
			} `xml:"Affected>AffectedItem" json:"Affected"`
			Impact struct {
				Description string `xml:"ImpactItem>Description" json:"Description"`
				CVSS        []struct {
					Version    string `xml:"version,attr" json:"Version"`
					BaseVector string `xml:"Vector" json:"BaseVector"`
					BaseScore  string `xml:"Base" json:"BaseScore"`
					Severity   string `xml:"Severity" json:"Severity"`
				} `xml:"Cvss" json:"Cvss"`
			} `xml:"Impact" json:"Impact"`
			Solution struct {
				Description string `xml:"SolutionItem>Description" json:"Description"`
			} `xml:"Solution" json:"Solution"`
			Related []struct {
				Type      string `xml:"type,attr" json:"Type"`
				Name      string `xml:"Name" json:"Name"`
				VulinfoID string `xml:"VulinfoID" json:"VulinfoID"`
				Title     string `xml:"Title,omitempty" json:"Title,omitempty"`
				URL       string `xml:"URL" json:"URL"`
			} `xml:"Related>RelatedItem" json:"Related"`
			History []struct {
				HistoryNo   int         `xml:"HistoryNo" json:"HistoryNo"`
				DateTime    values.Time `xml:"DateTime" json:"DateTime"`
				Description string      `xml:"Description" json:"Description"`
			} `xml:"History>HistoryItem" json:"History"`
			DateFirstPublished values.Time `xml:"DateFirstPublished" json:"DateFirstPublished"`
			DateLastUpdated    values.Time `xml:"DateLastUpdated" json:"DateLastUpdated"`
			DatePublic         values.Time `xml:"DatePublic" json:"DatePublic"`
		} `xml:"VulinfoData" json:"VulinfoData"`
	} `xml:"Vulinfo" json:"Vulinfo"`
}

VULDEF is structure of VULDEF

func Unmarshal

func Unmarshal(data []byte) (*VULDEF, error)

Unmarshal returns JVNRSS value, unmarshalling XML data

func (*VULDEF) Append

func (vuln *VULDEF) Append(appnd *VULDEF)

Append appends Vulinfo data

func (*VULDEF) JSON

func (vuln *VULDEF) JSON(indent string) ([]byte, error)

JSON returns JSON string

Jump to

Keyboard shortcuts

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