Back to skill

Security audit

Hotspot Aggregator

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a hotspot-reporting tool, but it needs review because it persists third-party content into agent memory and includes misleading report analysis.

Install only if you are comfortable with a Chinese-language hotspot tool that may contact external platforms when real API mode is enabled and that stores fetched content in agent memory. Treat generated reports as untrusted data, review them before using them for agent decisions, avoid enabling cron until the write path and retention are acceptable, and do not rely on the built-in trend percentages as real analytics.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
scripts/generate-report.sh:8
Finding

Untrusted Remote Content Is Persisted in Agent Memory Without Sanitization

Content
View full analysis
/dev/null else curl -s --max-time 10 "$url" -o "$output" 2>/dev/null fi } ``` For example, the Weibo response is transformed without validating or sanitizing the remote title: ```bash # scripts/fetch-hotspots.sh:48-58 if [[ "$USE_REAL_API" == "true" ]]; then # 尝试真实API(需要代理或特殊处理) local url="https://weibo.com/ajax/side/hotSearch" if fetch_url "$url" "$output.tmp"; then # 解析真实数据 if jq -e '.ok' "$output.tmp" > /dev/null 2>&1; then jq '[.data.realtime[] | {rank: .rank, title: .word, heat: .realpos, tag: .icon_desc}] | {platform: "weibo", date: "'$DATE'", time: "'$TIME'", data: .}' "$output.tmp" > "$output" rm -f "$output.tmp" log_info "微博热搜(真实数据)已保存" return fi fi ``` The same pattern is used for Baidu, Zhihu, and the third-party Douyin endpoint at `scripts/fetch-hotspots.sh:97-106`, `146-155`, and `195-204`. The report generator then renders remote titles verbatim: ```bash # scripts/generate-report.sh:25-41 generate_weibo_section() { local latest_file=$(ls -t "$DATA_DIR"/weibo_${DATE}_*.json 2>/dev/null | head -1) if [[ -z "$latest_file" ]]; then echo "⚠️ 未找到微博热搜数据" return fi echo "## 📱 微博热搜 TOP10" echo "" jq -r '.data[] | "\(.rank). \(.title) 🔥 \(.heat | tostring)热度"' "$latest_file" | head -10 echo "" } ...[truncated 3176 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

代码与描述在“热点聚合抓取”这一核心方向上基本一致:它确实会从微博、百度、知乎、抖音获取热榜数据,或在失败时写入模拟数据,并落盘为 JSON 文件。但声明中强调的“自动生成每日热点报告”“支持关键词订阅推送”在这段代码中完全没有体现;也没有定时调度、筛选订阅词、消息发送或报告生成逻辑。代码的实际职责更像是底层数据采集脚本,而不是完整的一站式监控与推送系统。因此描述对该代码块的能力有明显夸大,构成不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs users to run multiple shell scripts and use cron, but it does not declare any tool scope or allowed shell capabilities. This weakens least-privilege controls and can let an agent execute broader shell actions than users or the platform expect, especially when combined with network access and filesystem writes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The user-facing description, trigger phrases, examples, and operational instructions are entirely in Chinese, and the skill does not state that it is China-specific or provide an opt-in language choice. This can violate a language/locale policy when a skill implicitly forces one language for all users without explanation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list includes broad everyday terms such as '热点', '热搜', '舆情', and '内容监控', which can cause unintended activation in normal conversations. Accidental invocation is risky here because the skill can lead to shell script execution, external network requests, and report generation without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill interacts with external and third-party data sources, including platform APIs and a listed third-party aggregation API, but the skill description does not clearly warn users that requests and possibly keywords may be sent off-platform. This creates transparency and privacy risks, especially for subscription keywords that may contain sensitive brand, project, or personal monitoring terms.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list contains broad, common terms such as "热点", "热搜", and "舆情" that are likely to appear in ordinary user requests beyond the intended scope of this skill. This increases the chance of unintended invocation, causing the agent to route unrelated conversations into this skill and potentially execute downstream scripts or data-fetching behavior the user did not explicitly request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

This shell script automatically executes fetch-hotspots.sh all when the data directory is empty. Although there is a brief log message on L65, it does not disclose what the invoked script may do, such as network access or writing data, so users are not meaningfully warned before a potentially safety-relevant operation occurs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's comments and runtime messages are written in Chinese, and the banner/log output later in the file continues this fixed-language behavior. Under the policy, forcing a specific language without offering a user choice or documenting a justified region-specific constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

User-facing log messages such as status updates and errors are emitted in Chinese throughout the script, which constrains interaction to a single language. There is no visible mechanism for the user to select another language or any documented justification for the locale restriction.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

When USE_REAL_API=true, the script sends outbound requests to a third-party aggregation service and writes returned content to disk with minimal trust validation. This expands the data exposure and supply-chain trust boundary: operators may unknowingly rely on an unaffiliated service, and manipulated or unreliable responses could taint downstream reports or workflows.

Content

Scanner excerpt · scripts/fetch-hotspots.sh (reported line 181)May include surrounding context.

sh
if [[ "$USE_REAL_API" == "true" ]]; then
        # 使用第三方聚合API
        local url="https://api.oioweb.cn/api/toutiao/douyinHot"
        if fetch_url "$url" "$output.tmp"; then
            if jq -e '.result' "$output.tmp" > /dev/null 2>&1; then
                jq '{platform: "douyin", date: "'$DATE'", time: "'$TIME'", source: "real", data: [.result[] | {rank: .index, title: .name, play_count: .hot, author: "热门创作者"}]} | .data |= .[:10]' "$output.tmp" > "$output"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's natural-language comments and runtime output are consistently in Chinese, with no indication that this is optional or region-specific. Under the stated policy, forcing a specific language without user opt-in is a locale-policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script presents the trend section as if it were derived from the day's collected hotspot data, but it emits hard-coded percentages and a fixed conclusion regardless of input. This can mislead users into making editorial, operational, or market decisions based on fabricated analytics, which is a security-relevant integrity issue for a monitoring/reporting skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

A language or locale policy issue exists when a skill forces a specific language without user opt-in. This README presents all operational instructions in Chinese and does not indicate that users may choose another language or that the scope is intentionally limited to Chinese-language users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file documents commands that fetch data from multiple external platforms and later recommends cron-based automation, which implies recurring network activity. While rate limits are mentioned, there is no explicit warning that using the skill will contact third-party services and may expose request metadata or configured subscription terms.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description field uses only Chinese text, which indicates a fixed language choice in the skill metadata. There is no accompanying indication that the skill is China-specific or that users can opt into this locale, so it may violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The package metadata presents the skill entirely in Chinese and labels it with a locale-specific category "chinese" (L26), but does not indicate that users can choose another language or that the locale restriction is optional. This can be a natural-language policy concern when a skill appears to assume a fixed language/locale without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's comments and console messages are written in Chinese throughout, which imposes a specific language on users without any opt-in or documented locale limitation. Under the policy, language-specific behavior should either offer a choice or clearly justify the locale restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This shell script can invoke another script to fetch data and then creates or overwrites a markdown report at a fixed path. Although it logs progress, the messages do not explicitly warn the user about the file write or the additional data-fetching side effect, and there is no confirmation prompt.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

This shell script's comments, usage text, and runtime messages are all presented in Chinese, including error and status output. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in or a documented justification.

Content

No source excerpt is available for this finding.