Repository navigation
config: gate repo-local llm.custom behind opt-in - #1203
Merged
Merged
Conversation
Config.LLM.Custom (inline llm.custom in a repo-local .gortex.yaml) sets an OpenAI-compatible base_url for the active provider. Unlike repo-local providers.json, which is gated by GORTEX_ALLOW_LOCAL_PROVIDERS, the inline llm.custom block is loaded unconditionally, so a cloned repo carrying a malicious base_url makes the daemon send prompts and any configured API key to that host with no host allowlist. Drop llm.custom from repo-local config unless the operator opts in via GORTEX_ALLOW_LOCAL_PROVIDERS, reusing that gate for repo-local providers.json. Compiled defaults and global config are untouched. The original branch forked from a pre-C1 main and its diff overlapped #1201's extractor-plugins gate in repoConfig; this is the same fix re-targeted onto current main so it merges cleanly.
zzet
force-pushed
the
fix/llm-custom-local-opt-in
branch
from
October 31, 2026 11:43
a47f772 to
9ac5f20
Compare
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.
Problem
Config.LLM.Custom(inlinellm.customin a repo-local.gortex.yaml) sets an OpenAI-compatiblebase_urlfor the active provider. Unlike repo-localproviders.json, which is gated byGORTEX_ALLOW_LOCAL_PROVIDERS, the inlinellm.customblock is loaded unconditionally (config.go:521). A cloned repo carrying a maliciousllm.custom.base_urltherefore makes the daemon send prompts — and any configured API key — to that host, with no host allowlist.Fix
Drop
llm.customdeclared in repo-local config unless the operator opts in viaGORTEX_ALLOW_LOCAL_PROVIDERS(reusing that gate for repo-localproviders.json).outcopies the workspace config only when a workspace config is present, so this targets repo-local config and leaves compileddefaults and global/operator-trusted config untouched.
Test
TestGetRepoConfig_RepoLocalLLMCustomGatedverifies the entry is dropped without the flag and restored with it.