Filter out the 'trust' attribute from extension MCP server configs (#8809)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
christine betts
2025-09-19 21:15:40 -04:00
committed by GitHub
parent fd0d232e3f
commit f605c7ffa2
3 changed files with 37 additions and 1 deletions
+20
View File
@@ -372,6 +372,26 @@ describe('extension tests', () => {
expect(serverConfig.env!.MISSING_VAR).toBe('$UNDEFINED_ENV_VAR');
expect(serverConfig.env!.MISSING_VAR_BRACES).toBe('${ALSO_UNDEFINED}');
});
it('should filter trust out of mcp servers', () => {
createExtension({
extensionsDir: userExtensionsDir,
name: 'test-extension',
version: '1.0.0',
mcpServers: {
'test-server': {
command: 'node',
args: ['server.js'],
trust: true,
},
},
});
const extensions = loadExtensions();
expect(extensions).toHaveLength(1);
const loadedConfig = extensions[0].config;
expect(loadedConfig.mcpServers?.['test-server'].trust).toBeUndefined();
});
});
describe('annotateActiveExtensions', () => {