fix(cli): deny sort output flag

This commit is contained in:
Alex Alecu
2026-04-27 17:41:51 +03:00
parent 2f8f6a206b
commit b8736917e5
2 changed files with 4 additions and 0 deletions
@@ -118,6 +118,8 @@ export const readOnlyBash: Record<string, "allow" | "ask" | "deny"> = {
"* >| *": "deny",
"sort -o *": "deny",
"sort * -o *": "deny",
"sort --output*": "deny",
"sort * --output*": "deny",
}
function askGuard(mcp: Record<string, "allow" | "ask" | "deny"> = {}) {
@@ -114,6 +114,8 @@ describe("Ask agent bash permissions", () => {
"cat a > b",
"jq . a.json > b.json",
"sort names.txt -o names.txt",
"sort --output=names.txt names.txt",
"sort names.txt --output=names.txt",
]
for (const cmd of denied) {