From 143fcef4e06222a7897b69487a60d58e24a22884 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 28 Mar 2026 19:22:13 -0400 Subject: [PATCH] fix(security): comprehensive deny list for autonomous operator Allowlist approach for bash (curl, python3, tail, grep, pgrep, kill, scripts). Deny list blocks: file destruction (rm, mv, cp, chmod, chown, ln), remote access (ssh, scp, rsync), downloads (wget, curl -O), git mutations (push, commit, reset, checkout), package install (pip, apt), privilege escalation (sudo, nohup, crontab, systemctl), and shell injection (eval, exec, source, pipe to bash, redirect to /). Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/settings.json | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..0bd23a7 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,53 @@ +{ + "permissions": { + "allow": [ + "Bash(curl*localhost:8500*)", + "Bash(curl*192.168.0.244*)", + "Bash(python3*)", + "Bash(tail*)", + "Bash(grep*)", + "Bash(cat*)", + "Bash(pgrep*)", + "Bash(kill*)", + "Bash(bash*/home/claude/bin/mortdecai-cli/scripts/*)", + "Read(*)", + "Write(/home/claude/bin/mortdecai-cli/data/*)", + "Glob(*)", + "Grep(*)" + ], + "deny": [ + "Write(/home/claude/bin/Mortdecai-2.0/*)", + "Edit(/home/claude/bin/Mortdecai-2.0/*)", + "Bash(rm *)", + "Bash(rmdir *)", + "Bash(mv *)", + "Bash(cp *)", + "Bash(chmod *)", + "Bash(chown *)", + "Bash(ln *)", + "Bash(ssh *)", + "Bash(scp *)", + "Bash(rsync *)", + "Bash(wget *)", + "Bash(curl -O*)", + "Bash(curl --output*)", + "Bash(git push*)", + "Bash(git commit*)", + "Bash(git reset*)", + "Bash(git checkout*)", + "Bash(pip *)", + "Bash(apt *)", + "Bash(sudo *)", + "Bash(nohup *)", + "Bash(crontab *)", + "Bash(systemctl *)", + "Bash(*> /*)", + "Bash(*>> /*)", + "Bash(*| bash*)", + "Bash(*| sh*)", + "Bash(eval *)", + "Bash(exec *)", + "Bash(source *)" + ] + } +}