feat(#1058): disallow built-in Bash; remove allowedBashPatterns; prompt sweep
This commit is contained in:
parent
013e8740bd
commit
88f22065b0
5 changed files with 16 additions and 87 deletions
|
|
@ -129,29 +129,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
options.hyperhive.allowedBashPatterns = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
example = [
|
||||
"git *"
|
||||
"ls *"
|
||||
"cat /agents/*/state/*"
|
||||
];
|
||||
description = ''
|
||||
Shell command patterns auto-approved for the `Bash` built-in tool.
|
||||
Empty list (the default) grants wholesale `Bash` approval —
|
||||
claude can run any shell command without a prompt. Non-empty list
|
||||
replaces `Bash` in `--allowedTools` with one `Bash(pattern)` entry
|
||||
per item; only commands matching a pattern are auto-approved; all
|
||||
others require confirmation (which in `--print` mode means they
|
||||
will not run). Use to sandbox agents to a known-safe command
|
||||
vocabulary.
|
||||
|
||||
Patterns use the same glob syntax claude accepts in `Bash(…)`:
|
||||
`*` matches any string within a word, shell-style.
|
||||
'';
|
||||
};
|
||||
|
||||
options.hyperhive.allowedRecipients = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
|
|
@ -824,9 +801,6 @@ in
|
|||
text = config.hyperhive._bashEnvFragments;
|
||||
};
|
||||
|
||||
environment.etc."hyperhive/bash-allow.json".text =
|
||||
builtins.toJSON config.hyperhive.allowedBashPatterns;
|
||||
|
||||
environment.etc."hyperhive/send-allow.json".text =
|
||||
builtins.toJSON config.hyperhive.allowedRecipients;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue