Documentation
¶
Overview ¶
Package config defines configuration structures for gitMDM checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckDefinition ¶
CheckDefinition is just a map of OS names to command rules. The key can be: - "description" for the check description - An OS name like "linux", "darwin", "windows" - A comma-separated list like "linux,freebsd" - "unix" for all Unix-like systems - "all" for all systems.
func (CheckDefinition) CommandsForOS ¶
func (cd CheckDefinition) CommandsForOS(osName string) []CommandRule
CommandsForOS returns the command rules for a specific OS. Priority order: 1. Exact OS match (e.g., "freebsd") 2. Comma-separated match (e.g., "linux,freebsd") 3. Unix (for all Unix-like systems) 4. All (works on any OS).
type CommandRule ¶
type CommandRule struct { // Check type - either output (command) or file Output string `yaml:"output,omitempty"` // Command to execute File string `yaml:"file,omitempty"` // File to read // Evaluation criteria (all are optional) Includes string `yaml:"includes,omitempty"` // Regex - fail if matches Excludes string `yaml:"excludes,omitempty"` // Regex - fail if doesn't match ExitCode *int `yaml:"exitcode,omitempty"` // Fail if exit code matches // Remediation steps specific to this rule Remediation []string `yaml:"remediation,omitempty"` }
CommandRule defines a single command or file check with evaluation criteria.
type Config ¶
type Config struct {
Checks map[string]CheckDefinition `yaml:"checks"`
}
Config represents the complete checks configuration.