GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): protect credentials at the UI proxy boundary by kartikkabadi · Pull Request #2 · kartikkabadi/opencode

Conversation

@kartikkabadi

@kartikkabadi kartikkabadi commented Oct 21, 2026 •
edited by cubic-dev-ai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

The external UI fallback forwards the local server's Authorization and Cookie headers to app.opencode.ai. Its Fetch client also follows upstream redirects server-side, potentially reaching a different origin.

Strip those local credentials before the UI request, use manual redirect handling for this request, and build the destination by assigning only a pathname on the fixed UI URL. Workspace proxy authentication is unaffected. Redirect responses are returned to the browser rather than followed by the server.

Validation with pinned, officially verified Bun 1.3.14:

  • Full frozen installation with lifecycle scripts disabled passes; manifests, lockfile, all existing dependency patches and release-age policy are unchanged.
  • Package bun typecheck passes.
  • All 15 focused UI/authentication tests pass, including existing Basic/token authentication behavior.
  • New regressions fail on the original credential-forwarding behavior and on automatic redirect traversal. The redirect test uses two scoped local Effect Node HTTP servers and real Fetch redirect behavior; the second origin receives zero requests after the fix.
  • Authority-like URL helper inputs remain on the trusted origin. The current request adapter already normalizes double-slash paths, so this helper change is defense in depth, not a demonstrated remote request exploit through that adapter.
  • Changed-file Prettier and git diff checks pass; scoped Oxlint reports zero errors and one warning on an unchanged generated-module cast.

Draft scope: this is a confirmed credential-forwarding fix and proxy-boundary hardening found during source review. The connector cannot read CodeQL alert locations, so no mapping or closure is claimed for alerts anomalyco#7/anomalyco#8 or the other 30 findings. Intentional permission-controlled shell tools were not blindly restricted. Full application/native packaging and the full test suite were not run. No secret values were read or validated, no alerts were dismissed, and no merge/deployment/upstream change occurred.

AI assistance: prepared with Codex in ChatGPT Work Mode. Independent reviews used GPT-6.1 Sol with low reasoning. The primary session's exact model identifier is not exposed.


Summary by cubic

Fixes the external UI fallback leaking local credentials and following upstream redirects server-side.

The UI proxy no longer forwards the local server's Authorization and Cookie headers to app.opencode.ai, redirect responses are returned to the browser instead of being followed by the server, and destination URLs are built with a pathname assignment so authority-like paths stay on the trusted origin. Workspace proxy authentication is unaffected.

Written for commit 54f0321. Summary will update on new commits.

View guided diff Turn on auto-fix

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kartikkabadi
fix(opencode): protect credentials at the UI proxy boundary
54f0321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kartikkabadi
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.