stig

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package stig provides a compliance plugin for STIG security controls.

Index

Constants

View Source
const (
	// MaxDHCPInterfaces represents the maximum number of DHCP interfaces before flagging as unnecessary.
	MaxDHCPInterfaces = 2
)

STIG compliance thresholds used to evaluate service hardening controls.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingStatus

type LoggingStatus int

LoggingStatus represents the result of logging configuration analysis.

const (
	// LoggingStatusNotConfigured indicates no logging configuration is detected.
	LoggingStatusNotConfigured LoggingStatus = iota
	// LoggingStatusComprehensive indicates comprehensive logging is properly configured.
	LoggingStatusComprehensive
	// LoggingStatusPartial indicates logging is partially configured but missing critical components.
	LoggingStatusPartial
	// LoggingStatusUnableToDetermine indicates logging status cannot be determined due to model limitations.
	LoggingStatusUnableToDetermine
)

LoggingStatus values classify the device's logging posture for STIG compliance evaluation.

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin implements the compliance.Plugin interface for STIG plugin.

func NewPlugin

func NewPlugin() *Plugin

NewPlugin creates a new STIG compliance plugin.

func (*Plugin) Description

func (sp *Plugin) Description() string

Description returns the plugin description.

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 STIG 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) Name

func (sp *Plugin) Name() string

Name returns the plugin name.

func (*Plugin) RunChecks

func (sp *Plugin) RunChecks(
	device *common.CommonDevice,
) ([]compliance.Finding, []string, error)

RunChecks performs STIG compliance checks in a single traversal. Returns (findings, evaluated, err). All 10 STIG controls can be evaluated from config.xml data, so every control ID is appended to evaluated regardless of pass/fail — this matches the semantics of the previous EvaluatedControlIDs implementation that unconditionally returned all IDs.

err is currently always nil; reserved for future unrecoverable conditions.

func (*Plugin) ValidateConfiguration

func (sp *Plugin) ValidateConfiguration() error

ValidateConfiguration validates the plugin configuration.

func (*Plugin) Version

func (sp *Plugin) Version() string

Version returns the plugin version.

Jump to

Keyboard shortcuts

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