From 585f6ecf94d96a257eb9a614063b8a8c2dfe1361 Mon Sep 17 00:00:00 2001 From: saurav470 Date: Sun, 8 Mar 2026 13:53:01 +0530 Subject: [PATCH] test(feishu): add verification to ensure readFile bypass is not injected for plain array of roots --- extensions/feishu/src/media.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/feishu/src/media.test.ts b/extensions/feishu/src/media.test.ts index 44a4ddb4e99..cf7083a0fb9 100644 --- a/extensions/feishu/src/media.test.ts +++ b/extensions/feishu/src/media.test.ts @@ -343,6 +343,9 @@ describe("sendMediaFeishu msg_type routing", () => { localRoots: channelRoots, }), ); + // readFile bypass must NOT be injected for a plain array of roots. + const callArg = loadWebMediaMock.mock.calls[0][1] as Record; + expect(callArg).not.toHaveProperty("readFile"); }); it("honors explicit empty localRoots (no fallback to context mediaLocalRoots)", async () => {