Back to skill

Security audit

OpenWeather

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent OpenWeather helper that sends requested locations and the configured OpenWeather API key only to OpenWeather endpoints to retrieve forecasts.

Install only if you are comfortable providing an OpenWeather API key and sending requested locations, including any configured default location, to OpenWeather over HTTPS. Consider scoping the key to OpenWeather use and monitoring your OpenWeather quota or billing.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tainted flow: 'req' from os.environ.get (line 40, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
err("Refusing to request non-OpenWeather URL")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT})
        with urllib.request.urlopen(req, timeout=DEFAULT_TIMEOUT_SECS) as r:
            return json.loads(r.read())
    except urllib.error.HTTPError as e:
        body = e.read().decode()
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill invokes Python and requires both environment-variable access and outbound network access, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap: a host agent may grant broader capabilities than users or reviewers expect, making secret access and external requests less transparent and harder to constrain.

External Transmission

Medium
Category
Data Exfiltration
Content
def fetch(url: str):
    # Only allow OpenWeather endpoints (HTTPS only).
    if not (url.startswith("https://api.openweathermap.org/") or url.startswith("https://openweathermap.org/")):
        err("Refusing to request non-OpenWeather URL")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT})
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
def fetch(url: str):
    # Only allow OpenWeather endpoints (HTTPS only).
    if not (url.startswith("https://api.openweathermap.org/") or url.startswith("https://openweathermap.org/")):
        err("Refusing to request non-OpenWeather URL")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT})
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
def fetch(url: str):
    # Only allow OpenWeather endpoints (HTTPS only).
    if not (url.startswith("https://api.openweathermap.org/") or url.startswith("https://openweathermap.org/")):
        err("Refusing to request non-OpenWeather URL")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT})
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
def fetch(url: str):
    # Only allow OpenWeather endpoints (HTTPS only).
    if not (url.startswith("https://api.openweathermap.org/") or url.startswith("https://openweathermap.org/")):
        err("Refusing to request non-OpenWeather URL")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT})
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
def fetch(url: str):
    # Only allow OpenWeather endpoints (HTTPS only).
    if not (url.startswith("https://api.openweathermap.org/") or url.startswith("https://openweathermap.org/")):
        err("Refusing to request non-OpenWeather URL")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT})
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
def fetch(url: str):
    # Only allow OpenWeather endpoints (HTTPS only).
    if not (url.startswith("https://api.openweathermap.org/") or url.startswith("https://openweathermap.org/")):
        err("Refusing to request non-OpenWeather URL")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": USER_AGENT})
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
84% confidence
Finding
This code transmits the user-provided or default city value to OpenWeather over the network via the geocoding and weather endpoints. Although the behavior is central to the script's purpose, the visible usage/help text does not explicitly warn that entered locations are sent to a third-party service.

Static analysis

No suspicious patterns detected.