Repository navigation
fix(sandbox): 扣密钥时密封双平台 lark-cli 密钥库 - #3672
Conversation
- macOS 整库与当前 bot key 改为 mandatory ceiling;Linux 默认/自定义 keystore 同步覆盖 - withheld store 内所有非 deny 规则在 merge 后过滤,阻断 sibling/token/future-file 的深层授权;Seatbelt 在 finalReadOnlyPaths 之后重发最终 deny,HOME 或 / 的祖先授权也不能重开密钥 - larkTransportEnabled=false 的会话同样纳入密封集合;非 withhold 的 own-key 只读 carve-out 保持不变 验证:bun run build;fs-policy/沙盒/测试卫生 293 项通过、6 项跳过;Bun 相关 65 项通过。workingDir、userPaths、精确 key、祖先、sibling、custom store、no-transport 变异均咬红后恢复。独立复核未发现重开路径。macOS 仅验证编译 profile 与发射顺序,未做真机运行验证。 Co-Authored-By: Claude Code <[email protected]>
|
独立复核(首审 Claude,针对 Kimi 实现的合后 P2-1 修复)结论:可合(同仓 PR 无法用 GitHub APPROVE 自批,双审结论以评审群记录为准)。 【密封有效性 — 真实 buildFsPolicy/accessForPath/compileToSeatbelt 探针】 【无正常 auth 回归】 【独立变异(均咬红后还原)】
【验证】tsc 0 错、build 过;fs-policy/sandbox-relay/hygiene 214 项 + cli-relay/send-cred/freeze/background-guards/ipc 115 项 vitest 全绿;bun 腿 60 项全绿;merge-tree 对最新 master 无冲突;与 #3671 文件零重叠可并行。 【G9 边界】Seatbelt 编译 profile 与 last-match 发射顺序已由单测验证,但 darwin 内核级 sandbox-exec 强制效果未在 macOS 真机执行(Kimi 已注明),建议登记一次 macOS 真机回归窗口,与 #3649 同类 follow-up 一并安排。 最终以维护者审阅为准。 |
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 885b8fb…a0b04a957(4 个提交),同批合入的还有 #3671 #3665 #3675,失败不一定由本 PR 引起。
|
|
🚀 Released in v3.59.25 |
改了什么
修复 #3649 合入后发现的 macOS 密钥扣留绕过:
sandboxWithholdBotSecret=true时,macOS 整库 deny 只有 baseline,能被同路径workingDir、sandboxPaths或更深层精确 key 授权覆盖;Linux 的深层精确 key 授权也有同类问题。master.key.file、appsecret_<appId>.enc统一使用 mandatory ceiling。LARKSUITE_CLI_DATA_DIR自定义 keystore 同步覆盖。finalReadOnlyPaths之后重新发射 withheld-store deny,HOME 或/的祖先授权也不能覆盖密钥。larkTransportEnabled=false的会话也纳入同一密封集合;非 withhold 的 own-key 只读 carve-out 保持不变。影响面
仅影响
sandboxWithholdBotSecret=true的 oncall 会话,覆盖 macOS/Linux、transport/no-transport、默认及自定义 keystore。其它会话配置与现有 own-key 认证路径不变。relay-session-tool.ts的 P2-2 修复不在本 PR 内。实际验证
bun run build:通过。/祖先、sibling/token/future-file、no-transport。macOS 限制:本机为 Linux,仅验证真实
compileToSeatbelt生成的 profile 与 last-match 发射顺序;未执行 macOS 内核级真机验证,需 darwin 真机复核。🤖 Generated with Claude Code