Documentation ¶
Index ¶
- Constants
- func ColumnHeading(scanners types.Scanners, components, availableColumns []string) []string
- func InfraColumns() []string
- func RoleColumns() []string
- func SeparateMisconfigReports(k8sReport Report, scanners types.Scanners, components []string) []reports
- func WorkloadColumns() []string
- type ConsolidatedReport
- type CycloneDXWriter
- type JSONWriter
- type Option
- type Report
- type Resource
- type SummaryWriter
- type TableWriter
- type Writer
Constants ¶
View Source
const ( AllReport = "all" SummaryReport = "summary" )
View Source
const ( NamespaceColumn = "Namespace" ResourceColumn = "Resource" VulnerabilitiesColumn = "Vulnerabilities" MisconfigurationsColumn = "Misconfigurations" SecretsColumn = "Secrets" RbacAssessmentColumn = "RBAC Assessment" InfraAssessmentColumn = "Kubernetes Infra Assessment" )
Variables ¶
This section is empty.
Functions ¶
func ColumnHeading ¶
func InfraColumns ¶
func InfraColumns() []string
func RoleColumns ¶
func RoleColumns() []string
func SeparateMisconfigReports ¶
func SeparateMisconfigReports(k8sReport Report, scanners types.Scanners, components []string) []reports
SeparateMisconfigReports returns 3 reports based on scanners and components flags, - misconfiguration report - rbac report - infra checks report
func WorkloadColumns ¶
func WorkloadColumns() []string
Types ¶
type ConsolidatedReport ¶
type ConsolidatedReport struct { SchemaVersion int `json:",omitempty"` ClusterName string Findings []Resource `json:",omitempty"` }
ConsolidatedReport represents a kubernetes scan report with consolidated findings
type CycloneDXWriter ¶
type CycloneDXWriter struct {
// contains filtered or unexported fields
}
CycloneDXWriter implements types.Writer
func NewCycloneDXWriter ¶
func NewCycloneDXWriter(output io.Writer, format cdx.BOMFileFormat, appVersion string) CycloneDXWriter
NewCycloneDXWriter constract new CycloneDXWriter
type JSONWriter ¶
func (JSONWriter) Write ¶
func (jw JSONWriter) Write(report Report) error
Write writes the results in JSON format
type Report ¶
type Report struct { SchemaVersion int `json:",omitempty"` ClusterName string Resources []Resource `json:",omitempty"` RootComponent *core.Component `json:"-"` // contains filtered or unexported fields }
Report represents a kubernetes scan report
func (Report) Failed ¶
Failed returns whether the k8s report includes any vulnerabilities or misconfigurations
func (Report) PrintErrors ¶
func (r Report) PrintErrors()
type Resource ¶
type Resource struct { Namespace string `json:",omitempty"` Kind string Name string Metadata types.Metadata `json:",omitempty"` Results types.Results `json:",omitempty"` Error string `json:",omitempty"` // original report Report types.Report `json:"-"` }
Resource represents a kubernetes resource report
type SummaryWriter ¶
type SummaryWriter struct { Output io.Writer Severities []string SeverityHeadings []string ColumnsHeading []string }
func NewSummaryWriter ¶
func (SummaryWriter) Write ¶
func (s SummaryWriter) Write(report Report) error
Write writes the results in a summarized table format
Click to show internal directories.
Click to hide internal directories.