Back to skill

Security audit

Shortcuts Automator

Security checks for vulnerabilities and agentic risk

Overview

The skill is meant to control macOS Shortcuts, but it should be reviewed because broad triggers and shell-style command examples could lead to unintended or unsafe shortcut execution.

Review this skill before installing. Use it only for trusted local shortcuts, require explicit confirmation before running or signing shortcuts, and avoid executing shortcut names assembled into shell command strings unless names are validated from `shortcuts list` and passed as separate process arguments.

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
SKILL.md:43
Finding
Shell Command Injection Through Unsafely Interpolated Shortcut Names<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 43-56 **Vulnerability Type**: Shell command injection **Risk Level**: High ### Vulnerable Code ```bash shortcuts run "Morning Routine" shortcuts run "Send Email" ``` ```markdown **Parameters:** - `<name>`: Exact name of the shortcut (use quotes if name contains spaces) ``` ### Technical Analysis The skill instructs the agent to place a shortcut name into a shell-command template. It recommends enclosing the value in double quotes but does not require shell-free process execution, validation, or platform-correct escaping. Double quotes alone are not a safe defense when an untrusted value is used to construct a command string. A value containing a closing quote, command substitution, or other shell syntax may alter the resulting command. For example, interpolating a name such as `x"; malicious-command; #` could produce: ```bash shortcuts run "x"; malicious-command; #" ``` If the agent passes this generated string to a shell, the shell runs `malicious-command` separately from the intended `shortcuts` invocation. Command substitution syntax may also be evaluated inside double quotes when the assembled value is interpreted as shell source. The same unsafe usage pattern is repeated in `README.md`, lines 32-45. Exploitability depends on the execution layer constructing and evaluating a shell command string rather than passing the shortcut name as a distinct process argument. ### Attack Path 1. An attacker supplies or requests a shortcut name containing shell syntax, such as `x"; malicious-command; #`. 2. The agent follows the documented template and inserts that value between literal double quotes. 3. The agent or its command-execution tool submits the assembled command through a shell. 4. The injected quote terminates the intended shortcut-name argument. 5. The shell interprets the remaining text as an additional command. 6. The injected command executes with the operating-system priv ...[truncated 816 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Avoid shell command construction.** Invoke the executable through a process API that accepts an argument array: ```text executable: shortcuts arguments: ["run", shortcutName] shell: false ``` 2. **Do not rely on double quotes as sanitization.** Never concatenate user-controlled shortcut names into a command string evaluated by `/bin/sh`, `bash`, `zsh`, or an equivalent shell. 3. **Validate against authoritative output.** Run `shortcuts list`, parse the returned shortcut names without shell evaluation, and require the requested name to exactly match an existing entry. 4. **Use explicit operation allowlisting.** Restrict execution to the documented `list`, `view`, `run`, and `sign` subcommands and pass every dynamic value as a separate argument. 5. **Require confirmation for sensitive execution.** Before running or signing a shortcut, display its exact matched name and request confirmation when its behavior is unknown or it can access sensitive resources. 6. **Document the safe invocation requirement.** Update both `SKILL.md` and `README.md` to state that implementations must use shell-free argument passing. If a shell is unavoidable, apply robust platform-specific escaping and reject control characters, command substitutions, quotes, and shell metacharacters. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger list is very broad and includes generic phrases like "run automation" and "show shortcuts," which can cause the skill to activate in situations where the user did not explicitly intend to execute or manage macOS Shortcuts. In this skill's context, unintended invocation is more dangerous than usual because the skill can run arbitrary user-created shortcuts, and shortcuts may themselves execute shell commands, access files, or control other applications.

Static analysis

No suspicious patterns detected.