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

推荐订阅源

S
Schneier on Security
F
Fortinet All Blogs
博客园_首页
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
D
Docker
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
量子位
The Last Watchdog
The Last Watchdog
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Blog of Author Tim Ferriss
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
小众软件
小众软件
Cloudbric
Cloudbric
博客园 - 司徒正美
H
Help Net Security
人人都是产品经理
人人都是产品经理
Application and Cybersecurity Blog
Application and Cybersecurity Blog
L
LangChain Blog
Latest news
Latest news
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
博客园 - Franky
S
Security Affairs
W
WeLiveSecurity
F
Full Disclosure
Know Your Adversary
Know Your Adversary
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
Cyberwarzone
Cyberwarzone
美团技术团队
PCI Perspectives
PCI Perspectives
C
Check Point Blog
Spread Privacy
Spread Privacy

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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(test): harden secret provider proof cleanup · openclaw/openclaw@5054b20
vincentkoc · 2026-06-01 · via Recent Commits to openclaw:main

@@ -22,7 +22,14 @@ const OPENAI_LIVE_PROOF_MODEL = "openai/gpt-5.5";

2222

const COMMAND_TIMEOUT_MS = readPositiveInt(process.env.OPENCLAW_SECRET_PROOF_COMMAND_MS, 120000);

2323

const READY_TIMEOUT_MS = readPositiveInt(process.env.OPENCLAW_SECRET_PROOF_READY_MS, 120000);

2424

const RPC_TIMEOUT_MS = readPositiveInt(process.env.OPENCLAW_SECRET_PROOF_RPC_MS, 15000);

25-

const TEARDOWN_GRACE_MS = 5000;

25+

const TEARDOWN_GRACE_MS = readPositiveInt(

26+

process.env.OPENCLAW_SECRET_PROOF_TEARDOWN_GRACE_MS,

27+

5000,

28+

);

29+

const OUTPUT_CAPTURE_LIMIT_BYTES = readPositiveInt(

30+

process.env.OPENCLAW_SECRET_PROOF_OUTPUT_BYTES,

31+

4 * 1024 * 1024,

32+

);

2633

const RESULTS_PATH =

2734

process.env.OPENCLAW_SECRET_PROOF_RESULTS_PATH?.trim() ||

2835

path.join(os.tmpdir(), `openclaw-secret-provider-e2e-results-${process.pid}.json`);

@@ -84,6 +91,44 @@ function scrub(text) {

8491

.replace(/sk-[A-Za-z0-9_-]{20,}/gu, "<openai-key>");

8592

}

869394+

function createOutputCapture(label, options = {}) {

95+

let output = "";

96+

let bytes = 0;

97+

let truncated = false;

98+

let scanTail = "";

99+

let leakedForbiddenValue = null;

100+

const forbiddenValues = options.forbiddenValues ?? [];

101+

const scanTailLength = Math.max(0, ...forbiddenValues.map((value) => value.length - 1));

102+

return {

103+

append(chunk) {

104+

const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk));

105+

if (forbiddenValues.length > 0) {

106+

const scanText = `${scanTail}${buffer.toString("utf8")}`;

107+

leakedForbiddenValue ??= forbiddenValues.find((value) => scanText.includes(value)) ?? null;

108+

scanTail = scanTailLength > 0 ? scanText.slice(-scanTailLength) : "";

109+

}

110+

const remaining = Math.max(0, OUTPUT_CAPTURE_LIMIT_BYTES - bytes);

111+

if (remaining > 0) {

112+

const slice = buffer.subarray(0, remaining);

113+

output += slice.toString("utf8");

114+

bytes += slice.length;

115+

}

116+

if (buffer.length > remaining && !truncated) {

117+

truncated = true;

118+

output += `\n[secret-provider-proof] ${label} truncated after ${String(

119+

OUTPUT_CAPTURE_LIMIT_BYTES,

120+

)} bytes\n`;

121+

}

122+

},

123+

text() {

124+

return output;

125+

},

126+

leakedForbiddenValue() {

127+

return leakedForbiddenValue;

128+

},

129+

};

130+

}

131+87132

