mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 09:30:58 -07:00
fix(core): prevent server name spoofing in policy engine (#12511)
This commit is contained in:
@@ -50,7 +50,10 @@ export class MessageBus extends EventEmitter {
|
||||
}
|
||||
|
||||
if (message.type === MessageBusType.TOOL_CONFIRMATION_REQUEST) {
|
||||
const decision = this.policyEngine.check(message.toolCall);
|
||||
const decision = this.policyEngine.check(
|
||||
message.toolCall,
|
||||
message.serverName,
|
||||
);
|
||||
|
||||
switch (decision) {
|
||||
case PolicyDecision.ALLOW:
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface ToolConfirmationRequest {
|
||||
type: MessageBusType.TOOL_CONFIRMATION_REQUEST;
|
||||
toolCall: FunctionCall;
|
||||
correlationId: string;
|
||||
serverName?: string;
|
||||
}
|
||||
|
||||
export interface ToolConfirmationResponse {
|
||||
|
||||
Reference in New Issue
Block a user