Gemini CLI sandbox bug: corrupt policy file silently drops read-only restrictions
EddieMurphy89 · ghdev · 2026-12-02
- 问题:当 /.gemini/policies/sandbox.toml 存在但无法读取或解析时(如崩溃、SIGKILL、磁盘写满导致文件截断),SandboxPolicyManager.loadConfig() 会静默回退到内置 DEFAULTCONFIG,导致操作者配置的 readonly = true 和 allowOverrides = false 被悄悄丢弃。
- 攻击者可获得:沙箱命令可在只读工作区中写入;带 networkAccess: true 或额外权限的沙箱扩展请求不再被拒绝,工具调用可拿到出站网络和额外读写路径;降级策略贯穿整个进程生命周期,每次新会话都重复降级。
- 隐蔽性:仅有 debug 日志提示,退出码和命令结果均不显示策略已被降级,且非沙箱逃逸、不可远程触发。
- 修复方案:保留最后一次有效策略;无有效策略时应用只读 fallback;无配置文件的默认行为不变。
More from coding & agent
- Connecting Squad, CrawlRaven and Piqo Into an AI Business OS That Joins SEO With Conversion Data — ayushtweetshere · 2026-12-02
- vork: open-source GPU rendering engine lets AI agents build cinematic 3D scenes with code, no video model needed — ravisparikh · 2026-12-02
- SlackBench: most of 33 frontier agents score under 66% on messy real-work collaboration tasks — DynamicWebPaige · 2026-12-02
- Sentry founder's "JIT Steering": making agents deterministic without killing their capability — zeeg · 2026-12-02
- Vibe Coded in Two Hours: A Private Tinder-Style Job Search App for iPhone — rawpie01 · 2026-12-02
- GodTerm v0.4.2: open-source macOS app to use Grok, Claude, Antigravity in one place — Daniel_Farinax · 2026-12-02