T09 · Insecure Skill Coding Practices
- Location
scripts/location.sh:5- Finding
Arbitrary Shell Execution Through Shared Environment File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its location-helper purpose, but it handles precise location and credentials with enough under-scoped and unsafe behavior that users should review it carefully before installing.
Install only if you are comfortable with this skill reading location-service credentials, storing saved places and reminders locally, and sending precise location or destination data to mapping services. Avoid using it with a shared or broadly writable ~/.openclaw/.env, prefer dedicated least-privilege credentials, disable or avoid cron notifications unless you want ongoing background checks, and treat ETA/nearby/address features as third-party location disclosure.
scripts/location.sh:5Arbitrary Shell Execution Through Shared Environment File
scripts/location.py:991Precise Location and Destination Transmitted Over Plaintext HTTP
scripts/location.py:266Sensitive Location State Persisted Without Enforced Access Controls
scripts/location.py:298Undisclosed Precise Location Disclosure to Public Mapping Services
The declared description suggests a privacy-friendly location helper, but the documented behavior also includes generic HTTP ingestion, geofence and place management, proximity alerts, and external geocoding/routing calls that materially expand data exposure and side effects. This mismatch can mislead users and reviewers about the skill's true reach, especially because location history and destination lookups may be sent to third-party services.
The cron setup forwards location-triggered reminders and alerts to an external messaging channel, which can leak sensitive movement and place data outside the local environment. Because there is no privacy warning or consent flow, users may enable persistent outbound notifications without understanding that their whereabouts could be transmitted to third-party services or phone numbers.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
#!/bin/bash
# Location awareness wrapper - loads credentials and runs location.py
# Source OpenClaw .env if available (provides HA_URL, HA_TOKEN, etc.)
[[ -f "$HOME/.openclaw/.env" ]] && set -a && source "$HOME/.openclaw/.env" && set +a
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Using source on ~/.openclaw/.env executes the file as shell code, not just as passive key=value data, and exports everything into the environment. If that file is tampered with or contains unexpected commands, this can lead to arbitrary code execution and unauthorized access to Home Assistant tokens or other secrets, which is especially sensitive in a location-awareness skill handling movement data and home automation context.
# Location awareness wrapper - loads credentials and runs location.py
# Source OpenClaw .env if available (provides HA_URL, HA_TOKEN, etc.)
[[ -f "$HOME/.openclaw/.env" ]] && set -a && source "$HOME/.openclaw/.env" && set +a
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
exec python3 "$SCRIPT_DIR/location.py" "$@"
The skill clearly relies on capabilities with security implications: reading environment variables for secrets, writing persistent files such as geofences/reminders/cron jobs, and making network requests to location providers and mapping/geocoding services. Failing to declare an explicit tool scope weakens least-privilege controls and can cause users or the host agent to underestimate what the skill is allowed to access.
The skill exposes highly sensitive data including current location, coordinates, addresses, travel patterns, and visit history, yet the user-facing instructions emphasize terse direct output with no privacy warning. In a location-tracking context, this increases the risk of accidental disclosure to anyone with access to the chat/session or downstream logs.
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
Every command must be run via scripts/location.sh. Example:
User asks: "How long to walk home?"
You run:
scripts/location.sh eta home --mode walk
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
Every command must be run via scripts/location.sh. Example:
User asks: "How long to walk home?"
You run:
scripts/location.sh eta home --mode walk
The documented commands allow adding, editing, disabling, and deleting saved places and rules without warning that they modify persistent state. In a conversational environment, ambiguous phrasing or prompt injection through user content could cause irreversible changes to geofence configuration or reminders.
The documented cron configuration establishes ongoing autonomous behavior that persists across sessions and repeatedly processes sensitive location data. In the context of a location skill, session persistence increases risk because it can continue monitoring movement and sending alerts after the user has forgotten it was enabled.
Use OpenClaw's built-in cron to run periodic location checks. Add a job to ~/.openclaw/cron/jobs.json:
{
The skill sends precise location data to external third-party services for reverse geocoding without clearly disclosing that behavior in the skill description. For a location-tracking skill, undisclosed outbound sharing materially affects user privacy expectations because users may assume coordinates stay within Home Assistant/OwnTracks/local providers.
The code transmits user coordinates to external geocoding services without any visible warning, consent flow, or inline disclosure. Because this skill handles highly sensitive movement and location data, silent disclosure to third parties can expose home/work patterns, travel history, and other personal inferences.
The POI, geocoding, and ETA features rely on third-party services such as Overpass/Nominatim/OSRM, but the manifest description does not mention these external dependencies. This creates a privacy and transparency gap because destination queries and current location can be sent off-device without the user's informed awareness.
The script silently loads sensitive credentials from ~/.openclaw/.env with no disclosure or user confirmation at runtime. Even if intended for convenience, this can surprise users, increase secret propagation into subprocesses, and make it easier for a compromised or overly capable skill to access tokens unrelated to its primary function.
The module documentation says the skill supports 'HTTP endpoint' providers, while the manifest description specifically names Home Assistant, OwnTracks, and GPS Logger as the privacy-friendly tracking sources. This creates an intent mismatch in documentation because the code advertises a broader, arbitrary-network provider model than the manifest's more constrained provider framing.
The skill can resolve configuration values from environment variables, including tokens and endpoints, via the env:VAR_NAME mechanism and direct environment lookups. For a location-awareness skill this capability is not inherently required by the stated user-facing purpose, and it expands the skill into credential/config harvesting territory beyond pure location operations.
The skill resolves secrets from environment variables, including provider tokens used for location services, but there is no visible user-facing notice that credentials may be read from the environment. While this may be operationally normal, the rule calls for disclosure when accessing sensitive environment variables or credentials and no such disclosure appears in code comments intended for users, prompts, or nearby output.
The wrapper automatically sources a global .env file and exports all variables into the child process environment before launching location.py. This broadens the skill's access beyond location processing and creates implicit credential exposure and trust in a shell-parsed file, which is risky if the file contains more secrets than strictly needed or can be modified by another local process.
No suspicious patterns detected.