precc
安装方式使用危险的 curl|bash 远程执行模式,等效于 supply_chain 攻击路径;PreToolUse hook 可在执行前重写 Bash 命令,具备等效 shell:WRITE 能力但文档未充分警示风险范围。
安装命令 'curl -fsSL https://peria.ai/install.sh | bash' 会在目标机器上无条件执行远程服务器返回的任意 shell 脚本。与 skill-card.md 自身标注的缓解建议('prefer a version-pinned, inspectable, checksum-verified installer')直接矛盾。若 peria.ai 域名被劫持或服务器被攻破,攻击者可在用户机器上获得完全代码执行权。
SKILL.md:101 Why this conclusion was reached
3/4 dimensions flagged2 undeclared or violating capabilities were inferred.
1 high-risk artifacts or egress signals were extracted.
The report includes 4 attack-chain steps and 2 severe findings.
1 dependency or supply-chain issues need attention.
Attack Chain
Entry · SKILL.md:101
Escalation · SKILL.md:100
Escalation · SKILL.md:98
Impact · SKILL.md:98
What drove the risk score up
SKILL.md:101 使用 curl -fsSL https://peria.ai/install.sh | bash,违背 skill-card.md 自身推荐的版本锁定校验安装方式
precc-hook 以 PreToolUse 身份运行,可重写任意 Bash 命令后才执行,行为等同于 shell:WRITE
skill 本身为 Rust 二进制,非开源脚本,无法审计源码,来源 peria.ai 非标准分发渠道
Most important evidence
curl|bash 远程脚本执行 — 等效供应链攻击
安装命令 'curl -fsSL https://peria.ai/install.sh | bash' 会在目标机器上无条件执行远程服务器返回的任意 shell 脚本。与 skill-card.md 自身标注的缓解建议('prefer a version-pinned, inspectable, checksum-verified installer')直接矛盾。若 peria.ai 域名被劫持或服务器被攻破,攻击者可在用户机器上获得完全代码执行权。
SKILL.md:101 PreToolUse Hook 可在命令执行前重写任意 Bash 命令
precc-hook 注册为 Claude Code 的 PreToolUse hook,运行在命令实际执行之前,可对任何 Bash 调用进行覆写(包括替换命令、注入参数)。这意味着即使最终执行的命令是用户可见的,hook 层面的修改对用户完全不透明。
SKILL.md:98 修改全局 Claude Code 配置
安装后向 ~/.claude/settings.json 注入 PreToolUse hook 入口,将 precc-hook 设为所有 Bash 命令的前置审查点,形成持久化劫持。
SKILL.md:87 pip 依赖 cocoindex-code 无版本锁定
SKILL.md:64 提及 pipx install cocoindex-code,未指定具体版本,pip 默认拉取 latest,存在依赖替换风险。
SKILL.md:64 README 声称 SHA256 校验但安装命令无体现
SKILL.md:100 声称 install.sh 会验证 SHA256,但实际的 curl|bash 命令不传递任何校验参数,用户无法在执行前独立验证。
SKILL.md:100 Declared capability vs actual capability
SKILL.md:101 — 通过 curl|bash 安装二进制;PreToolUse hook 重写 Bash 命令 SKILL.md — 修改 ~/.claude/settings.json,安装 ~/.local/bin/precc* 二进制,写入 ~/.local/share/precc/*.db SKILL.md metadata — 读取 PRECC_LICENSE_KEY SKILL.md — hook 自动注入并重写命令,等效于劫持 Claude Code 工具调用流程 Suspicious artifacts and egress
curl -fsSL https://peria.ai/install.sh | bash SKILL.md:101
https://peria.ai/install.sh SKILL.md:101
https://clawhub.ai/skills/precc SKILL.md:179
https://clawhub.ai/user/yijunyu skill-card.md:9
https://clawhub.ai/yijunyu/skills/precc skill-card.md:39
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| precc | unspecified | binary (peria.ai/install.sh) | No | 无版本号,通过 curl|bash 安装,源码闭源 |
| cocoindex-code | * | pip/pipx | No | 无版本锁定,默认拉取 latest |
| SQLCipher | bundled | precc binary | No | 加密 telemetry 数据库,由 precc 二进制使用 |
File composition
SKILL.md skill-card.md