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
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/weather.py (reported line 41)May include surrounding context.

python
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()

Undeclared Tool Scope

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.

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 · api-reference.md (reported line 7)May include surrounding context.

md
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})

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 · api-reference.md (reported line 15)May include surrounding context.

md
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})

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 · api-reference.md (reported line 25)May include surrounding context.

md
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})

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/weather.py (reported line 37)May include surrounding context.

python
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})

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/weather.py (reported line 56)May include surrounding context.

python
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})

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/weather.py (reported line 66)May include surrounding context.

python
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})

Missing User Warnings

Low
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.