Skip to content

Commit 7c07ee5

Browse files
committed
fix(security): block untrusted workspace providers in startup discovery
1 parent 59a0457 commit 7c07ee5

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/agents/models-config.providers.implicit.discovery-scope.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ describe("resolveImplicitProviders startup discovery scope", () => {
111111
expect(mocks.resolveRuntimePluginDiscoveryProviders).toHaveBeenCalledWith(
112112
expect.objectContaining({
113113
discoveryEntriesOnly: true,
114+
includeUntrustedWorkspacePlugins: false,
114115
}),
115116
);
116117
});

src/agents/models-config.providers.implicit.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ export async function resolveImplicitProviders(
484484
...(params.pluginMetadataSnapshot
485485
? { pluginMetadataSnapshot: params.pluginMetadataSnapshot }
486486
: {}),
487-
...(params.providerDiscoveryEntriesOnly === true ? { discoveryEntriesOnly: true } : {}),
487+
...(params.providerDiscoveryEntriesOnly === true
488+
? { discoveryEntriesOnly: true, includeUntrustedWorkspacePlugins: false }
489+
: {}),
488490
});
489491

490492
for (const order of PLUGIN_DISCOVERY_ORDERS) {

0 commit comments

Comments
 (0)