惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
博客园 - Franky
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
月光博客
月光博客
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
Last Week in AI
Last Week in AI
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
J
Java Code Geeks
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
Stabilize Google Meet chrome-node launch config (#96908) ...
joshavant · 2026-06-26 · via Recent Commits to openclaw:main
1+

// Google Meet node.invoke policy tests cover caller-controlled command sanitization.

2+

import type { OpenClawPluginNodeInvokePolicyContext } from "openclaw/plugin-sdk/plugin-entry";

3+

import { describe, expect, it, vi } from "vitest";

4+

import { resolveGoogleMeetConfig } from "./config.js";

5+

import {

6+

createGoogleMeetChromeNodeInvokePolicy,

7+

GOOGLE_MEET_CHROME_NODE_COMMAND,

8+

} from "./node-invoke-policy.js";

9+10+

function createContext(params: unknown, pluginConfig: Record<string, unknown> = {}) {

11+

const invokeNode = vi.fn<OpenClawPluginNodeInvokePolicyContext["invokeNode"]>(async () => ({

12+

ok: true,

13+

payload: { ok: true },

14+

}));

15+

const ctx: OpenClawPluginNodeInvokePolicyContext = {

16+

nodeId: "node-1",

17+

command: GOOGLE_MEET_CHROME_NODE_COMMAND,

18+

params,

19+

config: {} as never,

20+

pluginConfig,

21+

invokeNode,

22+

};

23+

return { ctx, invokeNode };

24+

}

25+26+

describe("Google Meet node invoke policy", () => {

27+

it("rewrites start executable fields from trusted config", async () => {

28+

const policy = createGoogleMeetChromeNodeInvokePolicy(

29+

resolveGoogleMeetConfig({

30+

chrome: {

31+

launch: false,

32+

browserProfile: "Trusted Profile",

33+

joinTimeoutMs: 45_000,

34+

audioInputCommand: ["trusted-capture", "--raw"],

35+

audioOutputCommand: ["trusted-play", "--raw"],

36+

},

37+

}),

38+

);

39+

const { ctx, invokeNode } = createContext({

40+

action: "start",

41+

url: "https://meet.google.com/abc-defg-hij",

42+

mode: "bidi",

43+

launch: true,

44+

browserProfile: "Attacker Profile",

45+

joinTimeoutMs: 1,

46+

audioBridgeCommand: ["node", "-e", "process.exit(99)"],

47+

audioBridgeHealthCommand: ["node", "-e", "process.exit(98)"],

48+

audioInputCommand: ["malicious-capture"],

49+

audioOutputCommand: ["malicious-play"],

50+

});

51+52+

await expect(policy.handle(ctx)).resolves.toEqual({ ok: true, payload: { ok: true } });

53+54+

expect(invokeNode).toHaveBeenCalledTimes(1);

55+

expect(invokeNode).toHaveBeenCalledWith({

56+

params: {

57+

action: "start",

58+

url: "https://meet.google.com/abc-defg-hij",

59+

mode: "bidi",

60+

launch: false,

61+

browserProfile: "Trusted Profile",

62+

joinTimeoutMs: 45_000,

63+

audioInputCommand: ["trusted-capture", "--raw"],

64+

audioOutputCommand: ["trusted-play", "--raw"],

65+

},

66+

});

67+

});

68+69+

it("uses trusted configured external bridge commands for start", async () => {

70+

const policy = createGoogleMeetChromeNodeInvokePolicy(

71+

resolveGoogleMeetConfig({

72+

chrome: {

73+

audioBridgeHealthCommand: ["trusted-bridge", "status"],

74+

audioBridgeCommand: ["trusted-bridge", "start"],

75+

},

76+

}),

77+

);

78+

const { ctx, invokeNode } = createContext({

79+

action: "start",

80+

url: "https://meet.google.com/abc-defg-hij",

81+

mode: "bidi",

82+

audioBridgeHealthCommand: ["node", "-e", "process.exit(98)"],

83+

audioBridgeCommand: ["node", "-e", "process.exit(99)"],

84+

});

85+86+

await policy.handle(ctx);

87+88+

const call = invokeNode.mock.calls[0]?.[0];

89+

expect(call?.params).toMatchObject({

90+

action: "start",

91+

audioBridgeHealthCommand: ["trusted-bridge", "status"],

92+

audioBridgeCommand: ["trusted-bridge", "start"],

93+

});

94+

});

95+96+

it("rejects direct start for non-Meet URLs before node dispatch", async () => {

97+

const policy = createGoogleMeetChromeNodeInvokePolicy(resolveGoogleMeetConfig({}));

98+

const { ctx, invokeNode } = createContext({

99+

action: "start",

100+

url: "https://example.com/private",

101+

mode: "bidi",

102+

});

103+104+

await expect(policy.handle(ctx)).resolves.toMatchObject({

105+

ok: false,

106+

code: "GOOGLE_MEET_NODE_POLICY_DENIED",

107+

message: "url must be an explicit https://meet.google.com/... URL",

108+

});

109+

expect(invokeNode).not.toHaveBeenCalled();

110+

});

111+112+

it("keeps direct setup diagnostics but strips extra fields", async () => {

113+

const policy = createGoogleMeetChromeNodeInvokePolicy(resolveGoogleMeetConfig({}));

114+

const { ctx, invokeNode } = createContext({

115+

action: "setup",

116+

audioBridgeCommand: ["node", "-e", "process.exit(99)"],

117+

});

118+119+

await policy.handle(ctx);

120+121+

expect(invokeNode).toHaveBeenCalledWith({ params: { action: "setup" } });

122+

});

123+124+

it("rejects unsupported googlemeet.chrome actions before node dispatch", async () => {

125+

const policy = createGoogleMeetChromeNodeInvokePolicy(resolveGoogleMeetConfig({}));

126+

const { ctx, invokeNode } = createContext({ action: "exec", command: ["id"] });

127+128+

await expect(policy.handle(ctx)).resolves.toMatchObject({

129+

ok: false,

130+

code: "GOOGLE_MEET_NODE_POLICY_DENIED",

131+

});

132+

expect(invokeNode).not.toHaveBeenCalled();

133+

});

134+

});