myjvn

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 12 Imported by: 0

README

go-myjvn

go-myjvn is a Go client library for accessing the MyJVN API.

MyJVN API is provided by IPA to offer to create calls to get the data of vulnerabilities in Japanese products.

Golang CI GoDoc GitHub Go Report Card

Usage

import "github.com/kazukiigeta/go-myjvn"

Construct a new MyJVN client, then prepare an instance of parameters for a method which you want to use. You can get a result of calling a method as an instance of JSON struct unmarshalled from a HTTP response.

For example:

c := myjvn.NewClient(nil)
alertList, err := c.GetAlertList(context.Background(),
	SetKeyword("android"),
	SetRangeDatePublic("n"),
	SetRangeDatePublished("n"),
	SetRangeDateFirstPublished("n"),
)
if err != nil {
	fmt.Println(err)
}
fmt.Println(alertList.Title)

Trying examples

Working examples are available in examples/ directory. You can try them just to execute the following commands.

# Example of getAlertList
cd examples/get-alert-list
go run main.go

# Example of getVendorList
cd examples/get-vendor-list
go run main.go

# Example of getProductList
cd examples/get-product-list
go run main.go -venorID 4499

# Example of getVulnOverviewList
cd examples/get-vuln-overview-list
go run main.go

# Example of getVulnDetailInfo
cd examples/get-vuln-detail-info
go run main.go -vulnid JVNDB-2020-007528

# Example of getStatics ver HND
cd examples/get-statistics-hnd
go run main.go -cweID CWE-20 -datePublicStartY 2019

# Example of getStatistics ver ITM
cd examples/get-statistics-itm
go run main.go -theme sumCvss -cweID CWE-20 -datePublicStartY 2019

Implemented API

Version Method Supported Notes
HND getAlertList Yes
getVendorList Yes
getProductList Yes
getVulnOverviewList Yes
getVulnDetailInfo Yes
getStatistics Yes
ITM getStatistics Yes
3.1 getOvalList not planned
getOvalData not planned
getXccdfList not planned
getXccdfData not planned

LICENSE

MIT

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrorRetryable added in v0.1.4

func IsErrorRetryable(resp *http.Response) bool

IsErrorRetryable shows HTTP response error is retryable or not.

Types

type ALAuthor added in v0.1.3

type ALAuthor struct {
	Text string `xml:",chardata"`
	Name string `xml:"name"`
	URI  string `xml:"uri"`
}

ALAuthor stores the data from API response.

type ALCategory added in v0.1.3

type ALCategory struct {
	Text  string `xml:",chardata"`
	Label string `xml:"label,attr"`
	Term  string `xml:"term,attr"`
}

ALCategory stores the data from API response.

type ALEntry added in v0.1.3

type ALEntry struct {
	Text      string     `xml:",chardata"`
	Title     string     `xml:"title"`
	ID        string     `xml:"id"`
	Published string     `xml:"published"`
	Updated   string     `xml:"updated"`
	Category  ALCategory `xml:"category"`
	Items     ALItems    `xml:"items"`
}

ALEntry stores the data from API response.

type ALHandling added in v0.1.3

type ALHandling struct {
	Text    string    `xml:",chardata"`
	Marking ALMarking `xml:"Marking"`
}

ALHandling stores the data from API response.

type ALItem added in v0.1.3

type ALItem struct {
	Text       string     `xml:",chardata"`
	Title      string     `xml:"title"`
	Identifier string     `xml:"identifier"`
	Link       ALItemLink `xml:"link"`
	Published  string     `xml:"published"`
	Updated    string     `xml:"updated"`
}

ALItem stores the data from API response.

type ALItemLink struct {
	Text string `xml:",chardata"`
	Href string `xml:"href,attr"`
}

ALItemLink stores the data from API response.

type ALItems added in v0.1.3

type ALItems struct {
	Text  string    `xml:",chardata"`
	Items []*ALItem `xml:"item"`
}

ALItems stores the data from API response.

type ALLink struct {
	Text     string `xml:",chardata"`
	Rel      string `xml:"rel,attr"`
	Type     string `xml:"type,attr"`
	HRefLang string `xml:"hreflang,attr"`
	HRef     string `xml:"href,attr"`
}

ALLink stores the data from API response.

type ALMarking added in v0.1.3

type ALMarking struct {
	Text          string          `xml:",chardata"`
	MarkingStruct ALMarkingStruct `xml:"Marking_Structure"`
}

