Documentation ¶
Index ¶
Constants ¶
const ( SeverityCritical = "CRITICAL" SeverityHigh = "HIGH" SeverityMedium = "MEDIUM" SeverityLow = "LOW" SeverityNone = "NONE" // Kept for legacy reasons since starboard contains this severity level SeverityUnknown = "UNKNOWN" )
Adapted from severityNames in Trivy-db https://gitlab.com/gitlab-org/security-products/dependencies/trivy-db/-/blob/2bd1364579ec652f8f595c4a61595fd9575e8496/pkg/types/types.go#L35
const ( // Trivy version 0.45.0 contains a feature to support scanning of private images. It is due to be released early Sep 2023. // I've opted to use the sha256 digest from the Trivy Canary build in lieu of version 0.45.0 so we can release the private image scanning fix earlier. // TODO, switch back to version tag once Trivy 0.45.0 or later has been released. TrivyScannerVersion = "@sha256:f7fe23c37e0545435e4b8cf3c8c1712ab5584677e119edfb749b0f50ca4de895" // nolint:gosec )
Variables ¶
var TrivyScanner = report.ScannerDetails{
ID: "starboard_trivy",
Name: "Trivy (via Starboard Operator)",
Vendor: report.Vendor{
Name: "GitLab",
},
}
Functions ¶
This section is empty.
Types ¶
type ConsolidatedReport ¶
type ConsolidatedReport struct {
Findings []Resource `json:"Findings"`
}
Type referenced from Trivy https://gitlab.com/gitlab-org/security-products/dependencies/trivy/-/blob/v0.38.3/pkg/k8s/report/report.go?ref_type=tags#L51
type CronScheduler ¶
type CronScheduler struct {
// contains filtered or unexported fields
}
CronScheduler can run tasks on a cron schedule, with cancellation.
func NewCronScheduler ¶
func NewCronScheduler() *CronScheduler
func (*CronScheduler) Run ¶
func (s *CronScheduler) Run(ctx context.Context)
type DetectedVulnerability ¶
type DetectedVulnerability struct { VulnerabilityID string `json:"VulnerabilityID"` PkgName string `json:"PkgName"` InstalledVersion string `json:"InstalledVersion"` FixedVersion string `json:"FixedVersion"` PrimaryURL string `json:"PrimaryURL"` // Embed vulnerability details Vulnerability }
Type referenced from Trivy https://gitlab.com/gitlab-org/security-products/dependencies/trivy/-/blob/v0.38.3/pkg/types/vulnerability.go#L9
type Factory ¶
type Factory struct{}
func (*Factory) IsProducingLeaderModules ¶ added in v16.3.0
func (*Factory) StartStopPhase ¶
func (f *Factory) StartStopPhase() modshared.ModuleStartStopPhase
type LogParser ¶
type LogParser interface {
ParsePodLogsToReport(logs []byte) (ConsolidatedReport, error)
}
type Payload ¶
type Payload struct { Vulnerability *report.Vulnerability `json:"vulnerability"` Scanner report.ScannerDetails `json:"scanner"` }
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
func (*Reporter) ResolveVulnerabilities ¶
type Resource ¶
type Resource struct { Namespace string `json:"Namespace"` Kind string `json:"Kind"` Name string `json:"Name"` Results []Result `json:"Results"` }
Type referenced from Trivy https://gitlab.com/gitlab-org/security-products/dependencies/trivy/-/blob/v0.38.3/pkg/k8s/report/report.go#L58
type Result ¶
type Result struct { Target string `json:"Target"` Class string `json:"Class"` Type string `json:"Type"` Vulnerabilities []DetectedVulnerability `json:"Vulnerabilities"` }
Type referenced from Trivy https://gitlab.com/gitlab-org/security-products/dependencies/trivy/-/blob/v0.38.3/pkg/types/report.go#L71
type Vulnerability ¶
type Vulnerability struct { Title string `json:"Title"` Description string `json:"Description"` Severity string `json:"Severity"` // Selected from VendorSeverity, depending on a scan target References []string `json:"References"` PublishedDate *time.Time `json:"PublishedDate"` // Take from NVD LastModifiedDate *time.Time `json:"LastModifiedDate"` // Take from NVD }
Type referenced from Trivy-db https://gitlab.com/gitlab-org/security-products/dependencies/trivy-db/-/blob/4bcdf1c414d0/pkg/types/types.go#L132 referenced by Trivy v0.38.3