feat: v0.8.2 安全纵深补全 · 协议保真 · 断链修复 — 图片SSRF/根MEMORY.md保护根治 · Anthropic thinking回传+pause_turn续传 · 2523 用例全量回归 + E2E 扩充
CI / 类型检查 + Lint + 单元测试 (push) Failing after 9m45s
CI / 全量测试 (Electron ABI) (push) Failing after 6m28s
CI / 产物编译验证 (push) Successful in 11m18s

This commit is contained in:
2026-09-08 14:30:27 +08:00
parent 69776e447f
commit 4cd6e997b5
86 changed files with 4303 additions and 956 deletions
+7 -1
View File
@@ -15,6 +15,8 @@
import type Database from 'better-sqlite3';
import { createHash } from 'crypto';
import log from 'electron-log';
// v0.8.2 P1-5: 审计 args 深度脱敏(与配置层脱敏同源)
import { deepMaskSensitive } from '../utils/mask';
/**
* #36 修复: 稳定序列化,递归按 key 字典序排序后序列化
@@ -194,6 +196,10 @@ export class AuditService {
/**
* 记录工具调用
*
* v0.8.2 P1-5: args 深度脱敏后落库 —— 工具参数中的密钥/鉴权头/token 此前
* 以明文进入 audit_logssafeStorage 只保护配置层),构成敏感信息二次扩散面。
* 键名匹配与配置层单源(utils/mask → secure-config 归一化匹配)。
*/
logToolCall(params: {
sessionId: string;
@@ -212,7 +218,7 @@ export class AuditService {
actor: 'agent',
target: params.toolName,
details: {
args: params.args,
args: deepMaskSensitive(params.args),
result: typeof params.result === 'string' ? params.result.slice(0, 1000) : params.result,
error: params.error,
},