ALMarking stores the data from API response.

type ALMarkingStruct added in v0.1.3

type ALMarkingStruct struct {
	Text             string `xml:",chardata"`
	Type             string `xml:"type,attr"`
	MarkingModelName string `xml:"marking_model_name,attr"`
	MarkingModelRef  string `xml:"marking_model_ref,attr"`
	Color            string `xml:"color,attr"`
}

ALMarkingStruct stores the data from API response.

type ALTitle added in v0.1.3

type ALTitle struct {
	Text string `xml:",chardata"`
	Type string `xml:"type,attr"`
}

ALTitle stores the data from API response.

type AlertList

type AlertList struct {
	XMLName        xml.Name   `xml:"feed"`
	Text           string     `xml:",chardata"`
	SchemaLocation string     `xml:"schemaLocation,attr"`
	Lang           string     `xml:"lang,attr"`
	Title          ALTitle    `xml:"title"`
	Updated        string     `xml:"updated"`
	ID             string     `xml:"id"`
	Link           ALLink     `xml:"link"`
	Author         ALAuthor   `xml:"author"`
	Handling       ALHandling `xml:"handling"`
	Entries        []*ALEntry `xml:"entry"`
	Status         Status     `xml:"Status"`
}

AlertList stores the data from API response.

type Client

type Client struct {
	BaseURL *url.URL
	// contains filtered or unexported fields
}

A Client manages communication with the MyJVN API.

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient creates an instance of Client.

func (*Client) DoWithRetry added in v0.1.4

func (c *Client) DoWithRetry(req *http.Request) (*http.Response, error)

DoWithRetry execute do with retry functionality.

func (*Client) GetAlertList

func (c *Client) GetAlertList(ctx context.Context, opts ...Option) (*AlertList, error)

GetAlertList downloads an alert list. See: https://jvndb.jvn.jp/apis/getAlertList_api_hnd.html

Example
c := myjvn.NewClient(nil)
alertList, err := c.GetAlertList(context.Background(), nil)
if err != nil {
	fmt.Println(err)
}

fmt.Println(alertList.Title)
Output:

func (*Client) GetProductList

func (c *Client) GetProductList(ctx context.Context, opts ...Option) (*ProductList, error)

GetProductList downloads a product list. See: https://jvndb.jvn.jp/apis/getProductList_api_hnd.html

Example
c := myjvn.NewClient(nil)
productList, err := c.GetProductList(context.Background())
if err != nil {
	fmt.Println(err)
}

for _, product := range productList.VendorInfo.Vendors[100].Products {
	fmt.Println(*product)
}
Output:

func (*Client) GetStatistics added in v0.1.3

func (c *Client) GetStatistics(ctx context.Context, opts ...Option) (*Statistics, error)

GetStatistics downloads a product list. See: https://jvndb.jvn.jp/apis/getStatistics_api_hnd.html See: https://jvndb.jvn.jp/apis/getStatistics_api_itm.html

Example
c := myjvn.NewClient(nil)

statisticsHND, err := c.GetStatistics(context.Background(),
	myjvn.SetFeed("hnd"),
	myjvn.SetTheme("sumCvss"),
	myjvn.SetCWEID("CWE-20"),
	myjvn.SetDatePublicStartY(2015),
)

if err != nil {
	fmt.Println(err)
}

statisticsITM, err := c.GetStatistics(context.Background(),
	myjvn.SetFeed("itm"),
	myjvn.SetTheme("sumCvss"),
	myjvn.SetCWEID("CWE-20"),
	myjvn.SetDatePublicStartY(2015),
)
if err != nil {
	fmt.Println(err)
}

fmt.Println(statisticsHND.SumCVSS.Titles)
fmt.Println(statisticsITM.SumCVSS.Titles)
Output:

func (*Client) GetVendorList

func (c *Client) GetVendorList(ctx context.Context, opts ...Option) (*VendorList, error)

GetVendorList downloads a vendor list. See: https://jvndb.jvn.jp/apis/getVendorList_api_hnd.html

Example
c := myjvn.NewClient(nil)
vendorList, err := c.GetVendorList(context.Background())
if err != nil {
	fmt.Println(err)
}

for _, v := range vendorList.VendorInfo.Vendors {
	fmt.Println(*v)
}
Output:

func (*Client) GetVulnDetailInfo

func (c *Client) GetVulnDetailInfo(ctx context.Context, opts ...Option) (*VulnDetailInfo, error)

