oval

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: GPL-3.0 Imports: 20 Imported by: 12

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

Types

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 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 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 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 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

Jump to

Keyboard shortcuts

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