oval

package
v0.0.0-...-b33991e Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(opts ...Option) error

Types

type CVEDefinition

type CVEDefinition struct {
	Class    string `xml:"class,attr" json:"class,omitempty"`
	ID       string `xml:"id,attr" json:"id,omitempty"`
	Version  string `xml:"version,attr" json:"version,omitempty"`
	Metadata struct {
		Title       string `xml:"title" json:"title,omitempty"`
		Description string `xml:"description" json:"description,omitempty"`
		Affected    struct {
			Family   string `xml:"family,attr" json:"family,omitempty"`
			Platform string `xml:"platform" json:"platform,omitempty"`
		} `xml:"affected" json:"affected,omitempty"`
		Reference struct {
			Source string `xml:"source,attr" json:"source,omitempty"`
			RefID  string `xml:"ref_id,attr" json:"ref_id,omitempty"`
			RefURL string `xml:"ref_url,attr" json:"ref_url,omitempty"`
		} `xml:"reference" json:"reference,omitempty"`
		Advisory struct {
			Severity   string   `xml:"severity" json:"severity,omitempty"`
			Rights     string   `xml:"rights" json:"rights,omitempty"`
			PublicDate string   `xml:"public_date" json:"public_date,omitempty"`
			Bug        []string `xml:"bug" json:"bug,omitempty"`
			Cve        struct {
				Text       string `xml:",chardata" json:"text,omitempty"`
				Href       string `xml:"href,attr" json:"href,omitempty"`
				Severity   string `xml:"severity,attr" json:"severity,omitempty"`
				Public     string `xml:"public,attr" json:"public,omitempty"`
				CvssScore  string `xml:"cvss_score,attr" json:"cvss_score,omitempty"`
				CvssVector string `xml:"cvss_vector,attr" json:"cvss_vector,omitempty"`
				Usns       string `xml:"usns,attr" json:"usns,omitempty"`
			} `xml:"cve" json:"cve,omitempty"`
			PublicDateAtUsn string   `xml:"public_date_at_usn" json:"public_date_at_usn,omitempty"`
			AssignedTo      string   `xml:"assigned_to" json:"assigned_to,omitempty"`
			DiscoveredBy    string   `xml:"discovered_by" json:"discovered_by,omitempty"`
			Crd             string   `xml:"crd" json:"crd,omitempty"`
			Ref             []string `xml:"ref" json:"ref,omitempty"`
		} `xml:"advisory" json:"advisory,omitempty"`
	} `xml:"metadata" json:"metadata,omitempty"`
	Notes struct {
		Note string `xml:"note" json:"note,omitempty"`
	} `xml:"notes" json:"notes,omitempty"`
	Criteria Criteria `xml:"criteria" json:"criteria,omitempty"`
}

type Criteria

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

type Criterion

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

type Objects

