attacksim

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package attacksim is the engine module wrapper around internal/attacksim. It runs the safe adversary-emulation harness and projects control GAPS (scenarios where no admission/detection control fired) into the Finding model, so a scan can answer "are our Phase 4/5 defenses actually working?". It is OFF BY DEFAULT and safe by construction: Analyze returns nothing unless the caller sets an explicit authorization acknowledgement in the target metadata, and the harness only evaluates inert scenario descriptors — it never executes anything.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(args []string) int

Command runs `dsecrat validate [flags]`. Exit codes: 0 no gaps, 1 gaps found, 2 usage error, 3 refused (missing acknowledgement).

func Register

func Register(r *engine.Registry)

Register adds the attack-sim module to the registry. The master agent calls this from modules.Default() during integration, so this package never edits the shared registry file (parallel-safe wiring — see SHARED_CONTRACT §2).

Registering the module is safe even though it performs adversary emulation: the module is inert unless a target explicitly carries the authorization acknowledgement in its metadata (see attacksim.go).

Types

type Module

type Module struct{}

Module is the attack-simulation / control-validation capability (CAPABILITY_SPEC domain 14, pentest/validation).

func New

func New() *Module

New returns an attack-sim module.

func (*Module) Analyze

func (m *Module) Analyze(ctx context.Context, t *engine.Target) ([]engine.Finding, error)

Analyze runs the harness ONLY when authorized. Absent the acknowledgement it returns nothing, so it is silent in ordinary scans. When authorized it emits a gating-neutral coverage summary plus one finding per control gap (and per regression when a baseline is supplied).

func (*Module) Description

func (m *Module) Description() string

func (*Module) Domains

func (m *Module) Domains() []string

func (*Module) Name

func (m *Module) Name() string

func (*Module) Supports

func (m *Module) Supports(t engine.TargetType) bool

Supports handles filesystem targets (the carrier for control fixtures/baseline), but the module only does anything when explicitly authorized via metadata.

Jump to

Keyboard shortcuts

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