review: scoped check passed, staticcheck-sa1019
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+13
−0
docs/superpowers/reviews/CHECK-staticcheck-sa1019-R1-fix.md+13 −0
CI passed — run details
diff --git a/docs/superpowers/reviews/CHECK-staticcheck-sa1019-R1-fix.md b/docs/superpowers/reviews/CHECK-staticcheck-sa1019-R1-fix.md| new file mode 100644 |
| index 000000000..df10787ea |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CHECK-staticcheck-sa1019-R1-fix.md |
| @@ -0,0 +1,13 @@ |
| +Scoped check of `20009722` at tip `8a172df63aec562626c54fa9c10449e6f16c3de4`. No P1 or P2 findings. |
| + |
| +1. **OK — the round-one P2 is resolved.** [apidbclaim.go:66](/home/paulca/amadan.net/carlos/platform-staticcheck-sa1019/internal/console/apidbclaim.go:66) discards excess leading zero bytes and panics if any excess byte is nonzero. Valid P-384 and P-521 keys whose scalars fit in 32 bytes are accepted again. |
| + |
| +2. **OK — derivation and overflow refusal are preserved for valid P-256, P-384 and P-521 keys.** Removing only leading zeros preserves the integer value. Padding the remainder to 32 bytes therefore produces exactly the old `D.FillBytes(make([]byte, 32))` input to HMAC. Every scalar requiring more than 32 bytes still panics. |
| + |
| + I independently recomputed all five fixture goldens using Python’s HMAC-SHA256; all matched. An additional 5,018 deterministic boundary and sampled encoding cases across the three curves matched the old encoding or overflow refusal. This equivalence concerns valid ECDSA keys: `Bytes()` also validates malformed key structs, unlike `FillBytes`; that behavior predates the scoped fix. |
| + |
| +3. **OK — the fixtures detect the relevant mutations.** The fitting P-384 fixtures at [apidbclaim_test.go:118](/home/paulca/amadan.net/carlos/platform-staticcheck-sa1019/internal/console/apidbclaim_test.go:118) detect rejecting all wide encodings, retaining the full curve width, and taking the first 32 bytes. The deterministic 257-bit fixture at [apidbclaim_test.go:135](/home/paulca/amadan.net/carlos/platform-staticcheck-sa1019/internal/console/apidbclaim_test.go:135) detects truncation without overflow refusal. Independent in-memory mutation simulations confirmed these results. |
| + |
| +Validation limit: the focused Go test could not run because Go attempted to update `go.mod` on the read-only filesystem. Mutation simulations did not execute the Go tests. No files were edited, reviewers spawned, or full suites run. |
| + |
| +CHECK PASSED |
| \ No newline at end of file |