type Objects struct {
	Textfilecontent54Object []struct {
		ID       string `xml:"id,attr" json:"id,omitempty"`
		Version  string `xml:"version,attr" json:"version,omitempty"`
		Comment  string `xml:"comment,attr" json:"comment,omitempty"`
		Path     string `xml:"path" json:"path,omitempty"`
		Filename string `xml:"filename" json:"filename,omitempty"`
		Pattern  struct {
			Operation string `xml:"operation,attr" json:"operation,omitempty"`
			Datatype  string `xml:"datatype,attr" json:"datatype,omitempty"`
			VarRef    string `xml:"var_ref,attr" json:"var_ref,omitempty"`
			VarCheck  string `xml:"var_check,attr" json:"var_check,omitempty"`
		} `xml:"pattern" json:"pattern,omitempty"`
		Instance struct {
			Text      string `xml:",chardata" json:"text,omitempty"`
			Operation string `xml:"operation,attr" json:"operation,omitempty"`
			Datatype  string `xml:"datatype,attr" json:"datatype,omitempty"`
		} `xml:"instance" json:"instance,omitempty"`
	} `xml:"textfilecontent54_object" json:"textfilecontent54_object,omitempty"`
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithBaseURL

func WithBaseURL(url string) Option

func WithDir

func WithDir(dir string) Option

func WithRetry

func WithRetry(retry int) Option

type PKGDefinition

type PKGDefinition struct {
	Class    string `xml:"class,attr" json:"class,omitempty"`
	ID       string `xml:"id,attr" json:"id,omitempty"`
	Version  string `xml:"version,attr" json:"version,omitempty"`
	Metadata struct {
		Title     string `xml:"title" json:"title,omitempty"`
		Reference struct {
			Source string `xml:"source,attr" json:"source,omitempty"`
			RefID  string `xml:"ref_id,attr" json:"ref_id,omitempty"`
			RefURL string `xml:"ref_url,attr" json:"ref_url,omitempty"`
		} `xml:"reference" json:"reference,omitempty"`
		Description string `xml:"description" json:"description,omitempty"`
		Affected    struct {
			Family   string `xml:"family,attr" json:"family,omitempty"`
			Platform string `xml:"platform" json:"platform,omitempty"`
		} `xml:"affected" json:"affected,omitempty"`
		Advisory struct {
			Rights         string `xml:"rights" json:"rights,omitempty"`
			Component      string `xml:"component" json:"component,omitempty"`
			CurrentVersion string `xml:"current_version" json:"current_version,omitempty"`
			Cve            []struct {
				Text         string `xml:",chardata" json:"text,omitempty"`
				Href         string `xml:"href,attr" json:"href,omitempty"`
				Priority     string `xml:"priority,attr" json:"priority,omitempty"`
				Public       string `xml:"public,attr" json:"public,omitempty"`
				CvssScore    string `xml:"cvss_score,attr" json:"cvss_score,omitempty"`
				CvssVector   string `xml:"cvss_vector,attr" json:"cvss_vector,omitempty"`
				CvssSeverity string `xml:"cvss_severity,attr" json:"cvss_severity,omitempty"`
				TestRef      string `xml:"test_ref,attr" json:"test_ref,omitempty"`
				Usns         string `xml:"usns,attr" json:"usns,omitempty"`
			} `xml:"cve" json:"cve,omitempty"`
		} `xml:"advisory" json:"advisory,omitempty"`
	} `xml:"metadata" json:"metadata,omitempty"`
	Criteria Criteria `xml:"criteria" json:"criteria,omitempty"`
}

type States

type States struct {
	Textfilecontent54State []struct {
		ID            string `xml:"id,attr" json:"id,omitempty"`
		Version       string `xml:"version,attr" json:"version,omitempty"`
		Comment       string `xml:"comment,attr" json:"comment,omitempty"`
		Subexpression struct {
			Text      string `xml:",chardata" json:"text,omitempty"`
			Datatype  string `xml:"datatype,attr" json:"datatype,omitempty"`
			Operation string `xml:"operation,attr" json:"operation,omitempty"`
		} `xml:"subexpression" json:"subexpression,omitempty"`
	} `xml:"textfilecontent54_state" json:"textfilecontent54_state,omitempty"`
}

type Tests

type Tests struct {
	Textfilecontent54Test []struct {
		ID             string `xml:"id,attr" json:"id,omitempty"`
		Version        string `xml:"version,attr" json:"version,omitempty"`
		CheckExistence string `xml:"check_existence,attr" json:"check_existence,omitempty"`
		Check          string `xml:"check,attr" json:"check,omitempty"`
		Comment        string `xml:"comment,attr" json:"comment,omitempty"`
		Object         struct {
			ObjectRef string `xml:"object_ref,attr" json:"object_ref,omitempty"`
		} `xml:"object" json:"object,omitempty"`
		State struct {
			StateRef string `xml:"state_ref,attr" json:"state_ref,omitempty"`
		} `xml:"state" json:"state,omitempty"`
	} `xml:"textfilecontent54_test" json:"textfilecontent54_test,omitempty"`
}

type USNDefinition

type USNDefinition struct {
	Class    string `xml:"class,attr" json:"class,omitempty"`
	ID       string `xml:"id,attr" json:"id,omitempty"`
	Version  string `xml:"version,attr" json:"version,omitempty"`
	Metadata struct {
		Title       string `xml:"title" json:"title,omitempty"`
		Description string `xml:"description" json:"description,omitempty"`
		Affected    struct {
			Family   string `xml:"family,attr" json:"family,omitempty"`
			Platform string `xml:"platform" json:"platform,omitempty"`
		} `xml:"affected" json:"affected,omitempty"`
		Reference []struct {
			Source string `xml:"source,attr" json:"source,omitempty"`
			RefID  string `xml:"ref_id,attr" json:"ref_id,omitempty"`
			RefURL string `xml:"ref_url,attr" json:"ref_url,omitempty"`
		} `xml:"reference" json:"reference,omitempty"`
		Advisory struct {
			From     string `xml:"from,attr" json:"from,omitempty"`
			Severity string `xml:"severity" json:"severity,omitempty"`
			Issued   struct {
				Date string `xml:"date,attr" json:"date,omitempty"`
			} `xml:"issued" json:"issued,omitempty"`
			Cve []struct {
				Text         string `xml:",chardata" json:"text,omitempty"`
				Href         string `xml:"href,attr" json:"href,omitempty"`
				Priority     string `xml:"priority,attr" json:"priority,omitempty"`
				Public       string `xml:"public,attr" json:"public,omitempty"`
				CvssScore    string `xml:"cvss_score,attr" json:"cvss_score,omitempty"`
				CvssVector   string `xml:"cvss_vector,attr" json:"cvss_vector,omitempty"`
				CvssSeverity string `xml:"cvss_severity,attr" json:"cvss_severity,omitempty"`
				Usns         string `xml:"usns,attr" json:"usns,omitempty"`
				Severity     string `xml:"severity,attr" json:"severity,omitempty"`
			} `xml:"cve" json:"cve,omitempty"`
			Bug []string `xml:"bug" json:"bug,omitempty"`
			Ref []string `xml:"ref" json:"ref,omitempty"`
		} `xml:"advisory" json:"advisory,omitempty"`
	} `xml:"metadata" json:"metadata,omitempty"`
	Criteria Criteria `xml:"criteria" json:"criteria,omitempty"`
}

type Variables

type Variables struct {
	ConstantVariable []struct {
		ID       string   `xml:"id,attr" json:"id,omitempty"`
		Version  string   `xml:"version,attr" json:"version,omitempty"`
		Datatype string   `xml:"datatype,attr" json:"datatype,omitempty"`
		Comment  string   `xml:"comment,attr" json:"comment,omitempty"`
		Value    []string `xml:"value" json:"value,omitempty"`
	} `xml:"constant_variable" json:"constant_variable,omitempty"`
}

Jump to

Keyboard shortcuts

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