config

package
v0.0.0-...-d0c7a6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditConfig

type AuditConfig struct {
	// Kubernetes clients
	Clientset  *kubernetes.Clientset
	RestConfig *rest.Config

	// Audit scope configuration
	Namespace     string
	AuditScopes   []string
	SkipScopes    []string
	IncludeSystem bool

	// Output configuration
	OutputFile   string
	ReportFormat string
	MinSeverity  string
	Debug        bool

	// Rules configuration
	RulesDir  string
	RuleFiles map[string]string
}

AuditConfig holds all configuration for the security auditor

func ParseConfig

func ParseConfig() (*AuditConfig, error)

func (*AuditConfig) Validate

func (c *AuditConfig) Validate() error

Validate validates the configuration

type ConfigOptions

type ConfigOptions struct {
	KubeconfigPath string
	Namespace      string
	OutputFile     string
	Debug          bool
	MinSeverity    string
	ReportFormat   string
	IncludeSystem  bool
	RulesDir       string
}

ConfigOptions holds the command-line options

type Rule

type Rule struct {
	Name        string            `yaml:"name"`
	Description string            `yaml:"description"`
	Category    string            `yaml:"category"`
	Severity    string            `yaml:"severity"`
	Condition   string            `yaml:"condition"`
	Suggestion  string            `yaml:"suggestion"`
	Metadata    map[string]string `yaml:"metadata,omitempty"`
}

Rule represents a single security rule definition

func LoadRules

func LoadRules(filename string) ([]Rule, error)

LoadRules loads rules from a specific file

type RuleConfig

type RuleConfig struct {
	Rules []Rule `yaml:"rules"`
}

RuleConfig represents the structure of a rules YAML file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL