Back to skill

Security audit

图片姬

Security checks for vulnerabilities and agentic risk

Overview

This image-prompt skill is mostly coherent, but it requests broad file editing and browser powers that are not clearly needed for prompt generation.

Review this skill before installing because it asks for file editing and browser access even though its visible instructions mainly generate image prompts. Prefer installing only if your host can sandbox file writes, require confirmation before browser use, or remove Write/Edit unless you specifically need the skill to save or modify local files.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:8
Finding
Excessive File Modification and Browser Permissions## Vulnerability Details **File Location**: `SKILL.md:8-14` **Vulnerability Type**: Excessive tool permissions violating least privilege **Risk Level**: Medium ```yaml allowed-tools: - Read - Write - Edit - AskUserQuestion - BrowserUse ``` ### Technical Analysis The Skill is designed to analyze image requirements, consult bundled documentation, recommend visual options, and produce image-generation prompts. These operations legitimately require document-reading and user-interaction capabilities, but the declared permissions additionally grant unrestricted `Write` and `Edit` capabilities. No reviewed workflow, template, or example requires modifying local files. Granting these capabilities therefore exceeds the Skill's documented operational requirements and increases the consequences of malicious or adversarial input. If the host platform treats `allowed-tools` as an authorization boundary, content processed by the Skill could attempt to induce the Agent to overwrite or alter any files accessible through those tools. `BrowserUse` may be relevant to the optional image-generation stage, but the configuration does not limit it to approved image-generation services, trusted destinations, or explicit user-confirmed operations. This unnecessarily broadens the network interaction surface. ### Attack Path 1. A user activates the Skill with an image or prompt-generation request. 2. The request includes adversarial instructions disguised as image content, reference material, or a required workflow step. 3. Because `Write` and `Edit` are authorized, the adversarial content attempts to convince the Agent to create, overwrite, or modify an accessible project or configuration file. 4. Alternatively, the content directs `BrowserUse` to an attacker-selected or otherwise unintended destination. 5. If the Agent follows those instructions without an independent authorization check, the attacker can cause file modification ...[truncated 1032 chars]
Remediation
## Remediation Suggestions 1. Remove `Write` and `Edit` from `allowed-tools`, because no documented Skill operation requires local file modification. 2. Use a least-privilege default configuration containing only `Read` and `AskUserQuestion` for prompt analysis and generation. 3. Move optional direct image generation into a separate, explicitly invoked workflow with user confirmation. 4. If browser access is necessary, restrict it to an allowlist of trusted image-generation endpoints and prohibit arbitrary navigation. 5. Require a clear confirmation showing the destination and intended data before any browser request. 6. Enforce host-level filesystem sandboxing and deny writes outside a dedicated output directory if future functionality genuinely requires file creation. 7. Add tests confirming that image-related user content cannot trigger file modification or navigation to unapproved destinations.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (9)

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger metadata is very broad and consists of generic image/prompt-generation terms without clear scope boundaries, exclusions, or confirmation requirements. This can cause the skill to activate in unintended contexts, increasing the chance of overreach, tool use when not needed, or interference with other skills handling adjacent requests.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The document states that when the user's language is unspecified, image text will default to Chinese. This is a natural-language policy concern because it imposes a specific locale without offering user choice or documenting a justified region-specific constraint.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The document is entirely written in Chinese and does not indicate any ability to switch languages or respect user locale preferences. This can cause the skill to ignore user language expectations, reducing usability and potentially leading to misunderstandings or inaccessible output for non-Chinese users, but it does not create a direct security compromise.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
SQP-3 applies to all file types, including markdown. Several prompt blocks explicitly require Chinese output, such as '带中文注释', '清晰中文字体', or 'Chinese language', which imposes a language choice on the user without opt-in. This is a natural-language locale policy issue rather than a code-security issue.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The instruction '清晰中文字体' mandates a specific language/locale presentation. Under SQP-3, forcing a specific language without offering user choice is a policy violation unless clearly justified as region-specific.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This line directly constrains the output language to Chinese. Because the file does not present this as an opt-in or region-specific requirement, it matches the SQP-3 language/locale policy violation criteria.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This natural-language instruction fixes the output locale to Chinese. Under SQP-3, that should be flagged unless the skill offers a language choice or clearly documents a justified locale constraint.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
Line L09 states that the title and body must use Chinese unless a specific name or the user specifies another language. This imposes a default language requirement rather than offering a neutral choice, which matches the locale/language policy violation category.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
This markdown file contains user-facing natural-language guidance exclusively in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. Under the language/locale policy rule, forcing a specific language without user choice can be a policy concern.

Static analysis

No suspicious patterns detected.