Skip to main content

stave apply

Run control evaluation after plan checks pass

Usage

stave apply [flags]

Description

Apply executes control evaluation and produces safety findings.

Modes: Default Evaluate observations against controls in a project directory. --auto Discover→plan→evaluate pipeline. Requires --services or --pack. Prints a severity-weighted plan to stderr, then evaluates. --dry-run Run readiness checks only, without evaluating controls. --profile Evaluate a bundled observations file against a built-in control pack. Requires --input. Example: stave apply --profile aws-s3 --input obs.json

Inputs: --controls, -i Path to control definitions directory (default: controls/s3) --observations, -o Path to observation snapshots directory (default: observations) --pack Scope evaluation to a concern pack's controls (repeatable; see "stave pack list") --services Scope evaluation to controls for these AWS services (comma-separated, e.g. iam,s3 — see "stave plan") --all Evaluate the full catalog; print findings grouped per service, then compound, then a summary --profile, -p Evaluation profile (e.g., aws-s3) --input Path to observations bundle file (required with --profile) --max-unsafe Maximum allowed unsafe duration (default: from project config) --eval-time Evaluation reference timestamp (RFC3339) for deterministic output --format, -f Output format: text, json, or sarif (default: text) --dry-run Run readiness checks only

Outputs: stdout Evaluation findings (JSON, text, or SARIF) stderr Progress and diagnostic messages

Exit Codes: 0 - Evaluation completed with no violations 2 - Invalid input or configuration error 3 - Violations found 4 - Internal error 130 - Interrupted (SIGINT)

Remediation scope: Stave produces findings with structured remediation data (asset-parameterized CLI in findings[].fix_plan.command, property-level changes in findings[].remediation_context.changes, AI-prompt-ready context in findings[].remediation_context). It does NOT execute remediation. Pipe apply output to downstream tooling — AI prompts, CI/CD pipelines, ticket systems — for fix generation. There is no --apply-fixes flag and no auto-fix mode; the boundary is the data, not the change.

Offline-only: reads local files; makes zero network connections; no cloud credentials.

Flags

FlagTypeDescription
--acknowledgment-filestringPath to acknowledgment config YAML file
--allboolEvaluate the full catalog and print findings grouped per service, then compound, then a summary
--assert-recentstringFail if no snapshot newer than this duration (e.g. 48h)
--assetsstringasset sensitivity classification manifest YAML
--autoboolRun discover→plan→evaluate: resolve services, show severity plan, evaluate in weighted order
--baselinestringSARIF baseline file for baseline state comparison
--bucket-allowliststringSliceBucket names/ARNs to include
-i, --controlsstringPath to control definitions directory (default: controls)
--dry-runboolRun readiness checks only, without evaluating controls
--eval-timestringEvaluation reference timestamp (RFC3339). Durations and temporal risk are measured against this time. Defaults to wall clock.
--exemption-filestringPath to asset exemption list YAML file
-f, --formatstringOutput format (text, json, or sarif) (default: text)
--historystringDirectory of historical assessment JSON files (for --new-only)
--include-allboolDisable health scope filtering
--inputstringPath to observations bundle file (required with --profile)
--integrity-manifeststringPath to manifest JSON containing expected hashes
--integrity-public-keystringPath to Ed25519 public key for signed manifests
--max-unsafestringMaximum allowed unsafe duration Resolved default may come from STAVE_* env vars, stave.yaml, user config, or built-in.
--new-onlyboolShow only findings not present in previous assessment
--new-sincestringShow only findings not present in assessments within this window (e.g. 7d)
-o, --observationsstringPath to observation snapshots directory (default: observations)
--overlaystringenvironment-specific severity overlay YAML
--owner-filterstringSliceTeam IDs to filter findings (repeatable or comma-separated)
--packstringArrayScope evaluation to a concern pack (repeatable). Example: stave apply --pack entropy -o snapshot/
-p, --profilestringEvaluation profile (e.g. aws-s3)
--profile-filestringSlicecustom compliance profile YAML (can be repeated)
--servicesstringSliceScope evaluation to controls for these AWS services (comma-separated). Example: stave apply --services iam,s3 -o snapshot/
--show-suppressedboolinclude overlay-suppressed controls in output
--sla-policystringSLA breach exit code behavior: warn, strict, critical-only (default: warn)
--sla-profilestringSLA policy profile (pci_dss_v4, hipaa, soc2, fedramp_moderate, default)
--sla-profile-filestringpath to custom SLA policy YAML file
--team-manifeststringPath to stave-teams.yaml for owner routing
--tracestringWrite full step-by-step audit trace to file. Every finding already emits a compact reasoning_trace inline (rendered as prose in text output, as raw DSL in JSON/SARIF); this flag writes the full Assessment.Steps[] superset to a separate file for users who want the precise predicate-DSL form or per-step timing.
-v, --verboseboolShow full evidence, reasoning, and remediation for each finding

Examples

# Guided evaluation: discover services, plan severity order, evaluate
stave apply --auto --services iam,s3,lambda -o ./snapshots/

# Standard evaluation
stave apply --controls ./controls --observations ./obs --format json

# Scope evaluation to one concern pack
stave apply --pack entropy --observations ./obs

# Readiness check only (dry run)
stave apply --dry-run

# Profile-based evaluation with bundled observations
stave apply --profile aws-s3 --input observations.json --eval-time 2026-01-15T00:00:00Z