Back to skill

Security audit

ELPA

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but its training runner turns configuration into unrestricted local shell commands with broad environment access.

Install only if you will run it with configs you fully trust. Treat training configs as executable code, review every train_cmd and placeholder value before using --execute, avoid running it with sensitive API keys in the environment, and use an isolated workspace or container for training runs.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/elpa_orchestrator.py:56
Finding

Shell Command Injection Through Configuration-Derived Commands and Placeholder Values

Content
View full analysis
str: try: return template.format(**context) except KeyError as exc: missing = str(exc).strip("'") raise ValueError(f"missing placeholder '{missing}' in context for command: {template}") from exc ``` ```python context = _build_context(cfg, run_dir=run_dir, model_dir=model_dir, model_name=name) command = _render_command(cmd_template, context) ``` ```python completed = subprocess.run( item["train_cmd"], shell=True, cwd=item["model_dir"], env=env, stdout=out_f, stderr=err_f, check=False, ) ``` ### Technical Analysis The orchestrator reads `train_cmd` templates and placeholder values from a JSON configuration, combines them using Python string formatting, and submits the resulting string to `subprocess.run()` with `shell=True`. Because the generated command is interpreted by a command shell, shell metacharacters in either the template or substituted values retain their special meaning. A value intended to represent only a dataset path, project path, interpreter, or other argument can therefore introduce additional commands through characters such as `;`, `|`, command substitution, or redirection. For example, a configuration-derived dataset value conceptually equivalent to: ```text /path/to/data.csv; attacker-command ``` would be inserted directly into the command string. When execution is enabled, the shell interprets the text after the semicolon as another command. The documented design intentionally permits users to specify training commands. Nevertheless, the implementation does not distinguish executable command structure from data-only placeholder values. Consequently, configurations ob ...[truncated 1659 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/elpa_orchestrator.py:76
Finding

Path Traversal Through Unsanitized Model Names

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the skill claims ELPA integration behavior but in practice exposes undeclared arbitrary shell command execution through configurable train_cmd, that is a meaningful security issue. The dangerous part is not the description mismatch alone, but that users may trust a forecasting utility while it can launch arbitrary external commands from configuration, creating command-execution and supply-chain risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the skill claims ELPA integration behavior but in practice exposes undeclared arbitrary shell command execution through configurable train_cmd, that is a meaningful security issue. The dangerous part is not the description mismatch alone, but that users may trust a forecasting utility while it can launch arbitrary external commands from configuration, creating command-execution and supply-chain risk.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
91% confidence
Finding

Copying the full parent process environment into child training jobs propagates all available secrets and credentials, such as API keys, cloud tokens, and internal service configuration, to externally defined sub-model commands. In this skill, those commands are intentionally configurable and may invoke arbitrary frameworks or scripts, so environment inheritance materially increases the blast radius of any malicious or compromised training command.

Content

Scanner excerpt · scripts/elpa_orchestrator.py (reported line 129)May include surrounding context.

python
item["status"] = "running"
        item["started_at"] = _now()
        env = os.environ.copy()
        env.update(item.get("env", {}))

        stdout_path = Path(item["stdout_log"])

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This is a tool-parameter abuse issue because the subprocess invocation accepts a fully attacker-controllable command string from model configuration and executes it through the shell. The skill's purpose is to orchestrate external training jobs, which makes this especially dangerous: the code effectively turns configuration into code execution without validation or sandboxing.

Content

Scanner excerpt · scripts/elpa_orchestrator.py (reported line 138)May include surrounding context.

python
stderr_path.parent.mkdir(parents=True, exist_ok=True)

        with stdout_path.open("w", encoding="utf-8") as out_f, stderr_path.open("w", encoding="utf-8") as err_f:
            completed = subprocess.run(
                item["train_cmd"],
                shell=True,
                cwd=item["model_dir"],

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises and documents shell-based orchestration, file reads/writes, and likely environment use, but it declares no explicit tool scope or permission boundaries. In a skill that executes user-supplied train_cmd values, missing permission declarations materially increases the risk of arbitrary command execution, filesystem modification, and abuse of ambient credentials or hardware resources.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

The orchestrator builds a shell command from configuration data and then executes it with shell=True. Because train_cmd is derived from JSON config and template-expanded context values, an attacker who can influence the config can inject arbitrary shell metacharacters or additional commands, leading to arbitrary command execution on the host.

Content

Scanner excerpt · scripts/elpa_orchestrator.py (reported line 138)May include surrounding context.

python
stderr_path.parent.mkdir(parents=True, exist_ok=True)

        with stdout_path.open("w", encoding="utf-8") as out_f, stderr_path.open("w", encoding="utf-8") as err_f:
            completed = subprocess.run(
                item["train_cmd"],
                shell=True,
                cwd=item["model_dir"],

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

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

md
- Put your real training entrypoints in each model `train_cmd`.
- Keep each model tagged as `online` or `offline`.
- Add as many models as needed; ELPA is not limited to 4.

## 2) Dry-Run Plan (No Training)

Static analysis

No suspicious patterns detected.