GetVulnDetailInfo downloads a vendor list. See: https://jvndb.jvn.jp/apis/getVulnDetailInfo_api_hnd.html

Example
c := myjvn.NewClient(nil)
vulnDetailInfo, err := c.GetVulnDetailInfo(context.Background(), myjvn.SetVulnID("JVNDB-2020-006469"))
if err != nil {
	fmt.Println(err)
}

fmt.Println(vulnDetailInfo.VulInfo.VulInfoID)
Output:

func (*Client) GetVulnOverviewList

func (c *Client) GetVulnOverviewList(ctx context.Context, opts ...Option) (*VulnOverviewList, error)

GetVulnOverviewList downloads a product list. See: https://jvndb.jvn.jp/apis/getVulnOverviewList_api_hnd.html

Example
c := myjvn.NewClient(nil)
vulnOverviewList, err := c.GetVulnOverviewList(context.Background())
if err != nil {
	fmt.Println(err)
}

fmt.Println(vulnOverviewList.Items[0].Title)
Output:

type Option added in v0.1.3

type Option func(p *parameter)

Option represents a function of which a parameter is REST API parameter.

func SetAggrType added in v0.1.3

func SetAggrType(s string) Option

SetAggrType returns Option which sets AggrType as REST API parameter.

func SetCPEName added in v0.1.3

func SetCPEName(s string) Option

SetCPEName returns Option which sets CPEName as REST API parameter.

func SetCWEID added in v0.1.3

func SetCWEID(s string) Option

SetCWEID returns Option which sets CWEID as REST API parameter.

func SetDateFirstPublished added in v0.1.3

func SetDateFirstPublished(u uint16) Option

SetDateFirstPublished returns Option which sets DateFirstPublished as REST API parameter.

func SetDateFirstPublishedEndD added in v0.1.3

func SetDateFirstPublishedEndD(u uint8) Option

SetDateFirstPublishedEndD returns Option which sets DatePublishedEndD as REST API parameter.

func SetDateFirstPublishedEndM added in v0.1.3

func SetDateFirstPublishedEndM(u uint8) Option

SetDateFirstPublishedEndM returns Option which sets DatePublishedEndM as REST API parameter.

func SetDateFirstPublishedEndY added in v0.1.3

func SetDateFirstPublishedEndY(u uint16) Option

SetDateFirstPublishedEndY returns Option which sets DatePublishedEndY as REST API parameter.

func SetDateFirstPublishedStartD added in v0.1.3

func SetDateFirstPublishedStartD(u uint8) Option

SetDateFirstPublishedStartD returns Option which sets DatePublishedStartD as REST API parameter.

func SetDateFirstPublishedStartM added in v0.1.3

func SetDateFirstPublishedStartM(u uint8) Option

SetDateFirstPublishedStartM returns Option which sets DatePublishedStartM as REST API parameter.

func SetDateFirstPublishedStartY added in v0.1.3

func SetDateFirstPublishedStartY(u uint16) Option

SetDateFirstPublishedStartY returns Option which sets DatePublishedStartY as REST API parameter.

func SetDatePublicEndD added in v0.1.3

func SetDatePublicEndD(u uint8) Option

SetDatePublicEndD returns Option which sets DatePublicEndD as REST API parameter.

func SetDatePublicEndM added in v0.1.3

func SetDatePublicEndM(u uint8) Option

SetDatePublicEndM returns Option which sets DatePublicEndM as REST API parameter.

func SetDatePublicEndY added in v0.1.3

func SetDatePublicEndY(u uint16) Option

SetDatePublicEndY returns Option which sets DatePublicEndY as REST API parameter.

func SetDatePublicStartD added in v0.1.3

func SetDatePublicStartD(u uint8) Option

SetDatePublicStartD returns Option which sets DatePublicStartD as REST API parameter.

func SetDatePublicStartM added in v0.1.3

func SetDatePublicStartM(u uint8) Option

SetDatePublicStartM returns Option which sets DatePublicStartM as REST API parameter.

func SetDatePublicStartY added in v0.1.3

func SetDatePublicStartY(u uint16) Option

SetDatePublicStartY returns Option which sets DatePublicStartY as REST API parameter.

func SetDatePublished added in v0.1.3

func SetDatePublished(u uint16) Option

SetDatePublished returns Option which sets DatePublished as REST API parameter.

func SetFeed added in v0.1.3

func SetFeed(s string) Option

SetFeed returns Option which sets Feed as REST API parameter.

