Skip to content

security(timeout): bound every external RPC request with one timeout - #599

Open
umpireboulianne-design wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
umpireboulianne-design:fix/issue-534
Open

umpireboulianne-design wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
umpireboulianne-design:fix/issue-534

Conversation

@umpireboulianne-design

Copy link
Copy Markdown

Summary

  • Define the shared default timeout DEFAULT_RPC_TIMEOUT_MS = 10_000 (10 seconds), SubRosaRpcRequestTimeoutError, assertRpcTimeoutMs, withBoundedTimeout, and createBoundedFetch in packages/sdk/src/network.ts (re-exported from @sub-rosa/sdk).
  • Wire DEFAULT_RPC_TIMEOUT_MS across SubRosaClient (rpcTimeoutMs), KeeperStatusClient (timeoutMs), createOzChannelsSubmitter (timeout), keeper CLI configuration (RPC_TIMEOUT_MS), createPaidFetch in services/appraisal-api/src/client.ts, and chainInfo / fetchRoundBeacon / fetchRoundSignature in packages/tlock/src/quicknet.ts.
  • Document DEFAULT_RPC_TIMEOUT_MS (10_000 ms) in services/appraisal-api/README.md and add deterministic timeout unit tests across packages/sdk, services/keeper, services/appraisal-api, and packages/tlock.

Supply-chain review

  • No package scripts or dependencies changed. If changed, explain why below.
  • No .vscode/, workflow, or other editor/config file changes. If changed, list them below.
  • No lockfile changes. If changed, explain the update below.
  • No binary or font asset changes. If changed, list and justify them below.
  • I confirm no automatic task (such as preinstall/postinstall) was added.
  • I confirm no hidden executable payload (encoded blob, obfuscated command, or unexpected binary) was added.
  • Any changed executable or binary was reviewed by a maintainer.

Testing

  • node --import tsx/esm --test src/network.test.ts src/public-api-snapshot.test.ts in packages/sdk (17/17 tests pass)
  • node --import tsx/esm --test src/dry-run.test.ts in services/keeper (passes)
  • node --import tsx/esm --test src/quote-guard.test.ts in services/appraisal-api (15/15 tests pass)
  • node --import tsx/esm --test src/quicknet.test.ts in packages/tlock (11/11 tests pass)
  • node scripts/check-direct-time-access.mjs (passes)

Closes #534
Fixes #534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

security(high/easy): bound every external RPC request with one timeout

1 participant