Back to skill

Security audit

Screenshot Capture

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent personal screenshot-saving purpose, but it can automatically preserve shared images, edit notes, and create reminders from broad triggers without clear pre-action confirmation.

Install only if you want screenshots shared in matching contexts to be automatically saved into local notes, summarized, pattern-logged, and paired with reminders. Avoid using it for sensitive screenshots unless you first narrow the trigger, require confirmation before writes, and ensure file paths are handled safely with sanitized names and structured file operations.

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

Warning
Location
SKILL.md:10
Finding
Unquoted File Paths May Enable Shell Command or Option Injection<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 10 **Vulnerability Type**: Shell command injection and argument injection **Risk Level**: Medium ### Vulnerable Code ```sh cp [inbound image] notes/screenshots/[descriptive-name].jpg ``` ### Technical Analysis The documented copy command uses placeholders for the inbound image path and descriptive destination name without requiring shell-safe quoting, validation, or an end-of-options delimiter. If an agent implementation directly interpolates attacker-controlled or model-generated values into this command, the shell may interpret whitespace, metacharacters, command substitutions, redirections, or leading hyphens rather than treating the values exclusively as file paths. For example, an inbound filename containing shell syntax could execute additional commands when inserted into a shell command. A source path beginning with `-` could also be interpreted as a `cp` option. The destination name is model-generated from screenshot content and therefore should likewise be treated as untrusted until normalized. Exploitation depends on the workflow executing this template through a shell with direct string interpolation. Structured process invocation that passes arguments separately would prevent shell metacharacter interpretation. ### Attack Path 1. An attacker provides a screenshot whose inbound filename or associated naming context contains crafted shell syntax, whitespace, command substitution, or a leading option marker. 2. The agent derives the source or destination path and substitutes it directly into the documented `cp` command. 3. The agent executes the resulting command through a shell without quoting, validation, or `--`. 4. The shell interprets the crafted content as syntax or additional arguments. 5. Commands may execute, or files may be copied to or overwritten at unintended locations, with the privileges of the agent process. ### Impact Assessment Successful exploitation co ...[truncated 571 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prefer a structured filesystem API or process-execution API that passes the source and destination as separate arguments without invoking a shell. 2. If shell execution is unavoidable, use an end-of-options delimiter and quote both paths: ```sh cp -- "$source_path" "$destination_path" ``` 3. Do not construct either path by directly concatenating untrusted screenshot content, comments, filenames, or model output. 4. Generate destination names from a strict allowlist, such as lowercase ASCII letters, digits, and hyphens. Reject or replace path separators, control characters, shell metacharacters, leading hyphens, `.` segments, and `..` segments. 5. Resolve and canonicalize both paths before copying. Verify that the source belongs to the approved inbound directory and that the destination remains within `notes/screenshots`. 6. Prevent unintended overwrites by generating unique filenames or using no-clobber behavior where appropriate. 7. Run the workflow with least privilege and restrict its filesystem access to the inbound-image and notes directories. ]]>
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 (3)

Vague Triggers

Medium
Confidence
93% confidence
Finding
The skill description is broad enough to trigger on ordinary screenshot-sharing behavior such as sending an image with casual context like 'save this.' That increases the chance the agent will activate without clear user intent and then perform side effects such as storing files and modifying notes, which can lead to unauthorized persistence of sensitive content.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The workflow says 'When Enzo shares a screenshot with comments, execute this workflow' without requiring confirmation, scoping rules, or exceptions. Because the workflow includes copying files, editing multiple notes, and setting reminders, underspecified triggering can cause unintended actions and durable changes from ambiguous conversational input.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill automatically copies inbound images, updates several files, logs patterns, and always creates a reminder, but this behavior is not clearly disclosed up front. Hidden or insufficiently signaled side effects are dangerous because users may share screenshots expecting analysis only, while the agent silently persists possibly sensitive content and creates additional records and tasks.

Static analysis

No suspicious patterns detected.