scanner

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package scanner finds unsafe ShiftLock configurations and emits findings in text, JSON, or SARIF form.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(w io.Writer, format string, findings []Finding) error

Format selects text, json, or sarif output.

Types

type Finding

type Finding struct {
	RuleID      string   `json:"rule_id"`
	Severity    Severity `json:"severity"`
	Title       string   `json:"title"`
	Message     string   `json:"message"`
	Remediation string   `json:"remediation"`
	Path        string   `json:"path,omitempty"`
}

Finding is one scanner result.

func Scan

func Scan(in Input) []Finding

Scan evaluates Input against built-in rules.

type Input

type Input struct {
	Production              bool
	SignaturesRequired      bool
	UnsignedConfigActive    bool
	AllowInsecureSkipVerify bool
	TCPAgentListener        bool
	ShellExecEnabled        bool
	UnboundedQueue          bool
	AuditVerifyOnStart      bool
	DenyByDefault           bool
	SecurityProfile         string
	LeaseTTLSeconds         int
	CapabilitiesUnsigned    bool
}

Input is a sanitized configuration view for scanning.

type Severity

type Severity string

Severity ranks finding impact.

const (
	SeverityInfo     Severity = "info"
	SeverityLow      Severity = "low"
	SeverityMedium   Severity = "medium"
	SeverityHigh     Severity = "high"
	SeverityCritical Severity = "critical"
)

Jump to

Keyboard shortcuts

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