Back to skill

Security audit

Writing Style Iterator

Security checks for vulnerabilities and agentic risk

Overview

This writing-style skill is not clearly malicious, but it automatically edits files and stores persistent copies of drafts and inferred style rules with too little user control.

Install only if you are comfortable with a writing assistant that creates ~/.writing-style-iterator, copies drafts into Git history, and updates style rules automatically. Avoid using it on confidential, regulated, credential-bearing, or shared documents unless it is changed to require explicit approval, quote paths safely, limit retention, and provide clear purge controls.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:73
Finding

Command Injection Through Unquoted User-Controlled File Paths

Content
View full analysis
) && cp ~/.writing-style-iterator/drafts/ && git -C ~/.writing-style-iterator add . && git -C ~/.writing-style-iterator commit -m "draft: " ``` ### Technical Analysis The command template inserts a user file path and filename directly into shell syntax without quoting or separating the values from the command. The path is used inside command substitution, as a `cp` argument, as part of a destination path, and in a Git commit message. If an agent replaces these placeholders with an untrusted path and submits the resulting string to a shell, spaces and shell metacharacters can change the command's meaning. Characters such as semicolons, redirections, command substitutions, and option prefixes can produce additional commands or alter the behavior of `dirname`, `cp`, or `git`. Using `&&` does not provide atomicity and does not prevent injection. It only controls whether the following command runs based on the preceding command's exit status. ### Attack Path 1. An attacker supplies, creates, or induces the use of a crafted output filename or absolute path. 2. The agent substitutes the path into the documented command template. 3. The agent executes the constructed command through a shell. 4. The shell interprets metacharacters embedded in the path as syntax rather than as literal filename characters. 5. Attacker-selected commands execute with the same operating-system privileges as the agent process. For example, a path containing a shell command separator could terminate the intended `cp` argument and append another command when the agent builds a raw sh ...[truncated 686 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:121
Finding

Persistent Style-Memory Poisoning Through Unverified Document Feedback

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:72
Finding

Mandatory Retention of User Documents in a Hidden Git Repository

Content
View full analysis
) && cp ~/.writing-style-iterator/drafts/ && git -C ~/.writing-style-iterator add . && git -C ~/.writing-style-iterator commit -m "draft: " ``` ```text This step must be performed after every content generation or modification. ``` ### Technical Analysis The skill requires every generated or modified user document to be copied into a hidden directory under the user's home directory and committed to Git. The source document's absolute path is reproduced beneath the snapshot directory. Git commits preserve historical versions even after the current snapshot is changed, sanitized, or deleted. Consequently, confidential text removed from the working copy may remain recoverable from repository objects and commit history. The workflow does not: - Ask the user to opt in to document retention. - Restrict snapshots to an approved project directory. - Exclude credentials, regulated data, private correspondence, or other sensitive files. - Define a retention period. - Configure restrictive repository permissions. - Provide a secure purge operation that removes historical Git objects. - Warn that deleting the original file does not delete committed snapshots. The use of `git add .` also stages every changed file in the hidden repository, not only the intended snapshot. ### Attack Path 1. A user asks the agent to generate or edit a confidential ...[truncated 1431 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill mandates automatic writes to user files, snapshot archives, and style memory without warning or confirmation. This combination of silent file mutation and persistent storage is dangerous because users may not realize their documents and preferences are being changed and archived across sessions.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation criteria cover nearly any writing, rewriting, polishing, translation, or 'help me write/edit' request, making the skill likely to trigger in many ordinary contexts. Because this skill also performs persistence and file operations, broad activation materially increases the chance of unexpected retention or writes when the user only wanted ephemeral assistance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language description and operating instructions are written as a Chinese-only interaction pattern, and the skill does not indicate that users may choose another language. Because the skill is a general writing assistant rather than a clearly region-specific tool, forcing a single language without opt-in is a locale policy concern.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is explicitly designed to persist and analyze writing preferences across sessions, but it does so without clear consent gating, minimization, or sensitivity boundaries. Cross-session profiling of user writing and feedback can capture personal, confidential, or identifying information beyond what is needed for style assistance.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill persists full draft snapshots of user files in a git-backed archive under the home directory, which materially increases data retention and exposure. Retaining complete copies of user writing may capture sensitive content unrelated to style learning and is broader than necessary for the stated purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to initialize and mutate a persistent git repository in the user's home directory, which is filesystem mutation beyond simple text-generation assistance. This expands the agent's authority into persistent local state changes without an explicit consent gate or strong scope limits, increasing the chance of unintended writes and data retention.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The skill establishes session persistence by creating a repository in the user's home directory and committing state to it, which is a real persistence mechanism rather than transient task handling. Persistent state is not always unsafe, but here it is introduced silently and coupled with broad activation and automatic data collection, making it materially risky.

Content

Scanner excerpt · SKILL.md (reported line 21)May include surrounding context.

首次使用前,如果目录不存在,先初始化:

bash
mkdir -p ~/.writing-style-iterator/drafts && git -C ~/.writing-style-iterator init && touch ~/.writing-style-iterator/style.md && git -C ~/.writing-style-iterator add . && git -C ~/.writing-style-iterator commit -m "init"

核心工作流

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow says the agent should save drafts by writing to user files automatically, which exceeds a narrow 'load style and learn from edits' description and creates authority to alter arbitrary content. Automatic modification of user files can overwrite work, introduce errors, or be abused to make changes the user did not explicitly request at that moment.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow copies full user files into a drafts history repository for diffing and rollback, creating a second persistent copy of potentially sensitive documents. This broadens the data exposure surface and retention period well beyond what is necessary if only stylistic changes need to be learned.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill tells the agent to extract signals from all user edits, annotations, and verbal feedback and write them into persistent memory, which can absorb sensitive or incidental information not intended as reusable preferences. Because the extraction rules are broad and informal, the agent may incorrectly memorialize private details or one-off comments as stable user traits.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Automatically updating persistent memory without asking the user first removes meaningful control over what is retained across sessions. This is dangerous because errors in inference can become durable behavior, and the user may be unaware that future generations are being shaped by silently stored data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs the agent to update persistent style rules automatically without confirmation, creating silent cross-session state changes. While not inherently catastrophic, hidden memory updates can surprise users, encode misinterpretations, and change future outputs in ways the user did not knowingly approve.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.