fix(daemon): timing-safe token comparison, daemon.json hardening, shell-quote CVE#731
Merged
Conversation
…hardening Use crypto.timingSafeEqual (via SHA-256 digests, length-independent) for the three daemon token checks, and chmod daemon.json to 0600 after writes since writeFileSync only applies mode on creation. https://claude.ai/code/session_01LXZXzxi55sZ11DSyqWyBA2
…n test-app Override added to examples/test-app/pnpm-workspace.yaml (package.json-level overrides are silently ignored for this nested app, see the comment there). Lockfile change is limited to shell-quote 1.8.3 -> 1.8.4; pnpm audit is clean. https://claude.ai/code/session_01LXZXzxi55sZ11DSyqWyBA2
11 tasks
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
Member
Author
|
Merge blocker: the iOS Smoke Tests check is red. The log shows |
|
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
Three small security hardenings from the technical audit (#722):
crypto.timingSafeEqualover SHA-256 digests (length-independent, no early-exit timing signal) instead of===/!==— newsrc/utils/timing-safe-equal.ts, wired into the two router checks and the HTTP auxiliary-endpoint check. Matters more now that network-fronted daemon deployments are near.daemon.json(contains the daemon auth token) ischmod'd to0600after every write;writeFileSync'smodeonly applies on file creation, so a pre-existing looser-permission file previously kept its permissions.shell-quote@1.8.3viareact-native > react-devtools-corein the test app). The override is added toexamples/test-app/pnpm-workspace.yaml— notpackage.json, where overrides for this nested app are silently ignored (see the comment in that file / fix: resolve test-app dependabot alerts #649). The lockfile diff is limited toshell-quote1.8.3 → 1.8.4.Touched files: 6 (4 src, 2 example-app manifests).
Validation
Full unit suite green (2,159 passed), daemon smoke tests green (8/8 — these spawn the real daemon, exercising both token enforcement and the info-file write path), typecheck/lint/format clean, and
pnpm auditinexamples/test-appnow reports zero vulnerabilities (previously 1 critical).Part of #722.
https://claude.ai/code/session_01LXZXzxi55sZ11DSyqWyBA2
Generated by Claude Code