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

推荐订阅源

H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
L
LangChain Blog
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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
test: tighten sandbox security assertions · openclaw/open...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -16,16 +16,25 @@ function expectBindMountsToThrow(binds: string[], expected: RegExp, label: strin

1616

expect(() => validateBindMounts(binds), label).toThrow(expected);

1717

}

181819+

function expectBlockedTargetReason(

20+

bind: string,

21+

): Extract<NonNullable<ReturnType<typeof getBlockedBindReason>>, { kind: "targets" }> {

22+

const reason = getBlockedBindReason(bind);

23+

expect(reason?.kind).toBe("targets");

24+

if (reason?.kind !== "targets") {

25+

throw new Error(`expected blocked target reason for ${bind}`);

26+

}

27+

return reason;

28+

}

29+1930

describe("getBlockedBindReason", () => {

2031

afterEach(() => {

2132

vi.unstubAllEnvs();

2233

});

23342435

it("blocks common Docker socket directories", () => {

25-

expect(getBlockedBindReason("/run:/run")).toEqual(expect.objectContaining({ kind: "targets" }));

26-

expect(getBlockedBindReason("/var/run:/var/run:ro")).toEqual(

27-

expect.objectContaining({ kind: "targets" }),

28-

);

36+

expectBlockedTargetReason("/run:/run");

37+

expectBlockedTargetReason("/var/run:/var/run:ro");

2938

});

30393140

it("does not block /var by default", () => {

@@ -47,22 +56,16 @@ describe("getBlockedBindReason", () => {

4756

] as const;

48574958

for (const source of cases) {

50-

expect(getBlockedBindReason(`${source}:/mnt/test:ro`)).toEqual(

51-

expect.objectContaining({ kind: "targets" }),

52-

);

59+

expectBlockedTargetReason(`${source}:/mnt/test:ro`);

5360

}

5461

});

55625663

it("still blocks OS-home credential paths when OPENCLAW_HOME points elsewhere", () => {

5764

vi.stubEnv("HOME", "/home/tester");

5865

vi.stubEnv("OPENCLAW_HOME", "/srv/openclaw-home");

596660-

expect(getBlockedBindReason("/home/tester/.gnupg/secring.gpg:/mnt/gnupg:ro")).toEqual(

61-

expect.objectContaining({

62-

kind: "targets",

63-

blockedPath: "/home/tester/.gnupg",

64-

}),

65-

);

67+

const reason = expectBlockedTargetReason("/home/tester/.gnupg/secring.gpg:/mnt/gnupg:ro");

68+

expect(reason?.blockedPath).toBe("/home/tester/.gnupg");

6669

});

67706871

it("blocks canonical OS-home aliases for credential paths", () => {

@@ -77,12 +80,8 @@ describe("getBlockedBindReason", () => {

7780

symlinkSync(realHome, aliasHome);

7881

vi.stubEnv("HOME", aliasHome);

798280-

expect(getBlockedBindReason(`${join(realHome, ".ssh", "config")}:/mnt/ssh:ro`)).toEqual(

81-

expect.objectContaining({

82-

kind: "targets",

83-

blockedPath: normalizePathForSnapshot(join(realHome, ".ssh")),

84-

}),

85-

);

83+

const reason = expectBlockedTargetReason(`${join(realHome, ".ssh", "config")}:/mnt/ssh:ro`);

84+

expect(reason?.blockedPath).toBe(normalizePathForSnapshot(join(realHome, ".ssh")));

8685

});

8786

});

8887