You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: preserve safe shell previews and avoid self-blocking status - #145
Fix excessive redaction and false-positive blocking of safe shell commands in DSH runtime events.
Preserve useful, bounded command previews for commands such as curl, tail, grep, env, cat, ls, stat, and chmod.
Normalize absolute user-home paths to ~ while continuing to redact actual secrets.
Prevent Codex and Claude Code hooks from reclassifying safely masked agentguard status output as PII or bulk egress.
Keep the exemption narrowly scoped to standalone agentguard status commands; compound commands, other AgentGuard commands, and unmasked secrets remain subject to normal policy checks.
Ensure OpenClaw, QClaw, Hermes, and DSH integrations do not incorrectly block safe status output.
Add regression tests and update privacy/runtime documentation.
Type
Bug fix
New feature / detection rule
Refactoring
Documentation
Testing
npm run build passes
npm test passes (900 passed, 1 platform-specific test skipped)
severity: high — src/runtime/self-command.ts / src/runtime/protect.ts
The new isAgentGuardStatusCommand() only matches the exact string agentguard status and drops support for shell wrappers, env, command, builtin, alternate executable names (agentguard-mcp), and path-qualified invocations. In protect.ts, this predicate is now used to suppress rescanning and to mark Claude batch status calls, so legitimate self-status invocations that were previously recognized can be treated as ordinary tool output again. That can reintroduce self-blocking for agentguard status in wrapped/shelled native hooks and can cause the new suppression logic to miss safe status calls, producing false positives and inconsistent behavior. Fix: restore the prior wrapper-aware parser for status detection, or keep the exact-command check only as an additional guard while preserving the existing token-based matching for wrapped/prefixed invocations.
severity: medium — src/runtime/protect.ts (projectClaudeBatchForInspection, projectAgentGuardStatusOutput)
The batch projection replaces verified status output with a fixed placeholder before content scanning, but claudeBatchFacts() now calculates redactedBytes from the projected inspection data instead of the original payload. This means the reported redaction statistics no longer reflect the actual amount of sensitive data in the incoming batch and can undercount or overcount redactions depending on how much output was suppressed. That breaks audit accuracy and may hide the true size of sensitive content from downstream policy decisions or telemetry. Fix: compute redaction metrics from the original batch payload, and only use the projected copy for classification/suppression decisions.
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
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
Fix excessive redaction and false-positive blocking of safe shell commands in DSH runtime events.
curl,tail,grep,env,cat,ls,stat, andchmod.~while continuing to redact actual secrets.agentguard statusoutput as PII or bulk egress.agentguard statuscommands; compound commands, other AgentGuard commands, and unmasked secrets remain subject to normal policy checks.Type
Testing
npm run buildpassesnpm testpasses (900 passed, 1 platform-specific test skipped)Related Issues
Closes #