oval

package
v0.15.10-saas Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: AGPL-3.0 Imports: 21 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 uses Red Hat's OVAL, so return 'redhat'

Types

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(cnf config.VulnDictInterface) 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(cnf config.VulnDictInterface) Amazon

NewAmazon creates OVAL client for Amazon Linux

type Base

type Base struct {
	Cnf config.VulnDictInterface
	// contains filtered or unexported fields
}

Base is a base struct

func (Base) CheckIfOvalFetched

func (b Base) CheckIfOvalFetched(osFamily, release string) (fetched bool, err 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

type CentOS

type CentOS struct {
	RedHatBase
}

CentOS is the interface for CentOS OVAL

func NewCentOS

func NewCentOS(cnf config.VulnDictInterface) 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)
}

Client is the interface of OVAL client.

func NewOVALClient added in v0.15.10

func NewOVALClient(family string, cnf config.GovalDictConf) (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(cnf config.VulnDictInterface) 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 Oracle

type Oracle struct {
	RedHatBase
}

Oracle is the interface for Oracle OVAL

func NewOracle

func NewOracle(cnf config.VulnDictInterface) Oracle

NewOracle creates OVAL client for Oracle

type RedHat

type RedHat struct {
	RedHatBase
}

RedHat is the interface for RedhatBase OVAL

func NewRedhat

func NewRedhat(cnf config.VulnDictInterface) RedHat

NewRedhat creates OVAL client for Redhat

type RedHatBase

type RedHatBase struct {
	Base
}

RedHatBase is the base struct for RedHat and CentOS

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(cnf config.VulnDictInterface) 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(cnf config.VulnDictInterface) Ubuntu

NewUbuntu creates OVAL client for Debian

func (Ubuntu) FillWithOval

func (o Ubuntu) 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