aqua

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Scan(imageRef ImageRef) (ScanReport, error)
}

Command represents the CLI interface for the Aqua Enterprise scanner, i.e. scannercli executable.

func NewCommand

func NewCommand(cfg etc.AquaCSP, ambassador ext.Ambassador) Command

NewCommand constructs Aqua Enterprise scanner command with the given configuration.

type ImageRef

type ImageRef struct {
	Repository string
	Tag        string
	Digest     string
	Auth       RegistryAuth
}

func (*ImageRef) WithDigest

func (ir *ImageRef) WithDigest() string

func (*ImageRef) WithTag

func (ir *ImageRef) WithTag() string

type MockCommand

type MockCommand struct {
	mock.Mock
}

func (*MockCommand) Scan added in v0.5.0

func (c *MockCommand) Scan(imageRef ImageRef) (ScanReport, error)

type RegistryAuth added in v0.7.0

type RegistryAuth struct {
	Username string
	Password string
}

type Resource

type Resource struct {
	Format  string       `json:"format"`
	Type    ResourceType `json:"type"`
	Path    string       `json:"path"`
	Name    string       `json:"name"`
	Version string       `json:"version"`
	CPE     string       `json:"cpe"` // CPE Common Platform Enumerations
}

type ResourceScan

type ResourceScan struct {
	Resource        Resource        `json:"resource"`
	Scanned         bool            `json:"scanned"`
	Vulnerabilities []Vulnerability `json:"vulnerabilities"`
}

type ResourceType

type ResourceType int
const (
	Library ResourceType
	Package
)

type ScanOptions added in v0.5.0

type ScanOptions struct {
	ScanExecutables          bool `json:"scan_executables"`
	ShowWillNotFix           bool `json:"show_will_not_fix"`
	StrictScan               bool `json:"strict_scan"`
	ScanMalware              bool `json:"scan_malware"`
	ScanFiles                bool `json:"scan_files"`
	ManualPullFallback       bool `json:"manual_pull_fallback"`
	SaveAdHockScans          bool `json:"save_adhoc_scans"`
	Dockerless               bool `json:"dockerless"`
	EnableFastScanning       bool `json:"enable_fast_scanning"`
	SuggestOSUpgrade         bool `json:"suggest_os_upgrade"`
	IncludeSiblingAdvisories bool `json:"include_sibling_advisories"`
	UseCVSS3                 bool `json:"use_cvss3"`
}

type ScanReport

type ScanReport struct {
	Image          string         `json:"image"`
	Registry       string         `json:"registry"`
	Digest         string         `json:"digest"`
	PullName       string         `json:"pull_name"`
	OS             string         `json:"os"`
	Version        string         `json:"version"`
	PartialResults bool           `json:"partial_results"`
	ChangedResults bool           `json:"changed_results"`
	InitiatingUser string         `json:"initiating_user"`
	Resources      []ResourceScan `json:"resources"`
	Summary        Summary        `json:"vulnerability_summary"`
	ScanOptions    ScanOptions    `json:"scan_options"`
}

type Summary

type Summary struct {
	Total      int `json:"total"`
	Critical   int `json:"critical"`
	High       int `json:"high"`
	Medium     int `json:"medium"`
	Low        int `json:"low"`
	Negligible int `json:"negligible"`
	Sensitive  int `json:"sensitive"`
	Malware    int `json:"malware"`
}

type Vulnerability

type Vulnerability struct {
	Name              string  `json:"name"`
	Description       string  `json:"description"`
	NVDURL            string  `json:"nvd_url"`
	VendorURL         string  `json:"vendor_url"`
	FixVersion        string  `json:"fix_version"`
	AquaScore         float32 `json:"aqua_score"`
	AquaSeverity      string  `json:"aqua_severity"`
	AquaVectors       string  `json:"aqua_vectors"`
	AquaScoringSystem string  `json:"aqua_scoring_system"`
}

Jump to

Keyboard shortcuts

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