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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Engineering at Meta
Engineering at Meta
L
LangChain Blog
Jina AI
Jina AI
博客园 - 叶小钗
B
Blog RSS Feed
Recent Announcements
Recent Announcements
H
Help Net Security
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
B
Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客

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
fix(logging): redact subsystem console output before colo...
steipete · 2026-04-28 · via Recent Commits to openclaw:main

@@ -216,13 +216,15 @@ function formatConsoleLine(opts: {

216216

const displaySubsystem =

217217

opts.style === "json" ? opts.subsystem : formatSubsystemForConsole(opts.subsystem);

218218

if (opts.style === "json") {

219-

return JSON.stringify({

220-

time: formatConsoleTimestamp("json"),

221-

level: opts.level,

222-

subsystem: displaySubsystem,

223-

message: opts.message,

224-

...opts.meta,

225-

});

219+

return redactSensitiveText(

220+

JSON.stringify({

221+

time: formatConsoleTimestamp("json"),

222+

level: opts.level,

223+

subsystem: displaySubsystem,

224+

message: opts.message,

225+

...opts.meta,

226+

}),

227+

);

226228

}

227229

const color = getColorForConsole();

228230

const prefix = `[${displaySubsystem}]`;

@@ -235,7 +237,8 @@ function formatConsoleLine(opts: {

235237

: opts.level === "debug" || opts.level === "trace"

236238

? color.gray

237239

: color.cyan;

238-

const displayMessage = stripRedundantSubsystemPrefixForConsole(opts.message, displaySubsystem);

240+

const redactedMessage = redactSensitiveText(opts.message);

241+

const displayMessage = stripRedundantSubsystemPrefixForConsole(redactedMessage, displaySubsystem);

239242

const time = (() => {

240243

if (opts.style === "pretty") {

241244

return color.gray(formatConsoleTimestamp("pretty"));

@@ -250,18 +253,17 @@ function formatConsoleLine(opts: {

250253

return `${head} ${levelColor(displayMessage)}`;

251254

}

252255253-

function writeConsoleLine(level: LogLevel, line: string) {

256+

function writeConsoleLine(level: LogLevel, line: string, opts: { redacted?: boolean } = {}) {

254257

clearActiveProgressLine();

255258

const sanitized =

256259

process.platform === "win32" && process.env.GITHUB_ACTIONS === "true"

257260

? line.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "?").replace(/[\uD800-\uDFFF]/g, "?")

258261

: line;

259262

// Subsystem console output bypasses the patched console.* capture handler in

260-

// ./console.ts to avoid recursion, so the sink-boundary redaction applied

261-

// there does not run for these writes (#73284). Redact at this exit instead

262-

// so secrets reaching subsystem loggers as message strings or formatted meta

263-

// do not appear verbatim on the terminal.

264-

const redacted = redactSensitiveText(sanitized);

263+

// ./console.ts to avoid recursion. Normal formatted messages are redacted

264+

// before colorization; keep this exit guard for raw writes and structured

265+

// lines that reach the sink already serialized (#73284).

266+

const redacted = opts.redacted ? sanitized : redactSensitiveText(sanitized);

265267

const sink = loggingState.rawConsole ?? console;

266268

if (loggingState.forceConsoleToStderr || level === "error" || level === "fatal") {

267269

(sink.error ?? console.error)(redacted);

@@ -378,6 +380,7 @@ export function createSubsystemLogger(subsystem: string): SubsystemLogger {

378380

style: consoleSettings.style,

379381

meta: fileMeta,

380382

}),

383+

{ redacted: true },

381384

);

382385

};

383386