Back to skill

Security audit

花粉过敏指数权威发布

Security checks for vulnerabilities and agentic risk

Overview

This skill is broadly about the advertised weather and pollen WeCom push, but its bundled scripts use root-oriented settings and unsafe broad process/log handling that should be reviewed before installation.

Review this before installing. Use it only under a dedicated unprivileged account, remove the global pkill chrome cleanup, move logs out of /tmp into a protected directory, avoid sourcing arbitrary shell config for secrets, protect and rotate the WeCom webhook key, and do not rely on non-Beijing city support until the scripts are fixed.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/push_to_wecom_v4.sh:84
Finding

Overbroad Root-Level Termination of Browser Processes

Content
View full analysis
/dev/null || true # 统计僵尸进程 local zombie_count=$(ps aux | grep 'chrome.*' | grep -v grep | wc -l) if [ "$zombie_count" -gt 0 ]; then log "WARN" "发现 $zombie_count 个僵尸 chrome 进程,将彻底清理" fi # 彻底清理所有 agent-browser 相关进程 local chrome_count=$(ps aux | grep -E 'agent-browser|chrome.*agent-browser' | grep -v grep | wc -l) if [ "$chrome_count" -gt 0 ]; then log "INFO" "发现 $chrome_count 个旧浏览器进程,强制清理..." pkill -9 -f 'agent-browser' 2>/dev/null || true sleep 1 pkill -9 -f 'chrome' 2>/dev/null || true sleep 2 fi } ``` The script also establishes a root-oriented execution environment: ```bash export PATH="/root/.nvm/versions/node/v22.22.1/bin:/root/.local/share/pnpm:/root/.local/bin:/usr/local/bin:/usr/bin:/bin:$PATH" export HOME="/root" ``` ### Technical Analysis The cleanup function does not restrict termination to the browser process or session created by the current script. In particular, `pkill -9 -f 'chrome'` matches every Chrome process visible to the executing account. The script sets `HOME` to `/root` and is designed for cron execution, so it may operate with root privileges. Although `AGENT_BROWSER_SESSION` is defined, the cleanup logic does not use that identifier to select processes. It instead relies on broad command-line substring matching and sends `SIGKILL`, preventing graceful shutdown or state recovery. This violates least-privilege and process-ownership boundaries. It can disrupt unrelated users, agents, browser automation tasks, monitoring jobs, or interactive browser se ...[truncated 1109 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/push_to_wecom_v4.sh:29
Finding

Symlink-Unsafe Predictable Log Files in a World-Writable Directory

