guanghu-ice-heart/server-tools/zhulan-remote-cell
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-13 17:49:53 +08:00
..
contracts feat(zhulan): add restricted remote development cell 2026-08-13 17:49:53 +08:00
deploy feat(zhulan): add restricted remote development cell 2026-08-13 17:49:53 +08:00
runtime feat(zhulan): add restricted remote development cell 2026-08-13 17:49:53 +08:00
tests feat(zhulan): add restricted remote development cell 2026-08-13 17:49:53 +08:00
ui feat(zhulan): add restricted remote development cell 2026-08-13 17:49:53 +08:00
policy.example.json feat(zhulan): add restricted remote development cell 2026-08-13 17:49:53 +08:00
README.md feat(zhulan): add restricted remote development cell 2026-08-13 17:49:53 +08:00

铸澜受限远程开发单元

zhulan-remote-cellICE-GL-ZL-001 的手机远程开发运行入口。它把公网前门与真实运行体明确分开:

  • BS-GZ-006 只承载 guanghulab.com/zhulan/ 的域名、TLS 和反向代理,不保存或运行审批 UI
  • BS-SG-003 承载真实 UI、申请、主人登录、批准、临时能力、策略校验、SQLite 状态与哈希回执链;
  • UI 只投影运行层返回的事实,不拥有执行权;
  • 公开申请本身没有任何服务器或仓库权限;
  • 一次批准绑定 persona + development_id + repository + base_sha + branch + paths + actions + expiry,不得在会话内扩大。

当前能力

  1. 铸澜可创建无执行权申请并取得一次性领取凭证;
  2. 冰朔使用光湖代码频道账号登录审批端,密码仅用于当次 Forgejo 验证,不写入本地状态;
  3. 批准后由运行层生成三小时临时能力,磁盘只保存摘要和重建所需的非秘密声明;
  4. 临时能力只能领取一次,可由受限执行器通过回环 API 校验;
  5. 所有申请、批准、拒绝、领取与校验事件写入前后哈希相连的回执链;
  6. 代码门脚本检查当前分支、基线、改动路径、符号链接、超大文件与常见秘密模式;
  7. 候选提交只进入 BS-SG-003 的内部复核库,不在远程会话中持有代码频道写凭证,也不直接发布中央仓库;本机铸渊复核后再走既有发布门。

这里不提供任意远程 shell。后续手机 Codex 接入只能通过受限执行器或受限工具协议使用这些能力,不能把临时能力降级成长期 root 密钥。

本地验收

python3 -m unittest discover -s tests -v

运行配置

生产安装读取 /etc/guanghu/zhulan-remote-cell.env,参考 deploy/zhulan-remote-cell.env.example。真实应用秘密、代码频道密码和临时能力都不得提交到仓库。

运行层默认仅监听 127.0.0.1:17631。广州 Nginx 只允许代理到一条专用的回环隧道,不得把新加坡运行端口直接暴露到公网。

Ubuntu 24.04 的生产验收命令通过专用的 zhulan-bwrap 副本和本机 Unix 套接字执行器运行。公网审批/MCP 服务继续保持 NoNewPrivileges=true;只有无公网监听、只接受策略登记命令的执行器负责创建 Bubblewrap 用户命名空间。安装器只为 root 持有、zhulan-runtime 组可执行的副本路径加载 AppArmor userns 例外;不得关闭全机的未授权用户命名空间限制,也不得把系统 bwrap 改成 setuid。