risk-analysis
Skill declares video/image risk analysis but contains undeclared MySQL database connectivity with hardcoded credentials, fallback hardcoded JWT tokens in source code, and connects to an internal IP (172.31.16.2) — all missing from SKILL.md documentation.
The file skills/scripts/common/config.yaml contains a hardcoded database connection string with plaintext username 'admin' and password 'Smyx2025@db' pointing to internal IP 172.31.16.2. These credentials are not read from environment variables and are present in the skill package.
skills/scripts/common/config.yaml:4 为什么得出这个结论
3/4 个维度触发发现 2 项声明之外的能力或越权行为。
提取到 1 个高危 IOC 或外联信号。
报告包含 0 步攻击链,另有 4 项高危或严重发现。
发现 7 项需要关注的依赖或供应链线索。
风险分是怎么被拉高的
SKILL.md does not mention database:WRITE; skills/scripts/common/dao.py connects to MySQL via SQLAlchemy with no mention in docs
skills/scripts/common/config.yaml exposes admin:Smyx2025@[email protected]; config-dev.yaml exposes remoteuser with special-char password
Feishu app-id and app-secret hardcoded in config.yaml (cli_a93d769369badcb1 / zYJMyYcB4kIF5uPCwFACBdmvbr3JkK8r)
util.py:217 contains hardcoded JWT bearer tokens as fallback in _get_or_create_user exception handler
172.31.16.2 hardcoded as database host; connects to internal infrastructure without declaration
requirements.txt has unpinned versions across ~90 packages
最关键的证据
Hardcoded MySQL credentials in config.yaml
The file skills/scripts/common/config.yaml contains a hardcoded database connection string with plaintext username 'admin' and password 'Smyx2025@db' pointing to internal IP 172.31.16.2. These credentials are not read from environment variables and are present in the skill package.
skills/scripts/common/config.yaml:4 Hardcoded Feishu app credentials in config.yaml
Feishu (Lark) application ID and secret are hardcoded in config.yaml (feishu-app--id: cli_a93d769369badcb1, feishu-app--secret: zYJMyYcB4kIF5uPCwFACBdmvbr3JkK8r). If compromised, these could be used to send messages via the organization's Feishu workspace.
skills/scripts/common/config.yaml:10 Hardcoded JWT bearer tokens in exception handler fallback
util.py contains a _get_or_create_user() function with a hardcoded JWT token as a fallback in the exception handler (line ~217). While commented, the token structure (eyJ... base64) is readable and could be activated if the exception path is taken.
skills/scripts/common/util.py:217 Undeclared MySQL database connectivity — SKILL.md mismatch
SKILL.md declares only filesystem:READ and network:READ for video/image analysis. However, the skill's dao.py connects to MySQL (database:WRITE) via SQLAlchemy using hardcoded credentials from config.yaml. This database access is completely absent from the SKILL.md documentation.
skills/scripts/common/dao.py:58 No dependency version pinning in requirements.txt
requirements.txt contains ~90 packages with unpinned versions (e.g., requests>=2.28.0, opencv-python>=4.5.5, numpy>=1.21.0, pillow>=9.0.0). This allows any version including vulnerable ones to be installed.
requirements.txt:1 Undeclared environment variable reading for user identity
The skill reads OPENCLAW_SENDER_OPEN_ID, OPENCLAW_SENDER_USERNAME, and FEISHU_OPEN_ID from os.environ to identify the user without declaring this in SKILL.md. This constitutes undeclared environment:READ access for user identity mapping.
skills/scripts/common/config.py:178 User token storage in external MySQL database — undeclared data sink
The dao.py User model stores user tokens (token, open_token fields) in an external MySQL database (172.31.16.2). The skill reads and writes these tokens during user authentication flows. The data destination (external MySQL) is not declared in SKILL.md.
skills/scripts/common/dao.py:232 Internal network IP (172.31.16.2) hardcoded
An internal VPC IP address (172.31.16.2) is hardcoded as the MySQL database host. While this limits direct external exploitability, it exposes internal infrastructure topology and could be weaponized in a lateral movement scenario.
skills/scripts/common/config.yaml:4 声明能力 vs 实际能力
SKILL.md: scripts/risk_analysis.py reads local files with os.path.exists, os.path.getsize SKILL.md does not declare network:WRITE; risk_analysis.py sends POST requests to external APIs; util.py POSTs to multiple external health APIs; dao.py connects to MySQL on 172.31.16.2 SKILL.md declares no database access; dao.py uses SQLAlchemy to connect to MySQL at 172.31.16.2:3306 with hardcoded credentials No subprocess/shell execution found config.py reads ALERT_FEISHU_WEBHOOK, RISK_ANALYSIS_API_KEY, RISK_ANALYSIS_API_URL; util.py reads OPENCLAW_SENDER_OPEN_ID, OPENCLAW_SENDER_USERNAME, FEISHU_OPEN_ID No clipboard access found No browser access found No dynamic skill invocation found 可疑产物与外联
172.31.16.2 skills/scripts/common/config.yaml:4
https://open.lifeemergence.com/smyx-open-api scripts/config.py:56
http://livemonitortest.lifeemergence.com/smyx-open-api skills/scripts/common/config-dev.yaml:4
https://healthtest.lifeemergence.com/jeecg-boot skills/scripts/common/config-dev.yaml:5
http://192.168.1.234:8080/jeecg-boot skills/scripts/common/config-dev.yaml:6
https://lifeemergence.com/jeecg-boot skills/scripts/common/config.yaml:6
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| requests | >=2.28.0 | pip | 否 | Version not pinned — minimum declared is 2.28.0, latest 2.32.5 may be installed |
| opencv-python | >=4.5.5 | pip | 否 | Version not pinned |
| numpy | >=1.21.0 | pip | 否 | Version not pinned |
| pillow | >=9.0.0 | pip | 否 | Version not pinned |
| SQLAlchemy | 2.0.46 | pip | 否 | Exact pinned version present in requirements.txt |
| PyMySQL | 1.1.2 | pip | 否 | Exact pinned version |
| pydash | 8.0.6 | pip | 否 | Exact pinned version; used for response extraction |
文件构成
skills/scripts/common/dao.py skills/scripts/common/util.py skills/scripts/common/config.py requirements.txt scripts/config.py skills/scripts/common/config.yaml skills/scripts/common/config-dev.yaml