xhs-monitor
合法的小红书竞品监控爬虫工具,功能与声明基本一致,存在轻微文档-代码差异(stealth插件未正确使用、目录结构不符),无恶意行为。
为什么得出这个结论
0/4 个维度触发声明资源与推断能力基本一致。
提取到 5 个一般风险产物,需要结合上下文判断。
没有形成明确的恶意路径。
发现 3 项需要关注的依赖或供应链线索。
风险分是怎么被拉高的
scraper.js 第7行 require('puppeteer-extra') 和第10行 puppeteerExtra.use(StealthPlugin()),但实际启动用的是 puppeteerCore.launch() 而非 puppeteerExtra.launch(),属于阴影功能痕迹
SKILL.md 声称文件在 src/ 子目录下,但所有 .js 文件实际位于根目录
puppeteer-extra 和 puppeteer-core 无版本锁定,存在供应链风险
最关键的证据
Stealth 反爬插件引用但未实际使用
scraper.js 加载了 puppeteer-extra 和 stealth 插件并调用 puppeteerExtra.use(StealthPlugin()),但启动浏览器用的是 puppeteerCore.launch() 而非 puppeteerExtra.launch(),导致 stealth 功能从未生效。这是代码残留或阴影功能痕迹。
scraper.js:10 文档目录结构与实际文件布局不符
SKILL.md 中的「项目结构」章节声称文件位于 src/ 子目录下(如 src/main.js、src/scraper.js),但实际上所有 .js 文件均位于项目根目录。
SKILL.md:73 puppeteer-extra 和 puppeteer-core 无版本锁定
package.json 中 puppeteer-extra 和 puppeteer-core 的版本为 *(无锁定),攻击者可能通过供应链投毒植入恶意代码。
SKILL.md:18 本地 shell 执行未在文档中声明
scheduler.js:27 通过 child_process.spawn('node', ...) 执行本地 main.js,run.sh 也执行 shell 命令,但 SKILL.md 未声明 shell:WRITE 能力。
scheduler.js:27 声明能力 vs 实际能力
dedupe.js:23 — 写入 ../data/history.csv scraper.js:183 — 访问 xiaohongshu.com;notify.example.js — 访问 feishu API scraper.js:175 — puppeteerCore.launch() 创建无头浏览器 scheduler.js:27 — spawn('node', [mainPath]);run.sh:41 — node main.js scraper.js:13 — process.env.CHROMIUM_PATH;run.sh:11 — XHS_DATA_DIR 可疑产物与外联
https://www.xiaohongshu.com/user/profile/用户ID1 SKILL.md:83
https://www.xiaohongshu.com/user/profile/用户ID2 SKILL.md:84
https://www.xiaohongshu.com/ SKILL.md:98
https://www.xiaohongshu.com/user/profile/小红书用户ID config.example.js:20
https://www.xiaohongshu.com/user/profile/ config.js:12
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| puppeteer-core | 未指定 | npm | 否 | 无版本锁定,建议锁定版本 |
| puppeteer-extra | 未指定 | npm | 否 | 无版本锁定,被引用但未正确使用 |
| puppeteer-extra-plugin-stealth | 未指定 | npm | 否 | 无版本锁定,被引用但未正确使用 |
文件构成
scraper.js SKILL.md scheduler.js config.js config.example.js