Skip to content

fix(sandbox): Inject provider credentials without URL forwarding#371

Merged
dcramer merged 3 commits into
mainfrom
fix/sentry-oauth-egress-diagnostics
May 19, 2026
Merged

fix(sandbox): Inject provider credentials without URL forwarding#371
dcramer merged 3 commits into
mainfrom
fix/sentry-oauth-egress-diagnostics

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented May 19, 2026

Use Vercel Sandbox network policy header transforms for active plugin provider credentials instead of forwarding provider traffic through Junior. This keeps provider request URLs intact, including trailing slash-sensitive API paths, while still keeping real credentials out of the sandbox.

Command-scoped Credentials

Before each sandbox command, Junior issues a lease only for the active provider when that provider declares credentials or API headers, applies its header transforms to the sandbox network policy, and clears the transforms after command cleanup. If credentials are missing, bash returns the existing junior-auth-required ... marker so plugin OAuth can start.

Proxy Fallback

The forwarded egress proxy remains for existing forwarded traffic and diagnostic failures, but the Sentry-specific path repair and response-body logging are removed.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment May 19, 2026 3:29pm

Request Review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4908ed7. Configure here.

Comment thread packages/junior/src/chat/sandbox/egress-proxy.ts
Restore slashless Sentry API paths before the proxy calls upstream. Vercel Sandbox forwarding can deliver provider API paths without the trailing slash that Sentry expects, which made valid authenticated calls look like OAuth failures.

Log the Sentry API path observed at the sandbox egress boundary before any credential verification or provider path restoration. This makes the forwarding behavior visible without recording query contents or credentials.

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer dcramer force-pushed the fix/sentry-oauth-egress-diagnostics branch from 4908ed7 to 6fba565 Compare May 19, 2026 02:56
@dcramer dcramer changed the title fix(sandbox): Retry slashless egress API requests fix(sandbox): Restore Sentry egress API slashes May 19, 2026
Use command-scoped Vercel Sandbox network policy transforms for active plugin provider credentials. This avoids routing provider API calls through forwardURL, so provider paths and trailing slashes stay intact.

Clear credential transforms after each command and preserve the auth-required marker when a provider credential is unavailable.

Co-Authored-By: GPT-5 Codex <[email protected]>
Keep egress proxy diagnostics on status, path, host, and provider metadata. Provider response bodies can contain user or service content, so do not attach previews to warning logs.

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer dcramer changed the title fix(sandbox): Restore Sentry egress API slashes fix(sandbox): Inject provider credentials without URL forwarding May 19, 2026
@dcramer dcramer marked this pull request as ready for review May 19, 2026 15:33
@dcramer dcramer merged commit adb9656 into main May 19, 2026
16 checks passed
@dcramer dcramer deleted the fix/sentry-oauth-egress-diagnostics branch May 19, 2026 17:32
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.

1 participant