Files
kasun 1e02dd5930
Checks / Secret Scan (pull_request) Successful in 8s
Checks / Lint (pull_request) Successful in 9s
chore(claude): close remaining gaps in the merge gate
Gitea's issue comments endpoint ignores paging, so the hook now reads all
comments in one call; the paged loop refused every merge. Any command that
calls gitea.sh and mentions a merge must now be the strict form as a whole,
while commands that only name gitea.sh as a file (git add, git diff) pass.
The body may only pin the head commit, and curl calls have time limits so
the hook can't time out into a non-blocking error.
2026-11-27 03:57:18 +01:00

120 lines
3.1 KiB
JSON

{
"permissions": {
"defaultMode": "plan",
"disableAutoMode": "disable",
"allow": [
"Bash(.venv/bin/yamllint *)",
"Bash(.venv/bin/ansible-lint *)",
"Bash(.venv/bin/ansible-lint)",
"Bash(ansible --version)",
"Bash(ansible-doc *)",
"Bash(git log *)",
"Bash(git status *)",
"Bash(git diff *)",
"Bash(git show *)",
"Bash(git grep *)",
"Bash(git blame *)",
"Bash(git ls-files *)",
"Bash(git ls-tree *)",
"Bash(git rev-parse *)",
"Bash(git describe *)",
"Bash(git shortlog *)",
"Bash(git merge-base *)",
"Bash(git reflog show *)",
"Bash(git stash list *)",
"Bash(git branch --list *)",
"Bash(git branch -a *)",
"Bash(git branch -v *)",
"Bash(git tag --list *)",
"Bash(git remote -v)",
"Bash(git fetch *)",
"Bash(git add *)",
"Bash(git switch *)",
"Bash(git commit *)",
"Bash(git push *)",
"Bash(ls *)",
"Bash(pwd)",
"Bash(wc *)",
"Bash(which *)",
"Bash(jq *)",
"Bash(.claude/scripts/gitea.sh GET *)",
"Bash(.claude/scripts/gitea.sh WAIT *)",
"Bash(.claude/scripts/gitea.sh POST *)",
"WebFetch(domain:docs.ansible.com)",
"WebFetch(domain:docs.docker.com)",
"WebFetch(domain:docs.gitea.com)",
"WebFetch(domain:github.com)",
"WebFetch(domain:raw.githubusercontent.com)"
],
"ask": [
"Bash(ansible *)",
"Bash(ansible-playbook *)",
"Bash(ansible-pull *)",
"Bash(ansible-console *)",
"Bash(ansible-vault *)",
"Bash(ssh *)",
"Bash(scp *)",
"Bash(sftp *)",
"Bash(rsync *)",
"Bash(docker *)",
"Bash(pct *)",
"Bash(qm *)",
"Bash(curl *)",
"Bash(.claude/scripts/gitea.sh POST */merge*)",
"Bash(.claude/scripts/gitea.sh PATCH *)",
"Bash(.claude/scripts/gitea.sh PUT *)",
"Bash(.claude/scripts/gitea.sh DELETE *)"
],
"deny": [
"Bash(env)",
"Bash(printenv *)",
"Bash(ansible-vault view *)",
"Bash(ansible-vault decrypt *)",
"Bash(*/etc/homelab-ansible*)",
"Bash(*homelab-agent/token*)",
"Read(**/.env)",
"Read(**/.env.*)",
"Read(**/vault.yml)",
"Read(**/vault.yaml)",
"Read(**/.vault_pass*)",
"Read(//etc/homelab-ansible/**)",
"Edit(//etc/homelab-ansible/**)",
"Read(~/.config/homelab-agent/token)",
"Edit(~/.config/homelab-agent/**)"
]
},
"attribution": {
"commit": "",
"pr": ""
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/guard-live-infra.sh"
},
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/guard-merge.sh",
"timeout": 90
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/check-on-stop.sh",
"timeout": 300
}
]
}
]
}
}