func SetFormat added in v0.1.3

func SetFormat(s string) Option

SetFormat returns Option which sets Format as REST API parameter.

func SetKeyword added in v0.1.3

func SetKeyword(s string) Option

SetKeyword returns Option which sets Keyword as REST API parameter.

func SetLanguage added in v0.1.3

func SetLanguage(s string) Option

SetLanguage returns Option which sets Language as REST API parameter.

func SetMaxCountItem added in v0.1.3

func SetMaxCountItem(u uint8) Option

SetMaxCountItem returns Option which sets MaxCountItem as REST API parameter.

func SetMethod added in v0.1.3

func SetMethod(s string) Option

SetMethod returns Option which sets Method as REST API parameter.

func SetPID added in v0.1.3

func SetPID(u uint) Option

SetPID returns Option which sets PID as REST API parameter.

func SetProductID added in v0.1.3

func SetProductID(s string) Option

SetProductID returns Option which sets ProductID as REST API parameter.

func SetRangeDateFirstPublished added in v0.1.3

func SetRangeDateFirstPublished(s string) Option

SetRangeDateFirstPublished returns Option which sets RangeDateFirstPublished as REST API parameter.

func SetRangeDatePublic added in v0.1.3

func SetRangeDatePublic(s string) Option

SetRangeDatePublic returns Option which sets RangeDatePublic as REST API parameter.

func SetRangeDatePublished added in v0.1.3

func SetRangeDatePublished(s string) Option

SetRangeDatePublished returns Option which sets RangeDatePublished as REST API parameter.

func SetSeverity added in v0.1.3

func SetSeverity(s string) Option

SetSeverity returns Option which sets Severity as REST API parameter.

func SetStartItem added in v0.1.3

func SetStartItem(u uint) Option

SetStartItem returns Option which sets StartItem as REST API parameter.

func SetTheme added in v0.1.3

func SetTheme(s string) Option

SetTheme returns Option which sets Theme as REST API parameter.

func SetVector added in v0.1.3

func SetVector(s string) Option

SetVector returns Option which sets Vector as REST API parameter.

func SetVendorID added in v0.1.3

func SetVendorID(s string) Option

SetVendorID returns Option which sets VendorID as REST API parameter.

func SetVulnID added in v0.1.3

func SetVulnID(s string) Option

SetVulnID returns Option which sets VulnID as REST API parameter.

type PLProduct added in v0.1.3

type PLProduct struct {
	Text  string `xml:",chardata"`
	PName string `xml:"pname,attr"`
	CPE   string `xml:"cpe,attr"`
	PID   string `xml:"pid,attr"`
}

PLProduct stores the data from API response.

type PLVendor added in v0.1.3

type PLVendor struct {
	Text     string       `xml:",chardata"`
	VName    string       `xml:"vname,attr"`
	CPE      string       `xml:"cpe,attr"`
	VID      string       `xml:"vid,attr"`
	Products []*PLProduct `xml:"Product"`
}

PLVendor stores the data from API response.

type PLVendorInfo added in v0.1.3

type PLVendorInfo struct {
	Text    string      `xml:",chardata"`
	Lang    string      `xml:"lang,attr"`
	Vendors []*PLVendor `xml:"Vendor"`
}

PLVendorInfo stores the data from API response.

type ProductList

type ProductList struct {
	XMLName        xml.Name     `xml:"Result"`
	Text           string       `xml:",chardata"`
	Version        string       `xml:"version,attr"`
	XSI            string       `xml:"xsi,attr"`
	XMLNS          string       `xml:"xmlns,attr"`
	MJRes          string       `xml:"mjres,attr"`
	AttrStatus     string       `xml:"status,attr"`
	SchemaLocation string       `xml:"schemaLocation,attr"`
	VendorInfo     PLVendorInfo `xml:"VendorInfo"`
	Status         Status       `xml:"Status"`
}

ProductList stores the data from API response.

type SResData added in v0.1.3

type SResData struct {
	Text   string `xml:",chardata"`
	Date   string `xml:"date,attr"`
	CntAll string `xml:"cntAll,attr"`
	CntC   string `xml:"cntC,attr"`
	CntH   string `xml:"cntH,attr"`
	CntM   string `xml:"cntM,attr"`
	CntL   string `xml:"cntL,attr"`
	CntN   string `xml:"cntN,attr"`
}

SResData stores the data from API response.

type SResDataTotal added in v0.1.3

