fix(mcp): restrict env var expansion in MCP configs
Block sensitive env var interpolation in MCP config expansion so repo and plugin MCP definitions cannot exfiltrate secrets by default. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -20,6 +20,7 @@ const PARTIAL_STRING_ARRAY_KEYS = new Set([
|
||||
"disabled_hooks",
|
||||
"disabled_commands",
|
||||
"disabled_tools",
|
||||
"mcp_env_allowlist",
|
||||
]);
|
||||
|
||||
export function parseConfigPartially(
|
||||
@@ -154,6 +155,12 @@ export function mergeConfigs(
|
||||
...(override.disabled_tools ?? []),
|
||||
]),
|
||||
],
|
||||
mcp_env_allowlist: [
|
||||
...new Set([
|
||||
...(base.mcp_env_allowlist ?? []),
|
||||
...(override.mcp_env_allowlist ?? []),
|
||||
]),
|
||||
],
|
||||
claude_code: deepMerge(base.claude_code, override.claude_code),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user