fix(a2a-server): enforce workspace trust and task isolation to prevent RCE (#28470)

This commit is contained in:
luisfelipe-alt
2026-07-21 09:38:09 -07:00
committed by GitHub
parent acae7124bd
commit c776c665b0
18 changed files with 1121 additions and 489 deletions
+8
View File
@@ -9,6 +9,7 @@ import { promisify } from 'node:util';
import { once } from 'node:events';
import { debugLogger } from './debugLogger.js';
import { coreEvents, CoreEvent, type EditorSelectedPayload } from './events.js';
import { isHeadlessMode } from './headless.js';
const GUI_EDITORS = [
'vscode',
@@ -404,6 +405,13 @@ export async function openDiff(
newPath: string,
editor: EditorType,
): Promise<void> {
if (isHeadlessMode()) {
debugLogger.warn(
'External editor spawning is disabled in headless/server mode.',
);
return;
}
const diffCommand = getDiffCommand(oldPath, newPath, editor);
if (!diffCommand) {
debugLogger.error('No diff tool available. Install a supported editor.');