fix(cli): deny shell operators

This commit is contained in:
Alex Alecu
2026-04-27 17:43:10 +03:00
parent b8736917e5
commit 3732e95cfc
2 changed files with 11 additions and 0 deletions
@@ -110,6 +110,12 @@ export const readOnlyBash: Record<string, "allow" | "ask" | "deny"> = {
"git branch -r *": "allow",
"git remote -v *": "allow",
"gh *": "ask",
"*|*": "deny",
"*;*": "deny",
"*&&*": "deny",
"*&*": "deny",
"*$(*": "deny",
"*`*": "deny",
"*>*": "deny",
"* > *": "deny",
"*>>*": "deny",
@@ -111,6 +111,11 @@ describe("Ask agent bash permissions", () => {
const denied = [
"echo hi > file",
"echo hi >> file",
"echo hi | tee file",
"echo hi; touch file",
"echo hi && touch file",
"echo $(touch file)",
"echo `touch file`",
"cat a > b",
"jq . a.json > b.json",
"sort names.txt -o names.txt",