T03 · Remote Payload Retrieval and Execution
- Location
scripts/setup.sh:25- Finding
Installer retrieves and executes mutable code outside the audited package
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This stock-analysis skill has a coherent purpose, but its helper scripts can install and run mutable, unaudited code from GitHub and handle credentials and outbound reports with weak scoping.
Review before installing. Prefer using only the reviewed local package code, avoid running scripts/setup.sh or scripts/update.sh unless the upstream repository is pinned to a reviewed commit, and do not run the scripts as root. Put only least-privilege API keys and webhook credentials in config files, keep push.enabled false until you intentionally configure a channel, and remove any .env backup files that contain secrets. Treat any AI analysis and pushed reports as data shared with third-party services.
scripts/setup.sh:25Installer retrieves and executes mutable code outside the audited package
requirements.txt:2Open-ended dependency constraints allow unreviewed package versions to execute during installation
scripts/update.sh:20Credential-bearing configuration can be exposed through plaintext backups and missing ignore protection
The Gemini path reads HTTPS proxy settings directly from environment variables and uses them for outbound API calls. If the runtime environment is attacker-controlled or untrusted, requests containing prompts, stock data, and the API key-bearing request context can be routed through a malicious proxy, enabling interception or manipulation of transmitted data.
if proxy_url:
proxies = {'https': proxy_url, 'http': proxy_url}
response = requests.post(url, headers=headers, params=params, json=data, timeout=30, proxies=proxies)
response.raise_for_status()
result = response.json()
该描述明显高估了此代码片段的实际能力。代码文件自身注释即表明是“Agent 问股模块(简化版)”,核心行为是基于关键词的意图分类与静态模板/预置列表返回结果。虽然配置中包含 api_key、provider、model、base_url 等字段,但没有任何网络请求或LLM调用。所谓‘分析股票’也只是从问题中提取6位数字代码并返回提示‘使用 analyze_stock() 函数进行详细分析’,并未执行分析。代码也没有实现每日分析流程、复盘、仪表盘、推送、跨市场完整支持或技术面/基本面综合分析。因此,声明的系统级、完整版、LLM驱动、多能力描述与该代码片段的实际行为存在实质性不匹配。
声明描述的是一个完整的、多功能的股票分析系统,而给出的代码片段只是 fundamental.py 基本面分析子模块。该模块主要格式化A股代码,并通过 AkShare 拉取部分估值和资金流向数据;盈利、成长性、机构持仓仅返回“需配置 Tushare Token 获取详细数据”的占位信息,没有真正完成。代码没有出现LLM调用、技术面分析、港股/美股处理、仪表盘、复盘、板块分析、问答Agent或推送相关实现。因此,代码实际行为与声明的整体用途存在明显不匹配,属于声明远大于实际实现范围。
该代码块与声明存在明显的描述-行为不匹配。代码文件本身标注为“大盘复盘模块”,其核心功能是通过 akshare/yfinance 获取A股和美股主要指数数据、简单涨跌停统计,并格式化为文本报告。这属于声明中的一个子功能,但远不能支撑“完整版每日股票分析系统”的整体描述。尤其是港股支持、LLM驱动分析、Agent问股、技术面与基本面综合分析、板块分析、仪表盘和推送能力,在该代码中均未出现。虽然单个代码块可能只是整个系统的一部分,但就“所 supplied code chunk 实际做什么”而言,它明显比声明范围窄得多,且缺失多个关键宣称能力,因此应判定为不匹配。
声明描述的是一个功能完整、范围较广的股票分析系统,而提供的代码片段只是其中一个独立的技术分析器脚本。它只对单只股票的历史行情数据进行技术指标分析和交易信号生成,属于技术面子模块。代码没有显示任何LLM调用、外部数据源整合、基本面指标处理、市场级/板块级分析、交互式问股Agent、仪表盘展示或消息推送逻辑。因此,若将这段代码视为对整体技能能力的代表,则声明明显夸大,存在描述与实际行为不一致。
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
只输出 JSON,不要其他内容。"""
return prompt
def _parse_ai_response(self, text: str, tech: Dict[str, Any]) -> Dict[str, Any]:
"""解析 AI 响应"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 检查环境变量配置
if [ ! -f "$PROJECT_DIR/.env" ]; then
echo "❌ 错误: 未找到 .env 配置文件"
echo "请执行: cd $PROJECT_DIR && cp .env.example .env"
echo "然后编辑 .env 配置 API Key 和股票列表"
exit 1
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 检查环境变量配置
if [ ! -f "$PROJECT_DIR/.env" ]; then
echo "❌ 错误: 未找到 .env 配置文件"
echo "请执行: cd $PROJECT_DIR && cp .env.example .env"
echo "然后编辑 .env 配置 API Key 和股票列表"
exit 1
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 检查环境变量配置
if [ ! -f "$PROJECT_DIR/.env" ]; then
echo "❌ 错误: 未找到 .env 配置文件"
echo "请执行: cd $PROJECT_DIR && cp .env.example .env"
echo "然后编辑 .env 配置 API Key 和股票列表"
exit 1
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cd "$PROJECT_DIR"
# 备份当前配置
if [ -f ".env" ]; then
echo "→ 备份当前配置..."
cp .env .env.backup.$(date +%Y%m%d_%H%M%S)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cd "$PROJECT_DIR"
# 备份当前配置
if [ -f ".env" ]; then
echo "→ 备份当前配置..."
cp .env .env.backup.$(date +%Y%m%d_%H%M%S)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cd "$PROJECT_DIR"
# 备份当前配置
if [ -f ".env" ]; then
echo "→ 备份当前配置..."
cp .env .env.backup.$(date +%Y%m%d_%H%M%S)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cd "$PROJECT_DIR"
# 备份当前配置
if [ -f ".env" ]; then
echo "→ 备份当前配置..."
cp .env .env.backup.$(date +%Y%m%d_%H%M%S)
fi
Automatically copying .env creates an additional plaintext secret file, increasing the attack surface and the chance of accidental disclosure through backups, packaging, or misconfigured file permissions. In a stock-analysis skill, API keys or broker/data-provider credentials in .env could enable unauthorized access to financial data services or downstream integrations if the backup is exposed.
# 备份当前配置
if [ -f ".env" ]; then
echo "→ 备份当前配置..."
cp .env .env.backup.$(date +%Y%m%d_%H%M%S)
fi
# 拉取最新代码
This markdown file is written entirely in Chinese and provides no indication that users may choose another language or that the locale restriction is intentional and justified. Under the policy, language or locale constraints should be opt-in or clearly documented as region-specific.
The top-level description states the skill provides analysis and AI decision advice in Chinese, and the examples throughout the README use fixed Chinese output labels and recommendations. There is no indication that users can opt into another language or that the Chinese-only behavior is a justified region-specific requirement.
The README documents use of external AI and market-data integrations but does not clearly warn users that stock symbols, prompts, analysis context, and possibly configuration-derived metadata may be sent to third-party services. In a finance-related skill, that omission matters because users may assume analysis stays local while their watchlists or trading interests are disclosed externally.
The README explicitly configures a third-party API endpoint at api.deepseek.com, indicating data will leave the local environment. External transmission is not inherently malicious, but in this skill context it can expose stock symbols, prompts, or user strategy context to an outside provider without sufficiently prominent disclosure or guidance on data minimization.
"ai": {
"provider": "openai",
"api_key": "sk-your-deepseek-key",
"base_url": "https://api.deepseek.com/v1",
"model": "deepseek-chat"
}
}
The skill advertises capabilities that inherently require sensitive operations such as network access, file access, environment secrets, and shell usage, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this increases the risk of over-privileged execution, unintended secret exposure, or arbitrary command/network activity if the runtime grants broad defaults.
The trigger phrases such as '股票分析', '每日分析', and '问股' are very broad and likely to activate during ordinary financial conversation. In an agent platform, overly broad triggers can cause accidental invocation of a skill with network access, data retrieval, or outbound push behavior, increasing the chance of unintended actions or data disclosure.
The skill prominently advertises multi-channel pushing to Feishu, WeChat, Telegram, Discord, and email, but it does not warn that generated reports or contextual data may be transmitted to third-party services. In agent settings, users may not realize that prompts, model outputs, stock lists, or other contextual information could leave the local environment, creating privacy and data-governance risk.
The configuration includes a third-party API endpoint for DeepSeek, which means prompts, analysis inputs, and possibly user-provided financial queries may be transmitted off-platform. External transmission is contextually expected for an AI-powered analysis skill, but it remains security-relevant because sensitive data may be sent to an external processor without explicit minimization, disclosure, or boundary controls.
"ai": {
"provider": "openai",
"api_key": "sk-your-deepseek-key",
"base_url": "https://api.deepseek.com/v1",
"model": "deepseek-chat"
},
"data": {
This code defines the agent description and all user-facing interactions in Chinese only, with no opt-in or fallback for other languages. That creates a natural-language policy concern when a skill forces a specific language without giving the user a choice or documenting a justified locale restriction.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
self.provider = config.get('provider', 'openai')
self.api_key = config.get('api_key', '')
self.model = config.get('model', 'deepseek-chat')
self.base_url = config.get('base_url', 'https://api.deepseek.com/v1')
self.temperature = config.get('temperature', 0.3)
self.max_tokens = config.get('max_tokens', 4096)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
self.provider = config.get('provider', 'openai')
self.api_key = config.get('api_key', '')
self.model = config.get('model', 'deepseek-chat')
self.base_url = config.get('base_url', 'https://api.deepseek.com/v1')
self.temperature = config.get('temperature', 0.3)
self.max_tokens = config.get('max_tokens', 4096)