Commit 98cc059
committed
fix: align the command bans across the two agent policy files
The two files carry the same block list in two languages and had drifted: expanding every
prefix_rule into its concrete argv prefixes and matching both directions turned up 24
asymmetries — 22 commands Codex forbids that Claude Code only prompted for (git filter-repo,
the rm flag spellings, fdisk/parted, redis-cli flush*, the npm/yarn/bun db: scripts, the
pnpm/bunx prisma launchers, aws ec2 delete-volume/delete-snapshot, aws rds delete-db-cluster),
and 2 the other way (prisma migrate reset, prisma db push --force-reset).
Bare "prisma migrate reset" never matched: folding the bare form into the launcher alternation
demanded four argv tokens where the command has three. It is now its own rule, as is
"prisma db push --force-reset".
Nothing is loosened — the allow list is untouched and every change is an addition or a
widening. The one remaining difference is structural and now says so in the Codex header:
Claude Code matches a command-string prefix, so "aws iam delete-:*" covers verbs AWS has not
shipped yet, while a prefix_rule matches whole argv tokens and can only enumerate today's.
Refs #381 parent d6d8201 commit 98cc059
2 files changed
Lines changed: 107 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | | - | |
54 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
55 | 76 | | |
56 | 77 | | |
57 | 78 | | |
| |||
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
| 91 | + | |
| 92 | + | |
70 | 93 | | |
| 94 | + | |
71 | 95 | | |
72 | 96 | | |
73 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
10 | 28 | | |
11 | 29 | | |
12 | 30 | | |
| |||
148 | 166 | | |
149 | 167 | | |
150 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
151 | 180 | | |
152 | | - | |
| 181 | + | |
153 | 182 | | |
154 | 183 | | |
155 | 184 | | |
156 | 185 | | |
157 | 186 | | |
158 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
159 | 204 | | |
160 | 205 | | |
161 | 206 | | |
| |||
240 | 285 | | |
241 | 286 | | |
242 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
243 | 292 | | |
244 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
245 | 322 | | |
246 | | - | |
247 | | - | |
| 323 | + | |
| 324 | + | |
248 | 325 | | |
249 | 326 | | |
0 commit comments