oval

package
v0.23.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 22 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFamilyInOval added in v0.15.10

func GetFamilyInOval(familyInScanResult string) (string, error)

GetFamilyInOval returns the OS family name in OVAL For example, CentOS/Alma/Rocky uses Red Hat's OVAL, so return 'redhat'

Types

type Alma added in v0.15.14

type Alma struct {
	// Base
	RedHatBase
}

Alma is the interface for RedhatBase OVAL

func NewAlma added in v0.15.14

func NewAlma(driver ovaldb.DB, baseURL string) Alma

NewAlma creates OVAL client for Alma Linux

type Alpine added in v0.4.2

type Alpine struct {
	Base
}

Alpine is the struct of Alpine Linux

func NewAlpine added in v0.4.2

func NewAlpine(driver ovaldb.DB, baseURL string) Alpine

NewAlpine creates OVAL client for SUSE

func (Alpine) FillWithOval added in v0.4.2

func (o Alpine) FillWithOval(r *models.ScanResult) (nCVEs int, err error)

FillWithOval returns scan result after updating CVE info by OVAL

type Amazon added in v0.8.0

type Amazon struct {
	// Base
	RedHatBase
}

Amazon is the interface for RedhatBase OVAL

func NewAmazon added in v0.8.0

func NewAmazon(driver ovaldb.DB, baseURL string) Amazon

NewAmazon creates OVAL client for Amazon Linux

type Base

type Base struct {
	// contains filtered or unexported fields
}

Base is a base struct

func (Base) CheckIfOvalFetched

func (b Base) CheckIfOvalFetched(osFamily, release string) (bool, error)

CheckIfOvalFetched checks if oval entries are in DB by family, release.

func (Base) CheckIfOvalFresh

func (b Base) CheckIfOvalFresh(osFamily, release string) (ok bool, err error)

CheckIfOvalFresh checks if oval entries are fresh enough

func (Base) CloseDB added in v0.19.5

func (b Base) CloseDB() error

CloseDB close a DB connection

type CentOS

type CentOS struct {
	RedHatBase
}

CentOS is the interface for CentOS OVAL

func NewCentOS

func NewCentOS(driver ovaldb.DB, baseURL string) CentOS

NewCentOS creates OVAL client for CentOS

type Client

type Client interface {
	FillWithOval(*models.ScanResult) (int, error)
	CheckIfOvalFetched(string, string) (bool, error)
	CheckIfOvalFresh(string, string) (bool, error)
	CloseDB() error
}

Client is the interface of OVAL client.

func NewOVALClient added in v0.15.10

func NewOVALClient(family string, cnf config.GovalDictConf, o logging.LogOpts) (Client, error)

NewOVALClient returns a client for OVAL database

type Debian

type Debian struct {
	DebianBase
}

Debian is the interface for Debian OVAL

func NewDebian

func NewDebian(driver ovaldb.DB, baseURL string) Debian

NewDebian creates OVAL client for Debian

func (Debian) FillWithOval

func (o Debian) FillWithOval(r *models.ScanResult) (nCVEs int, err error)

FillWithOval returns scan result after updating CVE info by OVAL

type DebianBase

type DebianBase struct {
	Base
}

DebianBase is the base struct of Debian and Ubuntu

type Fedora added in v0.19.3

type Fedora struct {
	// Base
	RedHatBase
}

Fedora is the interface for RedhatBase OVAL

func NewFedora added in v0.19.3

func NewFedora(driver ovaldb.DB, baseURL string) Fedora

NewFedora creates OVAL client for Fedora Linux

type Oracle

type Oracle struct {
	RedHatBase
}

Oracle is the interface for Oracle OVAL

func NewOracle

func NewOracle(driver ovaldb.DB, baseURL string) Oracle

NewOracle creates OVAL client for Oracle

type Pseudo added in v0.19.5

type Pseudo struct {
	Base
}

Pseudo is OVAL client for Windows, FreeBSD and Pseudo

func NewPseudo added in v0.19.5

func NewPseudo(family string) Pseudo

NewPseudo creates OVAL client for Windows, FreeBSD and Pseudo

func (Pseudo) FillWithOval added in v0.19.5

func (pse Pseudo) FillWithOval(_ *models.ScanResult) (int, error)

FillWithOval is a mock function for operating systems that do not use OVAL

type RedHat

type RedHat struct {
	RedHatBase
}

RedHat is the interface for RedhatBase OVAL

func NewRedhat

func NewRedhat(driver ovaldb.DB, baseURL string) RedHat

NewRedhat creates OVAL client for Redhat

type RedHatBase

type RedHatBase struct {
	Base
}

RedHatBase is the base struct for RedHat, CentOS, Alma, Rocky and Fedora

func (RedHatBase) FillWithOval

func (o RedHatBase) FillWithOval(r *models.ScanResult) (nCVEs int, err error)

FillWithOval returns scan result after updating CVE info by OVAL

type Rocky added in v0.15.13

type Rocky struct {
	// Base
	RedHatBase
}

Rocky is the interface for RedhatBase OVAL

func NewRocky added in v0.15.13

func NewRocky(driver ovaldb.DB, baseURL string) Rocky

NewRocky creates OVAL client for Rocky Linux

type SUSE added in v0.4.1

type SUSE struct {
	Base
}

SUSE is the struct of SUSE Linux

func NewSUSE added in v0.4.1

func NewSUSE(driver ovaldb.DB, baseURL, family string) SUSE

NewSUSE creates OVAL client for SUSE

func (SUSE) FillWithOval added in v0.4.1

func (o SUSE) FillWithOval(r *models.ScanResult) (nCVEs int, err error)

FillWithOval returns scan result after updating CVE info by OVAL

type Ubuntu

type Ubuntu struct {
	DebianBase
}

Ubuntu is the interface for Debian OVAL

func NewUbuntu

func NewUbuntu(driver ovaldb.DB, baseURL string) Ubuntu

NewUbuntu creates OVAL client for Debian

func (Ubuntu) FillWithOval

func (o Ubuntu) FillWithOval(_ *models.ScanResult) (nCVEs int, err error)

FillWithOval returns scan result after updating CVE info by OVAL

Jump to

Keyboard shortcuts

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