Back to skill

Security audit

OMIE Energy

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent OMIE energy-price purpose, but its device-control and .env handling can run shell code on the user's machine and should be reviewed before installation.

Install only if you are comfortable with a local CLI that can run shell commands. Avoid --execute unless you wrote and verified the command strings yourself, keep .env controlled or avoid it, and prefer isolated environments with pinned dependencies for production use.

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

T09 · Insecure Skill Coding Practices

Error
Location
omie_energy.py:286
Finding

Arbitrary Shell Command Execution Through Smart-Home Control Arguments

Content
View full analysis
ON command", args.on_command, execute) action_taken = True if args.price_above is not None and price_kwh >= args.price_above: if args.off_command: run_cmd("Price is above threshold -> OFF command", args.off_command, execute) action_taken = True ``` ```python s4.add_argument("--on-command") s4.add_argument("--off-command") s4.add_argument("--execute", action="store_true") ``` ### Technical Analysis The `--on-command` and `--off-command` arguments accept unrestricted strings. When `--execute` is supplied and the corresponding price threshold matches, the selected string is passed directly to: ```python subprocess.run(cmd, shell=True, check=True) ``` Setting `shell=True` causes the operating-system shell to interpret command separators, pipelines, redirections, variable expansion, command substitution, and other shell syntax. Consequently, the interface does not restrict execution to the intended smart-home command. The behavior is documented and execution requires the explicit `--execute` option, so this is not a hidden backdoor. However, it remains an exploitable command-injection boundary whenever command arguments can be influenced by an untrusted user, generated content, copied instructions, or another automation layer. ### Attack Path 1. An attacker influences the value supplied to `--on-command` or `--off-command`, such as through malicious copied instructions or untrusted Agent-generated ...[truncated 1258 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
run.sh:5
Finding

Skill-Local Environment File Is Executed as Shell Code

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Third-Party Runtime Dependencies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (14)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 29)May include surrounding context.

Optional default area:

bash
cp .env.example .env
# edit OMIE_AREA=PT or ES
bash run.sh prices --hours 24

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 158)May include surrounding context.

md
- Include: `SKILL.md`, `run.sh`, `omie_energy.py`, `requirements.txt`, `.env.example`, `config.json.example`, `.gitignore`

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The control feature accepts arbitrary --on-command and --off-command values and can execute them when price conditions match. This is effectively arbitrary code execution by design, and in a smart-home automation skill it can be abused not only to run OS commands but also to pivot into broader system compromise or unsafe device actions.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This is a true tool-parameter abuse issue because the subprocess invocation directly consumes an untrusted parameter as a shell command. The agent-skill context materially increases risk: natural-language workflows or indirect inputs can influence these parameters, enabling command injection or deliberate host command execution under the skill's privileges.

Content

Scanner excerpt · omie_energy.py (reported line 281)May include surrounding context.

python
def run_cmd(label: str, cmd: str, execute: bool):
    print(f"{label}: {cmd}")
    if execute:
        subprocess.run(cmd, shell=True, check=True)


def command_control(args, default_area: str):

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

md
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"

# Auto-load local .env for OMIE_* variables when present.
if [[ -f "${ROOT}/.env" ]]; then
  set -a
  # shellcheck disable=SC1091

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · run.sh (reported line 5)May include surrounding context.

sh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"

# Auto-load local .env for OMIE_* variables when present.
if [[ -f "${ROOT}/.env" ]]; then
  set -a
  # shellcheck disable=SC1091

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · omie_energy.py (reported line 23)May include surrounding context.

python
ROOT="$(cd "$(dirname "$0")" && pwd)"

# Auto-load local .env for OMIE_* variables when present.
if [[ -f "${ROOT}/.env" ]]; then
  set -a
  # shellcheck disable=SC1091
  source "${ROOT}/.env"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · run.sh (reported line 6)May include surrounding context.

sh
ROOT="$(cd "$(dirname "$0")" && pwd)"

# Auto-load local .env for OMIE_* variables when present.
if [[ -f "${ROOT}/.env" ]]; then
  set -a
  # shellcheck disable=SC1091
  source "${ROOT}/.env"

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

Sourcing a local .env file executes its contents as shell code, not just key=value assignments. If an attacker can modify that file or influence the skill directory contents, they can achieve arbitrary code execution in the context of the script, and any loaded secrets become available to the child Python process.

Content

Scanner excerpt · run.sh (reported line 9)May include surrounding context.

sh
if [[ -f "${ROOT}/.env" ]]; then
  set -a
  # shellcheck disable=SC1091
  source "${ROOT}/.env"
  set +a
fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises shell-based execution paths (bash run.sh ...) and explicitly supports executing user-provided device commands, but it does not declare any permissions or allowed-tools scope. That mismatch weakens sandboxing and informed consent because a host may allow broader shell, env, or file access than users expect from the manifest.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The skill executes a caller-provided string with subprocess.run(..., shell=True), which allows arbitrary shell execution if --execute is used. In an agent skill context, this is especially dangerous because command strings may come from user prompts, workflow inputs, or automation state, turning the skill into a general command-execution primitive on the host.

Content

Scanner excerpt · omie_energy.py (reported line 281)May include surrounding context.

python
def run_cmd(label: str, cmd: str, execute: bool):
    print(f"{label}: {cmd}")
    if execute:
        subprocess.run(cmd, shell=True, check=True)


def command_control(args, default_area: str):

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency OMIEData is unpinned, so installations may resolve to different versions over time, including releases with breaking changes or newly introduced vulnerabilities. This creates a supply-chain risk because the skill may silently consume an unsafe or compromised package version in future deployments.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
OMIEData
pandas

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The pandas dependency is also unpinned, which means builds are not reproducible and may pull in a vulnerable or incompatible version later. In a skill that processes external market data and may trigger smart-home actions, unexpected dependency changes can affect reliability and expand supply-chain exposure.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
OMIEData
pandas

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
82% confidence
Finding

Because pandas is not version-pinned, it is not possible to verify from this manifest whether deployment will install a version affected by the referenced advisory. The cited CVE is disputed and context-dependent, so the direct risk is limited here, but the inability to verify dependency safety is still a real supply-chain weakness.

Content

No source excerpt is available for this finding.