Back to skill

Security audit

Cursor Dispatch

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real Cursor-agent orchestration guide, but it recommends broad auto-approved execution patterns that can change code, run commands, create commits, and kill processes with limited safeguards.

Install only if you are comfortable letting a delegated Cursor agent modify repositories and run project commands. Prefer plan/review flows, avoid `--yolo` and `--trust` on untrusted repos, run work in an isolated worktree or container, review verification commands and commits manually, and do not use the global process-kill fallback except with clear awareness that it can stop unrelated Cursor sessions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
中 N 个问题: 1. 第 X 行:<current code> → <fixed code> 2. 第 Y 行:<current code> → <fixed code> 修复后运行:<verify command> 确认无错误后 git commit -m '<message>'。" ``` ### Technical Analysis The documented command templates interpolate the project path and task-controlled strings into a shell command. The project path is not quoted, while the prompt, task, and commit message are enclosed in single quotes without any escaping procedure. Single quotes do not provide protection when the interpolated value itself can contain a ...[truncated 2310 chars]:24
Finding

Shell Command Injection Through Unescaped Dynamic Placeholders

Content
View full analysis
&& cursor agent -p --trust [FLAGS] --model auto --workspace . ''", pty: true, timeout: ) ``` The same unsafe construction appears in the direct execution workflow: ```text exec( command: "cd && cursor agent -p --trust --yolo --model auto --workspace . ''", pty: true, timeout: 180 ) ``` A commit-message template also performs unsafe shell interpolation: ```text Execute: "修复 中 N 个问题: 1. 第 X 行: → 2. 第 Y 行: → 修复后运行: 确认无错误后 git commit -m ''。" ``` ### Technical Analysis The documented command templates interpolate the project path and task-controlled strings into a shell command. The project path is not quoted, while the prompt, task, and commit message are enclosed in single quotes without any escaping procedure. Single quotes do not provide protection when the interpolated value itself can contain a single quote. A value containing `'` can terminate the intended argument and introduce shell operators such as `;`, `&&`, command substitution, or redirection. An unquoted project path can likewise alter command parsing through spaces or shell metacharacters. For example, if a task placeholder were populated with a value conceptually equivalent to: ```text legitimate task'; attacker_command; # ``` the generated command would end the quoted task argument and execute `attacker_command` in the dispatcher's shell context. The audit did not execute such a payload; this path follows directly from the documented string-concatenation pattern. The risk also applies to `` because the instructions encourage inserting and running an arbitrary verification command w ...[truncated 1418 chars]
Remediation
View remediation
&& ...`. 3. If shell execution is unavoidable, apply platform-correct shell escaping independently to every dynamic argument. Generic quote replacement is not sufficient across shells. 4. Validate project paths using canonicalization and restrict them to an explicitly approved workspace root. 5. Treat task text, commit messages, repository content, and agent-produced verification instructions as untrusted input. 6. Replace arbitrary verification commands with a repository-specific allowlist of executable and argument combinations. 7. Pass Git commit messages as discrete arguments rather than interpolating them into a shell command. 8. Add tests containing quotes, spaces, newlines, command substitutions, redirections, and shell operators to ensure values remain single inert arguments. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:125
Finding

Unrestricted Agent Approval and Workspace Trust Break Least-Privilege Boundaries

Content
View full analysis
&& cursor agent -p --trust --yolo --model auto --workspace . ''", pty: true, timeout: 180 ) → poll → verify output not empty → done ``` ``` The mode table explicitly defines the execution setting: ```text | Execute | `--yolo` | 180s | Auto-approve changes | ``` The CLI parameter reference confirms the scope of this option: ```text -f, --force / --yolo Auto-approve all ``` ### Technical Analysis The direct execution workflow combines `--trust` with `--yolo`. According to the included parameter reference, `--yolo` auto-approves all actions. This removes interactive review boundaries for changes or commands proposed by the delegated Cursor agent. A coding agent operates on instructions and repository content that may be untrusted. Source files, workspace rules, task descriptions, generated build instructions, or other contextual material can influence agent behavior. Automatically trusting the workspace and approving all actions gives such content a path to induce changes or command execution without a human authorization gate. This is a least-privilege failure rather than evidence that the Skill intentionally performs malicious actions. Its severity follows from granting broad authority by default in an orchestration workflow. ### Attack Path 1. A user dispatches the Skill against an untrusted or compromised repository, or supplies an attacker-influenced task. 2. Malicious repository content or task text influences the delegated coding agent. 3. The Skill launches Cursor with both trusted-workspace behavior and automatic approval. 4. The agent proposes file modifications or commands based ...[truncated 997 chars]
Remediation
View remediation

other

Warning
Location
SKILL.md:99
Finding

Global Process-Kill Fallback Can Terminate Unrelated Cursor Sessions

Content
View full analysis
10 minutes: process(action=kill, sessionId=X) 4. Verify: ps aux | grep "cursor agent -p" | grep -v grep 5. Nuclear option: pkill -f "cursor agent -p" (kills ALL cursor CLI agents) ``` ``` ### Technical Analysis The cleanup procedure includes `pkill -f "cursor agent -p"`, which matches process command lines globally for the invoking user's visible process namespace. It is not restricted to processes created by the current Skill invocation, a recorded session identifier, a parent process, or a specific workspace. Consequently, recovery from one failed task can terminate unrelated Cursor agents belonging to other repositories or orchestration jobs. Command-line pattern matching is also less reliable than terminating recorded process identifiers because unrelated processes may contain the same text. The instructions accurately call this a “nuclear option,” but they do not require user confirmation or establish controls that prevent collateral termination. ### Attack Path 1. A task is made to hang, exceed its timeout, or otherwise trigger cleanup. 2. Normal session-based termination is considered insufficient or orphaned processes are suspected. 3. The documented fallback executes `pkill -f "cursor agent -p"`. 4. Every visible process whose command line matches the pattern receives a termination signal. 5. Unrelated Cursor sessions stop, potentially while writing files, running tests, or managing repository state. ### Impact Assessment The primary impact is denial of service and loss of in-progress work rather than privilege escalation. Potential consequences include: - Termination of unrelated Cursor CLI sessions. - Interrupted f ...[truncated 417 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Documenting --yolo as auto-approve changes without a clear warning normalizes fully autonomous modification behavior. In practice, this can cause unintended edits, unsafe command execution, or unnoticed repository changes when used by operators who do not realize approval checks have been bypassed.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The skill explicitly supports autonomous decision-making through auto-approval of code changes. In a coding agent context, that increases risk because file modifications can occur without human review, and the surrounding workflows also contemplate verification commands and commits, compounding the effect of a bad prompt or unsafe project environment.

Content

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

md
| Mode | Flags | Timeout | Use |
|------|-------|---------|-----|
| Plan | `--plan` | 180s | Read-only analysis |
| Execute | `--yolo` | 180s | Auto-approve changes |
| Ask | `--mode ask` | 120s | Q&A, no changes |

## Concurrency Control Protocol

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The cleanup guidance includes broad kill operations, including pkill -f "cursor agent -p", without requiring confirmation or emphasizing blast radius. In shared or multi-task environments, this can terminate unrelated active sessions, destroy in-flight work, and create denial-of-service against other agent tasks.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This section goes beyond mere orchestration and explicitly instructs the operator to have the downstream agent modify code, run verification commands, and create git commits. That materially increases the autonomy and state-changing power of the skill, so a mistaken prompt, poisoned repository, or unsafe verification command could lead to unintended code changes or repository state modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow instructs the agent to run verification commands and then create git commits, but does not warn that these actions modify repository state and may execute arbitrary project-defined scripts. Verification commands can trigger unsafe build hooks or test code, and auto-commits can persist unintended or malicious changes.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/models-and-params.md (reported line 74)May include surrounding context.

md
--continue                    Continue last session
  --model <model>               Model selection
  --list-models                 List models and exit
  -f, --force / --yolo          Auto-approve all
  --sandbox <mode>              enabled | disabled
  --approve-mcps                Auto-approve MCP servers
  --trust                       Trust workspace (headless)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/models-and-params.md (reported line 76)May include surrounding context.

md
--continue                    Continue last session
  --model <model>               Model selection
  --list-models                 List models and exit
  -f, --force / --yolo          Auto-approve all
  --sandbox <mode>              enabled | disabled
  --approve-mcps                Auto-approve MCP servers
  --trust                       Trust workspace (headless)

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The documented command template applies --trust even for plan mode, while the text describes plan mode as read-only analysis. If --trust relaxes sandboxing or approval boundaries, the documentation creates a misleading safety model: operators may believe they are invoking a harmless read-only action when the runtime permissions are broader.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

Labeling plan mode as read-only without a technical mechanism that enforces read-only operation is a safety issue because users may over-trust the mode and run it in sensitive repositories. The danger is primarily from mismatched expectations: a trusted invocation may still have the capability to write files or perform other side effects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Multiple recommended prompts are written as mandatory Chinese command text, and the skill does not state that users may choose another language. This creates a locale/language policy issue because it implicitly forces a specific language without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The "Good" prompt examples and the reusable plan/execute template are provided exclusively in Chinese imperative text. Since no language choice or region-specific justification is given, the skill appears to enforce a specific language convention.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.