type SResDataTotal struct {
	Text    string `xml:",chardata"`
	VulInfo string `xml:"vulinfo,attr"`
	Vendor  string `xml:"vendor,attr"`
	Product string `xml:"product,attr"`
}

SResDataTotal stores the data from API response.

type SSumCVSS added in v0.1.3

type SSumCVSS struct {
	Text         string        `xml:",chardata"`
	Titles       []*STitle     `xml:"title"`
	ResDataTotal SResDataTotal `xml:"resDataTotal"`
	ResData      []*SResData   `xml:"resData"`
}

SSumCVSS stores the data from API response.

type SSumCWE added in v0.1.3

type SSumCWE struct {
	Text         string        `xml:",chardata"`
	CWEID        string        `xml:"cweId,attr"`
	Titles       []*STitle     `xml:"title"`
	ResDataTotal SResDataTotal `xml:"resDataTotal"`
	ResData      []*SResData   `xml:"resData"`
}

SSumCWE stores the data from API response.

type SSumJVNDB added in v0.1.3

type SSumJVNDB struct {
	Text         string        `xml:",chardata"`
	Titles       []*STitle     `xml:"title"`
	ResDataTotal SResDataTotal `xml:"resDataTotal"`
	ResData      []*SResData   `xml:"resData"`
}

SSumJVNDB stores the data from API response.

type STitle added in v0.1.3

type STitle struct {
	Text string `xml:",chardata"`
	Lang string `xml:"lang,attr"`
}

STitle stores the data from API response.

type Statistics added in v0.1.3

type Statistics struct {
	XMLName        xml.Name  `xml:"Result"`
	Text           string    `xml:",chardata"`
	Version        string    `xml:"version,attr"`
	XSI            string    `xml:"xsi,attr"`
	XMLNS          string    `xml:"xmlns,attr"`
	MJRes          string    `xml:"mjres,attr"`
	MJStat         string    `xml:"mjstat,attr"`
	AttrStatus     string    `xml:"status,attr"`
	SchemaLocation string    `xml:"schemaLocation,attr"`
	SumJVNDB       SSumJVNDB `xml:"sumJvnDb"`
	SumCVSS        SSumCVSS  `xml:"sumCvss"`
	SumCWE         SSumCWE   `xml:"sumCwe"`
	Status         Status    `xml:"Status"`
}

Statistics stores the data from API response.

type Status

type Status struct {
	Version                  string `xml:"version,attr"`
	Method                   string `xml:"method,attr"`
	Language                 string `xml:"lang,attr"`
	RetCd                    uint   `xml:"retCd,attr"`
	RetMax                   string `xml:"retMax,attr"`
	RetMaxCnt                string `xml:"retMaxCnt,attr"`
	ErrCd                    string `xml:"errCd,attr"`
	ErrMsg                   string `xml:"errMsg,attr"`
	TotalRes                 string `xml:"totalRes,attr"`
	TotalResRet              string `xml:"totalResRet,attr"`
	FirstRes                 string `xml:"firstRes,attr"`
	Feed                     string `xml:"feed,attr"`
	StartItem                uint   `xml:"startItem,attr"`
	MaxCountItem             uint8  `xml:"maxCountItem,attr"`
	DatePublished            uint16 `xml:"datePublished,attr"`
	DateFirstPublished       uint16 `xml:"dateFirstPublished,attr"`
	CPEName                  string `xml:"cpeName,attr"`
	Format                   string `xml:"format,attr"`
	Keyword                  string `xml:"keyword,attr"`
	VendorID                 string `xml:"vendorId,attr"`
	ProductID                string `xml:"productId,attr"`
	VulnID                   string `xml:"vulnId,attr"`
	Severity                 string `xml:"severity,attr"`
	Vector                   string `xml:"vector,attr"`
	RangeDatePublic          string `xml:"rangeDatePublic,attr"`
	RangeDatePublished       string `xml:"rangeDatePublished,attr"`
	RangeDateFirstPublished  string `xml:"rangeDateFirstPublished,attr"`
	DatePublicStartY         uint16 `xml:"datePublicStartY,attr"`
	DatePublicStartM         uint8  `xml:"datePublicStartM,attr"`
	DatePublicStartD         uint8  `xml:"datePublicStartD,attr"`
	DatePublicEndY           uint16 `xml:"datePublicEndY,attr"`
	DatePublicEndM           uint8  `xml:"datePublicEndM,attr"`
	DatePublicEndD           uint8  `xml:"datePublicEndD,attr"`
	DateFirstPublishedStartY uint16 `xml:"dateFirstPublishedStartY,attr"`
	DateFirstPublishedStartM uint8  `xml:"dateFirstPublishedStartM,attr"`
	DateFirstPublishedStartD uint8  `xml:"dateFirstPublishedStartD,attr"`
	DateFirstPublishedEndY   uint16 `xml:"dateFirstPublishedEndY,attr"`
	DateFirstPublishedEndM   uint8  `xml:"dateFirstPublishedEndM,attr"`
	DateFirstPublishedEndD   uint8  `xml:"dateFirstPublishedEndD,attr"`
	Theme                    string `xml:"theme,attr"`
	AggrType                 string `xml:"type,attr"`
	CWEID                    string `xml:"cweId,attr"`
	PID                      uint   `xml:"pid,attr"`
}