function parseJsonOutput(stdout) {

88133

const text = stdout.trim();

89134

if (!text) {

@@ -183,31 +228,33 @@ function runCommand(command, args, options = {}) {

183228

stdio: options.stdio ?? ["pipe", "pipe", "pipe"],

184229

windowsVerbatimArguments: options.windowsVerbatimArguments,

185230

});

186-

let stdout = "";

187-

let stderr = "";

231+

const stdout = createOutputCapture("stdout");

232+

const stderr = createOutputCapture("stderr");

188233

const timer = setTimeout(() => {

189234

child.kill("SIGTERM");

190235

setTimeout(() => child.kill("SIGKILL"), 1000).unref();

191236

reject(new Error(scrub(`command timed out: ${command} ${args.join(" ")}`)));

192237

}, timeoutMs);

193238

child.stdout.on("data", (chunk) => {

194-

stdout += chunk.toString("utf8");

239+

stdout.append(chunk);

195240

});

196241

child.stderr.on("data", (chunk) => {

197-

stderr += chunk.toString("utf8");

242+

stderr.append(chunk);

198243

});

199244

child.on("error", (error) => {

200245

clearTimeout(timer);

201-

reject(error);

246+

reject(error instanceof Error ? error : new Error(formatErrorMessage(error)));

202247

});

203248

child.on("close", (code, signal) => {

204249

clearTimeout(timer);

205-

const result = { code: code ?? 0, signal, stdout, stderr };

250+

const result = { code: code ?? 0, signal, stdout: stdout.text(), stderr: stderr.text() };

206251

if (result.code !== 0 && options.allowFailure !== true) {

207252

reject(

208253

new Error(

209254

scrub(

210-

`command failed (${result.code}): ${command} ${args.join(" ")}\n${stderr || stdout}`,

255+

`command failed (${result.code}): ${command} ${args.join(" ")}\n${

256+

result.stderr || result.stdout

257+

}`,

211258

),

212259

),

213260

);

@@ -271,7 +318,7 @@ async function allocatePort() {

271318

const address = server.address();

272319

const port = typeof address === "object" && address ? address.port : 0;

273320

await new Promise((resolve, reject) => {

274-

server.close((error) => (error ? reject(error) : resolve()));

321+

server.close((error) => (error ? reject(new Error(formatErrorMessage(error))) : resolve()));

275322

});

276323

if (!port) {

277324

throw new Error("failed to allocate a local port");

@@ -568,21 +615,23 @@ async function startGateway(envCtx, port, token = TOKEN_V1) {

568615

detached: process.platform !== "win32",

569616

stdio: ["ignore", "pipe", "pipe"],

570617

});

571-

let stdout = "";

572-

let stderr = "";

618+

const stdout = createOutputCapture("gateway stdout");

619+

const stderr = createOutputCapture("gateway stderr");

573620

child.stdout.on("data", (chunk) => {

574-

stdout += chunk.toString("utf8");

621+

stdout.append(chunk);

575622

});

576623

child.stderr.on("data", (chunk) => {

577-

stderr += chunk.toString("utf8");

624+

stderr.append(chunk);

578625

});

579626

const started = Date.now();

580627

let lastHealthResult;

581628

let lastHealthError;

582629

while (Date.now() - started < READY_TIMEOUT_MS) {

583630

if (child.exitCode !== null) {

584631

throw new Error(

585-

scrub(`gateway exited during startup (${child.exitCode})\n${stderr || stdout}`),

632+

scrub(

633+

`gateway exited during startup (${child.exitCode})\n${stderr.text() || stdout.text()}`,

634+

),

586635

);

587636

}

588637

const remainingMs = remainingDeadlineMs(started, READY_TIMEOUT_MS);

@@ -602,7 +651,7 @@ async function startGateway(envCtx, port, token = TOKEN_V1) {

602651

if (health.code === 0) {

603652

return {

604653

child,

605-

output: () => ({ stdout, stderr }),

654+

output: () => ({ stdout: stdout.text(), stderr: stderr.text() }),

606655

stop: async () => {

607656

await stopGateway(child);

608657

},

@@ -613,7 +662,7 @@ async function startGateway(envCtx, port, token = TOKEN_V1) {

613662

}

614663

await delay(Math.min(500, remainingDeadlineMs(started, READY_TIMEOUT_MS)));

615664

}

616-

terminateProcessTree(child, "SIGTERM");

665+

await stopGateway(child);

617666

const lastHealthOutput =

618667

lastHealthError instanceof Error

619668

? lastHealthError.message

@@ -622,22 +671,58 @@ async function startGateway(envCtx, port, token = TOKEN_V1) {

622671

: lastHealthResult

623672

? lastHealthResult.stderr || lastHealthResult.stdout

624673

: "";

625-

throw new Error(scrub(`gateway did not become ready\n${lastHealthOutput}\n${stderr || stdout}`));

674+

throw new Error(

675+

scrub(`gateway did not become ready\n${lastHealthOutput}\n${stderr.text() || stdout.text()}`),

676+

);

626677

}

627678628679

async function stopGateway(child) {

629-

if (!child || child.exitCode !== null) {

680+

if (!child || !processTreeIsAlive(child)) {

630681

return;

631682

}

632683

terminateProcessTree(child, "SIGTERM");

633684

const started = Date.now();

634685

while (Date.now() - started < TEARDOWN_GRACE_MS) {

635-

if (child.exitCode !== null) {

686+

if (!processTreeIsAlive(child)) {

636687

return;

637688

}

638689

await delay(100);

639690

}

640691

terminateProcessTree(child, "SIGKILL");

692+

await waitForProcessTreeExit(child, 1000);

693+

}

694+695+

function childHasExited(child) {

696+

return child.exitCode !== null || child.signalCode !== null;

697+

}

698+699+

function processTreeIsAlive(child) {

700+

if (!child || typeof child.pid !== "number") {

701+

return false;

702+

}

703+

if (process.platform === "win32") {

704+

return !childHasExited(child);

705+

}

706+

try {

707+

process.kill(-child.pid, 0);

708+

return true;

709+

} catch (error) {

710+

if (error && error.code === "EPERM") {

711+

return true;

712+

}

713+

return false;

714+

}

715+

}

716+717+

async function waitForProcessTreeExit(child, timeoutMs) {

718+

const started = Date.now();

719+

while (Date.now() - started < timeoutMs) {

720+

if (!processTreeIsAlive(child)) {

721+

return true;

722+

}

723+

await delay(50);

724+

}

725+

return !processTreeIsAlive(child);

641726

}

642727643728

function terminateProcessTree(child, signal) {

@@ -729,30 +814,51 @@ async function expectGatewayStartupFails(envCtx, port, reason) {

729814

detached: process.platform !== "win32",

730815

stdio: ["ignore", "pipe", "pipe"],

731816

});

732-

let stdout = "";

733-

let stderr = "";

817+

const forbiddenStartupSecrets = [TOKEN_V1, TOKEN_V2, PLUGIN_EXEC_TOKEN];

818+

const stdout = createOutputCapture("startup stdout", {

819+

forbiddenValues: forbiddenStartupSecrets,

820+

});

821+

const stderr = createOutputCapture("startup stderr", {

822+

forbiddenValues: forbiddenStartupSecrets,

823+

});

734824

child.stdout.on("data", (chunk) => {

735-

stdout += chunk.toString("utf8");

825+

stdout.append(chunk);

736826

});

737827

child.stderr.on("data", (chunk) => {

738-

stderr += chunk.toString("utf8");

828+

stderr.append(chunk);

739829

});

740830

const code = await new Promise((resolve, reject) => {

831+

let timedOut = false;

741832

const timer = setTimeout(() => {

742-

terminateProcessTree(child, "SIGTERM");

743-

reject(new Error(`gateway did not fail closed for ${reason}`));

833+

timedOut = true;

834+

void stopGateway(child).then(() => {

835+

reject(new Error(`gateway did not fail closed for ${reason}`));

836+

}, reject);

744837

}, 20000);

745838

child.on("close", (exitCode) => {

839+

if (timedOut) {

840+

return;

841+

}

746842

clearTimeout(timer);

747843

resolve(exitCode);

748844

});

749-

child.on("error", reject);

845+

child.on("error", (error) => {

846+

if (timedOut) {

847+

return;

848+

}

849+

clearTimeout(timer);

850+

reject(error instanceof Error ? error : new Error(formatErrorMessage(error)));

851+

});

750852

});

751853

if (code === 0) {

752854

throw new Error(`gateway unexpectedly started for ${reason}`);

753855

}

754-

const rawCombined = `${stdout}\n${stderr}`;

755-

for (const forbidden of [TOKEN_V1, TOKEN_V2, PLUGIN_EXEC_TOKEN]) {

856+

const rawCombined = `${stdout.text()}\n${stderr.text()}`;

857+

const streamedLeak = stdout.leakedForbiddenValue() ?? stderr.leakedForbiddenValue();

858+

if (streamedLeak) {

859+

throw new Error(`startup failure for ${reason} leaked a secret value`);

860+

}

861+

for (const forbidden of forbiddenStartupSecrets) {

756862

if (rawCombined.includes(forbidden)) {

757863

throw new Error(`startup failure for ${reason} leaked a secret value`);

758864

}

@@ -1586,7 +1692,13 @@ async function main() {

15861692

}

15871693

}

158816941589-

export { gatewayCall, runCommand, startGateway, waitForManagedGatewayStatus };

1695+

export {

1696+

expectGatewayStartupFails,

1697+

gatewayCall,

1698+

runCommand,

1699+

startGateway,

1700+

waitForManagedGatewayStatus,

1701+

};

1590170215911703

if (process.argv[1] && import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href) {

15921704

await main();