Back to skill

Security audit

Weather via OpenMeteo (via openmeteo-sh cli; simple ver)

Security checks for vulnerabilities and agentic risk

Overview

This weather skill is purpose-aligned, but its install instructions and command guidance create avoidable local execution and supply-chain risks.

Review this before installing. Prefer installing a pinned, verified release of openmeteo-sh, avoid running sudo make install from an unreviewed checkout, and ensure the agent invokes openmeteo with structured arguments or robust shell escaping rather than interpolating user-provided city names into shell strings.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:59
Finding
User-Controlled Location Values Can Trigger Shell Command Injection<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 59–60 **Vulnerability Type**: Shell command injection through inadequate quoting guidance **Risk Level**: High ### Vulnerable Code Snippet ```markdown 1. Always pass `--llm`. 2. **Quote all user-provided values** in shell commands: `--city="New York"`, `--city="St. Petersburg"`. Only known-safe tokens (numbers, single ASCII words) may be unquoted. ``` ### Technical Analysis The Skill instructs the agent to place user-provided values inside double-quoted shell arguments. Double quotes prevent word splitting and pathname expansion, but they do not prevent shell command substitution through `$(...)` or backticks. For example, directly interpolating a user-provided city into the documented template could produce: ```sh openmeteo weather --current --city="$(id)" --llm ``` A shell evaluates `$(id)` before invoking `openmeteo`. Merely placing the input inside double quotes therefore does not safely isolate it as data. The same issue applies to other user-controlled options if they are interpolated into shell command strings. The Skill does not require arbitrary shell execution for its weather functionality. It only needs to pass location and weather parameters to the `openmeteo` executable, so allowing shell interpretation exceeds the minimum execution capability necessary for the declared task. ### Attack Path 1. An attacker submits a weather request containing shell syntax in a location value, such as a city named `$(id)` or a more harmful command-substitution payload. 2. The agent follows the documented command template and inserts that value between double quotes. 3. The command is passed to a shell rather than to a process API as a structured argument array. 4. The shell evaluates the embedded command substitution. 5. The injected command executes before `openmeteo` receives the resulting argument. Successful exploitation depends on the agent or runtime constructing a shell command ...[truncated 793 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Invoke `openmeteo` directly through an execution API that accepts an argument array, without using a shell. For example, pass the city as one discrete argument equivalent to: ```text ["openmeteo", "weather", "--current", "--city=New York", "--llm"] ``` 2. Explicitly prohibit constructing shell command strings from user input. State that double quoting alone is not sufficient protection. 3. Validate every user-controlled parameter against a narrow allowlist: - Latitude and longitude must parse as bounded numeric values. - Country codes should match the supported fixed format. - Forecast lengths and offsets should be bounded integers. - Parameter lists should be selected from the documented weather-variable allowlist. - City values should be subject to reasonable length and character restrictions. 4. If shell execution is unavoidable, apply a proven shell-escaping routine independently to every argument, such as Bash `printf '%q'`. Do not implement escaping through ad hoc character replacement. 5. Run the weather command under a minimally privileged account with restricted filesystem access, a sanitized environment, and outbound network access limited to the required Open-Meteo endpoints. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:42
Finding
Unpinned Third-Party Installation Paths Can Execute Mutable Upstream Code with Elevated Privileges<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 42–65 **Vulnerability Type**: Unsafe and unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code Snippet ```sh brew tap lstpsche/tap brew install openmeteo-sh ``` ```sh # Import the signing key curl -fsSL https://lstpsche.github.io/apt-repo/pubkey.gpg \ | sudo gpg --dearmor -o /usr/share/keyrings/openmeteo-sh.gpg # Add the repository echo "deb [signed-by=/usr/share/keyrings/openmeteo-sh.gpg] https://lstpsche.github.io/apt-repo stable main" \ | sudo tee /etc/apt/sources.list.d/openmeteo-sh.list # Install sudo apt update sudo apt install openmeteo-sh ``` ```sh git clone https://github.com/lstpsche/openmeteo-sh.git cd openmeteo-sh sudo make install ``` ### Technical Analysis The installation instructions retrieve dependencies from mutable third-party repositories without pinning a reviewed release, commit, package version, or cryptographic checksum. The source installation method clones the repository’s current default branch and then runs repository-controlled installation logic through `sudo make install`. If the upstream repository, maintainer account, release infrastructure, or network-facing distribution channel is compromised, changed code can execute with root privileges. The APT method obtains both the signing key and packages from infrastructure under the same third-party publisher. Although HTTPS and package signatures provide transport and repository-integrity controls, the instructions do not provide an independently verifiable signing-key fingerprint or pin an audited package version. A compromise of the publisher’s infrastructure or signing authority could therefore distribute a malicious update. The Homebrew instructions similarly add an external tap and install its current formula without pinning a reviewed revision. These risks are not necessary for ordinary Skill invocation. The Skill only needs a weather client capable of conta ...[truncated 1898 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin installations to a reviewed, immutable release or commit instead of the current default branch. 2. Publish SHA-256 or stronger checksums for release artifacts and require users to verify them before installation. 3. Sign release artifacts and document the expected signing-key fingerprint through an independent trusted channel. 4. For source installation: - Use a specific release tag and verify that it resolves to the expected commit. - Review the build and installation files before execution. - Build without root privileges. - Copy only the required reviewed artifact using the narrowest necessary privilege, rather than running repository-controlled build logic under `sudo`. 5. For APT installation: - Document the expected repository-key fingerprint. - Pin an audited package version where operationally practical. - Protect publishing keys with strong release controls. - Document a safe key-rotation procedure. 6. For Homebrew installation, pin or verify the formula and release artifact where supported, and document the expected source checksum. 7. Prefer a packaged, reproducible installation process with immutable release artifacts and minimal installation privileges. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Credential Access

