Commit d48929e
fix(security): make a refused RBAC catalog write boot-visible instead of a silent seed of zero (#12967)
* fix(security): surface refused RBAC catalog writes instead of reporting a seed of zero
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
* test(security): pin the refused-catalog-write warning (loud, aggregated, classified)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
* chore(security): changeset for the refused-catalog-write repair
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
* test(security): conform the seed-refusal double to the engine/where/limit contracts
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
* fix(security): split the refused-catalog-write level — error for unique violations, warn for the rest
The AGENTS.md degradation rule decides this: a boot that logs 'RBAC catalog
seeded' at info over zero landed rows is the shape whose answer is error.
A non-unique refusal is a retrying outage and stays warn, per the same
section's 'do not over-apply it'.
SeedLogger gains an OPTIONAL error carrying the kernel Logger arity, and every
emission routes through logSeedDurabilityFailure so the warn fallback cannot be
forgotten — never logger.error?.() (silence against a reduced sink) and never
(a ?? b)() (detached receiver).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
* fix(security): make SeedLogger.warn non-optional so the durability fallback is guaranteed by the type
With both `warn` and `error` optional, `{}` satisfied SeedLogger and every
value of the type was permitted to print nothing — a contract that permits
silence, which no call-site spelling can repair. `error` stays optional so
reduced sinks remain representable.
Pinned by reading the declaration's AST rather than a `@ts-expect-error`:
measured, zero test files in this package reach any tsc program, so an
expect-error here would evaluate never.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
* test(security): pin SeedLogger's guaranteed warn channel at the type level
The earlier AST-reading pin used import.meta.url, which is TS1470 under this
package's CommonJS target and pushed TEST_DEBT 11 -> 12 on a shrink-only
ratchet. Replaced with a type-level pin that needs no filesystem: the
re-measure program DOES compile test files (it lifts the tsconfig test
exclusion), so a @ts-expect-error here is enforced rather than phantom.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
* test(security): pin SeedLogger's guaranteed warn channel as a runtime AST assertion
check:type-check-coverage refuses a @ts-expect-error in a file no tsc program
the typecheck script runs compiles, and PHANTOM_PIN_DEBT is closed to new
entries — it named this file when the pin was written that way. Replaced with
a runtime assertion over the declaration's own AST, seeded from __dirname
(import.meta is TS1470 under this package's CommonJS resolution).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kbQJxUvv2yvsGRtuXpP5
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 431d2fb commit d48929e
10 files changed
Lines changed: 1279 additions & 34 deletions
File tree
- .changeset
- packages/plugins/plugin-security/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
Lines changed: 37 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
77 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
78 | 89 | | |
79 | | - | |
80 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
84 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
85 | 111 | | |
86 | 112 | | |
87 | 113 | | |
| |||
101 | 127 | | |
102 | 128 | | |
103 | 129 | | |
| 130 | + | |
| 131 | + | |
104 | 132 | | |
105 | 133 | | |
106 | 134 | | |
| |||
121 | 149 | | |
122 | 150 | | |
123 | 151 | | |
124 | | - | |
| 152 | + | |
125 | 153 | | |
126 | 154 | | |
127 | 155 | | |
128 | | - | |
| 156 | + | |
129 | 157 | | |
130 | 158 | | |
131 | 159 | | |
| |||
134 | 162 | | |
135 | 163 | | |
136 | 164 | | |
| 165 | + | |
| 166 | + | |
137 | 167 | | |
138 | 168 | | |
139 | 169 | | |
| |||
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| |||
264 | 269 | | |
265 | 270 | | |
266 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
267 | 277 | | |
268 | 278 | | |
269 | 279 | | |
| |||
314 | 324 | | |
315 | 325 | | |
316 | 326 | | |
317 | | - | |
| 327 | + | |
318 | 328 | | |
319 | 329 | | |
320 | 330 | | |
| |||
348 | 358 | | |
349 | 359 | | |
350 | 360 | | |
351 | | - | |
| 361 | + | |
352 | 362 | | |
353 | 363 | | |
354 | 364 | | |
| |||
365 | 375 | | |
366 | 376 | | |
367 | 377 | | |
368 | | - | |
| 378 | + | |
369 | 379 | | |
370 | 380 | | |
371 | 381 | | |
| |||
399 | 409 | | |
400 | 410 | | |
401 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
402 | 416 | | |
403 | 417 | | |
404 | 418 | | |
| |||
426 | 440 | | |
427 | 441 | | |
428 | 442 | | |
429 | | - | |
| 443 | + | |
430 | 444 | | |
431 | 445 | | |
432 | 446 | | |
433 | 447 | | |
434 | 448 | | |
435 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
436 | 454 | | |
437 | 455 | | |
438 | 456 | | |
| |||
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
193 | 204 | | |
194 | 205 | | |
195 | 206 | | |
| |||
232 | 243 | | |
233 | 244 | | |
234 | 245 | | |
235 | | - | |
| 246 | + | |
236 | 247 | | |
237 | 248 | | |
238 | 249 | | |
| |||
263 | 274 | | |
264 | 275 | | |
265 | 276 | | |
266 | | - | |
| 277 | + | |
267 | 278 | | |
268 | 279 | | |
269 | 280 | | |
| |||
325 | 336 | | |
326 | 337 | | |
327 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
328 | 342 | | |
329 | 343 | | |
330 | 344 | | |
331 | 345 | | |
332 | 346 | | |
333 | 347 | | |
334 | | - | |
| 348 | + | |
335 | 349 | | |
336 | 350 | | |
337 | 351 | | |
| |||
349 | 363 | | |
350 | 364 | | |
351 | 365 | | |
| 366 | + | |
| 367 | + | |
352 | 368 | | |
353 | 369 | | |
354 | 370 | | |
| |||
Lines changed: 46 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | | - | |
38 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
39 | 56 | | |
40 | | - | |
41 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
42 | 63 | | |
43 | 64 | | |
44 | 65 | | |
45 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
46 | 78 | | |
47 | 79 | | |
48 | 80 | | |
| |||
124 | 156 | | |
125 | 157 | | |
126 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
127 | 162 | | |
128 | 163 | | |
129 | 164 | | |
| |||
152 | 187 | | |
153 | 188 | | |
154 | 189 | | |
155 | | - | |
| 190 | + | |
156 | 191 | | |
157 | 192 | | |
158 | 193 | | |
159 | 194 | | |
160 | 195 | | |
161 | 196 | | |
162 | | - | |
| 197 | + | |
163 | 198 | | |
164 | 199 | | |
165 | 200 | | |
| |||
174 | 209 | | |
175 | 210 | | |
176 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
177 | 215 | | |
178 | 216 | | |
179 | 217 | | |
| |||
0 commit comments