Documentation
¶
Overview ¶
Package sans provides a compliance plugin for SANS security controls.
Index ¶
- type Plugin
- func (sp *Plugin) Description() string
- func (sp *Plugin) EvaluatedControlIDs(device *common.CommonDevice) []string
- func (sp *Plugin) GetControlByID(id string) (*compliance.Control, error)
- func (sp *Plugin) GetControls() []compliance.Control
- func (sp *Plugin) Name() string
- func (sp *Plugin) RunChecks(device *common.CommonDevice) []compliance.Finding
- func (sp *Plugin) ValidateConfiguration() error
- func (sp *Plugin) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements the compliance.Plugin interface for SANS plugin.
func (*Plugin) Description ¶
Description returns the plugin description.
func (*Plugin) EvaluatedControlIDs ¶ added in v1.4.0
func (sp *Plugin) EvaluatedControlIDs(device *common.CommonDevice) []string
EvaluatedControlIDs returns the IDs of controls this plugin can evaluate given the device configuration. Controls that return Unknown (Known=false) are excluded — they cannot be assessed from config.xml data alone.
func (*Plugin) GetControlByID ¶
func (sp *Plugin) GetControlByID(id string) (*compliance.Control, error)
GetControlByID returns a specific control by ID.
func (*Plugin) GetControls ¶
func (sp *Plugin) GetControls() []compliance.Control
GetControls returns all SANS controls. The returned slice is a deep copy to prevent callers from mutating the plugin's internal state, including nested reference types (References, Tags, Metadata).
func (*Plugin) RunChecks ¶
func (sp *Plugin) RunChecks(device *common.CommonDevice) []compliance.Finding
RunChecks performs SANS compliance checks against the device configuration. Each helper returns a checkResult. When Known is false the check is skipped because the data needed to determine compliance is not available in config.xml.
func (*Plugin) ValidateConfiguration ¶
ValidateConfiguration validates the plugin configuration.