feat(tools): add Deaf Guard pre-execution command classification - #394
Open
loog4j wants to merge 1 commit into
Open
feat(tools): add Deaf Guard pre-execution command classification#394loog4j wants to merge 1 commit into
loog4j wants to merge 1 commit into
Conversation
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.
loog4j
force-pushed
the
feat/deaf-guard
branch
from
August 20, 2026 17:20
471dccd to
23b1810
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
terminaltool calls. Commands are matched against a 9-tier regex table (log/warn/block) before they run in the sandbox.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.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.tsxGET/PUT /api/v1/deafguard/configupdates{enabled, mode}; a new flow picks up the change, an already-running flow does notlogmode a BLOCK-tier command still executes and appears in the tab; inwarn/enforceit returnsBLOCKED by Deaf Guard ...without running