cli

package
v0.0.0-...-40f476f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Type    ResourceType `json:"type"`
	Path    string       `json:"path"`
	Name    string       `json:"name"`
	Version string       `json:"version"`
}

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

type ScanOptions struct {
	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"`
	OS             string               `json:"os"`
	Version        string               `json:"version"`
	PullName       string               `json:"pull_name"`
	InitiatingUser string               `json:"initiating_user"`
	Resources      []ResourceScan       `json:"resources"`
	Summary        VulnerabilitySummary `json:"vulnerability_summary"`
	Warnings       []Warning            `json:"warnings"`
	ScanOptions    ScanOptions          `json:"scan_options"`
}

type Scanner

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

func NewScanner

func NewScanner(baseURL string, credentials client.UsernameAndPassword) *Scanner

func (*Scanner) Scan

func (s *Scanner) Scan(imageRef string) (report v1alpha1.VulnerabilityReport, err error)

type Vulnerability

type Vulnerability struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	FixVersion  string `json:"fix_version"`

	VendorURL        string `json:"vendor_url"`
	VendorSeverity   string `json:"vendor_severity"`
	VendorSeverityV3 string `json:"vendor_severity_v3"`

	NVDURL        string  `json:"nvd_url"`
	NVDSeverity   string  `json:"nvd_severity"`
	NVDScore      float32 `json:"nvd_score"`
	NVDSeverityV3 string  `json:"nvd_severity_v3"`
	NVDScoreV3    float32 `json:"nvd_score_v3"`

	AquaSeverity      string  `json:"aqua_severity"`
	AquaScore         float32 `json:"aqua_score"`
	AquaScoringSystem string  `json:"aqua_scoring_system"`
}

type VulnerabilitySummary

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

type Warning

type Warning struct {
}

Jump to

Keyboard shortcuts

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