Documentation
¶
Overview ¶
Package scanner provides an interface and primitives for implementing scanners that check Kubernetes resources for various issues, such as security vulnerabilities, misconfigurations, and best practices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Issue ¶
type Issue struct {
Scanner string // Scanner is the name of the scanner that discovered the issue.
Severity IssueSeverityLevel // Severity indicates how critical the issue is, using the IssueSeverityLevel constants.
Title string // Title is a brief summary of the issue.
Message string // Message provides a detailed human-readable description of the issue.
}
Issue represents a particular finding or problem discovered by a scanner. It encapsulates the details of the issue such as the scanner's name, its severity, and a human-readable title and message.
type IssueSeverityLevel ¶
type IssueSeverityLevel int
IssueSeverityLevel represents the severity level of an issue.
const ( Low IssueSeverityLevel = iota // Low indicates a minor issue that should be addressed. Medium // Medium indicates a potential issue that may have a moderate impact. High // High indicates a serious issue that has a significant impact. Critical // Critical indicates an extremely serious issue that must be addressed immediately. )
IssueSeverityLevel defines the severity level of an issue. It is an enumeration starting from 0 (Low) and increases with severity.
func (IssueSeverityLevel) String ¶
func (s IssueSeverityLevel) String() string
String returns the string representation of the IssueSeverityLevel.
type KubeScanner ¶
type KubeScanner interface {
Name() string // Name returns the name of the scanner.
Scan(resources ...runtime.Object) ([]*Issue, error) // Scan accepts one or more Kubernetes resources and returns a slice of issues found.
ScanManifest(manifest io.Reader) ([]*Issue, error) // Scan accepts a Kubernetes manifest and returns a slice of issues found.
}
KubeScanner is an interface for scanners that analyze Kubernetes resources. Each scanner should implement this interface to provide scanning functionality.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package kubeaudit wraps the kubeaudit library to provide a scanner.KubeScanner implementation for auditing Kubernetes resources against common security concerns.
|
Package kubeaudit wraps the kubeaudit library to provide a scanner.KubeScanner implementation for auditing Kubernetes resources against common security concerns. |