T09 · Insecure Skill Coding Practices
- Location
prompts/monitor.md:21- Finding
Shell Command Injection Through Unsanitized Prompt Variables
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This brand-monitoring skill is mostly purpose-aligned, but it needs Review because it combines shell execution, external data sharing, persistent memory, scheduled recurring runs, and credential-like examples with incomplete safeguards.
Install only if you are comfortable sending monitored brand queries to SerpAPI and reports to Feishu, and review the prompts before use. Use a non-privileged account, avoid system-wide timers unless necessary, replace any webhook-shaped examples, store API keys in a proper secret store, and require confirmation before external alerts or memory writes.
prompts/monitor.md:21Shell Command Injection Through Unsanitized Prompt Variables
prompts/monitor.md:104Untrusted Web Content Can Be Persisted Into Agent Memory
crawler/requirements.txt:1Unpinned Dependencies Are Installed With Package Build Execution Enabled
README.md:211System-Level Scheduled Persistence Exceeds the Minimum Privilege Required
获取飞书Webhook指南.md:57Concrete Feishu Webhook Credential Is Hard-Coded in Documentation
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
��
### 2. 安装依赖
```bash
cd brand-monitor-skill
chmod +x install.sh
./install.sh
访问 https://serpapi.com/ 注册并获取免费 API Key
# Linux/macOS
export SERPAPI_KEY='your_api_key_here'
echo 'export SERPAPI_KEY="your_api_key_here"' >> ~/.bashrc
source ~/.bashrc
# Windows (PowerShell)
$env:SERPAPI_KEY='your_api_key_here'
cp config.example.json config.json
nano config.json
最小配置:
{
"brand_name": "理想汽车",
"feishu_webhook": "https://open.feishu.cn/open-apis/bot/v2/hook/你的webhook"
}
# 测试爬虫(Mock 模式,无需 API Key)
cd crawler
python search_crawler_serpapi.py "理想汽车" "weibo,zhihu" 5 24 --mock
# 测试真实搜索(需要 API Key
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
��
### 2. 安装依赖
```bash
cd brand-monitor-skill
chmod +x install.sh
./install.sh
访问 https://serpapi.com/ 注册并获取免费 API Key
# Linux/macOS
export SERPAPI_KEY='your_api_key_here'
echo 'export SERPAPI_KEY="your_api_key_here"' >> ~/.bashrc
source ~/.bashrc
# Windows (PowerShell)
$env:SERPAPI_KEY='your_api_key_here'
cp config.example.json config.json
nano config.json
最小配置:
{
"brand_name": "理想汽车",
"feishu_webhook": "https://open.feishu.cn/open-apis/bot/v2/hook/你的webhook"
}
# 测试爬虫(Mock 模式,无需 API Key)
cd crawler
python search_crawler_serpapi.py "理想汽车" "weibo,zhihu" 5 24 --mock
# 测试真实搜索(需要 API Key
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
��
### 2. 安装依赖
```bash
cd brand-monitor-skill
chmod +x install.sh
./install.sh
访问 https://serpapi.com/ 注册并获取免费 API Key
# Linux/macOS
export SERPAPI_KEY='your_api_key_here'
echo 'export SERPAPI_KEY="your_api_key_here"' >> ~/.bashrc
source ~/.bashrc
# Windows (PowerShell)
$env:SERPAPI_KEY='your_api_key_here'
cp config.example.json config.json
nano config.json
最小配置:
{
"brand_name": "理想汽车",
"feishu_webhook": "https://open.feishu.cn/open-apis/bot/v2/hook/你的webhook"
}
# 测试爬虫(Mock 模式,无需 API Key)
cd crawler
python search_crawler_serpapi.py "理想汽车" "weibo,zhihu" 5 24 --mock
# 测试真实搜索(需要 API Key
声明描述总体方向与代码较为相关,确实是在做品牌相关的多平台搜索监控,面向微博、小红书、知乎、抖音等国内平台,并提取部分元数据。但仍存在实质不一致:第一,声明权限为空,而代码明确发起外部 HTTP 请求到 serpapi.com,并间接访问搜索引擎结果,这是未声明的网络访问能力;第二,代码依赖 SERPAPI_KEY 环境变量,涉及外部 API 凭据使用;第三,声明称“搜索、分析品牌提及情况”,但代码的核心实际是搜索、解析、过滤和结构化输出,并没有明显的舆情分析逻辑(如情感分类、趋势判断、聚合分析等)。因此应判定为存在描述-行为不匹配。
代码的实际功能与声明目的存在明显不一致。声明描述的是一个面向新能源汽车品牌的舆情监控能力,但该代码块只是一个用于发布该技能的运维/打包脚本。它不抓取国内平台内容、不搜索品牌提及、不做情感分析或趋势分析,也没有任何监控逻辑。虽然脚本中提到了与品牌监控相关的文件名和发布说明文本,但这些只是围绕项目发布的辅助内容,不等于实现了舆情监控能力。因此应判定为描述与行为不匹配。
The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The skill uses 'network' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The skill instructs users to rely on SerpAPI for multi-platform monitoring without clearly warning that search terms, monitored brand names, and related queries are sent to an external search provider. In a monitoring context, those queries may reveal commercial strategy, investigations, or sensitive reputation concerns to a third party.
The README promotes automatic Feishu push notifications but does not clearly disclose that monitored content, summaries, and potentially sensitive brand intelligence will be transmitted to Feishu, a third-party service. This can create an unintentional data-sharing/privacy risk, especially if monitored results include confidential internal watchlists, crisis reports, or personal data from collected content.
The release notes instruct users to configure a Feishu webhook and describe monitoring and analysis of third-party brand mentions, but they do not clearly warn that collected content, summaries, or metadata may be transmitted to external services such as SerpAPI and Feishu. For a sentiment-monitoring skill that processes social-platform content, this omission can cause operators to unknowingly share potentially sensitive or regulated data outside their environment.
The description is written as a China-specific monitoring solution focused on domestic platforms, and the skill content is entirely in Chinese without offering a language or locale choice. This can be a language/locale policy issue when a skill implicitly forces one language or regional scope for all users without documenting it as an opt-in or justified regional specialization.
The activation phrases are broad business-language triggers such as '执行品牌监控' and '分析品牌趋势', which can match normal conversation and cause the skill to activate unexpectedly. Because the skill can perform network collection and send results outward via webhook, accidental activation increases the chance of unintended data gathering or transmission.
The skill requires a Feishu webhook and states reports will be pushed there, but the description does not present a strong user-facing warning that monitored content and analysis results are transmitted to an external endpoint. This is dangerous because users may trigger collection of sensitive business intelligence, complaints, or personal data without understanding that it will be exfiltrated outside the local environment.
This manifest-style JSON defines wide monitoring across multiple public platforms and a 24-hour monitoring window, but it does not specify clear activation boundaries, narrowing conditions, or negative examples for when the skill should not run. The limited exclude_keywords list does not fully clarify scope, which could lead to overly broad or unintended invocation/monitoring behavior.
The configuration includes an external Feishu webhook endpoint, creating a built-in path for monitored content and analysis results to be transmitted off-system. In a brand-monitoring skill that aggregates potentially sensitive business intelligence or user-generated content, silent outbound delivery increases the risk of unintended data disclosure, misrouting, or exfiltration if operators do not clearly understand what is being sent.
The document promotes sending brand-monitoring queries through SerpAPI but does not disclose that search terms, target platforms, and potentially operational metadata will be transmitted to a third-party service. In a monitoring skill, those queries may reveal business interests, monitored entities, or internal investigation targets, creating privacy and confidentiality risk.
The guide instructs users to persist a live API key in shell startup files, which increases the chance of credential exposure through dotfile syncing, backups, shared accounts, shell history, or accidental commits. While common in developer docs, presenting this without any warning that the key is sensitive or suggesting safer secret storage is a real security weakness.
The module description, CLI help, and status/error messages are written in Chinese, and the code also forces hl='zh-cn' for Baidu searches. This imposes a specific language/locale behavior without user opt-in or documentation that the skill is intentionally limited to a Chinese-language context.
When DEBUG is set, the code prints up to 2000 characters of the raw SerpAPI JSON response to stderr. Search results may contain sensitive query terms, personal data in snippets, or account metadata, and stderr is commonly captured by centralized logs where operators or other tenants may access it unexpectedly.
All prompts, status messages, and usage guidance in the installer are written in Chinese, including the suggested agent command text. For a general-purpose skill, this imposes a specific language/locale on users without opt-in, which matches the language-policy violation criteria.
The user-facing comments and console output are entirely in Chinese, which effectively imposes a specific language on all users of the script. There is no opt-in, fallback language, or documentation indicating that the skill is intentionally limited to Chinese-speaking users or a specific region.
The script deletes the release staging directory with rm -rf before recreating it, which is a destructive filesystem operation. Although progress messages are printed, there is no warning that existing contents at that path will be removed, no confirmation prompt, and no comment/docstring disclosing the destructive behavior.
The prompt extends a monitoring skill into operational response by instructing the agent to push alerts, notify stakeholders, and create follow-up tasks automatically. This is dangerous because it enables real-world actions beyond analysis without explicit authorization gates, increasing the risk of unwanted mass notifications, workflow disruption, or accidental escalation based on noisy or incorrect detections.
The skill instructs immediate transmission of monitored content, usernames, account metadata, and potentially sensitive incident details to external systems like Feishu and SMS, including broad notifications such as @all, without any consent or warning. This creates privacy and data-governance risk and can amplify harm by disseminating inaccurate, defamatory, or sensitive user-generated content to large internal audiences.
No suspicious patterns detected.