xhs-crawler
Hardcoded Feishu App Secret exposed in both source code and SKILL.md documentation, plus unpinned Python dependencies with no network isolation, constitute undeclared sensitive credential exposure and dependency supply chain risk.
FEISHU_APP_ID='cli_a924d921ce7a9cbd' and FEISHU_APP_SECRET='5QG92Lp8kvhAkgpPJTd57fIxshnCebEt' are hardcoded in config.py lines 89-90. SKILL.md lines 64-67 reproduce the exact same credentials in a documentation example block, meaning anyone with repo access or who receives this skill sees the live credentials. This creates a credential-leak blast radius: the Feishu bot can send messages to any group the bot has been added to.
config.py:89 为什么得出这个结论
2/4 个维度触发声明资源与推断能力基本一致。
提取到 1 个高危 IOC 或外联信号。
报告包含 0 步攻击链,另有 2 项高危或严重发现。
发现 3 项需要关注的依赖或供应链线索。
风险分是怎么被拉高的
FEISHU_APP_ID and FEISHU_APP_SECRET hardcoded in config.py (lines 89-90); SKILL.md (lines 64-67) reproduces them verbatim in documentation
SKILL.md exposes real Feishu App Secret in example config block, which constitutes a credential leak to anyone with read access to the repo/skill
package.json has no dependencies at all; Python has no requirements.txt — pip install without version pinning allows dependency confusion and supply-chain substitution attacks
index.js:runPythonScript uses child_process.exec() to invoke python with arbitrary command arguments, declared purpose but broad surface
最关键的证据
Feishu App Secret hardcoded and documented
FEISHU_APP_ID='cli_a924d921ce7a9cbd' and FEISHU_APP_SECRET='5QG92Lp8kvhAkgpPJTd57fIxshnCebEt' are hardcoded in config.py lines 89-90. SKILL.md lines 64-67 reproduce the exact same credentials in a documentation example block, meaning anyone with repo access or who receives this skill sees the live credentials. This creates a credential-leak blast radius: the Feishu bot can send messages to any group the bot has been added to.
config.py:89 No dependency pinning — supply chain risk
package.json has empty dependencies {}; no requirements.txt exists. SKILL.md instructs 'pip install playwright requests' without version pins. This allows dependency confusion attacks or a malicious future release of a transitive dependency to be silently installed.
package.json:9 Node.js exec() with arbitrary command injection surface
index.js:runPythonScript builds a shell command string with user-supplied keyword passed directly into exec(). While the keyword is URI-component free in the current code flow, a future change could introduce injection. The command also uses a 2-minute timeout and 10MB buffer which are appropriate.
index.js:122 Chrome profile directory stored in user home
XHS_USER_DATA_DIR defaults to Path.home() / 'xhs_chrome_profile', meaning the skill stores browser session data under the user's home directory. This is necessary for cookie persistence but expands the blast radius if the profile is compromised.
config.py:18 Pre-scan false positive: IP address misidentified
The pre-scan flagged '143.0.0.0' at config.py:50 as a hardcoded IP. This is actually the Chromium browser version number (143.0.0.0) embedded in the User-Agent string, not a network IP address. No malicious IP C2 indicator.
config.py:46 声明能力 vs 实际能力
cookie_manager.py writes cookie.txt; logs/xhs_crawler.log created; all within skill project directory requests to xiaohongshu.com (search API + browser), open.feishu.cn (Feishu OpenAPI); all legitimate service calls documented in SKILL.md index.js uses child_process.exec() to run python script; python itself uses playwright (browser) subprocess config.py reads no env vars; but feishu_app_bot.py sends App ID/Secret in POST body to feishu API (acceptable OAuth flow) 可疑产物与外联
143.0.0.0 config.py:50
https://www.xiaohongshu.com/explore auto_login_with_qrcode.py:96
https://edith.xiaohongshu.com/api/sns/web/v1/search/notes config.py:30
https://edith.xiaohongshu.com/api/sns/web/v1/feed config.py:31
https://www.xiaohongshu.com config.py:40
https://www.xiaohongshu.com/ config.py:43
https://www.xiaohongshu.com/user/profile cookie_manager.py:82
https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal feishu_app_bot.py:67
https://open.feishu.cn/open-apis/im/v1/messages feishu_app_bot.py:109
https://open.feishu.cn/open-apis/im/v1/images feishu_app_bot.py:222
https://open.feishu.cn/open-apis/im/v1/chats feishu_app_bot.py:368
https://www.xiaohongshu.com/explore/ xhs_crawler.py:181
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| playwright | * | pip | 否 | No version pinned — SKILL.md says 'pip install playwright' without version |
| requests | * | pip | 否 | No version pinned — SKILL.md says 'pip install requests' without version |
| node | * | system | 否 | No Node.js package.json dependencies declared |
文件构成
feishu_app_bot.py xhs_crawler.py auto_login_with_qrcode.py cookie_manager.py xhs_search_with_browser.py 使用文档.md index.js config.py