| date |
event |
rating |
detail |
| 2026-05-27 |
W20.4: plugin_loader ABI 契约校验(降级版函数名白名单) |
done |
在 load_plugin 中 init_fn() 调用后新增 55 行校验块:
name 字段 null/empty → DSTALK_LOG_ERROR + return -1;
version 字段 null/empty → DSTALK_LOG_ERROR + return -1;
description null → DSTALK_LOG_WARN(非阻断);
on_init 回调 null → DSTALK_LOG_WARN(非阻断)。
通过 ABI 契约验证替代 SHA-256 哈希白名单(投票 3/4 反对引入 crypto 依赖)。
编译 cmake --build build --config Release: 0 error, ctest: 6/6 pass。
|
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W19.1: 修复 F-18.3-1 — plugin_loader 5 处 C ABI 调用点添加 try/catch (合作 qa-xu) |
done |
为 load_plugin init_fn(L59)、initialize_all on_init(L237)、initialize_pending on_init(L272)、
unload_plugin on_shutdown(L108-109)、shutdown_all on_shutdown(L306-307) 五处 C ABI 调用点
添加 try/catch(const std::exception&)+catch(...) 双层保护。
initialize_all 实现 fail-continue:单插件异常不阻断其他插件加载。
新增 host_api_ 成员存储日志通道,fprintf(stderr) 替换为 host_api->log()。
编译 cmake --build build --config Release: 0 error, ctest: 5/5 pass。
findings-registry: F-18.3-1 OPEN→FIXED, Fix Wave W19.1。
|
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W18.3: plugin_loader 安全审计 (合作 qa-xu) — 9 维度审计, 1 HIGH + 4 MEDIUM + 3 LOW 发现 |
done |
审计 dstalk-core/src/plugin_loader.cpp + plugin_loader.hpp (385行), 9 维度全覆盖。
TOP3: (1) [HIGH] 5 处 C ABI on_init/on_shutdown/init_fn 调用 zero try/catch → std::terminate();
(2) [MEDIUM] load_plugin 5 失败路径全静默返回 -1 无日志;
(3) [MEDIUM] dstalk_plugin_load 公开 API 路径零验证 + DLL 无来源完整性检查。
额外: fprintf(stderr) 绕过 host->log、PluginLoader 零同步、符号解析无诊断、终端转义注入风险。
评级: 综合 C (ABI 安全 F, 路径安全 D, 错误处理 D, 堆纪律 A)。
报告: agents/audits/W18.3-plugin-loader-audit.md。
findings-registry: F-18.3-1~5 (1 HIGH + 4 MEDIUM) 录入 Open 分区。
|
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W17.1: 验证 F-13.3-1/2/3 (network_plugin TLS/DNS/exception) — W14.1 已全部修复,关闭 3 条发现 |
done |
检查 network_plugin.cpp 现状:F-13.3-1 (TLS) 已有 set_verify_mode(verify_peer) + SSL_set1_host;
F-13.3-2 (DNS) 已有 steady_timer 10s 超时 + resolver.cancel();
F-13.3-3 (catch) 已有 catch(...) 兜底。均为 W14.1 周岩修复。
编译 0 error,ctest 4/4 pass。findings-registry 更新:3 条 OPEN→CLOSED, Fix Wave W14.1, Verified By security-cao。
|
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W16.1: 验证 F-11.7-1 (build/bin/ 损坏二进制副本) — W12.4 已彻底修复 |
done |
确认 build/dstalk-cli/dstalk-cli.exe 已删除 (W12.4 devops-hu 修复);
build/bin/dstalk-cli.exe 为唯一正确副本 (67584 bytes);
cmake --build build --config Release: 0 error; ctest: 4/4 pass。
更新 findings-registry.md: F-11.7-1 OPEN→CLOSED, Close Date 2026-05-27, Fix Wave W12.4, Verified By security-cao。
|
|
| date |
event |
rating |
| 2026-05-27 |
入职 dstalk 团队 |
ongoing |
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W2.2: api_key 在 on_shutdown 时安全清零 (deepseek + anthropic) |
done |
在 deepseek_plugin.cpp 和 anthropic_plugin.cpp 的 anonymous namespace 内
新增 secure_zero(void*, size_t),通过 volatile 写零循环对 g_cfg.api_key
执行安全擦除后 clear。编译:0 error 0 warning(与改动相关的文件)。
|
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W9.3: 错误日志凭证泄露审计(8文件,0真实漏洞) |
done |
审计了 8 个文件的所有 host->log / printf / fprintf(stderr) / std::cerr 调用。
0 真实可利用漏洞。deepseek/anthropic 的 configure 日志有意排除了 api_key;
build_headers_json() 产生的凭证字符串仅通过内存传递给 Beast HTTP,未经过日志管道。
低风险/假阳性 2 项(lsp server_cmd 日志 + network e.what() 异常信息),无需代码修改。
审计报告写入 docs/explanation/security-logging.md。CVSS: N/A(无可利用漏洞)。
|
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W13.5: session + tools 联合安全审计 (515行) |
done |
联合审计 session_plugin.cpp (264行) + tools_plugin.cpp (251行)。
TOP3: (1) tools L50/L85 路径遍历→任意文件读写 (CVSS 7.5);
(2) 两插件全文 static global 无 mutex→多线程竞态 UAF/NPD;
(3) session L127/L141/L204/L242 + tools L106/L132/L203
缺 try/catch→§8违反→std::terminate。
凭证泄露: session_save 明文落盘含 tool_calls_json(潜在token泄露)。
命令注入: 未发现。路径遍历: tools 确认。
评级 session:D+ / tools:D。
报告: agents/audits/W13.5-session-tools-audit.md
|
|
| date |
event |
rating |
detail |
| 2026-05-27 |
W14.3: 修复 W13.5 审计发现 — 路径遍历 + 全局状态加锁 + 9 vtable try/catch |
done |
修改 session_plugin.cpp (294行) + tools_plugin.cpp (292行)。
(1) is_safe_path() 拒绝空路径、绝对路径(/或盘符)、含..段,lexically_normal二次校验;
builtin_file_read(L50) 和 builtin_file_write(L85) 入口调用,不安全→log ERROR + 返回错误JSON。
(2) 加锁: session g_history/g_cached_history→g_session_mutex; tools g_tools→g_tools_mutex;
g_host/g_file_io→std::atomic<T*> load(acquire)/store(release)。
(3) 9 vtable try/catch 覆盖: session_add/save/load/history (session) +
tools_register_tool/unregister_tool/get_tools_json/execute/on_init (tools)。
编译: cmake --build build --config Release → 0 error 0 warning。
ctest -C Release → 4/4 pass。
|
|