docs(skills): explain per-argument approval granularity as security gate - #642
Merged
Merged
Conversation
Add an Approval Prompts section to netclaw-operations explaining that shell and file tool approvals are per-binary-and-arguments by design. `sleep 5` and `sleep 10` are distinct approval patterns because the same mechanism gates `rm foo.txt` vs `rm ~/.netclaw/netclaw.db` and `kill 12345` vs `kill $(pgrep netclawd)`. Explicitly warn against proposing a hardcoded inert-binary bypass list: any such list becomes a silent privilege-escalation path the moment an entry turns out not to be truly inert. The correct response to prompt cadence complaints is to approve each pattern once and rely on the persistent grant store. Bump metadata.version 1.11.0 -> 1.12.0 per the System Skills Sync Rule.
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
Approval Promptssection tonetclaw-operationsSKILL.md explaining that shell and file tool approvals are per-binary-and-arguments by design, not per-binarysleep 5andsleep 10appear as distinct approval patterns: the same extraction mechanism gatesrm foo.txtvsrm ~/.netclaw/netclaw.dbandkill 12345vskill \$(pgrep netclawd)— weakening it would undermine the security gate across all binariesmetadata.version1.11.0 → 1.12.0 per the System Skills Sync Rule in CLAUDE.mdContext
Investigation started from a user observation that NetClaw was prompting separately for
sleep 5,sleep 10, andsleep 30in the same session, with a hypothesis that this was a side effect of the path-matching logic added in commit ca389b5 (#617). The path-matching commit turned out to be unrelated — it only affectsfile_write/file_edit.The shell behavior comes from
ShellApprovalMatcher.ExtractPatternscallingShellTokenizer.ExtractVerbChain, which keeps the second token as part of the approval pattern when that token isn't a flag, path, URL, env var, or glob. Bare numbers and bare words fall through. After walking through the design space, we concluded this is a feature, not a bug: per-target approval is exactly what gates destructive commands, and any "inert binaries" bypass list would be a silent privilege-escalation vector.No code changes. The only artifact is documentation so the next operator (or future self) who hits the prompt cadence doesn't go hunting for a bug and doesn't propose a bypass list.
Test plan