Back to skill

Security audit

Desktop Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill openly provides desktop automation, but it gives broad screen-reading and mouse/keyboard control with weak safeguards and an unsafe saved-task loader.

Install only if you intentionally want an agent to see your screen and control mouse and keyboard. Avoid using it around passwords, banking, admin prompts, private messages, or sensitive documents; review learned task files before running them, and treat task names and task JSON as trusted inputs only.

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
__init__.py:222
Finding

Task Name Path Traversal Enables Arbitrary JSON File Access and Untrusted Desktop Automation

Content
View full analysis
dict: """Load a saved task.""" filepath = self.tasks_dir / f"{task_name.replace(' ', '_')}.json" with open(filepath, 'r') as f: return json.load(f) ``` The loaded task is subsequently interpreted as desktop automation instructions in `__init__.py:239-283`: ```python def execute_task(self, task_name: str, **variables): """Execute a learned task with optional variables.""" task = self.load_task(task_name) results = [] for step in task["steps"]: step_type = step.get("type") # Replace variables in text text = step.get("text", "") for key, value in variables.items(): text = text.replace("{" + key + "}", value) if step_type == "click": self.click(step.get("x"), step.get("y")) results.append(f"Clicked {step.get('x')}, {step.get('y')}") elif step_type == "type": self.type(text) results.append(f"Typed: {text}") elif step_type == "press": self.press(*step.get("keys")) results.append(f"Pressed: {step.get('keys')}") elif step_type == "hotkey": self.hotkey(*step.get("keys")) results.append(f"Hotkey: {step.get('keys')}") elif step_type == "wait": import time time.sleep(step.get("seconds", 1)) ...[truncated 3717 chars]
Remediation
View remediation
str: if not TASK_NAME_PATTERN.fullmatch(task_name): raise ValueError("Invalid task name") return task_name ``` Reject absolute paths, path separators, empty names, `.` components, and `..` components. 2. **Enforce canonical path containment** Resolve both paths and verify that the resulting task path is a child of the intended directory: ```python def _task_path(self, task_name: str) -> Path: validate_task_name(task_name) base = self.tasks_dir.resolve() candidate = (base / f"{task_name}.json").resolve() if candidate.parent != base: raise ValueError("Task path escapes the task directory") return candidate ``` Use this centralized helper for both loading and saving. 3. **Prevent unintended overwrites** Use exclusive creation mode when creating new tasks or require explicit confirmation before replacement: ```python with open(filepath, "x", encoding="utf-8") as f: json.dump(task_data, f, indent=2) ``` If replacement is necessary, write to a safely created temporary file within `learned_tasks` and atomically replace the target after validation. 4. **Validate task documents against a strict schema** Require a dictionary with an allowed `steps` array. For every step: - Allowlist supported step types. - Reject unknown properties where practical. - Validate coordinate ranges against the screen dimensions. - Allowlist recognized key names and hotkey combinations. - Require finite, non-negative wait durations and enforce a maximum. - Limit text length. - Validate screenshot destinations separately and confine them to an approved directory. - Enforce limits on ...[truncated 648 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The task replay system can execute stored sequences of clicks, typing, hotkeys, waits, screenshots, and OCR-assisted text interactions with variable substitution, effectively acting as a general-purpose desktop automation engine. Because there are no permission checks, provenance controls, path restrictions, or execution warnings, a saved task can silently perform destructive actions, capture sensitive data, and persist reusable attack workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The method writes a desktop screenshot to any caller-supplied path with no validation, restriction to the workspace, or user confirmation. In a desktop-control skill, screenshots can capture credentials, messages, tokens, and other sensitive data, and arbitrary save locations increase the chance of silent data staging or persistence outside the intended workspace.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code performs OCR over the full screen by default, extracting any visible text without limits or user notice. In practice this can collect passwords, MFA codes, emails, chats, documents, and other highly sensitive information from unrelated applications, making the desktop-agent context especially risky.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill can generate arbitrary mouse clicks on the user's desktop without confirmation, enabling interaction with any visible application or security prompt. In combination with screen-reading and task automation features, this enables end-to-end unauthorized actions such as opening apps, approving dialogs, changing settings, or triggering data exfiltration workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Arbitrary text is injected into whichever application currently has focus, with no validation or warning. This can cause accidental or malicious submission of secrets, execution of shell commands, modification of documents or chats, or interaction with elevated prompts when combined with automated clicking/focus changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The CLI exposes direct mouse-click actions that can trigger arbitrary UI interactions on the host desktop without any confirmation, safety prompt, or indication of what window will receive the input. In an agent context, accidental or scripted invocation can cause unintended clicks on sensitive dialogs, browsers, terminals, or security prompts, making this a real safety/security issue even if the implementation appears intended for legitimate automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

These commands collect text or keys from stdin and immediately inject them into the active desktop session without warning about where the keystrokes will go. That can lead to credential leakage, unintended command execution, or manipulation of privileged applications if the focused window is sensitive or attacker-controlled.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Running a learned task can replay a sequence of stored desktop actions with no disclosure, review, or confirmation of what the task will do at execution time. Because the tasks are loaded by name and may include clicks, waits, or other UI automation steps, this increases the risk of executing unsafe or tampered automation against the local desktop environment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill activates for very broad requests such as controlling applications, learning tasks, or automating workflows, which can unintentionally match many ordinary desktop-related prompts. Because this skill grants screen visibility and mouse/keyboard control, over-broad triggering increases the chance the agent invokes a high-privilege capability without sufficiently explicit user intent, enabling unintended actions in sensitive applications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation exposes screenshot capture and reusable task execution features with only a minimal caution note, despite these capabilities enabling collection of sensitive on-screen data and execution of arbitrary UI actions across applications. In a desktop-control skill, weak warnings and missing safety guidance make accidental privacy violations, credential exposure, or destructive workflow automation more likely.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.