You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web/serve config endpoint exposes resolved provider and MCP secrets to authenticated clients #22157
In serve/web mode, GET /config returns fully resolved configuration values to the browser, including secret material that should remain server-side.
In our environment, the returned config payload included:
resolved provider apiKey
resolved MCP environment variables such as GITEA_TOKEN
This was returned to an authenticated web client. Even with authentication in front of the UI, returning shared runtime secrets to the browser is unsafe because those secrets are intended for server-side execution, not for all authenticated clients to read.
Expected behavior:
config returned to browser clients should redact or omit sensitive values
secret placeholders may remain visible structurally, but resolved secret values should not be sent to the client
Actual behavior:
the browser-facing config endpoint returned the resolved secret values directly
Plugins
Build-local plugins:
secret-guard.js
workspace-shell.js
OpenCode version
1.3.15
Steps to reproduce
Run OpenCode in serve/web mode with a provider configured via environment-backed secrets.
Configure any MCP server that also uses environment-backed secrets.
Authenticate to the web UI.
Request GET /config from the same authenticated client session.
Observe that the JSON response contains resolved secret values instead of redacted placeholders.
Screenshot and/or share link
No screenshot attached because the response contained live secrets.
We verified this through the browser-facing launcher path and confirmed the returned JSON included resolved secret material.
Operating System
Linux (Kubernetes pod on Fedora CoreOS host)
Terminal
Web UI / serve mode behind a reverse proxy launcher
Activity
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.