cc-safety-net

版本 2.8.2发布 2026-11-22仓库 kenryu42/cc-safety-net
3/4装得上 · 启动通过

CC Safety Net(Coding CLI Safety Net)在工具调用执行前拦截破坏性命令,以及 SSH 密钥、.env 文件等机密的访问。

开发与运行时周下载 48.3Kpeer 2MIT
pnpm add cc-safety-net

安装前须知

Node 要求
>=22
package.json engines
peer 依赖
2 个
由宿主提供,不随包安装
宿主服务
无需额外服务
装完由真宿主启动一次
入口 / 补丁
dist/index.js
bundle 已声明 · patch 随包

四段检测

逐层记录
收录门槛通过
manifest 是否声明 DSH 依赖或 dsh.bundle
离线审查未通过
静态结构包内清单、补丁文件与入口声明是否完整
无 high / critical 命中
未通过
配置组合装入一次性 DSH_HOME 后配置树能否合并通过
源码审查静态阅读源码,检查危险调用与数据外发
计数单位 finding,非包数。
通过
真机安装通过
真机执行 pnpm 安装,退出码为 0 且 node_modules 生成
实测宿主版本 0.2.2-rc.5
加载实测通过
安装完成后由真实宿主启动一次,检查入口是否激活

检测结论明细

共 6 次命中
收录判定1 条规则 · 1 次命中
主页与代码仓库不同站l0-homepage-unrelated
静态结构4 条规则 · 5 次命中
读取凭据/密钥文件路径×2credential-path-read
dist/bin/hook.js:8`||s==="\r")t+=s,r=!1,n.escaped=!1;continue}if(s==="#"&&!n.inSingle&&!n.inDouble&&o){r=!0;continue}if(t+=s,!n.inSingle&&!n.inDouble&&!n.escaped)o=/[\s
遍历目录后批量改写mass-file-overwrite
dist/bin/hook.js:55`).filter((o)=>o.trim()).map(PO);if(r.length===0)return;if(r.some((o)=>o===void 0||o>=t))return;if(Se.lstatSync(e).mtimeMs!==n.mtimeMs)return;Zh(e)}ca
代码中存在外部 URLremote-url-reference
dist/amp/cc-safety-net/index.ts:10http://169.254.169.254/latest/meta-data/iam/security-credentials/ https://uploads.example.com/ https://github.com/kenryu42/cc-safety-net/issues https:
提到凭据路径但没有读动作sensitive-path-reference
dist/amp/cc-safety-net/index.ts:10`||s==="\r")t+=s,r=!1,n.escaped=!1;continue}if(s==="#"&&!n.inSingle&&!n.inDouble&&o){r=!0;continue}if(t+=s,!n.inSingle&&!n.inDouble&&!n.escaped)o=/[\s

依赖结构

2 项
@opencode-ai/pluginpeer由宿主提供
@opencode/pluginpeer由宿主提供