Back to skill

Security audit

Sun Path & Environmental Analysis

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently provides local sun, shadow, terrain, and comfort plotting tools, with some dependency and file-output hygiene issues but no evidence of hidden or malicious behavior.

Install only in an isolated Python environment, pin or review dependencies before use, and direct outputs to unique files in allowed media directories. Treat DEM and output paths as user-controlled inputs and avoid running the skill on sensitive private files unless you intend the generated results to be shared back in chat.

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

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Unpinned Python Dependencies Allow Mutable Supply-Chain Code## Vulnerability Details **File Location**: `requirements.txt:1-7`; installation command in `SKILL.md:25` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium **Vulnerable Code Snippet**: ```text pysolar matplotlib pytz shapely numpy psychrolib rasterio ``` The dependencies are installed through the following documented command: ```bash pip install -r requirements.txt ``` ### Technical Analysis All Python dependencies are specified without exact versions or integrity hashes. Consequently, each installation can resolve to different and mutable package releases. Python package installation may execute package build logic, backend hooks, or other code with the privileges of the user performing the installation. If a package maintainer account, package release, distribution artifact, or transitive dependency is compromised, following the documented setup procedure could install attacker-controlled code. The absence of hashes also prevents `pip` from verifying that downloaded artifacts are the exact artifacts reviewed and approved by the project. `psychrolib` was not imported by any of the audited scripts, so it appears unnecessary for the observed runtime behavior and increases the dependency attack surface without a demonstrated functional requirement. ### Attack Path 1. An attacker compromises an upstream dependency, its publishing account, or one of its transitive dependencies. 2. The attacker publishes a malicious release under the legitimate package name. 3. A user follows `SKILL.md` and runs `pip install -r requirements.txt`. 4. Because no versions or hashes are pinned, `pip` may select the malicious release. 5. Attacker-controlled installation or runtime code executes in the user's Python environment. 6. The malicious dependency can act with the privileges and filesystem/network access of the installing user or of later skill executions. ### Impact Assessment S ...[truncated 447 chars]
Remediation
## Remediation Suggestions 1. Pin every direct dependency to an explicitly reviewed version using exact `==` constraints. 2. Generate a lock file that includes all transitive dependencies. 3. Record cryptographic hashes for every accepted distribution and install with `pip --require-hashes`. 4. Prefer reviewed binary wheels from trusted package indexes and restrict alternate indexes to prevent dependency-confusion attacks. 5. Remove `psychrolib` unless a documented and tested feature requires it. 6. Install dependencies in an isolated virtual environment using a non-privileged account. 7. Add automated dependency vulnerability and provenance checks to the release process. 8. Periodically update dependencies through a controlled review and testing workflow rather than resolving unrestricted latest releases during end-user installation.

T08 · Insecure Dependencies

