Back to skill

Security audit

Weather Pro

Security checks for vulnerabilities and agentic risk

Overview

It provides weather forecasts, but it loads local secrets in a way that can run unintended shell code and expose API keys.

Review before installing. Use only if you are comfortable sending city/location and derived coordinates to WeatherAPI and Sunsethue, and consider changing the script to receive only WEATHERAPI_KEY and SUNSETHUE_KEY from a controlled environment instead of sourcing ~/.openclaw/.env.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/weather-full.sh:6
Finding

Shared credential file is evaluated as executable shell code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/weather-full.sh:14
Finding

API credentials are exposed in request URL query strings

Content
View full analysis
Remediation
View remediation
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (13)

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The documented command directly sources ~/.openclaw/.env, causing all variables in that file to be loaded into the shell session before making a network request. Sourcing a broad secrets file is risky because it expands credential exposure scope and may execute unexpected shell content if the file is modified or unsafe.

Content

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

当前天气

bash
source ~/.openclaw/.env && curl -s "https://api.weatherapi.com/v1/forecast.json?key=${WEATHERAPI_KEY}&q=Beijing&days=1&lang=zh&aqi=yes" | jq '{
  location: .location.name,
  temp: .current.temp_c,
  condition: .current.condition.text,

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

This example again sources ~/.openclaw/.env before invoking an external API, exposing the session to all secrets in the file and trusting the file as shell code. In context, the skill is benign, but this pattern makes credential misuse and accidental disclosure more likely than necessary.

Content

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

晚霞预测

bash
source ~/.openclaw/.env && curl -s "https://api.sunsethue.com/event?latitude=39.90&longitude=116.41&date=$(date +%Y-%m-%d)&type=sunset&key=${SUNSETHUE_KEY}" | jq '{
  quality: (.data.quality * 100 | floor),
  rating: .data.quality_text
}'

Credential Access

High
Category
Privilege Escalation
Confidence
76% confidence
Finding

Reading credentials from a local .env file is common, but sourcing that file executes it as shell code rather than merely parsing key/value pairs. If the file is modified by another local process or attacker, arbitrary commands could run in the script's context, turning credential loading into code execution.

Content

Scanner excerpt · scripts/weather-full.sh (reported line 6)May include surrounding context.

sh
# 用法: weather-full.sh <城市> [天数]

# 加载环境变量
if [ -f ~/.openclaw/.env ]; then
    source ~/.openclaw/.env
fi

Credential Access

High
Category
Privilege Escalation
Confidence
76% confidence
Finding

The direct use of source on ~/.openclaw/.env means the file contents are treated as shell script. In an agent environment, this is riskier than standard environment access because a compromised or maliciously edited file could execute attacker-controlled commands when the skill runs.

Content

Scanner excerpt · scripts/weather-full.sh (reported line 7)May include surrounding context.

sh
# 加载环境变量
if [ -f ~/.openclaw/.env ]; then
    source ~/.openclaw/.env
fi

CITY="${1:-Shanghai}"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents shell-based behavior and example command execution but does not declare any explicit tool scope or permissions. This weakens reviewability and increases the chance that an agent may invoke shell access without clear user-visible authorization boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README instructs users to source a local .env file containing API keys and immediately send requests to third-party services, but it provides no warning that credentials are being loaded and used in outbound requests. This can lead to unintended credential exposure practices and poor operator awareness around secret handling.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

This command transmits user-supplied location data and an API key to api.weatherapi.com. External transmission is expected for a weather skill, but it still creates privacy and secret-handling risk, especially because the key is embedded in the request URL and the transmission is not clearly disclosed near execution guidance.

Content

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

当前天气

bash
source ~/.openclaw/.env && curl -s "https://api.weatherapi.com/v1/forecast.json?key=${WEATHERAPI_KEY}&q=Beijing&days=1&lang=zh&aqi=yes" | jq '{
  location: .location.name,
  temp: .current.temp_c,
  condition: .current.condition.text,

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

This command sends coordinates, date, and an API key to api.sunsethue.com. That is functionally necessary for the feature, but it is still an outbound data flow to a third party and the secret is placed in the URL without prominent disclosure or minimization guidance.

Content

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

晚霞预测

bash
source ~/.openclaw/.env && curl -s "https://api.sunsethue.com/event?latitude=39.90&longitude=116.41&date=$(date +%Y-%m-%d)&type=sunset&key=${SUNSETHUE_KEY}" | jq '{
  quality: (.data.quality * 100 | floor),
  rating: .data.quality_text
}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script loads local API keys from a user-specific .env file and sends user-supplied location data to third-party services without any consent prompt, privacy notice, or minimization. While expected for a weather skill, it still creates a real privacy boundary crossing and exposes precise location queries plus credentials-backed outbound requests to external providers.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This request transmits user-supplied location data and an API key to an external weather provider. In the context of an agent skill, undisclosed outbound transmission can expose sensitive user intent or location information and create dependency on a third-party service outside the local trust boundary.

Content

Scanner excerpt · scripts/weather-full.sh (reported line 14)May include surrounding context.

sh
DAYS="${2:-1}"

# 天气数据(WeatherAPI 支持中英文)
WEATHER_JSON=$(curl -s "https://api.weatherapi.com/v1/forecast.json?key=${WEATHERAPI_KEY}&q=${CITY}&days=${DAYS}&lang=zh&aqi=yes")

# 检查是否成功获取天气
if [ -z "$WEATHER_JSON" ] || echo "$WEATHER_JSON" | jq -e '.error' >/dev/null 2>&1; then

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The WeatherAPI request hard-codes lang=zh, and all user-facing messages and usage text are in Chinese. This imposes a specific language on all users without opt-in or an explained region-specific justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This request sends derived latitude/longitude and date data to a second external service, expanding data sharing beyond the primary weather provider. Even though the data is used for legitimate functionality, precise coordinates can be more sensitive than a city name and increase privacy risk if users are not informed.

Content

Scanner excerpt · scripts/weather-full.sh (reported line 42)May include surrounding context.

sh
DATE=$(date +%Y-%m-%d)

# 朝霞
SUNRISE_JSON=$(curl -s "https://api.sunsethue.com/event?latitude=${LAT}&longitude=${LON}&date=${DATE}&type=sunrise&key=${SUNSETHUE_KEY}")
SUNRISE_QUALITY=$(echo "$SUNRISE_JSON" | jq -r '.data.quality * 100 | floor // 0')
SUNRISE_RATING=$(echo "$SUNRISE_JSON" | jq -r '.data.quality_text // "N/A"')

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

A second call to the same external service repeats the transmission of precise coordinates and date information for sunset calculations. Repeated third-party requests increase observability of user behavior and location-related metadata while relying on externally controlled infrastructure.

Content

Scanner excerpt · scripts/weather-full.sh (reported line 47)May include surrounding context.

sh
SUNRISE_RATING=$(echo "$SUNRISE_JSON" | jq -r '.data.quality_text // "N/A"')

# 晚霞
SUNSET_JSON=$(curl -s "https://api.sunsethue.com/event?latitude=${LAT}&longitude=${LON}&date=${DATE}&type=sunset&key=${SUNSETHUE_KEY}")
SUNSET_QUALITY=$(echo "$SUNSET_JSON" | jq -r '.data.quality * 100 | floor // 0')
SUNSET_RATING=$(echo "$SUNSET_JSON" | jq -r '.data.quality_text // "N/A"')