oval

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRHSAFormat = errors.New("invalid RHSA-ID format")
	ErrInvalidCVEFormat  = errors.New("invalid CVE-ID format")
)

Functions

This section is empty.

Types

type AdvAffected

type AdvAffected struct {
	Resolution Resolution `xml:"resolution" json:",omitempty"`
}

type Advisory

type Advisory struct {
	From            string      `xml:"from,attr" json:",omitempty"`
	Severity        string      `xml:"severity" json:",omitempty"`
	Rights          string      `xml:"rights" json:",omitempty"`
	Issued          Issued      `xml:"issued" json:",omitempty"`
	Updated         Updated     `xml:"updated" json:",omitempty"`
	Cves            []Cve       `xml:"cve" json:",omitempty"`
	Bugzilla        []Bugzilla  `xml:"bugzilla" json:",omitempty"`
	AffectedCpeList []string    `xml:"affected_cpe_list>cpe" json:",omitempty"`
	Affected        AdvAffected `xml:"affected" json:",omitempty"`
}

type Affected

type Affected struct {
	Family    string   `xml:"family,attr" json:",omitempty"`
	Platforms []string `xml:"platform" json:",omitempty"`
}

type Arch

type Arch struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Datatype  string `xml:"datatype,attr" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type Behaviors

type Behaviors struct {
	Text          string `xml:",chardata" json:",omitempty"`
	Noconfigfiles string `xml:"noconfigfiles,attr" json:",omitempty"`
	Noghostfiles  string `xml:"noghostfiles,attr" json:",omitempty"`
	Nogroup       string `xml:"nogroup,attr" json:",omitempty"`
	Nolinkto      string `xml:"nolinkto,attr" json:",omitempty"`
	Nomd5         string `xml:"nomd5,attr" json:",omitempty"`
	Nomode        string `xml:"nomode,attr" json:",omitempty"`
	Nomtime       string `xml:"nomtime,attr" json:",omitempty"`
	Nordev        string `xml:"nordev,attr" json:",omitempty"`
	Nosize        string `xml:"nosize,attr" json:",omitempty"`
	Nouser        string `xml:"nouser,attr" json:",omitempty"`
}

type Bugzilla

type Bugzilla struct {
	Href string `xml:"href,attr" json:",omitempty"`
	ID   string `xml:"id,attr" json:",omitempty"`
}

type Config

type Config struct {
	VulnListDir  string
	URLFormat    string
	RepoToCpeURL string
	AppFs        afero.Fs
	Retry        int
}

func NewConfig

func NewConfig() Config

func (Config) Update

func (c Config) Update() error

type Criteria

type Criteria struct {
	Operator   string      `xml:"operator,attr" json:",omitempty"`
	Criterions []Criterion `xml:"criterion" json:",omitempty"`
	Criterias  []Criteria  `xml:"criteria" json:",omitempty"`
}

type Criterion

type Criterion struct {
	Comment string `xml:"comment,attr"`
	TestRef string `xml:"test_ref,attr"`
}

type Cve

type Cve struct {
	CveID  string `xml:",chardata" json:",omitempty"`
	Cvss2  string `xml:"cvss2,attr" json:",omitempty"`
	Cvss3  string `xml:"cvss3,attr" json:",omitempty"`
	Cwe    string `xml:"cwe,attr" json:",omitempty"`
	Impact string `xml:"impact,attr" json:",omitempty"`
	Href   string `xml:"href,attr" json:",omitempty"`
	Public string `xml:"public,attr" json:",omitempty"`
}

type Definition

type Definition struct {
	Class    string   `xml:"class,attr" json:",omitempty"`
	ID       string   `xml:"id,attr" json:",omitempty"`
	Version  string   `xml:"version,attr" json:",omitempty"`
	Metadata Metadata `xml:"metadata" json:",omitempty"`
	Criteria Criteria `xml:"criteria" json:",omitempty"`
}

type Definitions

type Definitions struct {
	Definition []Definition `xml:"definition" json:",omitempty"`
}

type Epoch

type Epoch struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type Evr

type Evr struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Datatype  string `xml:"datatype,attr" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type Filepath

type Filepath struct {
	Text     string `xml:",chardata" json:",omitempty"`
	Datatype string `xml:"datatype,attr" json:",omitempty"`
}

type Generator