Warning
Location
PUBLISH.md:28
Finding
Unpinned Global npm Installation Exposes the Publishing Environment to Supply-Chain Risk## Vulnerability Details **File Location**: `PUBLISH.md:28-31` **Vulnerability Type**: Unpinned globally installed publishing dependency **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash npm i -g clawhub clawhub login ``` ```text Follow the prompts (browser or `--token`) to complete login. ``` ### Technical Analysis The documented publishing workflow globally installs the latest available `clawhub` npm package without selecting a reviewed version or enforcing artifact integrity. npm installations can execute package lifecycle scripts, and a globally installed CLI runs with the permissions of the invoking maintainer. The same CLI is then used for authentication and publishing. A compromised or unexpectedly modified package release could therefore execute code in a maintainer environment where ClawHub credentials, browser authentication state, source files, and publishing authority may be available. This finding concerns the unsafe dependency-installation procedure. The audited project itself does not contain evidence that the current `clawhub` package is malicious. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or a transitive dependency used by the CLI. 2. A malicious version becomes the version selected by the unpinned global installation command. 3. A project maintainer runs `npm i -g clawhub` as instructed. 4. Malicious lifecycle or CLI code executes with the maintainer's user privileges. 5. The maintainer runs `clawhub login`, potentially exposing a supplied token or authenticated session to the compromised CLI. 6. The attacker may use captured publishing authority to access the maintainer's account or publish a modified skill release. ### Impact Assessment Successful exploitation could result in arbitrary code execution under the maintainer's account, theft of accessible publishing credentials, unauthorized ClawHub releases, modification of local source f ...[truncated 260 chars]
Remediation
## Remediation Suggestions 1. Pin the CLI to a specifically reviewed version rather than installing the unrestricted latest release. 2. Avoid global installation where practical; invoke a pinned, project-local dependency or use a verified standalone artifact. 3. Commit the corresponding npm lock file and require lockfile integrity during installation. 4. Verify package provenance, signatures, publisher identity, and registry integrity before updates. 5. Disable lifecycle scripts during installation when compatible with the CLI, or explicitly review all required scripts before execution. 6. Use a short-lived, narrowly scoped publishing token and revoke it immediately if compromise is suspected. 7. Run publishing from an isolated, non-privileged environment that does not contain unrelated credentials. 8. Separate dependency installation from the authenticated publishing step and inspect the installed CLI before providing credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The code partially matches the declared description because it does calculate solar position and performs building shadow analysis. However, it does not generate a sun path diagram; instead, it optionally creates a monthly bar chart of annual sun/shadow/night hours at one point. It also does not perform any thermal comfort analysis. There are no signs of unrelated triggers or inconsistent resource access beyond standard local execution. Therefore, the description overstates the implemented capabilities in material ways.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
There is a clear description-behavior mismatch. The code chunk is narrowly focused on thermal comfort visualization and basic psychrometric calculations, which aligns with only one part of the declared description ('analyzes thermal comfort'). It does not implement sun path diagrams, solar position calculations, or building shadow analysis. No suspicious undeclared capability is present beyond plotting and file output, but the declared primary purpose is broader than what this code actually does.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The code accurately supports part of the description: it calculates solar position using pysolar and generates a sun path diagram. However, there is no implementation of building shadow analysis or thermal comfort analysis in this code chunk. It only plots sun paths for solstices/equinox and writes an image output. Therefore the declared description overstates the actual capabilities present in the supplied code.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The code’s actual functionality is limited to point-in-time solar position calculation and building shadow plotting for a simple rectangular building footprint. That partially matches the declared shadow-analysis and solar-position portions. However, there is no implementation of a sun path diagram across time, and no thermal comfort analysis logic, metrics, models, or outputs. There are no notable undeclared sensitive capabilities beyond the described domain; the mismatch is that the description materially overstates the skill’s implemented features.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The supplied code performs a narrow subset of the declared functionality: it computes current solar position using pysolar and prints the result. There is no logic for generating a sun path diagram, no shadow-analysis computation for buildings, and no thermal comfort analysis. The declared description therefore materially overstates the implemented capabilities, even though one listed function (solar position calculation) is present. The declared shell:exec permission is not exercised here, but over-declared permissions alone are not the mismatch basis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The code’s actual purpose is narrowly focused on terrain shadow computation from elevation data, not the broader set of features in the declared description. While it does calculate solar position, it does so only as part of terrain-shadow raster generation. There is no implementation of sun path diagram generation, no building shadow analysis specific to structures, and no thermal comfort analysis. The raster/DEM processing behavior is a materially different primary function from the declared multi-feature skill description, so this is a description-behavior mismatch.

Lp1

High
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The script writes output files to user-controlled paths via --output, creating GeoTIFFs and optionally PNGs on disk. In this skill, declared permissions only list shell:exec, so the implementation exceeds its stated capability boundary and could overwrite or create files in unintended locations if the agent runs with broader filesystem access.

Session Persistence

Medium
Category
Rogue Agent
Content
## Sending images to Telegram

