Back to skill

Security audit

詹明明·发布前审一遍

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent script-review skill, but it automatically persists feedback and trusts mutable local vault instructions, so it should be reviewed before installation.

Install only if you are comfortable with a Chinese/Douyin-focused review workflow that may read local vault policy files and save feedback or recurring issues for future use. Before using it on sensitive drafts, disable or require confirmation for memory write-back, treat external vault files as untrusted unless you control them, and avoid relying on homophone or coded-word substitutions to bypass platform moderation.

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

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:21
Finding
Mutable External Vault Files Can Override Bundled Skill Instructions## Vulnerability Details **File Location**: `SKILL.md:21-31`; supporting precedence rule in `references/规则卡.md:3-4` **Vulnerability Type**: Local prompt injection through trusted external instruction files **Risk Level**: Medium ### Vulnerable Instruction Snippet The following is an English rendering of the complete relevant instruction segment from `SKILL.md:21-31`: ```text First read `zmm/references/家族公约.md`. If it cannot be read, explicitly state that the convention cannot be read and red-line safety cannot be guaranteed, then stop; do not substitute memory for the convention. Next read `zmm/references/交互规范.md`. This skill includes its own criteria under `references/`. If `{vault}/00-规则与索引/发布前审核流程.md` exists, it takes precedence, with the bundled criteria serving only as a baseline. `{vault}/00-规则与索引/文案框架-总入口.md`, when present, is the sole navigation source for writing copy. Execute it by default. Any user feedback is automatically persisted according to its write-back mechanism without the user needing to identify it explicitly. ``` The same trust rule is reinforced in `references/规则卡.md:3-4`: ```text When corresponding rule files exist in the author's `{vault}`, the vault takes precedence and this file serves only as a baseline. If they conflict, follow the vault first and then return to update this file. ``` ### Technical Analysis The Skill grants instruction precedence to mutable Markdown files outside the audited package. These files are not included in the project, pinned by hash, authenticated, constrained to a data-only schema, or explicitly treated as untrusted input. Because the external files are loaded as authoritative instructions rather than reference data, a party capable of changing the vault can inject new imperatives that alter the Agent's review process. The instruction that the vault is the “sole navigation source” and “takes precedence” increases the likelihood that hostile content will supersede the audited rules. This is a ...[truncated 1885 chars]
Remediation
## Remediation Suggestions 1. Remove blanket precedence for external Markdown. Bundled, reviewed instructions should remain authoritative. 2. Treat external vault files as untrusted reference data, not executable Agent instructions. 3. Define a strict machine-readable schema for external configuration and reject unknown fields or free-form imperative text. 4. Resolve and canonicalize the vault path before access. Reject traversal, unexpected symlinks, and paths outside an approved root. 5. Pin approved external policy files by cryptographic hash or verify them through a signed manifest. 6. Display any conflict between bundled and external rules to the user and require explicit confirmation before applying the external version. 7. Apply least privilege to the Agent's tools while processing external content, especially filesystem write, network, shell, and secret-access capabilities. 8. Add adversarial tests in which vault files contain prompt-injection instructions and verify that these are quoted as data rather than executed. 9. Record the exact external file path, version, and hash in every report so the effective policy source can be audited.

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:222
Finding
User-Controlled Feedback Can Be Written to Persistent Agent Memory Without Explicit Consent## Vulnerability Details **File Location**: `SKILL.md:222-224`, with automatic write-back also specified at `SKILL.md:31` **Vulnerability Type**: Unvalidated cross-session memory modification **Risk Level**: Medium ### Vulnerable Instruction Snippet The following is an English rendering of the complete memory section from `SKILL.md:222-224`: ```text ## Memory Before finishing, check whether the user disputed a sentence score and supplied a reason. Record it as a “correction,” because this is the most valuable calibration for the scoring scale. Check whether a type of defect appears repeatedly. Record it as an “effective method” for use as an advance reminder before writing the next script. Write the result to `08-技能记忆/zmm-review/` after checking for duplicates. ``` The automatic nature of the write is established at `SKILL.md:31`: ```text Any user feedback is automatically persisted according to the write-back mechanism without the user needing to identify it explicitly. ``` ### Technical Analysis The Skill converts ordinary conversational feedback into persistent calibration rules and writes them to a shared memory directory. Explicit user authorization is not required, and the instructions do not require the exact proposed entry to be shown before persistence. Deduplication only prevents repeated entries; it does not validate truthfulness, distinguish factual corrections from adversarial instructions, constrain the stored format, or prevent embedded prompt-injection content. If later sessions read these memory files as guidance, attacker-controlled text can influence future scoring and behavior. This creates a cross-session integrity problem. Unlike a temporary prompt injection, a malicious or incorrect “correction” can survive the originating review and continue affecting unrelated users or future tasks. ### Attack Path 1. An attacker submits a script for review and intentionally disputes a score or rule. 2. The attacker provides a crafted justif ...[truncated 1344 chars]
Remediation
## Remediation Suggestions 1. Require explicit, informed opt-in before every persistent memory write. 2. Show the exact proposed memory entry, destination, and intended future use before requesting approval. 3. Store corrections as structured records with fixed fields such as source, timestamp, scope, evidence, and confidence; prohibit free-form executable instructions. 4. Validate that a correction concerns scoring calibration only. Reject commands, tool requests, external links, path references, and instruction-override language. 5. Scope memory by user and project. Do not place untrusted feedback in a globally shared Skill memory store. 6. Mark entries as untrusted observations and prevent them from overriding bundled security or compliance rules. 7. Add expiration, review, rollback, deletion, and provenance controls. 8. Require multiple independent confirmations or administrator review before promoting a user correction into a global rule. 9. Restrict writes to a canonical approved directory and reject symlink targets or path traversal. 10. Add tests that submit adversarial “corrections” and verify that they are neither persisted automatically nor executed in later sessions.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (20)

