T09 · Insecure Skill Coding Practices
- Location
scripts/mx_self_select.py:154- Finding
Spreadsheet Formula Injection in Exported CSV Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears purpose-built for Eastmoney watchlist management, but it can immediately change account-linked financial watchlist data from natural-language input without confirmation.
Review before installing if you use this with a real Eastmoney account. Only run add/delete commands when you intend to change your watchlist, prefer setting MX_APIKEY through a trusted environment rather than a .env file, and treat generated CSV/raw JSON files as account-related data.
scripts/mx_self_select.py:154Spreadsheet Formula Injection in Exported CSV Data
scripts/requirements.txt:1Unbounded and Unlocked Third-Party Dependency
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
try:
response = requests.post(QUERY_URL, headers=headers, json={}, timeout=30)
response.raise_for_status()
return response.json()
except Exception as e:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
try:
response = requests.post(MANAGE_URL, headers=headers, json=data, timeout=30)
response.raise_for_status()
return response.json()
except Exception as e:
Falling back to reading a plaintext .env file for an API key increases the risk of credential exposure through accidental commits, weak filesystem permissions, shared workspaces, or container/image leakage. While common in development, it is a credential-handling weakness in a skill that accesses a user account and performs remote actions on that account.
apikey = os.environ.get("MX_APIKEY", "")
if not apikey:
# 尝试从.env文件读取
env_file = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".env")
if os.path.exists(env_file):
try:
with open(env_file, "r") as f:
The skill advertises capabilities that involve environment-variable access, file output, and external network requests, but it does not declare any explicit tool scope or permissions boundary. This weakens reviewability and least-privilege enforcement, increasing the chance that an agent runtime grants broader access than users expect when handling account-linked watchlist data and API credentials.
The manifest description and usage instructions are entirely in Chinese and explicitly describe operation through natural-language queries, but they do not state that the skill is Chinese-only or offer any language choice. This can violate a language/locale policy when users are not given opt-in or an alternative locale.
The skill transmits user commands and an API credential to a remote service but does not provide an explicit user-facing notice at execution time that data will leave the local environment. In a tool/agent context, this can create privacy and consent issues because natural-language inputs may contain more information than the user realizes will be sent upstream.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(QUERY_URL, headers=headers, json={}, timeout=30)
response.raise_for_status()
return response.json()
except Exception as e:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(MANAGE_URL, headers=headers, json=data, timeout=30)
response.raise_for_status()
return response.json()
except Exception as e:
The skill performs state-changing add/delete watchlist operations immediately based on CLI input or natural-language text, without confirmation, dry-run, or explicit acknowledgement. In an agent setting, ambiguous prompts, prompt injection in upstream context, or user misunderstanding could cause unintended portfolio/watchlist modifications.
SKILL.md 在配置与前置要求中多次声明应使用环境变量 MX_APIKEY,但安全注意事项又写成 EASTMONEY_APIKEY。这会让技能声明的使用方式与文档中的安全说明发生直接冲突,属于文档意图层面的矛盾。
The dependency is specified as requests>=2.31.0 without an upper bound or exact pin, which makes builds non-reproducible and can silently introduce vulnerable or incompatible versions over time. In a skill that interacts with account-backed data and external services, dependency drift increases supply-chain risk and makes security posture unverifiable.
requests>=2.31.0
Because requests is not pinned, it is impossible to verify whether the installed version includes fixes for known advisories affecting that package. This uncertainty is especially relevant here because the skill appears to access account and market data, so any vulnerable HTTP client behavior could affect credential handling, request integrity, or data exposure depending on the runtime version resolved.
No suspicious patterns detected.