Skip to content

Commit 619597f

Browse files
committed
fix(pi): mirror agent footgun denies
1 parent f844a9a commit 619597f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

config/pi/pi-permissions.jsonc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,22 @@
6363
"*GIT_COMMITTER_NAME=*": "deny",
6464
"*GIT_COMMITTER_EMAIL=*": "deny",
6565
"*HUSKY=0*": "deny",
66+
"*SKIP=*": "deny",
67+
"*SKIP_PREPARE_COMMIT_MSG=*": "deny",
68+
"*SKIP_PRE_COMMIT=*": "deny",
6669
"*PRE_COMMIT_ALLOW_NO_CONFIG=*": "deny",
6770

6871
// VCS foot-guns: these commonly open an editor or require an interactive
6972
// terminal. Agents should use non-interactive forms (`jj describe -m`,
7073
// `git commit -m`, explicit sequence-editor/editor env) or ask in chat.
7174
"*git rebase -i*": "deny",
7275
"*git rebase --interactive*": "deny",
76+
"*git add -p*": "deny",
77+
"*git add --patch*": "deny",
78+
"*git mergetool*": "deny",
79+
"*git difftool*": "deny",
80+
"*git gui*": "deny",
81+
"*git citool*": "deny",
7382
"*git -c sequence.editor=: rebase -i*": "allow",
7483
"*git -c sequence.editor=true rebase -i*": "allow",
7584
"*GIT_SEQUENCE_EDITOR=:*git rebase -i*": "allow",
@@ -80,6 +89,8 @@
8089
"*GIT_SEQUENCE_EDITOR=nvim*git rebase*": "deny",
8190
"git commit": "deny",
8291
"*&& git commit": "deny",
92+
"*git commit -n*": "deny",
93+
"*git commit * -n*": "deny",
8394

8495
// Never let an agent reboot/power off a host directly. Require the human to do it
8596
// or use a guarded deployment workflow that owns rollback semantics.
@@ -154,6 +165,19 @@
154165
"hey skills-sync*": "allow",
155166
"hey gc*": "allow",
156167

168+
// Avoid legacy Beads aliases and accidental issue closes. Use `br`, and
169+
// require an explicit close reason so issue state changes stay auditable.
170+
"bd": "deny",
171+
"bd *": "deny",
172+
"*&& bd *": "deny",
173+
"br close": "deny",
174+
"br close *": "deny",
175+
"*&& br close *": "deny",
176+
"br close * --reason *": "allow",
177+
"br close * --reason=*": "allow",
178+
"*&& br close * --reason *": "allow",
179+
"*&& br close * --reason=*": "allow",
180+
157181
// Allow normal Beads issue/task management even when descriptions mention
158182
// examples of denied commands; `br` only mutates repo issue metadata.
159183
"br *": "allow",

0 commit comments

Comments
 (0)