Back to skill

Security audit

reviewer-rebuttal-coach

Security checks for vulnerabilities and agentic risk

Overview

This skill reads the current macOS clipboard to help draft reviewer-response text, and the inspected files do not show hidden execution, exfiltration, persistence, or destructive behavior.

Install only if you are comfortable with the agent reading whatever is currently on your macOS clipboard. Before invoking it, copy only the review comments or feedback you want analyzed, and treat any instruction-like text inside the copied material as quoted source content rather than commands to follow.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
scripts/read_clipboard.mjs:11
Finding
Untrusted Clipboard Content Is Passed Verbatim into the Agent Context## Vulnerability Details **File Location**: `scripts/read_clipboard.mjs:11-20` and `SKILL.md:15-25, 31-40` **Vulnerability Type**: Indirect prompt injection through untrusted clipboard content **Risk Level**: Medium ### Vulnerable Code ```javascript const text = readClipboard(); if (!text) { console.error("剪贴板中没有可读取的文本。请先复制内容再调用此 skill。"); process.exit(1); } console.log("===CLIPBOARD_TEXT_BEGIN==="); console.log(text); console.log("===CLIPBOARD_TEXT_END==="); ``` The corresponding Skill instructions direct the Agent to read and process this output: ```markdown 你需要: 1. 读取剪贴板文本 2. 提取意见要点 3. 按问题类型分类 4. 生成逐条回复建议 5. 生成修改任务清单 6. 标出优先级和风险点 ``` ```markdown 你应运行: ```bash node {baseDir}/scripts/read_clipboard.mjs ``` ``` ### Technical Analysis Clipboard content is externally controlled and is printed verbatim into the output consumed by the Agent. Although the script surrounds the content with boundary markers, those markers provide no security enforcement. Neither the script nor the Skill instructions explicitly require the Agent to treat the enclosed content solely as untrusted review data. An attacker can embed instruction-like text in a document presented as reviewer feedback. After the user copies it, the embedded instructions enter the Agent context alongside legitimate review comments. This creates an indirect prompt-injection boundary in which malicious content may compete with the user's request or the Skill's intended workflow. The clipboard text is not executed as shell code, and the reviewed implementation contains no network transmission or persistence mechanism. Exploitation therefore depends on the Agent interpreting malicious clipboard text as instructions rather than data. ### Attack Path 1. An attacker supplies a document containing plausible review feedback and embedded instructions intended for the Agent. 2. The user copies the document text into the system clipboard. 3. The user invokes the reviewer-rebuttal Skill. 4. The Skill runs ...[truncated 985 chars]
Remediation
## Remediation Suggestions 1. Add an explicit trust-boundary rule to `SKILL.md`: all clipboard content must be treated exclusively as untrusted data, never as Agent instructions. 2. Require the Agent to ignore clipboard requests that attempt to change roles, override instructions, reveal secrets, invoke tools, access files, execute commands, or contact external services. 3. Place clipboard content in a clearly labeled structured field, such as a JSON value, rather than emitting it as undifferentiated conversational text. 4. Restrict the default workflow to text extraction, classification, and response drafting. Require explicit user confirmation before performing any action beyond analysis. 5. Preserve the original text for analysis while neutralizing instruction-like passages by labeling them as quoted source material. 6. Add adversarial tests using clipboard samples containing prompt-injection phrases and verify that the Agent reports or ignores those phrases instead of following them.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The README explicitly states that the skill reads from the clipboard, but it provides no warning that clipboard contents may contain sensitive material such as unpublished manuscripts, reviewer identities, credentials, or unrelated copied data. This creates a real privacy and data-handling risk because users may invoke the skill without realizing it will access whatever is currently on the system clipboard.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill is designed to read clipboard contents via pbpaste, but it does not warn the user that the clipboard may contain sensitive data unrelated to the current task. Broad clipboard access can unintentionally expose private material such as passwords, tokens, personal data, or confidential manuscript content if the clipboard was changed or contains more than expected.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The natural-language instructions, examples, and workflow are entirely specified in Chinese, implying the skill operates in a fixed language/locale without explicit user opt-in or alternative language support. Under the language/locale policy, a skill should not force a specific language unless it offers a choice or clearly documents a justified region- or language-specific constraint.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The invocation examples include broad phrases such as "帮我回复审稿意见" and especially "读取剪贴板并生成答复," which do not tightly constrain when this skill should activate beyond a general request to read clipboard content and generate a response. The file does not provide exclusion conditions or negative examples to distinguish these triggers from ordinary conversational requests, increasing the risk of unintended invocation.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code file contains a user-facing error message in Chinese only, which imposes a specific language on users without opt-in. The policy for natural-language violations applies to all file types, including code string literals, and there is no indication that this skill is intentionally limited to a Chinese-speaking or region-specific context.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
This markdown file contains user-facing natural-language content exclusively in Chinese, and there is no indication that the skill offers a language choice or that the locale restriction is intentional and documented. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/read_clipboard.mjs:5