安全决策报告

typescript-package-manager

技能声称提供知识指导,但实现代码包含远程脚本执行(curl|bash管道)和未声明的shell执行能力,文档-行为存在差异

安装决策优先 来源: ClawHub 扫描时间: 2026/4/6
文件 13
IOC 50
越权项 1
发现 4
最直接的威胁证据
01
用户调用typescript-package-manager技能 初始入口 · SKILL.md
02
脚本通过execSync执行shell命令检测Bun是否安装 权限提升 · scripts/bun-workflow.js
03
Bun未安装时输出curl|bash远程安装命令 权限提升 · scripts/bun-workflow.js

为什么得出这个结论

3/4 个维度触发
阻止
声明与实际能力

发现 1 项声明之外的能力或越权行为。

阻止
隐藏执行与外联

提取到 2 个高危 IOC 或外联信号。

阻止
攻击链与高危发现

报告包含 4 步攻击链,另有 1 项高危或严重发现。

复核
依赖与供应链卫生

没有完整依赖信息,供应链判断需要保留弹性。

攻击链

01
用户调用typescript-package-manager技能

初始入口 · SKILL.md:1

02
脚本通过execSync执行shell命令检测Bun是否安装

权限提升 · scripts/bun-workflow.js:37

03
Bun未安装时输出curl|bash远程安装命令

权限提升 · scripts/bun-workflow.js:195

04
用户若执行该命令,系统将执行来自远程URL的脚本(风险取决于URL安全性)

最终危害 · scripts/bun-workflow.js:195

风险分是怎么被拉高的

远程脚本执行 +25

curl -fsSL https://bun.sh/install | bash 和 curl -fsSL https://get.pnpm.io/install.sh | sh 管道执行

文档-行为不符 +15

SKILL.md声明为知识技能,但脚本实际执行shell命令并修改系统

shell执行未声明 +10

execSync调用未在文档中说明

无凭证收割 +-10

未发现凭证访问或外传

无数据外泄 +-10

未发现外部数据通信

最关键的证据

高危 代码执行

远程脚本管道执行

bun-workflow.js:195 和 pnpm-workflow.md:51 包含 curl -fsSL <url> | bash/sh 模式,这是经典的高危远程代码执行模式。虽然用于安装合法工具,但存在被替换URL进行攻击的风险。

scripts/bun-workflow.js:195
改用安全的安装方式:npm install -g bun 或 corepack enable pnpm
中危 文档欺骗

声明能力与实际行为不符

SKILL.md声称是'知识技能',但scripts/文件夹中的脚本实际执行shell命令(execSync)并可能修改系统状态。这属于阴影功能。

SKILL.md:1
在SKILL.md中明确声明脚本将执行shell命令
中危 权限提升

shell执行能力未声明

脚本使用execSync执行任意shell命令(如npm audit, tsc, npx等),但SKILL.md的allowed-tools中未声明shell:WRITE权限。

scripts/bun-workflow.js:27
在文档中明确声明需要shell执行权限及用途
低危 供应链

外部URL依赖

多处引用外部URL(bun.sh, pnpm.io等)作为文档链接和安装源,依赖第三方基础设施。

scripts/bun-workflow.js, scripts/pnpm-workflow.md:120,195,51
考虑使用更稳定的安装方式减少供应链风险

声明能力 vs 实际能力

文件系统 通过
声明 READ
推断 READ
脚本仅读取本地文件如tsconfig.json、package.json
命令执行 阻止
声明 NONE
推断 WRITE
scripts/bun-workflow.js:195, scripts/pnpm-workflow.md:51 - curl|bash管道远程执行
网络访问 通过
声明 NONE
推断 READ
脚本访问外部URL获取安装脚本,但作为工具安装的一部分
环境变量 通过
声明 NONE
推断 READ
health-check.js通过execSync执行npm audit读取环境

可疑产物与外联

严重 危险命令
curl -fsSL https://bun.sh/install | bash

scripts/bun-workflow.js:195

严重 危险命令
curl -fsSL https://get.pnpm.io/install.sh | sh

scripts/pnpm-workflow.md:51

中危 外部 URL
https://yourwebsite.com

assets/package-json-template.md:25

中危 外部 URL
https://docs.npmjs.com/cli/v9/configuring-npm/package-json

assets/package-json-template.md:521

中危 外部 URL
https://nodejs.org/api/packages.html

assets/package-json-template.md:522

中危 外部 URL
https://www.typescriptlang.org/docs/handbook/module-resolution.html

assets/package-json-template.md:523

中危 外部 URL
https://www.typescriptlang.org/docs/handbook/integrating-with-build-tools.html

references/integration-with-build-tools.md:13

中危 外部 URL
https://vitejs.dev/guide/

references/integration-with-build-tools.md:614

中危 外部 URL
https://webpack.js.org/concepts/

references/integration-with-build-tools.md:615

中危 外部 URL
https://esbuild.github.io/

references/integration-with-build-tools.md:616

中危 外部 URL
https://turbo.build/repo/docs

references/integration-with-build-tools.md:617

中危 外部 URL
https://en.wikipedia.org/wiki/Npm

references/package-management.md:13

依赖与供应链

没有结构化依赖告警。

文件构成

13 个文件 · 6923 行
Markdown 10 个文件 · 5899 行JavaScript 3 个文件 · 1024 行
需关注文件 · 9
scripts/health-check.md Markdown · 947 行
https://www.typescriptlang.org/tsconfig/ · https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html
scripts/npm-workflow.md Markdown · 692 行
https://docs.npmjs.com/
scripts/yarn-workflow.md Markdown · 830 行
https://yarnpkg.com/ · https://yarnpkg.com/getting-started/migration · https://yarnpkg.com/features/pnp · https://yarnpkg.com/features/workspaces
scripts/bun-workflow.md Markdown · 682 行
https://bun.sh/docs · https://npm.mycompany.com/
scripts/bun-workflow.js JavaScript · 383 行
远程脚本管道执行 · shell执行能力未声明 · curl -fsSL https://bun.sh/install | bash · https://bun.sh/docs/runtime/bunfig · https://registry.myorg.com/ · https://bun.sh/install
scripts/pnpm-workflow.md Markdown · 695 行
curl -fsSL https://get.pnpm.io/install.sh | sh · https://get.pnpm.io/install.ps1 · https://get.pnpm.io/install.sh · https://npm.company.com/ · https://pnpm.io/cli/add · https://pnpm.io/workspaces · https://pnpm.io/benchmarks
references/integration-with-build-tools.md Markdown · 617 行
https://www.typescriptlang.org/docs/handbook/integrating-with-build-tools.html · https://vitejs.dev/guide/ · https://webpack.js.org/concepts/ · https://esbuild.github.io/ · https://turbo.build/repo/docs
assets/package-json-template.md Markdown · 523 行
https://yourwebsite.com · https://docs.npmjs.com/cli/v9/configuring-npm/package-json · https://nodejs.org/api/packages.html · https://www.typescriptlang.org/docs/handbook/module-resolution.html
SKILL.md Markdown · 308 行
声明能力与实际行为不符
其他文件 · health-check.js · npm-workflow.js · package-manager-comparison.md

安全亮点

无凭证访问或窃取行为
无数据外泄或C2通信
代码结构清晰,包含内建测试
无恶意混淆或Base64编码执行
依赖第三方安全工具进行审计和检查