Back to skill

Security audit

抖音复刻蒸馏写作技能

Security checks for vulnerabilities and agentic risk

Overview

This skill can collect content, read local files, and install a persistent writing persona with too little containment and review.

Review before installing. Use it only with content you are authorized to analyze, expect RedFox API usage with your configured key, avoid pointing it at broad private directories, and inspect any generated SKILL.md before allowing it to be installed or updated under your local skills directory.

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

T02 · Agent Memory Poisoning

Error
Location
references/core_workflow.md:16
Finding

Untrusted Source Content Can Be Converted into Persistent Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: references/core_workflow.md:16-25, references/core_workflow.md:230-232, references/core_workflow.md:522-530, and references/persona-template.md:121-123
Vulnerability Type: Persistent instruction poisoning through untrusted corpus content
Risk Level: High

Evidence

The workflow accepts user-selected local files and platform content as source material:

text
File path input:
- A single file is read directly.
- A directory causes all .txt and .md files in that directory to be read.
- Multiple paths are read one by one.

It then uses the analysis results to populate and persist a new skill:

text
Output B: Thinking and writing persona sub-skill

1. Read references/persona-template.md.
2. Fill the template with the dual-profile conclusions from Phase 2.
3. Customize the mandatory review system from the extracted thinking genes
   and writing fingerprints.
4. Create ~/.workbuddy/skills/[author-name]-style/SKILL.md.

The generated template treats the resulting rules as mandatory:

markdown
## Mandatory Double-Review System

This is a workflow that must be executed during writing.
It is mandatory rather than advisory.
Before outputting any article, both reviews must pass.
If either review fails, the article must be rewritten.

Technical Analysis

The workflow crosses a critical trust boundary: text retrieved from a remote platform or read from user-selected files is treated as analytical data, but conclusions derived from that text are subsequently converted into executable Agent instructions and saved as a persistent skill.

No explicit instruction-data separation is defined. In particular, the workflow does not require the Agent to:

  • Treat commands embedded in source articles as inert quoted data.
  • Reject instructions concerning tools, credentials, system prompts, safety policy, or file operations.
  • Prevent s ...[truncated 2391 chars]
Remediation
View remediation

Remediation Suggestions

  1. Establish an explicit trust boundary: state that all platform responses, pasted articles, and local corpus files are untrusted data and that instructions found inside them must never be followed.
  2. Parse source material into a data-only representation before analysis. Remove or quarantine content that resembles system prompts, tool commands, credential requests, policy overrides, filesystem instructions, or Agent-control directives.
  3. Restrict generated persona fields to bounded stylistic properties such as vocabulary, sentence length, structure, tone, and rhetorical patterns. Do not derive tool permissions, safety rules, identity overrides, or operational instructions from corpus content.
  4. Validate the completed SKILL.md against an allowlist before writing it. Reject directives involving secrets, network access, shell execution, file access, policy changes, or instructions to ignore higher-priority messages.
  5. Show the complete generated skill to the user and require explicit confirmation before installation.
  6. Mark corpus quotations with strong delimiters and provenance metadata so they cannot be confused with instructions.
  7. Store generated personas as non-executable style data where possible, rather than as unrestricted Agent instruction files.
  8. Add adversarial tests using articles that contain prompt injection, repeated malicious rules, fake system messages, and tool-use instructions.

T09 · Insecure Skill Coding Practices

Error
Location
references/core_workflow.md:522
Finding

Unsanitized Author Name Is Interpolated into a Persistent Skill Path

Content
View full analysis

Vulnerability Details

File Location: references/core_workflow.md:522-530 and references/persona-template.md:1-4
Vulnerability Type: Path traversal and unintended file placement
Risk Level: High

Evidence

The documented installation operation constructs a path directly from an author-controlled name:

text
1. Read references/persona-template.md.
2. Fill the template with the analysis results.
3. Customize the review system.
4. Create ~/.workbuddy/skills/[author-name]-style/SKILL.md.

The template repeats the same destination convention:

text
Generated skill installation path:
~/.workbuddy/skills/[author-name]-style/SKILL.md

Technical Analysis

The author name is obtained from user input or analysis and is interpolated into a filesystem path. The workflow specifies no canonicalization, strict character allowlist, path-separator rejection, containment validation, collision handling, or safe overwrite policy.

If an implementation follows this documentation literally, a crafted author name containing path separators or traversal components may alter the resolved destination. Depending on path construction and normalization behavior, the generated file could be written outside the intended persona directory.

This is especially sensitive because the output is not an ordinary data file: it is a SKILL.md containing Agent instructions. Writing it to another recognized skill location could plant or overwrite instructions that are loaded under a different identity.

Attack Path

  1. An attacker or untrusted user supplies a crafted author name containing traversal elements, separators, or an absolute-path-like value.
  2. The workflow uses that value as [author-name] without validation.
  3. The implementation concatenates the value into ~/.workbuddy/skills/[author-name]-style/SKILL.md.
  4. Filesystem path normalization resolves the destination outside the intended author-spec ...[truncated 997 chars]
Remediation
View remediation

