Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion s03_permission/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PERMISSION_RULES = [
},
{
"tools": ["bash"],
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777"]),
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777", "del"]),
"message": "Potentially destructive command",
},
]
Expand Down
2 changes: 1 addition & 1 deletion s03_permission/README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PERMISSION_RULES = [
},
{
"tools": ["bash"],
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777"]),
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777", "del"]),
"message": "Potentially destructive command",
},
]
Expand Down
2 changes: 1 addition & 1 deletion s03_permission/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PERMISSION_RULES = [
},
{
"tools": ["bash"],
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777"]),
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777", "del"]),
"message": "Potentially destructive command",
},
]
Expand Down
2 changes: 1 addition & 1 deletion s03_permission/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def check_deny_list(command: str) -> str | None:
"check": lambda args: not (WORKDIR / args.get("path", "")).resolve().is_relative_to(WORKDIR),
"message": "Writing outside workspace"},
{"tools": ["bash"],
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777"]),
"check": lambda args: any(kw in args.get("command", "") for kw in ["rm ", "> /etc/", "chmod 777", "del"]),
"message": "Potentially destructive command"},
]

Expand Down