Content
View full analysis
> "$LOG_FILE" if [ "$level" = "ERROR" ]; then echo "[$timestamp] [$level] $message" >> "$ERROR_LOG_FILE" fi } ``` ### Technical Analysis The scripts use fixed filenames directly under `/tmp`, which is normally writable by every local user. Before appending data, the code does not: - Securely create the files. - Check whether either path is a symbolic link. - Verify file ownership or permissions. - Use a private directory. - Set a restrictive `umask`. - Open files with protections equivalent to `O_NOFOLLOW`. A local attacker can pre-create `/tmp/pollen-push.log` or `/tmp/pollen-push-error.log` as a symbolic link to another file. When the script subsequently runs with elevated privileges, shell redirection follows the link and appends log content to the target. The content partly depends on runtime values such as city names, weather responses, remote API responses, and errors. This can permit attacker-influenced text to be written to an unintended privileged file. ### Attack Path 1. A local attacker identifies that the scheduled task runs as root. 2. Before execution, the attacker creates a symbolic link: ```bash ln -s /path/to/privileged/target /tmp/pollen-push.log ``` 3. The privileged task invokes `log`. 4. The shell evaluates: ```bash echo "..." >> /tmp/poll ...[truncated 715 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/push_to_wecom_v4.sh:53
Finding

WeCom Webhook Secret Exposed Through Process Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/push_to_wecom_v3.sh:76
Finding

Unsafe Shell Evaluation and Inherited PATH in Root-Oriented Scripts

Content
View full analysis
/dev/null) if [ $? -eq 0 ] && [ -n "$result" ]; then echo "$result" return 0 fi retry=$((retry + 1)) log "WARN" "请求失败,重试 $retry/$max_retries" if [ $retry -lt $max_retries ]; then sleep 2 fi done return 1 } ``` The current caller uses a fixed literal: ```bash WEATHER=$(retry_request 'curl -s "wttr.in/Beijing?format=3"') ``` ### Technical Analysis `eval` parses its input as shell syntax. If a future caller passes user-controlled or remotely controlled content to `retry_request`, shell metacharacters, substitutions, redirections, or additional commands would execute with the script’s privileges. The currently reviewed calls use fixed command strings, so direct user-controlled command injection is not demonstrated in the present data flow. Nevertheless, the function is an unsafe execution sink and creates a high-consequence maintenance hazard in root-oriented scripts. The PATH assignment also appends the inherited `$PATH` rather than replacing it with a minimal trusted value. An executable absent from the explicitly listed directories could consequently be resolved from an attacker-influenced inherited directory. This risk depends on the execution environment and attacker control of that environment ...[truncated 1274 chars]
Remediation
View remediation
/dev/null) && [[ -n "$result" ]]; then printf '%s\n' "$result" return 0 fi ((retry++)) sleep 2 done return 1 } WEATHER=$(retry_request 3 curl -s "https://wttr.in/Beijing?format=3") ``` 3. Replace the inherited PATH with a fixed, minimal trusted PATH. 4. Use absolute paths for security-sensitive utilities where practical. 5. Validate all city, URL, and configuration inputs before use. 6. Add `set -u` and carefully applied `set -e` behavior after testing failure paths. 7. Run the task as a dedicated unprivileged user so that any future command-injection defect has reduced impact. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill description emphasizes user query capability, but the documented mechanics focus on backend fetch-and-push behavior and do not clearly implement interactive query logic. This mismatch is not code execution by itself, but it undermines informed consent about what the skill actually does and what external systems it contacts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill description emphasizes user query capability, but the documented mechanics focus on backend fetch-and-push behavior and do not clearly implement interactive query logic. This mismatch is not code execution by itself, but it undermines informed consent about what the skill actually does and what external systems it contacts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description emphasizes user query capability, but the documented mechanics focus on backend fetch-and-push behavior and do not clearly implement interactive query logic. This mismatch is not code execution by itself, but it undermines informed consent about what the skill actually does and what external systems it contacts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description emphasizes user query capability, but the documented mechanics focus on backend fetch-and-push behavior and do not clearly implement interactive query logic. This mismatch is not code execution by itself, but it undermines informed consent about what the skill actually does and what external systems it contacts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description emphasizes user query capability, but the documented mechanics focus on backend fetch-and-push behavior and do not clearly implement interactive query logic. This mismatch is not code execution by itself, but it undermines informed consent about what the skill actually does and what external systems it contacts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill description emphasizes user query capability, but the documented mechanics focus on backend fetch-and-push behavior and do not clearly implement interactive query logic. This mismatch is not code execution by itself, but it undermines informed consent about what the skill actually does and what external systems it contacts.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents shell-capable operations such as curl, openclaw cron add, agent-browser, and local file writes, but it does not declare any tool scope or allowed-tools boundary. This weakens least-privilege controls and can let a runtime grant broader capabilities than users or reviewers expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The scheduled push and logging features send content to an external channel and retain execution details locally, but the skill does not provide a clear user-facing disclosure about what data is transmitted, stored, for how long, and who can access it. Even if the data seems low sensitivity, operational metadata and recipient identifiers can still create privacy and compliance concerns.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 272)May include surrounding context.

md
### 安全建议

