> ## Summary
Author: khunwavCreated Sep 12, 2026Updated Sep 12, 2026
Summary
- Adds Deaf Guard, an optional pre-execution classifier on
terminaltool 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_MODEin 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).warnblocks BLOCK-tier commands;enforceblocks 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 -bandpnpm 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/configupdates{enabled, mode}; a new flow picks up the change, an already-running flow does not- In
logmode a BLOCK-tier command still executes and appears in the tab; inwarn/enforceit returnsBLOCKED by Deaf Guard ...without running
Originally posted by @khunwav in https://github.com/vxcontrol/pentagi/pull/394#issuecomment-5647937417
Source: vxcontrol/pentagi