Status stores the data from API response.

type VDIAffected added in v0.1.3

type VDIAffected struct {
	Text         string             `xml:",chardata"`
	AffectedItem []*VDIAffectedItem `xml:"AffectedItem"`
}

VDIAffected stores the data from API response.

type VDIAffectedItem added in v0.1.3

type VDIAffectedItem struct {
	Text        string `xml:",chardata"`
	Name        string `xml:"Name"`
	ProductName string `xml:"ProductName"`
	CPE         VDICPE `xml:"Cpe"`
	VersionNum  string `xml:"VersionNumber"`
}

VDIAffectedItem stores the data from API response.

type VDICPE added in v0.1.3

type VDICPE struct {
	Text    string `xml:",chardata"`
	Version string `xml:"version,attr"`
}

VDICPE stores the data from API response.

type VDICVSS added in v0.1.3

type VDICVSS struct {
	Text     string      `xml:",chardata"`
	Version  string      `xml:"version,attr"`
	Severity VDISeverity `xml:"Severity"`
	Base     string      `xml:"Base"`
	Vector   string      `xml:"Vector"`
}

VDICVSS stores the data from API response.

type VDIHandling added in v0.1.3

type VDIHandling struct {
	Text    string     `xml:",chardata"`
	Marking VDIMarking `xml:"Marking"`
}

VDIHandling stores the data from API response.

type VDIHistory added in v0.1.3

type VDIHistory struct {
	Text        string         `xml:",chardata"`
	HistoryItem VDIHistoryItem `xml:"HistoryItem"`
}

VDIHistory stores the data from API response.

type VDIHistoryItem added in v0.1.3

type VDIHistoryItem struct {
	Text        string `xml:",chardata"`
	HistoryNo   string `xml:"HistoryNo"`
	DateTime    string `xml:"DateTime"`
	Description string `xml:"Description"`
}

VDIHistoryItem stores the data from API response.

type VDIImpact added in v0.1.3

type VDIImpact struct {
	Text       string        `xml:",chardata"`
	CVSS       VDICVSS       `xml:"Cvss"`
	ImpactItem VDIImpactItem `xml:"ImpactItem"`
}

VDIImpact stores the data from API response.

type VDIImpactItem added in v0.1.3

type VDIImpactItem struct {
	Text        string `xml:",chardata"`
	Description string `xml:"Description"`
}

VDIImpactItem stores the data from API response.

type VDIMarking added in v0.1.3

type VDIMarking struct {
	Text          string           `xml:",chardata"`
	MarkingStruct VDIMarkingStruct `xml:"Marking_Structure"`
}

VDIMarking stores the data from API response.

type VDIMarkingStruct added in v0.1.3

type VDIMarkingStruct struct {
	Text             string `xml:",chardata"`
	Type             string `xml:"type,attr"`
	MarkingModelName string `xml:"marking_model_name,attr"`
	MarkingModelRef  string `xml:"marking_model_ref,attr"`
	Color            string `xml:"color,attr"`
}

VDIMarkingStruct stores the data from API response.

type VDIRelated added in v0.1.3

type VDIRelated struct {
	Text         string            `xml:",chardata"`
	RelatedItems []*VDIRelatedItem `xml:"RelatedItem"`
}

VDIRelated stores the data from API response.

type VDIRelatedItem added in v0.1.3

type VDIRelatedItem struct {
	Text      string `xml:",chardata"`
	Type      string `xml:"type,attr"`
	Name      string `xml:"Name"`
	VulInfoID string `xml:"VulinfoID"`
	URL       string `xml:"URL"`
	Title     string `xml:"Title"`
}