type Generator struct {
	ProductName    string `xml:"product_name"`
	ProductVersion string `xml:"product_version"`
	SchemaVersion  string `xml:"schema_version"`
	ContentVersion string `xml:"content_version"`
	Timestamp      string `xml:"timestamp"`
}

type Instance

type Instance struct {
	Text     string `xml:",chardata" json:",omitempty"`
	Datatype string `xml:"datatype,attr" json:",omitempty"`
	VarRef   string `xml:"var_ref,attr" json:",omitempty"`
}

type Issued

type Issued struct {
	Date string `xml:"date,attr" json:",omitempty"`
}

type Metadata

type Metadata struct {
	Title        string      `xml:"title" json:",omitempty"`
	AffectedList []Affected  `xml:"affected" json:",omitempty"`
	References   []Reference `xml:"reference" json:",omitempty"`
	Description  string      `xml:"description" json:",omitempty"`
	Advisory     Advisory    `xml:"advisory" json:",omitempty"`
}

type Name

type Name struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type Object

type Object struct {
	Text      string `xml:",chardata" json:",omitempty"`
	ObjectRef string `xml:"object_ref,attr" json:",omitempty"`
}

type Objects

type Objects struct {
	RpminfoObjects           []RpminfoObject           `xml:"rpminfo_object" json:",omitempty"`
	RpmverifyfileObjects     []RpmverifyfileObject     `xml:"rpmverifyfile_object" json:",omitempty"`
	Textfilecontent54Objects []Textfilecontent54Object `xml:"textfilecontent54_object" json:",omitempty"`
	UnameObjects             []UnameObject             `xml:"uname_object" json:",omitempty"`
}

type OsRelease

type OsRelease struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type OvalDefinitions

type OvalDefinitions struct {
	XMLName     xml.Name    `xml:"oval_definitions"`
	Generator   Generator   `xml:"generator"`
	Definitions Definitions `xml:"definitions"`

	Tests   Tests   `xml:"tests" json:",omitempty"`
	Objects Objects `xml:"objects" json:",omitempty"`
	States  States  `xml:"states" json:",omitempty"`
}

type Pattern

type Pattern struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type Reference

type Reference struct {
	Source string `xml:"source,attr" json:",omitempty"`
	RefID  string `xml:"ref_id,attr" json:",omitempty"`
	RefURL string `xml:"ref_url,attr" json:",omitempty"`
}

type Release

type Release struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type Resolution

type Resolution struct {
	State string `xml:"state,attr" json:",omitempty"`
}

type RpminfoObject

type RpminfoObject struct {
	ID      string `xml:"id,attr" json:",omitempty"`
	Version string `xml:"version,attr" json:",omitempty"`
	Name    string `xml:"name" json:",omitempty"`
}

type RpminfoState

type RpminfoState struct {
	ID             string         `xml:"id,attr" json:",omitempty"`
	Version        string         `xml:"version,attr" json:",omitempty"`
	Arch           Arch           `xml:"arch" json:",omitempty"`
	Evr            Evr            `xml:"evr" json:",omitempty"`
	SignatureKeyID SignatureKeyID `xml:"signature_keyid" json:",omitempty"`
}

type RpminfoTest

type RpminfoTest struct {
	Check          string `xml:"check,attr" json:",omitempty"`
	Comment        string `xml:"comment,attr" json:",omitempty"`
	ID             string `xml:"id,attr" json:",omitempty"`
	Version        string `xml:"version,attr" json:",omitempty"`
	CheckExistence string `xml:"check_existence,attr" json:",omitempty"`
	Object         Object `xml:"object" json:",omitempty"`
	State          State  `xml:"state" json:",omitempty"`
}

type RpmverifyfileObject

type RpmverifyfileObject struct {
	ID          string    `xml:"id,attr" json:",omitempty"`
	AttrVersion string    `xml:"version,attr" json:",omitempty"`
	Behaviors   Behaviors `xml:"behaviors" json:",omitempty"`
	Filepath    Filepath  `xml:"filepath" json:",omitempty"`
	Name        Name      `xml:"name" json:",omitempty"`
	Version     Version   `xml:"version" json:",omitempty"`
	Epoch       Epoch     `xml:"epoch" json:",omitempty"`
	Arch        Arch      `xml:"arch" json:",omitempty"`
	Release     Release   `xml:"release" json:",omitempty"`
}

