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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
量子位
博客园 - 司徒正美
V
V2EX
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
N
Netflix TechBlog - Medium
L
LangChain Blog
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog

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 media shared guard assertions · openclaw/op...
steipete · 2026-05-09 · via Recent Commits to openclaw:main

@@ -320,12 +320,9 @@ describe("fetchWithTimeoutGuarded", () => {

320320321321

await fetchWithTimeoutGuarded("https://example.com", {}, undefined, fetch);

322322323-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

324-

expect.objectContaining({

325-

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

326-

timeoutMs: 60_000,

327-

}),

328-

);

323+

const call = getFirstGuardedFetchCall();

324+

expect(call.url).toBe("https://example.com");

325+

expect(call.timeoutMs).toBe(60_000);

329326

});

330327331328

it("sanitizes auditContext before passing it to the SSRF guard", async () => {

@@ -339,12 +336,9 @@ describe("fetchWithTimeoutGuarded", () => {

339336

auditContext: "provider-http\r\nfal\timage\u001btest",

340337

});

341338342-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

343-

expect.objectContaining({

344-

auditContext: "provider-http fal image test",

345-

timeoutMs: 5000,

346-

}),

347-

);

339+

const call = getFirstGuardedFetchCall();

340+

expect(call.auditContext).toBe("provider-http fal image test");

341+

expect(call.timeoutMs).toBe(5000);

348342

});

349343350344

it("passes configured explicit proxy policy through the SSRF guard", async () => {

@@ -365,14 +359,10 @@ describe("fetchWithTimeoutGuarded", () => {

365359

},

366360

});

367361368-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

369-

expect.objectContaining({

370-

dispatcherPolicy: {

371-

mode: "explicit-proxy",

372-

proxyUrl: "http://169.254.169.254:8080",

373-

},

374-

}),

375-

);

362+

expect(getFirstGuardedFetchCall().dispatcherPolicy).toEqual({

363+

mode: "explicit-proxy",

364+

proxyUrl: "http://169.254.169.254:8080",

365+

});

376366

});

377367378368

it("forwards explicit pinDns overrides to JSON requests", async () => {

@@ -390,11 +380,7 @@ describe("fetchWithTimeoutGuarded", () => {

390380

pinDns: false,

391381

});

392382393-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

394-

expect.objectContaining({

395-

pinDns: false,

396-

}),

397-

);

383+

expect(getFirstGuardedFetchCall().pinDns).toBe(false);

398384

});

399385400386

it("forwards explicit pinDns overrides to transcription requests", async () => {

@@ -412,11 +398,7 @@ describe("fetchWithTimeoutGuarded", () => {

412398

pinDns: false,

413399

});

414400415-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

416-

expect.objectContaining({

417-

pinDns: false,

418-

}),

419-

);

401+

expect(getFirstGuardedFetchCall().pinDns).toBe(false);

420402

});

421403422404

it("does not set a guarded fetch mode when no HTTP proxy env is configured", async () => {

@@ -448,11 +430,7 @@ describe("fetchWithTimeoutGuarded", () => {

448430

fetchFn: fetch,

449431

});

450432451-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

452-

expect.objectContaining({

453-

mode: "trusted_env_proxy",

454-

}),

455-

);

433+

expect(getFirstGuardedFetchCall().mode).toBe("trusted_env_proxy");

456434

});

457435458436

it("respects an explicit mode from the caller when HTTP proxy env is configured", async () => {

@@ -467,11 +445,7 @@ describe("fetchWithTimeoutGuarded", () => {

467445

mode: "strict",

468446

});

469447470-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

471-

expect.objectContaining({

472-

mode: "strict",

473-

}),

474-

);

448+

expect(getFirstGuardedFetchCall().mode).toBe("strict");

475449

});

476450477451

it("auto-upgrades transcription requests to trusted env proxy when proxy env is configured", async () => {

@@ -489,11 +463,7 @@ describe("fetchWithTimeoutGuarded", () => {

489463

fetchFn: fetch,

490464

});

491465492-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

493-

expect.objectContaining({

494-

mode: "trusted_env_proxy",

495-

}),

496-

);

466+

expect(getFirstGuardedFetchCall().mode).toBe("trusted_env_proxy");

497467

});

498468499469

it("forwards an explicit mode override through postJsonRequest even when proxy env is configured", async () => {

@@ -512,11 +482,7 @@ describe("fetchWithTimeoutGuarded", () => {

512482

mode: "strict",

513483

});

514484515-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

516-

expect.objectContaining({

517-

mode: "strict",

518-

}),

519-

);

485+

expect(getFirstGuardedFetchCall().mode).toBe("strict");

520486

});

521487522488

it("forwards an explicit mode override through postTranscriptionRequest even when proxy env is configured", async () => {

@@ -535,11 +501,7 @@ describe("fetchWithTimeoutGuarded", () => {

535501

mode: "strict",

536502

});

537503538-

expect(fetchWithSsrFGuardMock).toHaveBeenCalledWith(

539-

expect.objectContaining({

540-

mode: "strict",

541-

}),

542-

);

504+

expect(getFirstGuardedFetchCall().mode).toBe("strict");

543505

});

544506545507

it("does not auto-upgrade when only ALL_PROXY is configured (HTTP(S) proxy gate)", async () => {