Used from the OpenClaw Telegram conversation. Scripts that produce images (`plot_sunpath.py`, `shadow_calc.py`, `comfort_calc.py`, `annual_sun_hours.py --output`, `terrain_shadow.py --plot`) write PNG/JPG to the path you pass. Run the script with an `--output` (or `--plot` and use the script’s default image path), then **send that image file** to the user via the OpenClaw message/media tool so they see it in chat.

**OpenClaw allowed paths:** The message tool only sends files from allowed dirs (`~/.openclaw/media/`, `~/.openclaw/agents/`, or `/tmp`). Always pass an output path under one of these (e.g. `--output ~/.openclaw/media/sunpath.png` or `/tmp/shadow.png`); do not use the skill install directory or sending will fail.
Confidence
74% confidence
Finding
The skill tells the agent to write generated files into shared allowed directories such as `~/.openclaw/media/`, `~/.openclaw/agents/`, or `/tmp`, which can create residual artifacts accessible across sessions or by other components. While intended for image delivery, this persistence can expose previous user outputs, sensitive path contents, or enable confusion/overwrite issues if filenames are predictable or reused.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill instructs the agent to execute shell commands directly and 'do not ask for confirmation,' which weakens human-in-the-loop safeguards around a permissioned `shell:exec` capability. In practice, user-provided parameters such as output paths, DEM paths, times, or other arguments could be passed into shell execution flows without sufficient validation, increasing the chance of unsafe command execution or misuse.

Lp4

Low
Category
MCP Least Privilege
Confidence
65% confidence
Finding
Declared permissions with no matching code capability may indicate removed functionality or pre-staging for future abuse.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pysolar
matplotlib
pytz
shapely
Confidence
93% confidence
Finding
The dependency list leaves pysolar unpinned, so installs may resolve to different versions over time, including vulnerable or breaking releases. In a skill with shell execution permission, supply-chain drift increases risk because the runtime may pull an unexpected package version during environment setup.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pysolar
matplotlib
pytz
shapely
numpy
Confidence
93% confidence
Finding
matplotlib is unpinned, which makes builds non-reproducible and can expose consumers to newly introduced vulnerable versions or dependency conflicts. While this is not an immediate exploit by itself, it weakens supply-chain integrity and predictability.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pysolar
matplotlib
pytz
shapely
numpy
psychrolib
Confidence
92% confidence
Finding
pytz is not version-pinned, so the environment may install whatever release is current at install time. This creates avoidable supply-chain uncertainty and can silently introduce security or compatibility issues.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pysolar
matplotlib
pytz
shapely
numpy
psychrolib
rasterio
Confidence
93% confidence
Finding
shapely is unpinned, allowing dependency resolution to vary across installations. For a geometry-processing skill, that can lead to inconsistent behavior and possible exposure to vulnerable package releases if an affected version is pulled.

Unpinned Dependencies

Low
Category
Supply Chain
Content
matplotlib
pytz
shapely
numpy
psychrolib
rasterio
Confidence
97% confidence
Finding
numpy is unpinned, and the manifest therefore does not guarantee avoidance of versions with known advisories. Because numpy is a foundational package with native code and broad transitive use, version ambiguity raises the chance of pulling an affected release and broadens the impact of supply-chain compromise.

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
96% confidence
Finding
The manifest references numpy without pinning a version even though advisories exist for some numpy releases, so it is impossible to verify whether deployments are safe. This is more concerning than a generic unpinned dependency because there is known security history and numpy is central to the package set.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pytz
shapely
numpy
psychrolib
rasterio
Confidence
92% confidence
Finding
psychrolib is unpinned, making installations non-deterministic and potentially subject to vulnerable or incompatible upstream releases. This is a classic dependency hygiene issue rather than evidence of deliberate maliciousness.

Unpinned Dependencies

Low
Category
Supply Chain
Content
shapely
numpy
psychrolib
rasterio
Confidence
94% confidence
Finding
rasterio is unpinned despite being a complex package that interfaces with native geospatial libraries. Uncontrolled upgrades can introduce vulnerable builds or ABI-related issues, and in a shell-enabled skill this increases operational and supply-chain risk.

Static analysis

No suspicious patterns detected.