Skip to content

fix(opencode): redact secrets from config responses#33723

Closed
rekram1-node wants to merge 2 commits into
devfrom
redact-config-secrets
Closed

fix(opencode): redact secrets from config responses#33723
rekram1-node wants to merge 2 commits into
devfrom
redact-config-secrets

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a public config projection while keeping resolved config available internally
  • apply it to both GET /config and GET /global/config
  • replace sensitive provider option values recursively, including provider headers and model-level options/headers, with [redacted]
  • replace every MCP environment and header value, plus MCP OAuth clientSecret, with [redacted]
  • preserve harmless provider and model metadata/options and MCP commands, URLs, enablement, OAuth client IDs, scopes, and callback settings

Tests

  • bun test test/server/httpapi-config.test.ts --timeout 30000 (3 passed)
  • bun typecheck from packages/opencode

Canary secrets are resolved through {file:...} substitutions before the endpoint response is asserted. Public schemas are unchanged, so the SDK was not regenerated.

Related issues

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.

Web/serve config endpoint exposes resolved provider and MCP secrets to authenticated clients

1 participant