type RpmverifyfileState

type RpmverifyfileState struct {
	ID          string  `xml:"id,attr" json:",omitempty"`
	AttrVersion string  `xml:"version,attr" json:",omitempty"`
	Name        Name    `xml:"name" json:",omitempty"`
	Version     Version `xml:"version" json:",omitempty"`
}

type RpmverifyfileTest

type RpmverifyfileTest struct {
	Check   string `xml:"check,attr" json:",omitempty"`
	Comment string `xml:"comment,attr" json:",omitempty"`
	ID      string `xml:"id,attr" json:",omitempty"`
	Version string `xml:"version,attr" json:",omitempty"`
	Object  Object `xml:"object" json:",omitempty"`
	State   State  `xml:"state" json:",omitempty"`
}

type SignatureKeyID

type SignatureKeyID struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type State

type State struct {
	Text     string `xml:",chardata" json:",omitempty"`
	StateRef string `xml:"state_ref,attr" json:",omitempty"`
}

type States

type States struct {
	RpminfoState           []RpminfoState           `xml:"rpminfo_state" json:",omitempty"`
	RpmverifyfileStates    []RpmverifyfileState     `xml:"rpmverifyfile_state" json:",omitempty"`
	Textfilecontent54State []Textfilecontent54State `xml:"textfilecontent54_state" json:",omitempty"`
	UnameState             []UnameState             `xml:"uname_state" json:",omitempty"`
}

type Tests

type Tests struct {
	RpminfoTests           []RpminfoTest           `xml:"rpminfo_test" json:",omitempty"`
	RpmverifyfileTests     []RpmverifyfileTest     `xml:"rpmverifyfile_test" json:",omitempty"`
	Textfilecontent54Tests []Textfilecontent54Test `xml:"textfilecontent54_test" json:",omitempty"`
	UnameTests             []UnameTest             `xml:"uname_test" json:",omitempty"`
}

type Text

type Text struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

type Textfilecontent54Object

type Textfilecontent54Object struct {
	ID       string   `xml:"id,attr" json:",omitempty"`
	Version  string   `xml:"version,attr" json:",omitempty"`
	Filepath Filepath `xml:"filepath" json:",omitempty"`
	Pattern  Pattern  `xml:"pattern" json:",omitempty"`
	Instance Instance `xml:"instance" json:",omitempty"`
}

type Textfilecontent54State

type Textfilecontent54State struct {
	ID      string `xml:"id,attr" json:",omitempty"`
	Version string `xml:"version,attr" json:",omitempty"`
	Text    Text   `xml:"text" json:",omitempty"`
}

type Textfilecontent54Test

type Textfilecontent54Test struct {
	Check   string `xml:"check,attr" json:",omitempty"`
	Comment string `xml:"comment,attr" json:",omitempty"`
	ID      string `xml:"id,attr" json:",omitempty"`
	Version string `xml:"version,attr" json:",omitempty"`
	Object  Object `xml:"object" json:",omitempty"`
	State   State  `xml:"state" json:",omitempty"`
}

type UnameObject

type UnameObject struct {
	Text    string `xml:",chardata" json:",omitempty"`
	ID      string `xml:"id,attr" json:",omitempty"`
	Version string `xml:"version,attr" json:",omitempty"`
}

type UnameState

type UnameState struct {
	ID        string    `xml:"id,attr" json:",omitempty"`
	Version   string    `xml:"version,attr" json:",omitempty"`
	OsRelease OsRelease `xml:"os_release" json:",omitempty"`
}

type UnameTest

type UnameTest struct {
	Check   string `xml:"check,attr" json:",omitempty"`
	Comment string `xml:"comment,attr" json:",omitempty"`
	ID      string `xml:"id,attr" json:",omitempty"`
	Version string `xml:"version,attr" json:",omitempty"`
	Object  Object `xml:"object" json:",omitempty"`
	State   State  `xml:"state" json:",omitempty"`
}

type Updated

type Updated struct {
	Date string `xml:"date,attr" json:",omitempty"`
}

type Version

type Version struct {
	Text      string `xml:",chardata" json:",omitempty"`
	Operation string `xml:"operation,attr" json:",omitempty"`
}

Jump to

Keyboard shortcuts

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