oval

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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() Alpine

NewAlpine creates OVAL client for SUSE

func (Alpine) FillWithOval added in v0.4.2

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

FillWithOval returns scan result after updating CVE info by OVAL

type Base

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

Base is a base struct

func (Base) CheckHTTPHealth

func (b Base) CheckHTTPHealth() error

CheckHTTPHealth do health check

func (Base) CheckIfOvalFetched

func (b Base) CheckIfOvalFetched(driver db.DB, 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(driver db.DB, 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() CentOS

NewCentOS creates OVAL client for CentOS

type Client

type Client interface {
	CheckHTTPHealth() error
	FillWithOval(db.DB, *models.ScanResult) (int, error)

	// CheckIfOvalFetched checks if oval entries are in DB by family, release.
	CheckIfOvalFetched(db.DB, string, string) (bool, error)
	CheckIfOvalFresh(db.DB, string, string) (bool, error)
}

Client is the interface of OVAL client.

type Debian

type Debian struct {
	DebianBase
}

Debian is the interface for Debian OVAL

func NewDebian

func NewDebian() Debian

NewDebian creates OVAL client for Debian

func (Debian) FillWithOval

func (o Debian) FillWithOval(driver db.DB, 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() Oracle

NewOracle creates OVAL client for Oracle

type RedHat

type RedHat struct {
	RedHatBase
}

RedHat is the interface for RedhatBase OVAL

func NewRedhat

func NewRedhat() 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(driver db.DB, 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() SUSE

NewSUSE creates OVAL client for SUSE

func (SUSE) FillWithOval added in v0.4.1

func (o SUSE) FillWithOval(driver db.DB, 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() Ubuntu

NewUbuntu creates OVAL client for Debian

func (Ubuntu) FillWithOval

func (o Ubuntu) FillWithOval(driver db.DB, 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