Fix/1377 client secret bundle safety - #1387
Merged
1nonlypiece merged 5 commits intoAug 30, 2026
Merged
1nonlypiece merged 5 commits into
1nonlypiece merged 5 commits into
Conversation
Add focused unit and integration coverage for outbox dispatching and snapshot workers, including success, failure, retry, boundary, and permission behavior.
Validate settlement route parameters, wallet identity, network, numeric values, ownership, and server responses before sensitive actions. Add regression coverage for replay, tampering, wrong-network, disconnected-wallet, malformed-response, retry, and authorization cases.
Enforce deterministic and atomic state transitions across outbox and snapshot workers, preventing duplicate submissions and stale responses from creating contradictory client state. Add recovery handling for interrupted and failed wallet operations while preserving user intent without silently repeating on-chain actions.
Strengthen client-secret and bundle validation at build and runtime boundaries, ensuring sensitive values cannot leak while public configuration remains explicit and testable. Add focused coverage for hostile inputs, malformed responses, authorization boundaries, and security-sensitive edge cases.
7 tasks
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
Strengthens the client-secret and bundle-safety boundaries to prevent sensitive values from leaking through build artifacts or runtime configuration while keeping public configuration explicit and testable.
Changes
Hardened client-secret validation in build-time checks
Improved bundle-secret detection and validation
Strengthened runtime boundary checks in
middleware.tsExplicitly separated public configuration from sensitive values
Added validation for malformed and unexpected inputs
Ensured authorization assumptions are not inferred solely from client state
Added focused coverage for:
Preserved existing public configuration and successful application behavior
Security Considerations
Sensitive values must never be treated as client-safe configuration. Build and runtime checks reject unsafe exposure rather than relying on naming conventions or client-side assumptions alone.
Validation
npm test npm run lint npm run typecheckSecurity/bundle validation scripts were also executed where available.
Design Tradeoffs
Validation is performed as close to the build and runtime boundaries as possible so unsafe configuration is detected before it can reach sensitive application paths.
Public configuration remains explicitly supported rather than broadly blocking all environment variables or runtime configuration.
Limitations
Any pre-existing CI or validation failures unrelated to client-secret and bundle safety are documented separately and were not modified as part of this issue.
Acceptance Criteria
closes #1377