Documentation
¶
Index ¶
- type CISUbuntu2004Module
- type ComplianceConfig
- type ComplianceManager
- func (m *ComplianceManager) CheckAllCompliance(ctx context.Context, module *core.Module) ([]*ComplianceResult, error)
- func (m *ComplianceManager) CheckCompliance(ctx context.Context, module *core.Module) (*ComplianceResult, error)
- func (m *ComplianceManager) Disable()
- func (m *ComplianceManager) Enable()
- func (m *ComplianceManager) GetLoadedModules() []string
- func (m *ComplianceManager) IsEnabled() bool
- func (m *ComplianceManager) LoadModule(name string) error
- type ComplianceModule
- type ComplianceResult
- type ComplianceViolation
- type NIST80053Module
- type STIGRHELModule
- type Severity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CISUbuntu2004Module ¶
type CISUbuntu2004Module struct{}
CISUbuntu2004Module implements CIS Ubuntu 20.04 compliance checks
func NewCISUbuntu2004Module ¶
func NewCISUbuntu2004Module() *CISUbuntu2004Module
NewCISUbuntu2004Module creates a new CIS Ubuntu 20.04 compliance module
func (*CISUbuntu2004Module) CheckCompliance ¶
func (c *CISUbuntu2004Module) CheckCompliance(ctx context.Context, module *core.Module) (*ComplianceResult, error)
CheckCompliance checks CIS Ubuntu 20.04 compliance
func (*CISUbuntu2004Module) Framework ¶
func (c *CISUbuntu2004Module) Framework() string
Framework returns the compliance framework name
func (*CISUbuntu2004Module) Version ¶
func (c *CISUbuntu2004Module) Version() string
Version returns the compliance framework version
type ComplianceConfig ¶
type ComplianceConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Modules []string `yaml:"modules" json:"modules"`
}
ComplianceConfig represents compliance configuration
func DefaultComplianceConfig ¶
func DefaultComplianceConfig() *ComplianceConfig
DefaultComplianceConfig returns default compliance configuration
type ComplianceManager ¶
type ComplianceManager struct {
// contains filtered or unexported fields
}
ComplianceManager manages compliance modules and checks
func NewComplianceManager ¶
func NewComplianceManager() *ComplianceManager
NewComplianceManager creates a new compliance manager
func (*ComplianceManager) CheckAllCompliance ¶
func (m *ComplianceManager) CheckAllCompliance(ctx context.Context, module *core.Module) ([]*ComplianceResult, error)
CheckAllCompliance checks compliance against all loaded modules
func (*ComplianceManager) CheckCompliance ¶
func (m *ComplianceManager) CheckCompliance(ctx context.Context, module *core.Module) (*ComplianceResult, error)
CheckCompliance checks compliance against the first loaded module
func (*ComplianceManager) Disable ¶
func (m *ComplianceManager) Disable()
Disable disables compliance checking
func (*ComplianceManager) Enable ¶
func (m *ComplianceManager) Enable()
Enable enables compliance checking
func (*ComplianceManager) GetLoadedModules ¶
func (m *ComplianceManager) GetLoadedModules() []string
GetLoadedModules returns the names of loaded compliance modules
func (*ComplianceManager) IsEnabled ¶
func (m *ComplianceManager) IsEnabled() bool
IsEnabled returns whether compliance checking is enabled
func (*ComplianceManager) LoadModule ¶
func (m *ComplianceManager) LoadModule(name string) error
LoadModule loads a compliance module by name
type ComplianceModule ¶
type ComplianceModule interface {
Framework() string
Version() string
CheckCompliance(ctx context.Context, module *core.Module) (*ComplianceResult, error)
}
ComplianceModule defines a compliance framework module
type ComplianceResult ¶
type ComplianceResult struct {
Framework string `json:"framework"`
Version string `json:"version"`
Compliant bool `json:"compliant"`
Violations []ComplianceViolation `json:"violations"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Total int `json:"total"`
}
ComplianceResult represents the result of a compliance check
type ComplianceViolation ¶
type ComplianceViolation struct {
Framework string `json:"framework"`
Version string `json:"version"`
Control string `json:"control"`
Title string `json:"title"`
Description string `json:"description"`
Severity Severity `json:"severity"`
Resource string `json:"resource"`
Message string `json:"message"`
}
ComplianceViolation represents a compliance violation
func (*ComplianceViolation) String ¶
func (v *ComplianceViolation) String() string
String returns a string representation of the violation
type NIST80053Module ¶
type NIST80053Module struct{}
NIST80053Module implements NIST 800-53 compliance checks
func NewNIST80053Module ¶
func NewNIST80053Module() *NIST80053Module
NewNIST80053Module creates a new NIST 800-53 compliance module
func (*NIST80053Module) CheckCompliance ¶
func (n *NIST80053Module) CheckCompliance(ctx context.Context, module *core.Module) (*ComplianceResult, error)
CheckCompliance checks NIST 800-53 compliance
func (*NIST80053Module) Framework ¶
func (n *NIST80053Module) Framework() string
Framework returns the compliance framework name
func (*NIST80053Module) Version ¶
func (n *NIST80053Module) Version() string
Version returns the compliance framework version
type STIGRHELModule ¶
type STIGRHELModule struct{}
STIGRHELModule implements STIG RHEL 8 compliance checks
func NewSTIGRHEL8Module ¶
func NewSTIGRHEL8Module() *STIGRHELModule
NewSTIGRHEL8Module creates a new STIG RHEL 8 compliance module
func (*STIGRHELModule) CheckCompliance ¶
func (s *STIGRHELModule) CheckCompliance(ctx context.Context, module *core.Module) (*ComplianceResult, error)
CheckCompliance checks STIG RHEL 8 compliance
func (*STIGRHELModule) Framework ¶
func (s *STIGRHELModule) Framework() string
Framework returns the compliance framework name
func (*STIGRHELModule) Version ¶
func (s *STIGRHELModule) Version() string
Version returns the compliance framework version