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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
J
Java Code Geeks
V
V2EX
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园 - Franky
爱范儿
爱范儿
T
Tailwind CSS Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
博客园_首页
B
Blog RSS Feed
博客园 - 司徒正美
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

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
feat(ui): show raw config pending changes · openclaw/open...
BunsDev · 2026-04-27 · via Recent Commits to openclaw:main

@@ -64,7 +64,7 @@ export function hintForPath(path: Array<string | number>, hints: ConfigUiHints)

6464

if (direct) {

6565

return direct;

6666

}

67-

const segments = key.split(".");

67+

const segments = path.map(String);

6868

for (const [hintKey, hint] of Object.entries(hints)) {

6969

if (!hintKey.includes("*")) {

7070

continue;

@@ -120,6 +120,28 @@ const ENV_VAR_PLACEHOLDER_PATTERN = /^\$\{[^}]*\}$/;

120120121121

export const REDACTED_PLACEHOLDER = "[redacted - click reveal to view]";

122122123+

const MAX_SENSITIVE_SCAN_DEPTH = 64;

124+

const MAX_SENSITIVE_SCAN_NODES = 20_000;

125+126+

type SensitiveScanState = {

127+

visited: number;

128+

};

129+130+

function createSensitiveScanState(): SensitiveScanState {

131+

return { visited: 0 };

132+

}

133+134+

function enterSensitiveScanNode(state: SensitiveScanState, depth: number): boolean {

135+

if (depth > MAX_SENSITIVE_SCAN_DEPTH) {

136+

return false;

137+

}

138+

state.visited += 1;

139+

if (state.visited > MAX_SENSITIVE_SCAN_NODES) {

140+

return false;

141+

}

142+

return true;

143+

}

144+123145

function isEnvVarPlaceholder(value: string): boolean {

124146

return ENV_VAR_PLACEHOLDER_PATTERN.test(value.trim());

125147

}

@@ -146,6 +168,20 @@ export function hasSensitiveConfigData(

146168

path: Array<string | number>,

147169

hints: ConfigUiHints,

148170

): boolean {

171+

return hasSensitiveConfigDataInner(value, path, hints, createSensitiveScanState(), 0);

172+

}

173+174+

function hasSensitiveConfigDataInner(

175+

value: unknown,

176+

path: Array<string | number>,

177+

hints: ConfigUiHints,

178+

scan: SensitiveScanState,

179+

depth: number,

180+

): boolean {

181+

if (!enterSensitiveScanNode(scan, depth)) {

182+

return true;

183+

}

184+149185

const key = pathKey(path);

150186

const hint = hintForPath(path, hints);

151187

const pathIsSensitive = isHintSensitive(hint) || isSensitiveConfigPath(key);

@@ -155,12 +191,14 @@ export function hasSensitiveConfigData(

155191

}

156192157193

if (Array.isArray(value)) {

158-

return value.some((item, index) => hasSensitiveConfigData(item, [...path, index], hints));

194+

return value.some((item, index) =>

195+

hasSensitiveConfigDataInner(item, [...path, index], hints, scan, depth + 1),

196+

);

159197

}

160198161199

if (value && typeof value === "object") {

162200

return Object.entries(value as Record<string, unknown>).some(([childKey, childValue]) =>

163-

hasSensitiveConfigData(childValue, [...path, childKey], hints),

201+

hasSensitiveConfigDataInner(childValue, [...path, childKey], hints, scan, depth + 1),

164202

);

165203

}

166204

@@ -172,6 +210,20 @@ export function countSensitiveConfigValues(

172210

path: Array<string | number>,

173211

hints: ConfigUiHints,

174212

): number {

213+

return countSensitiveConfigValuesInner(value, path, hints, createSensitiveScanState(), 0);

214+

}

215+216+

function countSensitiveConfigValuesInner(

217+

value: unknown,

218+

path: Array<string | number>,

219+

hints: ConfigUiHints,

220+

scan: SensitiveScanState,

221+

depth: number,

222+

): number {

223+

if (!enterSensitiveScanNode(scan, depth)) {

224+

return 1;

225+

}

226+175227

if (value == null) {

176228

return 0;

177229

}

@@ -186,15 +238,17 @@ export function countSensitiveConfigValues(

186238187239

if (Array.isArray(value)) {

188240

return value.reduce(

189-

(count, item, index) => count + countSensitiveConfigValues(item, [...path, index], hints),

241+

(count, item, index) =>

242+

count + countSensitiveConfigValuesInner(item, [...path, index], hints, scan, depth + 1),

190243

0,

191244

);

192245

}

193246194247

if (value && typeof value === "object") {

195248

return Object.entries(value as Record<string, unknown>).reduce(

196249

(count, [childKey, childValue]) =>

197-

count + countSensitiveConfigValues(childValue, [...path, childKey], hints),

250+

count +

251+

countSensitiveConfigValuesInner(childValue, [...path, childKey], hints, scan, depth + 1),

198252

0,

199253

);

200254

}