Documentation ¶
Index ¶
- Constants
- type BasicAuth
- type BearerAuth
- type CNSIReport
- type CVSSInfo
- type CauseMetadata
- type Code
- type ImageLayer
- type ImageRef
- type Layer
- type Lines
- type Metadata
- type MockWrapper
- type NoAuth
- type OS
- type Reference
- type RegistryAuth
- type RepoTags
- type Report
- type ScanResult
- type VersionInfo
- type Vulnerability
- type Wrapper
Constants ¶
View Source
const SchemaVersion = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BearerAuth ¶
type BearerAuth struct {
Token string
}
type CNSIReport ¶
type CNSIReport struct { GeneratedAt string `json:"generated_at,omitempty"` Artifact harbor.Artifact `json:"artifact,omitempty"` Scanner harbor.Scanner `json:"scanner,omitempty"` Severity string `json:"severity,omitempty"` Vulnerabilities string `json:"vulnerabilities,omitempty"` Report Report `json:"Report,omitempty"` }
CNSIReport represents a scan result
type CauseMetadata ¶
type ImageLayer ¶
type ImageLayer struct {
DiffID string `json:"DiffID"`
}
type ImageRef ¶
type ImageRef struct { Name string Auth RegistryAuth Insecure bool }
type MockWrapper ¶
func NewMockWrapper ¶
func NewMockWrapper() *MockWrapper
func (*MockWrapper) GetVersion ¶
func (w *MockWrapper) GetVersion() (VersionInfo, error)
func (*MockWrapper) Scan ¶
func (w *MockWrapper) Scan(imageRef ImageRef) ([]Vulnerability, error)
type ScanResult ¶
type ScanResult struct { Target string `json:"Target"` Class string `json:"Class"` Type string `json:"Type"` Vulnerabilities []Vulnerability `json:"Vulnerabilities"` }
type VersionInfo ¶
type Vulnerability ¶
type Vulnerability struct { VulnerabilityID string `json:"VulnerabilityID"` PkgName string `json:"PkgName"` InstalledVersion string `json:"InstalledVersion"` FixedVersion string `json:"FixedVersion"` Title string `json:"Title"` Description string `json:"Description"` Severity string `json:"Severity"` References []string `json:"References"` PrimaryURL string `json:"PrimaryURL"` Layer *Layer `json:"Layer"` //CVSS map[string]CVSSInfo `json:"CVSS"` CweIDs []string `json:"CweIDs"` }
type Wrapper ¶
type Wrapper interface { Scan(imageRef ImageRef) (*trivy.Report, error) GetVersion() (VersionInfo, error) }
func NewWrapper ¶
func NewWrapper(config etc.Trivy, ambassador ext.Ambassador) Wrapper
Click to show internal directories.
Click to hide internal directories.