chore: require approval for commits and guard the kubeconfig

Claude committed after a yes that was only meant for an edit, and once edited the local kubeconfig on its own. Commits now prompt, and kubeconfig/token edits are denied or prompt instead of relying on CLAUDE.md alone.
This commit is contained in:
kasun committed 2026-11-20 21:48:14 +01:00
1 parent 098c1c93c2
commit 5cd50c31ff
2 files changed
+9 -1

No files matched your search

+7 -1
View File
@@ -21,7 +21,6 @@
"Bash(kubectl top *)", "Bash(kubectl top *)",
"Bash(kubectl config get-contexts *)", "Bash(kubectl config get-contexts *)",
"Bash(git add *)", "Bash(git add *)",
"Bash(git commit *)",
"Bash(git switch *)", "Bash(git switch *)",
"Bash(.claude/scripts/gitea.sh GET *)", "Bash(.claude/scripts/gitea.sh GET *)",
"WebFetch(domain:www.pulumi.com)", "WebFetch(domain:www.pulumi.com)",
@@ -40,6 +39,10 @@
"Bash(pulumi config set *)", "Bash(pulumi config set *)",
"Bash(pulumi config rm *)", "Bash(pulumi config rm *)",
"Bash(kubectl get secret*)", "Bash(kubectl get secret*)",
"Bash(kubectl config set*)",
"Bash(kubectl config use-context *)",
"Bash(kubectl config delete*)",
"Bash(kubectl config rename-context *)",
"Bash(kubectl apply *)", "Bash(kubectl apply *)",
"Bash(kubectl delete *)", "Bash(kubectl delete *)",
"Bash(kubectl patch *)", "Bash(kubectl patch *)",
@@ -48,6 +51,7 @@
"Bash(ssh *)", "Bash(ssh *)",
"Bash(scp *)", "Bash(scp *)",
"Bash(curl *)", "Bash(curl *)",
"Bash(git commit *)",
"Bash(git push *)", "Bash(git push *)",
"Bash(.claude/scripts/gitea.sh POST *)", "Bash(.claude/scripts/gitea.sh POST *)",
"Bash(.claude/scripts/gitea.sh PATCH *)", "Bash(.claude/scripts/gitea.sh PATCH *)",
@@ -61,6 +65,8 @@
"Bash(pulumi *--show-secrets*)", "Bash(pulumi *--show-secrets*)",
"Read(**/.env)", "Read(**/.env)",
"Edit(**/Pulumi.dev.yaml)", "Edit(**/Pulumi.dev.yaml)",
"Edit(~/.kube/**)",
"Edit(~/.config/homelab-agent/**)",
"Read(~/.config/homelab-agent/token)", "Read(~/.config/homelab-agent/token)",
"Bash(*homelab-agent/token*)" "Bash(*homelab-agent/token*)"
] ]
+2
View File
@@ -41,6 +41,8 @@ A stack's outputs must exist (i.e. it must have been deployed) before any downst
Branch names, commit messages and PR titles follow @CONVENTIONS.md. Don't add a co-author when committing to git. Branch names, commit messages and PR titles follow @CONVENTIONS.md. Don't add a co-author when committing to git.
Only commit when I explicitly say "commit" for that change. A yes to a question that also mentioned committing is not enough; when unsure, ask.
The remote is a self-hosted Gitea, so `gh` doesn't work. For PRs and their CI status use `.claude/scripts/gitea.sh` (acts as `claude-bot`), e.g. `.claude/scripts/gitea.sh GET '/repos/kasun/homelab-infrastructure-as-code/pulls?state=open'`. Use it for PRs only, and ask before opening or merging one. The remote is a self-hosted Gitea, so `gh` doesn't work. For PRs and their CI status use `.claude/scripts/gitea.sh` (acts as `claude-bot`), e.g. `.claude/scripts/gitea.sh GET '/repos/kasun/homelab-infrastructure-as-code/pulls?state=open'`. Use it for PRs only, and ask before opening or merging one.
## Live infrastructure ## Live infrastructure