Skip to content

feat(guardrails): flip default mode from advisory to block (#171) - #182

Merged
JAORMX merged 1 commit into
mainfrom
feat/guardrails-default-block-171
Jun 24, 2026
Merged

JAORMX merged 1 commit into
mainfrom
feat/guardrails-default-block-171

Conversation

@JAORMX

@JAORMX JAORMX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Flips the default guardrail rule set from advisory (observe-only) to block (enforcement). Adds a guardrails.defaultMode YAML key (block default / advisory / sanitize) so operators can downgrade the built-in defaults to observe-only without authoring a full rule list.

Why

With #170 merged (advisory findings now surface to the TUI), advisory is a legitimate opt-in — but it should not be the default. An operator who enables a security control expects enforcement, not an observe-only mode that requires a config change to actually block.

Changes

  • internal/app/guardrails.go — defaultGuardrailSpecs flipped from ModeAdvisory to ModeBlock; effectiveGuardrailSpecs applies GuardrailsDefaultMode override when set.
  • internal/adapter/permconfig/schema.go — new defaultMode YAML key.
  • internal/app/build.go — Config.GuardrailsDefaultMode field.
  • ADR 0053 (new, supersedes ADR 0021 default-mode clause). Docs: usage.md, PRODUCTION-READINESS, skeleton, configuration-reference.
  • Tests: TestGuardrailsModelOnlyShipsDefaultBlock (replaces the old advisory test), TestGuardrailsDefaultModeAdvisory (override test).

Depends on #170 (merged). Closes #171.

The default guardrail rule set shipped in advisory (observe-only) mode.
With #170 landing (advisory findings now surface to the TUI), advisory is
a legitimate opt-in — but it should not be the default. An operator who
enables a security control expects enforcement.

Flips defaultGuardrailSpecs from ModeAdvisory to ModeBlock. Adds a
guardrails.defaultMode YAML key (block default / advisory / sanitize) so
the operator can downgrade the built-in defaults to observe-only without
authoring a full rule list. An explicit rules list still replaces the
defaults entirely.

Decision recorded in ADR 0053 (supersedes the default-mode clause of ADR
0021). Depends on #170 (advisory TUI visibility, merged).

Closes #171.
@JAORMX
JAORMX merged commit 5d6ab3b into main Jun 24, 2026
11 of 13 checks passed
@JAORMX
JAORMX deleted the feat/guardrails-default-block-171 branch June 24, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

guardrails: flip default mode from advisory to block (advisory becomes opt-in)

1 participant