Back to skill

Security audit

Ai Writing Style Cloner

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent writing-style cloning purpose, but it asks for broad command execution and stores reusable author-style data with weak safeguards.

Review this skill before installing. Use it only in a constrained workspace with scoped file access, avoid administrator/root execution, avoid storing sensitive or third-party text without authorization, and treat saved style fingerprints as untrusted data that may need review or deletion.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:121
Finding

Persistent Prompt Injection Through Untrusted Style Fingerprints

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 121-140
Vulnerability Type: Persistent indirect prompt injection caused by unsafe handling of untrusted content
Risk Level: Medium

Relevant instruction excerpt translated into English:

markdown
### Step 1: Style distillation (distill)
- Receive content samples uploaded by the author
  (text/image OCR text/text extracted from links)
- Invoke the LLM to analyze six dimensions of style characteristics
- The LLM returns a structured style fingerprint JSON
- Validate the completeness of the six fields
- Return the style fingerprint for author preview and confirmation

### Step 2: Style saving (save)
- Receive the style fingerprint JSON confirmed by the author
- Write the style fingerprint to a JSON file
  (style_fingerprints/{author_id}.json)
- If the file exists, overwrite and update it while retaining timestamps
- Store the complete style fingerprint JSON in the raw_analysis field

### Step 4: Content generation injection (automatic)
- Read the author's style fingerprint JSON during content generation
- Parse the six style characteristics
- Concatenate them into a style description
- Inject the description into the semi-static layer of the content-generation prompt
- Require the LLM to follow the style fingerprint

Technical Analysis

The Skill processes user-supplied writing samples with an LLM and stores the resulting fingerprint fields in persistent JSON files. Several fields, including sentence structure, rhythm, rhetorical preferences, emotional tone, style summary, and raw_analysis, are unrestricted natural-language values.

The saved values are subsequently concatenated into the semi-static prompt layer used for content generation. The instructions do not define:

  • An allowlist or strict schema for free-text values
  • Maximum field lengths
  • Escaping or canonical serialization rules
  • Separation between trust ...[truncated 2481 chars]
Remediation
View remediation

Remediation Suggestions

  1. Treat uploaded samples, LLM output, saved fingerprints, and raw_analysis as untrusted data.
  2. Replace unrestricted categorical fields with strict enumerations. For example, allow only predefined values for tone and emotional classification.
  3. Apply maximum lengths, character restrictions, type validation, and allowed-value checks to every fingerprint field.
  4. Do not persist unrestricted raw_analysis. If it is operationally required, store it separately and never inject it into prompts.
  5. Serialize fingerprint data as a clearly delimited data object instead of concatenating values into instructional prose.
  6. Add an explicit trusted instruction stating that fingerprint fields are descriptive data and that commands, requests, or policy statements inside them must not be followed.
  7. Detect and reject imperative or instruction-like content in generated fingerprint fields before saving.
  8. Require a structured review screen that exposes every value that will later enter a prompt.
  9. Use a tool-free LLM context for style-based content generation whenever possible.
  10. If tools are required, enforce a separate authorization layer that does not rely on model output and grants only the minimum tools and paths needed for the current operation.
  11. Add regression tests using writing samples that contain prompt-injection strings and verify that those strings cannot affect later generation.

T05 · Unauthorized Access and Privilege Escalation

Note
Location
SKILL.md:374
Finding

Troubleshooting Guidance Encourages Unnecessary Administrator Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 374
Vulnerability Type: Violation of least privilege through unsafe operational guidance
Risk Level: Low

Relevant instruction excerpt translated into English:

markdown
| Insufficient permissions | The current user lacks read/write permissions |
  Check file permissions and run as administrator |

Technical Analysis

The Skill's declared persistence requirement is limited to reading and writing JSON files in the style_fingerprints directory. Administrator privileges are not inherently required for this task.

Recommending that the entire Agent be run as administrator in response to a file-permission error expands the Agent's privilege boundary instead of addressing the underlying ownership, path, or access-control problem. This is especially unsafe because the Skill declares access to the exec tool. Any command error, malicious prompt injection, or unintended Agent action occurring in an elevated session would inherit administrator privileges.

Attack Path

  1. The Agent attempts to create or update a fingerprint file in a directory that is not writable by the current user.
  2. The operation fails with a permission error.
  3. The user follows the troubleshooting guidance and restarts the Agent with administrator privileges.
  4. The Agent retains access to command execution and file operations while elevated.
  5. A later prompt injection, malformed instruction, or accidental command executes within the administrator security context.
  6. The resulting action can modify resources that would have been protected from the normal user account.

Impact Assessment

Following the guidance can expose the full elevated privilege set of the host process to all Agent operations performed during that session. Depending on the operating system and administrator context, this may permit modification of protected files, system-wide configuration, othe ...[truncated 408 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the recommendation to run the Agent as administrator.
  2. Store fingerprints in a dedicated user-writable application-data directory.
  3. Validate directory ownership and permissions during initialization and return a safe error if they are unsuitable.
  4. Create the storage directory and files with restrictive permissions appropriate to the current user.
  5. Resolve access failures by correcting ownership or selecting a different storage path rather than elevating the complete Agent process.
  6. Canonicalize the storage path and ensure that it remains inside the approved application directory.
  7. Prefer scoped native file read/write tools over general-purpose exec commands for JSON persistence.
  8. Document the minimum required permissions and explicitly state that administrator or root execution is neither required nor recommended.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The '主要功能' section claims API integration, command execution, file processing, and information retrieval capabilities that exceed the stated style-cloning purpose. Broad, unjustified capabilities are dangerous because they normalize privilege creep and may cause an agent runtime to grant tools or trust assumptions far beyond what the task requires.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is documented as a specialized author-style cloning workflow, but the '主要功能' section reframes it as a general automation skill. Such contradiction is risky because security reviewers and users may underestimate what tools or behaviors the skill expects, allowing overly broad permissions to be accepted without clear justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description presents itself as a specialized writing-style cloning tool, but later sections introduce broader automation behaviors that are unrelated to that purpose. This mismatch weakens operator understanding of what the skill may actually do and can conceal over-broad capabilities, increasing the risk of misuse or unintended execution paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly supports cloning the style of arbitrary authors from uploaded works without a clear consent, copyright, or impersonation warning. In context, this can facilitate unauthorized mimicry of third-party creators and increase legal, ethical, and fraud risks, especially when marketed as making output read like the original author.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The promise to make generated content read 'exactly like' any original author encourages unauthorized reproduction of a third party's expressive characteristics. In this skill's context, that increases impersonation and misuse risk beyond ordinary writing assistance because the feature is framed as identity-level mimicry rather than inspiration or adaptation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs persistent storage and reuse of author-derived fingerprints and related analysis in local JSON files. Because those artifacts are derived from uploaded content and reused automatically, they create a retention and disclosure risk if the filesystem, logs, backups, or multi-user environment are not tightly controlled.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill advertises generic exec-based command execution even though its stated use case only requires style analysis and simple persistence. Unnecessary command execution materially expands the attack surface because a future implementation or agent could invoke shell commands from loosely specified inputs under the guise of normal skill behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation states that exec is used for file I/O and command invocation, but the workflow only substantiates reading and writing JSON state. This inconsistency suggests over-privileged design and creates ambiguity that could permit broader command use than reviewers or users expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description explicitly states '支持中文交互' and presents the skill as Chinese-interaction oriented, but does not indicate that language is optional or user-selectable. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.