VDIRelatedItem stores the data from API response.

type VDISeverity added in v0.1.3

type VDISeverity struct {
	Text string `xml:",chardata"`
	Type string `xml:"type,attr"`
}

VDISeverity stores the data from API response.

type VDISolution added in v0.1.3

type VDISolution struct {
	Text         string          `xml:",chardata"`
	SolutionItem VDISolutionItem `xml:"SolutionItem"`
}

VDISolution stores the data from API response.

type VDISolutionItem added in v0.1.3

type VDISolutionItem struct {
	Text        string `xml:",chardata"`
	Description string `xml:"Description"`
}

VDISolutionItem stores the data from API response.

type VDIVulInfo added in v0.1.3

type VDIVulInfo struct {
	Text        string         `xml:",chardata"`
	VulInfoID   string         `xml:"VulinfoID"`
	VulInfoData VDIVulInfoData `xml:"VulinfoData"`
}

VDIVulInfo stores the data from API response.

type VDIVulInfoData added in v0.1.3

type VDIVulInfoData struct {
	Text               string         `xml:",chardata"`
	Title              string         `xml:"Title"`
	VulInfoDesc        VDIVulInfoDesc `xml:"VulinfoDescription"`
	Affected           VDIAffected    `xml:"Affected"`
	Impact             VDIImpact      `xml:"Impact"`
	Solution           VDISolution    `xml:"Solution"`
	Related            VDIRelated     `xml:"Related"`
	History            VDIHistory     `xml:"History"`
	DateFirstPublished string         `xml:"DateFirstPublished"`
	DateLastUpdated    string         `xml:"DateLastUpdated"`
	DatePublic         string         `xml:"DatePublic"`
}

VDIVulInfoData stores the data from API response.

type VDIVulInfoDesc added in v0.1.3

type VDIVulInfoDesc struct {
	Text     string `xml:",chardata"`
	Overview string `xml:"Overview"`
}

VDIVulInfoDesc stores the data from API response.

type VLVendor added in v0.1.3

type VLVendor struct {
	Text  string `xml:",chardata"`
	VName string `xml:"vname,attr"`
	CPE   string `xml:"cpe,attr"`
	VID   string `xml:"vid,attr"`
}

VLVendor stores the data from API response.

type VLVendorInfo added in v0.1.3

type VLVendorInfo struct {
	Text    string      `xml:",chardata"`
	Lang    string      `xml:"lang,attr"`
	Vendors []*VLVendor `xml:"Vendor"`
}

VLVendorInfo stores the data from API response.

type VOLCPE added in v0.1.3

type VOLCPE struct {
	Text    string `xml:",chardata"`
	Version string `xml:"version,attr"`
	Vendor  string `xml:"vendor,attr"`
	Product string `xml:"product,attr"`
}

VOLCPE stores the data from API response.

type VOLCVSS added in v0.1.3

type VOLCVSS struct {
	Text     string `xml:",chardata"`
	Score    string `xml:"score,attr"`
	Severity string `xml:"severity,attr"`
	Vector   string `xml:"vector,attr"`
	Version  string `xml:"version,attr"`
	Type     string `xml:"type,attr"`
}

VOLCVSS stores the data from API response.

type VOLChannel added in v0.1.3

type VOLChannel struct {
	Text        string          `xml:",chardata"`
	About       string          `xml:"about,attr"`
	Title       string          `xml:"title"`
	Link        string          `xml:"link"`
	Description string          `xml:"description"`
	Date        string          `xml:"date"`
	Issued      string          `xml:"issued"`
	Modified    string          `xml:"modified"`
	Handling    VOLHandling     `xml:"handling"`
	Items       VOLChannelItems `xml:"items"`
}

VOLChannel stores the data from API response.

type VOLChannelItems added in v0.1.3

type VOLChannelItems struct {
	Text string `xml:",chardata"`
	Seq  VOLSeq `xml:"Seq"`
}

VOLChannelItems stores the data from API response.

type VOLHandling added in v0.1.3

type VOLHandling struct {
	Text    string     `xml:",chardata"`
	Marking VOLMarking `xml:"Marking"`
}

VOLHandling stores the data from API response.

type VOLItem added in v0.1.3

