gog-safety
/install gog-safety
gog Safety Profiles
Build and deploy gog binaries with compile-time command removal. Commands that are disabled don't exist in the binary — no runtime bypass possible.
Quick Start
1. Choose a safety level
| Level | Use case | Can send email/chat? |
|---|---|---|
| L1 | Email triage, drafting, inbox organization | No |
| L2 | L1 + commenting, RSVP, collaborative work | No |
| L3 | Full write access, no dangerous admin ops | Yes |
For full details: references/levels.md
2. Build
# Build for current platform
./scripts/build-gog-safe.sh L1
# Cross-compile for Linux ARM64 (e.g., AWS Graviton)
./scripts/build-gog-safe.sh L1 --arch arm64 --os linux
# Custom output
./scripts/build-gog-safe.sh L2 --output /tmp/gog-l2
Requires: Go 1.22+, git. First run clones the PR #366 branch (~30s).
3. Deploy
# Deploy to a remote host via SSH
./scripts/deploy-gog-safe.sh spock /tmp/gogcli-safety-build/bin/gog-l1-safe
# Deploy with verification (tests blocked + allowed commands)
./scripts/deploy-gog-safe.sh spock /tmp/gogcli-safety-build/bin/gog-l1-safe --verify
The deploy script:
- Backs up the existing
gogasgog-backup - Installs the new binary
- Verifies version output
- Optionally tests that blocked commands are gone and allowed commands work
4. Rollback
ssh \x3Chost> 'sudo mv /usr/local/bin/gog-backup /usr/local/bin/gog'
How It Works
Uses gogcli's compile-time safety profiles feature (PR #366 on steipete/gogcli). A YAML file specifies which commands are enabled (true) or removed (false). The build system generates Go source files with only the enabled commands, then compiles. The resulting binary's version is tagged with -safe.
YAML Profiles
In references/:
l1-draft.yaml— Draft & Organizel2-collaborate.yaml— Draft & Collaboratel3-standard.yaml— Full Write (No Admin)
Custom profiles: copy any YAML, edit the true/false flags, pass to build-gog-safe.sh.
Verification
After deployment, verify with:
ssh \x3Chost> "gog --version" # Should show -safe suffix
ssh \x3Chost> "gog gmail send --help 2>&1" # Should fail (L1/L2)
ssh \x3Chost> "gog gmail drafts create --help" # Should work (all levels)
Known Edge Cases
- Filter forwarding:
gmail settings filters createis allowed at L1+ for inbox organization. A filter with a forward action could auto-forward email. Accepted risk for v1. - Drive sharing:
drive shareis allowed at L1+ because sharing grants access without sending a message notification. The shared user sees it in "Shared with me" but doesn't get an email.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gog-safety - 安装完成后,直接呼叫该 Skill 的名称或使用
/gog-safety触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
gog-safety 是什么?
Build and deploy safety-profiled gogcli binaries with compile-time command removal. Use when setting up gog for an AI agent with restricted permissions — cho... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 380 次。
如何安装 gog-safety?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gog-safety」即可一键安装,无需额外配置。
gog-safety 是免费的吗?
是的,gog-safety 完全免费(开源免费),可自由下载、安装和使用。
gog-safety 支持哪些平台?
gog-safety 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 gog-safety?
由 BrennerSpear(@brennerspear)开发并维护,当前版本 v1.0.1。