Remediation Suggestions

  1. Convert the author name to a strict slug before using it in a path. Permit only a small allowlist such as ASCII letters, digits, underscores, and hyphens.
  2. Reject .., /, \, null bytes, control characters, drive prefixes, home-directory markers, URI syntax, and absolute paths.
  3. Construct paths with a safe path API rather than string concatenation.
  4. Resolve both the skill root and candidate destination to canonical absolute paths, then verify that the candidate remains strictly beneath ~/.workbuddy/skills/.
  5. Create the author directory with restrictive permissions and use exclusive file creation to prevent unintended overwrites.
  6. If a destination already exists, stop and require explicit user confirmation. Display the canonical target path before writing.
  7. Use an internal generated identifier for the directory and retain the human-readable author name only as metadata inside the file.
  8. Add tests for traversal strings, mixed separators, Unicode separator lookalikes, absolute paths, symbolic links, and existing-file collisions.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (19)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow directs the agent to create or update a local skill under the user's home directory, which is a privileged filesystem side effect unrelated to merely analyzing style and generating prompts. Writing executable or reusable agent instructions into a persistent skill location can become a persistence mechanism, alter future agent behavior, and expose the user to supply-chain-style prompt injection or unauthorized local modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README says users can 'Simply describe your needs in natural language—no commands to memorize,' which is an overly broad invocation description for a markdown skill file. It does not define clear trigger phrases, scope limits, or exclusion conditions, increasing the chance of accidental or unintended invocation from ordinary conversation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README advertises automatic Douyin content collection and installation of a local writing-clone subskill as a core value, but it does not clearly warn users about privacy, copyright, impersonation, or local-environment risks. In this context, the skill is specifically designed to reproduce a named author's thinking and style, which makes silent collection and local deployment more dangerous because it can normalize unauthorized data acquisition and deceptive content generation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs users to invoke the skill through unrestricted natural-language requests, including content collection, style cloning, and local persona use, without documenting meaningful constraints, authorization checks, or safety boundaries. In an agent setting, broad NL invocation increases the chance the skill will be used for unauthorized scraping, copyright-violating impersonation, or risky file/path access behaviors because the operator is told the system can infer intent from free-form requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The top-level description advertises automatic Douyin collection and manual file-path input without warning users about privacy, authorization, and ownership implications. This omission is dangerous because users may not realize the skill can process third-party content or local files, increasing the risk of unauthorized collection or sensitive file exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Telling users they can invoke the skill with any natural-language request creates weak activation boundaries and increases the chance the skill will trigger in contexts the user did not intend. Because this skill can automatically collect Douyin content and use specified file paths, overbroad invocation guidance can lead to unintended data access or collection flows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly promotes cloning and perfectly reproducing a specific author's writing style, including producing a reusable 'writing clone,' without any consent, labeling, or policy guardrails. That creates a meaningful impersonation and misuse risk, especially when paired with automated source collection and persistent reusable outputs that can be deployed as if they were the original author.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Several trigger phrases are broad and ambiguous, such as generic requests about analyzing style or copying writing style, which raises the risk of accidental invocation. In this skill's context, accidental activation is more concerning because the documented behavior includes collecting third-party content and generating impersonation-like outputs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a skill for '抖音复刻蒸馏写作' and explicitly frames the capability around Douyin material collection or manual article input. The workflow, however, adds a full '公众号平台' acquisition flow and later supports collecting from multiple platforms for the same author, materially expanding behavior beyond the stated Douyin-oriented scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger condition for automated collection is overly broad: merely mentioning a platform name or providing a link/account identifier can start external scraping. In an agent context, ambiguous triggers can cause unintended network actions, third-party data transfer, and consumption of paid API credits without sufficiently informed user consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow instructs the agent to use an environment-sourced third-party API key to collect external content, creating a capability boundary issue and potential secret misuse risk. In an LLM skill, allowing conversational input to trigger networked actions with privileged credentials can lead to unintended data collection, billing/resource abuse, or use of credentials beyond what the user reasonably expects from a writing-analysis tool.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The '信息源黑名单' states that 微信公众号 should not be used as a source, yet later '中国作者信息源优先级' places 公众号文章 above other sources. These instructions actively contradict each other about whether WeChat public-account content is excluded or preferred.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Phase 5 directs the system to automatically start two agents that critique and modify the generated skill. This multi-agent orchestration is an autonomous capability that goes beyond the manifest's user-facing purpose of analyzing writing and generating style outputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

该处按“中国作者 vs 西方作者”分别规定信息源优先级,属于基于地域/群体的默认处理策略,但未说明用户可选择其他来源偏好,也未给出必要的合规或任务限定依据。此类默认地域化规则可能与语言/locale 需经用户选择或明确说明的政策要求冲突。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

All user-facing template content and examples are written in Chinese, and the file does not indicate that language selection is optional or limited to a China-specific use case. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The template defines broad trigger phrases such as '像[作者名]一样写' and '模仿[作者名]写作' without any scope boundaries, disambiguation rules, or exclusion conditions. In an agent/skill ecosystem, overly generic triggers can cause unintended invocation, prompt collision with unrelated tasks, or accidental activation of imitation behaviors in contexts where the user did not explicitly intend to clone a persona.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file title and usage description are entirely in Chinese and present the writing-formula reference as a system resource for another skill, with no indication that users may choose another language or locale. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The manifest describes a skill for analyzing articles and generating a writing-style clone, with optional Douyin material collection. However, the security section explicitly requires a REDFOX_API_KEY from an external service, indicating dependence on a third-party API not otherwise explained as necessary for the core local/manual text analysis workflow. For a style-distillation skill, external credentialed service access is not clearly justified by the stated purpose as written.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all instructions and examples exclusively in Chinese, which effectively forces a specific language for use of the skill. The policy allows this only when the skill offers user language choice or clearly documents a justified locale constraint, neither of which appears here.

Content

No source excerpt is available for this finding.