Documentation ¶
Index ¶
- Variables
- type Config
- type Converter
- type ScanReport
- type Scanner
- func (s *Scanner) GetVulnerabilityReportsByScanJob(ctx context.Context, job *batch.Job) (reports vulnerabilities.WorkloadVulnerabilities, err error)
- func (s *Scanner) PrepareScanJob(_ context.Context, workload kube.Object, spec core.PodSpec, ...) (*batch.Job, *core.Secret, error)
- func (s *Scanner) Scan(ctx context.Context, workload kube.Object) (reports vulnerabilities.WorkloadVulnerabilities, owner meta.Object, err error)
- func (s *Scanner) ScanByPodSpec(ctx context.Context, workload kube.Object, spec core.PodSpec) (map[string]sec.VulnerabilityScanResult, error)
- type Vulnerability
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConverter = NewConverter()
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter interface {
Convert(config Config, imageRef string, reader io.Reader) (starboardv1alpha1.VulnerabilityScanResult, error)
}
Converter is the interface that wraps the Convert method.
Convert converts the vulnerabilities model used by Trivy to a generic model defined by the Custom Security Resource Specification.
func NewConverter ¶ added in v0.2.2
func NewConverter() Converter
type ScanReport ¶
type ScanReport struct { Target string `json:"Target"` Vulnerabilities []Vulnerability `json:"Vulnerabilities"` }
type Scanner ¶ added in v0.2.6
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func NewScanner(config Config, opts kube.ScannerOpts, clientset kubernetes.Interface) *Scanner
NewScanner constructs a new vulnerability Scanner with the specified options and Kubernetes client Interface.
func (*Scanner) GetVulnerabilityReportsByScanJob ¶ added in v0.2.6
func (s *Scanner) GetVulnerabilityReportsByScanJob(ctx context.Context, job *batch.Job) (reports vulnerabilities.WorkloadVulnerabilities, err error)
func (*Scanner) PrepareScanJob ¶ added in v0.2.6
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 sec.Severity `json:"Severity"` LayerID string `json:"LayerID"` References []string `json:"References"` }
Click to show internal directories.
Click to hide internal directories.