mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(cli): deny shell operators
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user