Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckOptions ¶
type CheckOptions struct {
Namespace string
Image string
Path string
SkipRules []string
OnlyRules []string
MinSeverity string
}
CheckOptions contains options for compliance checks
type CheckResult ¶
type CheckResult struct {
RuleID string `json:"rule_id"`
RuleName string `json:"rule_name"`
Category string `json:"category"`
Severity string `json:"severity"`
Status CheckStatus `json:"status"`
Resource string `json:"resource"`
Message string `json:"message"`
Remediation string `json:"remediation,omitempty"`
}
CheckResult represents the result of a compliance check
type CheckStatus ¶
type CheckStatus string
CheckStatus represents the status of a compliance check
const ( StatusPassed CheckStatus = "passed" StatusFailed CheckStatus = "failed" StatusSkipped CheckStatus = "skipped" StatusWarning CheckStatus = "warning" )
type DockerChecker ¶
type DockerChecker struct {
// contains filtered or unexported fields
}
DockerChecker checks Docker resources for compliance
func NewDockerChecker ¶
func NewDockerChecker(opts CheckOptions) *DockerChecker
NewDockerChecker creates a new Docker checker
func (*DockerChecker) Run ¶
func (c *DockerChecker) Run(ctx context.Context) ([]CheckResult, error)
Run runs the Docker compliance checks
type FileChecker ¶
type FileChecker struct {
// contains filtered or unexported fields
}
FileChecker checks configuration files for compliance
func NewFileChecker ¶
func NewFileChecker(opts CheckOptions) *FileChecker
NewFileChecker creates a new file checker
func (*FileChecker) Run ¶
func (c *FileChecker) Run(ctx context.Context) ([]CheckResult, error)
Run runs the file compliance checks
type K8sChecker ¶
type K8sChecker struct {
// contains filtered or unexported fields
}
K8sChecker checks Kubernetes resources for compliance
func NewK8sChecker ¶
func NewK8sChecker(opts CheckOptions) *K8sChecker
NewK8sChecker creates a new Kubernetes checker
func (*K8sChecker) Run ¶
func (c *K8sChecker) Run(ctx context.Context) ([]CheckResult, error)
Run runs the Kubernetes compliance checks
type Policy ¶
type Policy struct {
ID string `yaml:"id" json:"id"`
Name string `yaml:"name" json:"name"`
Category string `yaml:"category" json:"category"`
Severity string `yaml:"severity" json:"severity"`
Description string `yaml:"description" json:"description"`
Remediation string `yaml:"remediation" json:"remediation"`
}
Policy represents a compliance policy
func GetBuiltinPolicies ¶
func GetBuiltinPolicies() []Policy
GetBuiltinPolicies returns all built-in compliance policies
type Report ¶
type Report struct {
Title string `json:"title"`
GeneratedAt time.Time `json:"generated_at"`
Summary ReportSummary `json:"summary"`
Results []CheckResult `json:"results"`
}
Report represents a compliance report