Repository navigation
Reject unset {env:} references in sealed OpenCode providers - #57
Merged
Merged
Conversation
sealedOpenCodeProvider resolved a provider baseURL/apiKey written as
{env:NAME} to undefined when NAME was unset, then silently fell back to
the default upstream and the ambient OPENAI/ANTHROPIC credential. Sealed
roles could send requests and the host key to an endpoint other than the
configured one. Unset or empty references now throw
math_sealed_provider_reference_unset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
sealedOpenCodeProviderresolved a providerbaseURL/apiKeywritten as{env:NAME}toundefinedwhenNAMEwas unset, then silently fell back to the default upstream (api.openai.com/api.anthropic.com, orOPENAI_BASE_URL/ANTHROPIC_BASE_URL) and the ambientOPENAI_API_KEY/ANTHROPIC_API_KEY. Sealed formalization/review roles could therefore send requests and the host key to an endpoint other than the configured one. The configuration digest records the missing variable asnullon every check, so the identity binding did not catch it.math_sealed_provider_reference_unset.Tests
tests/sealedHarness.test.ts(fails without the fix).vitest run tests/sealedHarness.test.ts tests/researchHarness.test.ts: pass (4 skipped need installed Claude Code / OpenCode).tsc --noEmit -p .: pass.tests/harnessProcess.test.ts"nested sandbox" fails on the test host withbwrap: execvp bun: No such file or directory(bun not installed there); unrelated to this change.🤖 Generated with Claude Code