Merged
Conversation
Address the top findings from the 2026-03-09 coverage audit: - crypto-utils: verifySessionToken length-check short-circuit, deriveSessionToken, verifyHmacSignature edge cases, redactSecrets patterns (18 tests) - stepflow-handler: postCallback SSRF protection — private IPs, IPv6, protocol validation, allowlist enforcement, HMAC signing (16 tests) - session-manager: setModel restart path with alive/dead process (5 tests) - config: PORT fallback, AUTH_TOKEN file loading, GH_ORGS parsing, production CORS exit (12 tests) - session-naming: no-API-key early exit, no-context retry, scheduling, name validation, provider selection (14 tests) - ccApi: getSupportProvider, getWebhookConfig, getWebhookEvents, setSupportProvider success/error paths (9 tests) - useSettings: theme defaults, round-trip localStorage persistence, URL token parameter handling (3 tests) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
crypto-utils.test.ts(18),config.test.ts(12),session-naming.test.ts(14)stepflow-handler.test.ts(+16),session-manager.test.ts(+5),ccApi.test.ts(+9),useSettings.test.ts(+3)Coverage targets addressed
server/crypto-utils.tsverifySessionTokenlength-check short-circuit (lines 55–68)server/stepflow-handler.tspostCallbackSSRF protection (lines 392–438)server/session-manager.tssetModelrestart path (lines 964–1004)server/config.tsserver/session-naming.tssrc/lib/ccApi.tsgetSupportProvider, webhook config/events (lines 309–350)src/hooks/useSettings.tsNotable finding
The SSRF tests uncovered a known gap:
new URL('http://[::ffff:127.0.0.1]/...')normalizes the hostname to::ffff:7f00:1, bypassing the regex that checks for the literal::ffff:127.0.0.1. Documented in the test; fix can follow separately.Test plan
npm test— 933 tests pass, 0 failures🤖 Generated with Claude Code