fix: address Ralph Loop adversarial review findings - #67
Conversation
Fix WASM certkitInspect missing timeout/recovery, showStatus style leak, and ekuOIDNames map gaps. Add comprehensive tests for dn.go exported functions, ResolveInspectAIA, and CSR extension parsing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This pull request addresses findings from a Ralph Loop adversarial code review, focusing on robustness improvements to WASM inspect functionality, UI style fixes, EKU OID coverage, and comprehensive test coverage for DN formatting functions.
Changes:
- Fix WASM
certkitInspectmissing 30s context timeout and panic recovery guard - Fix UI style leak where error-red color persisted after status updates
- Add missing Microsoft SGC and Netscape SGC OIDs to
ekuOIDNamesfor CSR EKU display parity - Add 38 new test cases covering
dn.goexported functions, AIA resolution, and CSR extension parsing
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| web/public/app.js | Fix CSS color reset logic in showStatus to prevent error-red color leaking to subsequent processing updates |
| cmd/wasm/inspect.go | Add 30-second context timeout and panic recovery to inspectFiles goroutine; improve AIA warning logging |
| dn.go | Add Microsoft Server Gated Crypto and Netscape Server Gated Crypto OIDs to ekuOIDNames map |
| dn_test.go | Add comprehensive tests for FormatEKUs, FormatEKUOIDs, FormatKeyUsage, FormatKeyUsageBitString, ParseOtherNameSANs, and FormatDN functions |
| internal/inspect_test.go | Add tests for ResolveInspectAIA edge cases and CSR extension parsing (Key Usage and EKU) |
| CHANGELOG.md | Document all fixes and new tests under Unreleased section |
Code reviewIssues foundCL-3 / CL-4 — Wrong commit SHA in CHANGELOG.md All six new CHANGELOG entries and the link definition at the bottom reference commit Relevant lines:
The link definition at line 598 should be: And all six entries should reference |
Summary
certkitInspectmissing 30s context timeout andrecover()panic guardshowStatusinline style leak — error-red color persisted through subsequent processing updatesekuOIDNamesmissing Microsoft SGC and Netscape SGC OIDs (CSR EKU display parity with cert display)dn.goexported functions (FormatEKUs, FormatEKUOIDs, FormatKeyUsage, FormatKeyUsageBitString, ParseOtherNameSANs, FormatDN)ResolveInspectAIA(no-certs passthrough, all-resolved, intermediate fetching, fetcher errors, deduplication)Test plan
go test -race ./...passesgo vet ./...passesgolangci-lint runpassesGOOS=js GOARCH=wasm go build ./cmd/wasm/passescd web && npm testpasses (78 tests)🤖 Generated with Claude Code