Vague Triggers

High
Confidence
97% confidence
Finding
The trigger phrases are broad enough to match ordinary requests such as 'review my script' or 'can I publish this,' increasing the chance the skill activates outside the user's intended context. Over-broad invocation can cause unintended handling of user content under this skill's strict workflow, including its persistence behavior elsewhere in the file.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill instructs automatic write-back of user feedback into a vault despite presenting itself as a pre-publish review tool. That expands capability from analysis into persistence without clear user consent, creating a privacy and integrity risk because user content, feedback, and possibly sensitive draft material may be stored or propagated unexpectedly.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The instruction to write user feedback, objections, and recurring issue patterns into persistent files is unrelated to the narrow purpose of script review and creates unjustified data retention. If followed, it can accumulate sensitive user preferences, draft content characteristics, and behavioral history without minimization or permission.

Natural-Language Policy Violations

High
Confidence
94% confidence
Finding
The rule hard-codes a public-facing requirement to switch to domestic models and forbids guidance on using overseas models, regardless of user intent, consent, or legal context. This is risky because it imposes undisclosed policy steering inside the skill and can manipulate outputs away from user needs while embedding jurisdiction-specific censorship/compliance behavior as a fixed default.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
Automatic persistence is described without any user-facing warning, so users may provide draft scripts or feedback believing the interaction is ephemeral. This lack of transparency undermines informed consent and can lead to silent retention of sensitive business, creative, or personal material.

Ssd 3

Medium
Confidence
98% confidence
Finding
Default automatic write-back to the vault extends processing beyond immediate review into durable storage, but the file does not set clear limits on scope, retention, or sensitivity. In context, users may submit unpublished scripts, business claims, and personal feedback, making even medium-grade persistence risky.

Natural-Language Policy Violations

Medium
Confidence
76% confidence
Finding
The instruction "零术语" mandates avoiding theoretical terms and prescribing a single linguistic style for outputs, rather than offering it as a preference the user can accept or override. Because the policy is framed as a hard requirement rather than a documented optional style choice, it may violate language/locale choice expectations.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest states '默认只诊断不改 / Diagnose-only by default', which sets the expectation that the skill primarily audits rather than edits. However, the red-line phase explicitly requires '可直接替换的改写' and mandates providing two rewrite versions, which is active content modification rather than mere diagnosis.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The line '诊断模式下只标不改' states a read-only diagnostic intent. Earlier red-line instructions explicitly say '不许只标不改' and require replacement text, which directly contradicts that stated operating mode rather than merely adding detail.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill explicitly directs writing interaction-derived data to a memory directory but does not require warning or consent. Because the stored material includes correction signals and repeated weaknesses, it can create a longitudinal profile of the user or their drafts without their knowledge.

Ssd 3

Medium
Confidence
99% confidence
Finding
The skill retains user feedback and recurring issue patterns in persistent memory without clear minimization boundaries. This creates unnecessary accumulation of potentially sensitive interaction data and increases harm if the vault is later accessed, repurposed, or leaked.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The entire skill file is written as an operational review/report workflow in Chinese, including instructions for next steps and command references, but it does not indicate that language selection is optional or limited to a justified region-specific use case. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This markdown file contains natural-language content that implicitly forces a specific language/locale for all users. Under the policy, language constraints should either be optional for the user or clearly documented as region-specific and justified, which is not present here.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file is entirely prescriptive in Chinese and includes mandatory phrasing requirements such as '必须报到' and '不许写成…', but provides no option for users or evaluators to choose another language. This is a natural-language locale policy constraint that is not documented as region-specific or optional.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The file directs blanket scanning of a broad forbidden-word list and immediate substitution, including titles, subtitles, and tags, without requiring context review or preserving meaning. In a publishing-review skill, this can pressure users into content-distorting rewrites and overblocking, and it also normalizes moderation-avoidance phrasing rather than transparent compliance editing.

Ssd 2

Medium
Confidence
98% confidence
Finding
The text says matched forbidden terms should be 'replaced, made homophonic, or deleted,' directly endorsing homophone-based evasion of moderation semantics. Because this is an operational review skill, the instruction is actionable and lowers the barrier to systematically laundering disallowed wording into publishable form.

Ssd 2

Medium
Confidence
97% confidence
Finding
This section explicitly recommends euphemistic replacements such as homophones and coded wording for banned categories, presenting them as standard publication actions. That crosses from neutral compliance guidance into helping users evade automated moderation, which can facilitate publication of restricted financial, vice, or otherwise sensitive content while concealing it from platform review systems.

Natural-Language Policy Violations

Medium
Confidence
79% confidence
Finding
The guidance prohibits specific Chinese terms and prescribes replacements based on suitability for Douyin and 'B 端老板' audiences, such as '杀'不用 and avoiding programming vocabulary in early hooks. This is a natural-language policy concern because it imposes a fixed language/register policy without indicating that the constraint is optional, user-selected, or limited to a clearly declared region-specific workflow.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
This markdown file presents its instructions and evaluation content entirely in Chinese, and there is no indication that users may choose another language or that the Chinese-only constraint is required for a region-specific purpose. Under the policy criteria, forcing a specific language without opt-in is a natural-language policy concern.

Ssd 2

Low
Confidence
68% confidence
Finding
Although framed as risk reduction, this guidance tells authors to swap uncertain words for neutral alternatives whenever moderation might trigger, normalizing semantic concealment of flagged meaning. In context with the surrounding substitute-word tables, the likely intent is not harmless clarity but moderation avoidance through paraphrase.

Static analysis

No suspicious patterns detected.