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 Why this conclusion was reached
2/4 dimensions flaggedDeclared resources and inferred behavior are broadly aligned.
1 high-risk artifacts or egress signals were extracted.
The report includes 0 attack-chain steps and 2 severe findings.
3 dependency or supply-chain issues need attention.
What drove the risk score up
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
Most important evidence
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 Declared capability vs actual capability
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) Suspicious artifacts and egress
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
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| playwright | * | pip | No | No version pinned — SKILL.md says 'pip install playwright' without version |
| requests | * | pip | No | No version pinned — SKILL.md says 'pip install requests' without version |
| node | * | system | No | No Node.js package.json dependencies declared |
File composition
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