make plan agent whitelist more conservative

This commit is contained in:
Aiden Cline 2025-10-24 14:36:30 -05:00
parent 0685306da7
commit b73c37940d
2 changed files with 2 additions and 8 deletions

View file

@ -52,9 +52,6 @@ export namespace Agent {
{
edit: "deny",
bash: {
"awk -i inplace*": "ask",
"awk --inplace*": "ask",
"awk*": "allow",
"cut*": "allow",
"diff*": "allow",
"du*": "allow",
@ -79,9 +76,6 @@ export namespace Agent {
"more*": "allow",
"pwd*": "allow",
"rg*": "allow",
"sed --in-place*": "ask",
"sed -i*": "ask",
"sed -n *": "allow",
"sort --output=*": "ask",
"sort -o *": "ask",
"sort*": "allow",

View file

@ -45,8 +45,8 @@ test("allStructured prioritizes flag-specific patterns", () => {
test("allStructured handles sed flags", () => {
const rules = {
"sed -i*": "ask",
"sed -n *": "allow",
"sed * -i*": "ask",
"sed -n*": "allow",
}
expect(Wildcard.allStructured({ head: "sed", tail: ["-i", "file"] }, rules)).toBe("ask")
expect(Wildcard.allStructured({ head: "sed", tail: ["-i.bak", "file"] }, rules)).toBe("ask")