mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-23 12:30:43 -07:00
fix(core): prevent server name spoofing in policy engine (#12511)
This commit is contained in:
@@ -77,7 +77,14 @@ class DiscoveredMCPToolInvocation extends BaseToolInvocation<
|
||||
// Use composite format for policy checks: serverName__toolName
|
||||
// This enables server wildcards (e.g., "google-workspace__*")
|
||||
// while still allowing specific tool rules
|
||||
super(params, messageBus, `${serverName}__${serverToolName}`, displayName);
|
||||
|
||||
super(
|
||||
params,
|
||||
messageBus,
|
||||
`${serverName}__${serverToolName}`,
|
||||
displayName,
|
||||
serverName,
|
||||
);
|
||||
}
|
||||
|
||||
protected override async getConfirmationDetails(
|
||||
|
||||
Reference in New Issue
Block a user