type VOLItem struct {
	Text        string           `xml:",chardata"`
	About       string           `xml:"about,attr"`
	Title       string           `xml:"title"`
	Link        string           `xml:"link"`
	Description string           `xml:"description"`
	Creator     string           `xml:"creator"`
	Identifier  string           `xml:"identifier"`
	References  []*VOLReferences `xml:"references"`
	CPEs        []*VOLCPE        `xml:"cpe"`
	CVSSes      []*VOLCVSS       `xml:"cvss"`
	Date        string           `xml:"date"`
	Issued      string           `xml:"issued"`
	Modified    string           `xml:"modified"`
}

VOLItem stores the data from API response.

type VOLLI added in v0.1.3

type VOLLI struct {
	Text     string `xml:",chardata"`
	Resource string `xml:"resource,attr"`
}

VOLLI stores the data from API response.

type VOLMarking added in v0.1.3

type VOLMarking struct {
	Text          string           `xml:",chardata"`
	MarkingStruct VOLMarkingStruct `xml:"Marking_Structure"`
}

VOLMarking stores the data from API response.

type VOLMarkingStruct added in v0.1.3

type VOLMarkingStruct struct {
	Text             string `xml:",chardata"`
	Type             string `xml:"type,attr"`
	MarkingModelName string `xml:"marking_model_name,attr"`
	MarkingModelRef  string `xml:"marking_model_ref,attr"`
	Color            string `xml:"color,attr"`
}

VOLMarkingStruct stores the data from API response.

type VOLReferences added in v0.1.3

type VOLReferences struct {
	Text   string `xml:",chardata"`
	Source string `xml:"source,attr"`
	ID     string `xml:"id,attr"`
	Title  string `xml:"title,attr"`
}

VOLReferences stores the data from API response.

type VOLSeq added in v0.1.3

type VOLSeq struct {
	Text string   `xml:",chardata"`
	LI   []*VOLLI `xml:"li"`
}

VOLSeq stores the data from API response.

type VendorList

type VendorList struct {
	XMLName        xml.Name     `xml:"Result"`
	Text           string       `xml:",chardata"`
	Version        string       `xml:"version,attr"`
	XSI            string       `xml:"xsi,attr"`
	XMLNS          string       `xml:"xmlns,attr"`
	MJRes          string       `xml:"mjres,attr"`
	AttrStatus     string       `xml:"status,attr"`
	SchemaLocation string       `xml:"schemaLocation,attr"`
	VendorInfo     VLVendorInfo `xml:"VendorInfo"`
	Status         Status       `xml:"Status"`
}

VendorList stores the data from API response.

type VulnDetailInfo

type VulnDetailInfo struct {
	XMLName        xml.Name    `xml:"VULDEF-Document"`
	Text           string      `xml:",chardata"`
	Version        string      `xml:"version,attr"`
	XSI            string      `xml:"xsi,attr"`
	XMLNS          string      `xml:"xmlns,attr"`
	VulDef         string      `xml:"vuldef,attr"`
	AttrStatus     string      `xml:"status,attr"`
	Sec            string      `xml:"sec,attr"`
	Marking        string      `xml:"marking,attr"`
	TLPMarking     string      `xml:"tlpMarking,attr"`
	SchemaLocation string      `xml:"schemaLocation,attr"`
	Lang           string      `xml:"lang,attr"`
	VulInfo        VDIVulInfo  `xml:"Vulinfo"`
	Handling       VDIHandling `xml:"handling"`
	Status         Status      `xml:"Status"`
}

VulnDetailInfo stores the data from API response.

type VulnOverviewList

type VulnOverviewList struct {
	XMLName        xml.Name   `xml:"RDF"`
	Text           string     `xml:",chardata"`
	XSI            string     `xml:"xsi,attr"`
	XMLNS          string     `xml:"xmlns,attr"`
	RSS            string     `xml:"rss,attr"`
	RDF            string     `xml:"rdf,attr"`
	DC             string     `xml:"dc,attr"`
	DCTerms        string     `xml:"dcterms,attr"`
	Sec            string     `xml:"sec,attr"`
	Marking        string     `xml:"marking,attr"`
	TLPMarking     string     `xml:"tlpMarking,attr"`
	AttrStatus     string     `xml:"status,attr"`
	SchemaLocation string     `xml:"schemaLocation,attr"`
	Lang           string     `xml:"lang,attr"`
	Channel        VOLChannel `xml:"channel"`
	Items          []*VOLItem `xml:"item"`
	Status         Status     `xml:"Status"`
}

VulnOverviewList stores the data from API response.

Jump to

Keyboard shortcuts

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