- 配置文件权限设置为 600:`chmod 600 ~/.openclaw/config/wecom.env`
- 不要将配置文件提交到 Git
- 定期更换 Webhook Key

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Comments and output strings indicate the skill is designed to operate only in Chinese, and the weather request explicitly sets lang=zh. There is no opt-in, language selection, or documented justification that this skill is intended only for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script loads WECOM_WEBHOOK_KEY from a local env file and uses it to construct an outbound webhook URL for Enterprise WeChat delivery. Although there are error messages, there is no disclosure comment or user-facing warning that the skill reads a sensitive secret and sends data to an external service.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says users can customize the city and query pollen concentration and weather for that city, but the script fetches weather only for Beijing and opens a Beijing pollen page without any parameterization. This is a semantic mismatch between the advertised capability and the implemented behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The script fetches weather data from wttr.in and later posts formatted content to the WeCom webhook endpoint. While these operations are core to the script, the file lacks an upfront notice that it contacts third-party services and transmits generated content off-host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The loop drives agent-browser to open richerculture.cn and snapshot page content for parsing, which is a networked data-collection action. The script has no user-facing warning or descriptive comment indicating that external web content will be fetched and processed automatically.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/push_to_wecom.sh (reported line 99)May include surrounding context.

sh
🐉 小龙提醒"

    # 发送错误消息
    curl -s -X POST "$WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{
            \"msgtype\": \"markdown\",

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/push_to_wecom.sh (reported line 174)May include surrounding context.

sh
🐉 小龙提醒"

    # 发送错误消息
    curl -s -X POST "$WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{
            \"msgtype\": \"markdown\",

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/push_to_wecom_v2.sh (reported line 46)May include surrounding context.

sh
local msgtype="${2:-markdown}"
    
    local response
    response=$(curl -s -w "\n%{http_code}" -X POST "$WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{
            \"msgtype\": \"$msgtype\",

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/push_to_wecom_v3.sh (reported line 49)May include surrounding context.

sh
local msgtype="${2:-markdown}"
    
    local response
    response=$(curl -s -w "\n%{http_code}" -X POST "$WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{
            \"msgtype\": \"$msgtype\",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script opens a third-party site with agent-browser to retrieve pollen data and later sends content to the WeCom webhook and wttr.in, which are network operations involving system- or user-configured data. While the code has internal logging, it does not provide a user-facing warning, confirmation, or descriptive comment explaining these outbound transmissions and credential-backed webhook use.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says users can customize the city and query both pollen concentration and weather, and the script logs a configurable city via POLLEN_CITY. However, the actual weather request is hard-coded to wttr.in/Beijing, so non-Beijing users receive mismatched weather data while the message presents it alongside the selected city.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says users can customize the city and query pollen concentration and weather, but this implementation hardcodes Beijing weather at L260 and the parser explicitly targets the '北京近7天花粉报告表格' format described at L180-L205. Although a city parameter is accepted, the actual data retrieval logic does not use it to fetch city-specific results, creating a clear mismatch between claimed capability and implemented behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script sources a file from $HOME, which executes any shell code in that file rather than merely reading key-value pairs. If an attacker or another process can modify ~/.openclaw/config/wecom.env, this becomes arbitrary command execution in the script's privilege context, and it also implicitly grants access to the webhook secret without any transparency boundary.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The script transmits collected content to an external WeCom webhook, which is expected for the skill but still represents outbound data flow to a third party. In this context, the danger is limited because the payload is mostly weather/pollen data, but if upstream content or logs become attacker-controlled, the script could be used to exfiltrate unexpected data to the configured webhook.

Content

Scanner excerpt · scripts/push_to_wecom_v4.sh (reported line 56)May include surrounding context.

sh
local msgtype="${2:-markdown}"
    
    local response
    response=$(curl -s -w "\n%{http_code}" -X POST "$WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "{
            \"msgtype\": \"$msgtype\",

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest states the skill supports custom cities for querying pollen concentration and weather, and the script accepts a city parameter via POLLEN_CITY. However, the weather-fetching code ignores that city and always queries Beijing or Beijing coordinates, so the implemented behavior does not match the claimed customizable-city functionality.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/push_to_wecom_v4.sh (reported line 297)May include surrounding context.

sh
local lon="116.4074"
    local weather_json
    weather_json=$(curl -s --connect-timeout 8 --max-time 12 \
        "https://api.open-meteo.com/v1/forecast?latitude=$lat&longitude=$lon&current=temperature_2m,relative_humidity_2m,weather_code&timezone=Asia/Shanghai" 2>/dev/null)
    
    if [ -n "$weather_json" ] && [[ ! "$weather_json" =~ "error" ]]; then
        local temp=$(echo "$weather_json" | jq -r '.current.temperature_2m // empty')

Static analysis

No suspicious patterns detected.