Skip to content

fix(sdk): protect API key in direct data-plane mode - #1691

Open
ruirui6946 wants to merge 2 commits into
opensandbox-group:mainfrom
ruirui6946:fix/sdk-api-key-direct-mode-1689
Open

fix(sdk): protect API key in direct data-plane mode#1691
ruirui6946 wants to merge 2 commits into
opensandbox-group:mainfrom
ruirui6946:fix/sdk-api-key-direct-mode-1689

Conversation

@ruirui6946

Copy link
Copy Markdown
Contributor

Summary

  • prevent the JavaScript and C# SDKs from forwarding OPEN-SANDBOX-API-KEY to execd and egress in direct mode
  • retain tenant authentication for lifecycle requests and server-proxied data-plane requests
  • remove the tenant key from the C# shared HttpClient defaults so raw and streaming data-plane calls cannot inherit it

Closes #1689

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Commands run:

  • corepack pnpm exec eslint src scripts --max-warnings 0
  • corepack pnpm exec tsc -p tsconfig.json --noEmit
  • corepack pnpm exec tsup
  • node --test tests/*.test.mjs (107 passed)
  • dotnet test OpenSandbox.sln --no-restore (181 passed)

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (not needed; request behavior now matches the documented proxy declaration)
  • Added/updated tests
  • Security impact considered
  • Backward compatibility considered

Copilot AI lite review requested due to automatic review settings August 31, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added sdk/c# sdk/js size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fded56f83

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdks/sandbox/javascript/src/factory/defaultAdapterFactory.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk/c# sdk/js size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JavaScript and C# SDKs send OPEN-SANDBOX-API-KEY to execd in direct mode (tenant credential exposed to untrusted sandbox code)

2 participants