High
Category
Privilege Escalation
Content
```sh
# Import the signing key
curl -fsSL https://lstpsche.github.io/apt-repo/pubkey.gpg \
  | sudo gpg --dearmor -o /usr/share/keyrings/openmeteo-sh.gpg

# Add the repository
echo "deb [signed-by=/usr/share/keyrings/openmeteo-sh.gpg] https://lstpsche.github.io/apt-repo stable main" \
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```sh
# Import the signing key
curl -fsSL https://lstpsche.github.io/apt-repo/pubkey.gpg \
  | sudo gpg --dearmor -o /usr/share/keyrings/openmeteo-sh.gpg

# Add the repository
echo "deb [signed-by=/usr/share/keyrings/openmeteo-sh.gpg] https://lstpsche.github.io/apt-repo stable main" \
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Chaining Abuse

High
Category
Tool Misuse
Content
```sh
# Import the signing key
curl -fsSL https://lstpsche.github.io/apt-repo/pubkey.gpg \
  | sudo gpg --dearmor -o /usr/share/keyrings/openmeteo-sh.gpg

# Add the repository
echo "deb [signed-by=/usr/share/keyrings/openmeteo-sh.gpg] https://lstpsche.github.io/apt-repo stable main" \
Confidence
88% confidence
Finding
This is a true risky pattern because it chains network-fetched content directly into a privileged command. In a skill ecosystem, installation docs that normalize `curl | sudo ...` can make supply-chain compromise more dangerous, since a compromised key distribution endpoint could silently alter trust configuration with root privileges.

Chaining Abuse

High
Category
Tool Misuse
Content
# Add the repository
echo "deb [signed-by=/usr/share/keyrings/openmeteo-sh.gpg] https://lstpsche.github.io/apt-repo stable main" \
  | sudo tee /etc/apt/sources.list.d/openmeteo-sh.list

# Install
sudo apt update
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- `bash` 3.2+ (pre-installed on macOS and Linux)
- `curl` (pre-installed on macOS and Linux)
- `jq` — install if missing: `brew install jq` (macOS) or `sudo apt install jq` (Debian/Ubuntu)

## Installation
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- `bash` 3.2+ (pre-installed on macOS and Linux)
- `curl` (pre-installed on macOS and Linux)
- `jq` — install if missing: `brew install jq` (macOS) or `sudo apt install jq` (Debian/Ubuntu)

## Installation
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```sh
# Import the signing key
curl -fsSL https://lstpsche.github.io/apt-repo/pubkey.gpg \
  | sudo gpg --dearmor -o /usr/share/keyrings/openmeteo-sh.gpg

# Add the repository
echo "deb [signed-by=/usr/share/keyrings/openmeteo-sh.gpg] https://lstpsche.github.io/apt-repo stable main" \
Confidence
85% confidence
Finding
The README instructs users to pipe data fetched over the network directly into a privileged command (`curl ... | sudo gpg --dearmor`). Even though this is presented as repository setup, chaining unverified remote content into a root-privileged operation increases supply-chain risk if the hosting location, DNS, or transport trust is compromised.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| sudo tee /etc/apt/sources.list.d/openmeteo-sh.list

# Install
sudo apt update
sudo apt install openmeteo-sh
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| sudo tee /etc/apt/sources.list.d/openmeteo-sh.list

# Install
sudo apt update
sudo apt install openmeteo-sh
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| sudo tee /etc/apt/sources.list.d/openmeteo-sh.list

# Install
sudo apt update
sudo apt install openmeteo-sh
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The manifest description says to use the skill whenever the user asks about weather, temperature, rain, snow, wind, or whether they need an umbrella. Several of these triggers, especially 'temperature' and 'wind', are broad everyday topics and the file does not provide exclusion conditions or tighter scope for when the skill should not activate.

Static analysis

No suspicious patterns detected.