鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

cc-safety-net

执行前守卫,在工具调用运行前拦截破坏性 Git 与文件系统命令,以及对 SSH 密钥、.env 等机密文件的访问。

安全权限
访问 GitHub
文档README

▼
text
复制代码
![CC Safety Net](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/LUhBh5cORsIwwn1e.svg)

English · 简体中文 · 日本語

https://github.com/user-attachments/assets/353c1441-9156-483c-b8e5-32fce7905a83

CC Safety Net (Coding CLI Safety Net) blocks destructive commands and access to secrets such as SSH keys and .env files before the tool call runs. It parses what the command does. Wrapping the command or reordering flags does not hide it. A broken config file falls back to safe defaults instead of stopping your agent. It is not a sandbox: it does not contain processes, set filesystem permissions, or watch network egress.

[!NOTE] Full documentation → covers installation, configuration, reference material, guides, and the security model. This README is the short version.

How it works

▼
text
复制代码
![An AI coding agent tries to run a command or open a file. CC Safety Net checks what it would actually do before it runs. Safe calls such as git status run normally; dangerous ones such as git reset --hard never run, and the agent is told why.](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/1R3vDupEHss5e5hB.svg)

Supported coding CLIs

CC Safety Net supports these coding agent CLIs on Windows, macOS, and Linux.

▼
text
复制代码
[![Amp Code](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/3tIWHDprdCjAKQQW.svg) Amp Code](https://ccsafetynet.com/docs/installation/amp-code) [![Antigravity CLI](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/s2kVz8xd9L9IchOz.png) Antigravity CLI](https://ccsafetynet.com/docs/installation/antigravity-cli) [![Claude Code](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/GiGDvTGxbHfR3wY5.svg) Claude Code](https://ccsafetynet.com/docs/installation/claude-code) [![Codex](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/e6LLUWaKjXMN8gio.svg) Codex](https://ccsafetynet.com/docs/installation/codex) [![Cursor](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/oX0PNG4NtwDJTQLB.svg) Cursor](https://ccsafetynet.com/docs/installation/cursor) [![DeepSeek Harness](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/YQoi6UCEUcpowHZM.svg) DeepSeek Harness](https://ccsafetynet.com/docs/installation/deepseek-harness) [![Devin CLI](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/lqEMcbS9I8xMGZAK.svg) Devin CLI](https://ccsafetynet.com/docs/installation/devin-cli) [![Factory Droid](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/So7yqim7r3oIWnKY.svg) Factory Droid](https://ccsafetynet.com/docs/installation/factory-droid) [![Gemini CLI](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/eHWEs8D7P5XEgdiK.svg) Gemini CLI](https://ccsafetynet.com/docs/installation/gemini-cli) [![GitHub Copilot CLI](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/oejBsoRihlkBM2z5.svg) GitHub Copilot CLI](https://ccsafetynet.com/docs/installation/github-copilot-cli) [![Grok Build](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/5ofkfzevxyC2zfgU.svg) Grok Build](https://ccsafetynet.com/docs/installation/grok-build) [![Hermes Agent](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/ePvW0jMlxkY5zWja.png) Hermes Agent](https://ccsafetynet.com/docs/installation/hermes-agent) [![Kimi Code](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/lYFBxaRkw0lnVHtS.png) Kimi Code](https://ccsafetynet.com/docs/installation/kimi-code) [![OpenClaw](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/c19XUjyzngcPd1S7.png) OpenClaw](https://ccsafetynet.com/docs/installation/openclaw) [![OpenCode](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/B7WoxeL6YUYz6HC4.svg) OpenCode](https://ccsafetynet.com/docs/installation/opencode) [![Pi](https://pic.code-nav.cn/ai_dsh_plugin_image/1610518142000300034/MVTonq5Cf96pZjxo.svg) Pi](https://ccsafetynet.com/docs/installation/pi)

Features

  • Blocks destructive commands such as git reset --hard, git push --force, and rm -rf on dangerous targets, and install scripts piped from the internet (curl … | bash), even inside bash -c or python -c. See Blocked commands.
  • Blocks secret access to SSH keys, .env files, ~/.aws, and coding-CLI credentials, from the shell and from the agent's file tools. See Secret protection.
  • Tunes the policy in a GUI. Run npx cc-safety-net gui to pick the Standard, Strict, or Paranoid preset and turn rules on or off. See Dashboard.
  • Adds blocks through rulebooks: official packs for Terraform, AWS, gcloud, and Azure, or your own JSON. See Official rulebooks.
  • Shares policy through git. Commit .cc-safety-net/ so clones and cloud sessions get the same rules. See Team setup.
  • Embeds in your own tools. Call checkCommand from Node.js without installing the hook. See Library API.

Quick start

You need Node.js 18 or higher. Install into the coding CLIs on this machine, then check that protection is working:

▼
bash
复制代码
npx -y cc-safety-net@latest install npx -y cc-safety-net@latest doctor

Update with npx -y cc-safety-net@latest update and uninstall with npx -y cc-safety-net uninstall. Keep the @latest qualifier: a bare cc-safety-net spec can run an older copy from the npx cache. Per-CLI requirements are in Installation.

Development

See CONTRIBUTING.md to report a bug or request a feature.

License

MIT

安全权限

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:kenryu42/cc-safety-net

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
dsh-workspace-write-plus
增加工作区修改++权限档,文件工具仍锁在工作区,可用通配符放行 Git Bash 等程序以跳过 Windows 进程沙箱。
user-management
用户管理:给 dsh web 加登录门禁,未登录访问弹登录/注册页,首个注册者自动成为管理员;管理员可管理用户/角色,带登录与访问审计。
dsh-security-guard
DSH 插件安全卫士:28 条规则静态扫描、风险评分、白名单/黑名单、本地 Web 仪表盘与 DSH 内风险弹窗。
dsh-route-fence-linter
审计 profile 内所有插件 HTTP 路由的浏览器信任围栏:插件路由在 Web 服务器的最长前缀匹配中优先,因此缺少围栏的路由会被静默暴露;逐条给出文件与行号级别的证据。
dsh-dros-vajraclaw
DSH 本機工具調用防護外掛:攔截高風險 Shell 指令模式與敏感憑證讀取,具備持久化哈希鏈 JSONL 審計記錄,可選配外部 Gateway 集中治理。