Skip to content

feat(tools): add Deaf Guard pre-execution command classification - #394

Open
loog4j wants to merge 1 commit into
vxcontrol:mainfrom
loog4j:feat/deaf-guard
Open

feat(tools): add Deaf Guard pre-execution command classification#394
loog4j wants to merge 1 commit into
vxcontrol:mainfrom
loog4j:feat/deaf-guard

Conversation

@loog4j

@loog4j loog4j commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • Adds Deaf Guard, an optional pre-execution classifier on terminal tool calls. Commands are matched against a 9-tier regex table (log / warn / block) before they run in the sandbox.
  • Operators can set DEAF_GUARD_ENABLED / DEAF_GUARD_MODE in env, toggle them at runtime in Settings → Security, and watch live classifications on a Deaf Guard tab in the flow view.
  • Default posture is log (classify and record only). warn blocks BLOCK-tier commands; enforce blocks BLOCK and WARN. Runtime UI/API changes apply to the next flow, not already-running ones.

This is offered as an opt-in safety layer for autonomous pentest runs. Config defaults stay on observation (enabled=true, mode=log) so existing workflows are not blocked unless an operator tightens the mode.

Test plan

  • cd backend && go test ./pkg/tools/deafguard/ ./pkg/config/
  • cd frontend && pnpm exec tsc -b and pnpm exec vitest run src/features/flows/deaf-guard/lib.test.ts src/lib/routes.test.ts src/components/layouts/settings/settings-sidebar.test.tsx
  • Confirm Settings sidebar shows Security, and a running flow shows the Deaf Guard tab between Agents and Searches
  • GET/PUT /api/v1/deafguard/config updates {enabled, mode}; a new flow picks up the change, an already-running flow does not
  • In log mode a BLOCK-tier command still executes and appears in the tab; in warn/enforce it returns BLOCKED by Deaf Guard ... without running

Intercept terminal tool calls with a 9-tier classifier, Settings → Security controls, and a live flow tab so operators can log, warn, or block risky sandbox commands before they run.
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.

1 participant