oval

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisory

type Advisory struct {
	XMLName         xml.Name   `xml:"advisory"`
	Severity        string     `xml:"severity"`
	Cves            []Cve      `xml:"cve"`
	Bugzillas       []Bugzilla `xml:"bugzilla"`
	AffectedCPEList []string   `xml:"affected_cpe_list>cpe"`
	Refs            []Ref      `xml:"ref"` // Ubuntu Only
	Bugs            []Bug      `xml:"bug"` // Ubuntu Only
	PublicDate      Date       `xml:"public_date"`
	Issued          Date       `xml:"issued"`
	Updated         Date       `xml:"updated"`
}

Advisory : >definitions>definition>metadata>advisory RedHat and Ubuntu OVAL

type Affected

type Affected struct {
	XMLName   xml.Name `xml:"affected"`
	Family    string   `xml:"family,attr"`
	Platforms []string `xml:"platform"`
}

Affected : >definitions>definition>metadata>affected

type Arch

type Arch struct {
	XMLName   xml.Name  `xml:"arch"`
	Operation Operation `xml:"operation,attr"`
	Body      string    `xml:",chardata"`
}

Arch

type Bug

type Bug struct {
	XMLName xml.Name `xml:"bug"`
	URL     string   `xml:",chardata"`
}

Bug : >definitions>definition>metadata>advisory>bug Ubuntu OVAL

type Bugzilla

type Bugzilla struct {
	XMLName xml.Name `xml:"bugzilla"`
	ID      string   `xml:"id,attr"`
	URL     string   `xml:"href,attr"`
	Title   string   `xml:",chardata"`
}

Bugzilla : >definitions>definition>metadata>advisory>bugzilla RedHat OVAL

type ConfigLine

type ConfigLine struct {
	XMLName   xml.Name `xml:"config_line"`
	Body      string   `xml:",chardata"`
	Operation string   `xml:"operation,attr"`
}

ConfigLine : >states>line_state>config_line

type ConstantVariable

type ConstantVariable struct {
	XMLName  xml.Name `xml:"constant_variable"`
	ID       string   `xml:"id,attr"`
	Version  string   `xml:"version,attr"`
	Datatype string   `xml:"datatype,attr"`
	Comment  string   `xml:"comment,attr"`
	Values   []Value  `xml:"value"`
}

ConstantVariable

type Criteria

type Criteria struct {
	XMLName          xml.Name    `xml:"criteria"`
	Operator         string      `xml:"operator,attr"`
	Criterias        []Criteria  `xml:"criteria"`
	Criterions       []Criterion `xml:"criterion"`
	ExtendDefinition Extension   `xml:"extend_definition"`
}

Criteria : >definitions>definition>criteria

type Criterion

type Criterion struct {
	XMLName xml.Name `xml:"criterion"`
	Negate  bool     `xml:"negate,attr"`
	TestRef string   `xml:"test_ref,attr"`
	Comment string   `xml:"comment,attr"`
}

Criterion : >definitions>definition>criteria>*>criterion

type Cve

type Cve struct {
	XMLName xml.Name `xml:"cve"`
	CveID   string   `xml:",chardata"`
	Cvss2   string   `xml:"cvss2,attr"`
	Cvss3   string   `xml:"cvss3,attr"`
	// both values below are ubuntu specific
	CvssScore  string `xml:"cvss_score,attr"`
	CvssVector string `xml:"cvss_vector,attr"`
	Cwe        string `xml:"cwe,attr"`
	Impact     string `xml:"impact,attr"`
	Href       string `xml:"href,attr"`
	Public     string `xml:"public,attr"`
}

Cve : >definitions>definition>metadata>advisory>cve RedHat OVAL

type Date

type Date struct {
	Date time.Time
}

Date is a wrapper type for decoding a range of date, datestamp, and timestamp strings seen in the wild.

Currently, it will only examine attributes with the key "date".

func (*Date) UnmarshalXML

func (d *Date) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements xml.Unmarshaler.

func (*Date) UnmarshalXMLAttr

func (d *Date) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr implements xml.UnmarshalerAttr.

type Debian