Back to skill

Security audit

Device Control (Iyeque)

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its device-control purpose, but its app-closing feature can forcibly and too broadly terminate local processes, so it should be reviewed before installation.

Review this before installing if you plan to use app-closing. Prefer a version that uses an allowlist or exact process matching, warns before forced closes, and prevents broad patterns such as dots or short substrings from terminating unrelated processes.

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

T09 · Insecure Skill Coding Practices

Error
Location
ctl.js:211
Finding
Unescaped Regular Expression Allows Overbroad Process Termination## Vulnerability Details **File Location**: `ctl.js`, lines 211–216 **Vulnerability Type**: Improper neutralization of regular-expression metacharacters in process selection **Risk Level**: High ### Vulnerable Code ```js async function closeApp(appName) { const sanitizedApp = sanitizeAppName(appName); if (platform === 'linux' || platform === 'darwin') { // pkill -f pattern await execFilePromise('/usr/bin/pkill', ['-f', sanitizedApp]); ``` ### Technical Analysis On Linux and macOS, `closeApp()` supplies the user-controlled application name to `pkill -f`. Although `execFile` prevents shell-command injection, the argument is interpreted by `pkill` as a regular expression matched against complete process command lines. The validation performed by `sanitizeAppName()` permits dots, dashes, spaces, underscores, and alphanumeric characters. In particular, the permitted dot character is a regular-expression wildcard that matches any character. The validator therefore does not neutralize input for the downstream regular-expression interpreter. This also means benign short application names may match unrelated command lines because `-f` performs substring-style matching against the full command line rather than exact executable-name matching. ### Attack Path 1. An attacker or untrusted caller invokes the skill on Linux or macOS using `--action close_app --app .`. 2. `sanitizeAppName()` accepts `.` because dots are included in its allowlist. 3. `closeApp()` invokes `/usr/bin/pkill` with `['-f', '.']`. 4. `pkill` interprets `.` as a regular-expression wildcard. 5. The pattern matches nearly every non-empty process command line visible and signalable by the skill's operating-system user. 6. `pkill` terminates those matched processes, including unrelated applications and potentially components supporting the agent session. ### Impact Assessment Exploitation can cause denial of service and loss of unsave ...[truncated 308 chars]
Remediation
## Remediation Suggestions Avoid passing an application identifier to a regular-expression process matcher. 1. Prefer exact executable-name matching, such as `pkill -x -- sanitizedApp`, after validating the expected executable-name format. 2. If full-command matching is operationally necessary, escape every regular-expression metacharacter before invoking `pkill`, anchor the resulting expression to the intended command structure, and include `--` before the pattern where supported. 3. Reject ambiguous identifiers such as `.`, names consisting only of punctuation, and excessively broad short patterns. 4. Consider enumerating processes first, comparing parsed executable paths or names literally, and terminating only explicitly identified process IDs. 5. Add regression tests demonstrating that inputs such as `.`, `..`, and short substrings cannot select unrelated processes. 6. Update the security documentation to distinguish shell metacharacter protection from regular-expression metacharacter protection.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill is presented as providing 'safe device actions,' but the documented behavior includes launching applications and force-closing processes across platforms via shell/process execution. That mismatch is dangerous because it understates the real authority of the skill, which can be abused to run arbitrary allowed executables, disrupt user workflows, or terminate security-relevant processes if the implementation accepts loosely constrained app names.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
// SECURITY: Validate and sanitize inputs
function sanitizeNumber(val, min = 0, max = 100) {
  // Strict regex check to prevent trailing junk like "50; rm -rf /"
  if (!/^-?\d+$/.test(String(val))) {
      throw new Error('Value must be a valid integer with no extra characters');
  }
Confidence
100% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
// SECURITY: Validate and sanitize inputs
function sanitizeNumber(val, min = 0, max = 100) {
  // Strict regex check to prevent trailing junk like "50; rm -rf /"
  if (!/^-?\d+$/.test(String(val))) {
      throw new Error('Value must be a valid integer with no extra characters');
  }
Confidence
95% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
// SECURITY: Validate and sanitize inputs
function sanitizeNumber(val, min = 0, max = 100) {
  // Strict regex check to prevent trailing junk like "50; rm -rf /"
  if (!/^-?\d+$/.test(String(val))) {
      throw new Error('Value must be a valid integer with no extra characters');
  }
Confidence
100% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Chaining Abuse

High
Category
Tool Misuse
Content
// SECURITY: Validate and sanitize inputs
function sanitizeNumber(val, min = 0, max = 100) {
  // Strict regex check to prevent trailing junk like "50; rm -rf /"
  if (!/^-?\d+$/.test(String(val))) {
      throw new Error('Value must be a valid integer with no extra characters');
  }
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill advertises shell-backed device control behavior but does not declare any explicit tool scope such as permissions or allowed-tools. That omission weakens reviewability and containment, because a consumer cannot easily tell that system command execution is required, and shell access materially increases the consequences of any downstream validation failure or implementation bug.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill exposes a close_app capability but does not clearly warn users that it may forcibly terminate applications. This can cause data loss, interruption of active work, or termination of sensitive processes, especially because the skill is framed as 'safe' and users may not expect destructive behavior from a convenience automation tool.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The module imports broad subprocess primitives (`exec`, `execFile`) and uses them throughout to invoke arbitrary system utilities, which is more capability than a narrowly scoped 'safe device actions' skill should need. In agent environments, such broad execution surfaces increase the chance of capability creep, abuse, and unintended OS-level side effects.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill claims to expose safe device actions, but on Linux `open_app` executes any sanitized string as a command via `exec`, which effectively grants arbitrary program-launch capability. Even without shell metacharacter injection, this materially expands the tool from device control into general command execution and could be abused to start terminals, network tools, or other sensitive applications.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
`closeApp` uses broad process-matching semantics, especially `pkill -f` on Unix-like systems, which can terminate any process whose full command line contains the provided string. This can be abused to kill unrelated or critical processes, causing denial of service or disruption beyond the intended target application.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The closeApp function forcibly terminates processes using pkill and taskkill, which can cause loss of unsaved work or disrupt the user's system state. While the file contains generic success/error logging, it does not provide any explicit warning, confirmation, or comment disclosing that this action is destructive to running applications.

Missing User Warnings

Low
Confidence
81% confidence
Finding
The openApp function launches local applications through exec/execFile, which changes system state by starting external programs. Although the action name suggests app launching, this file does not include a specific warning, disclosure, or documentation comment indicating that invoking open_app will execute a local program on the user's machine.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
ctl.js:200