Back to skill

Security audit

Docx Fill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Word-template filling workflow, but it can silently remove document table content and can overwrite arbitrary writable output files if used carelessly.

Review this skill before installing or using it on important templates. Use an explicit new output path in a scratch/workspace directory, keep backups of source templates, and manually compare generated documents for missing table text. Avoid using it where generated documents have legal, financial, or approval impact until the renderer only changes explicitly declared placeholders and refuses unsafe overwrites by default.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/render_document.py:88
Finding

Undeclared Table Cells Are Destructively Cleared Without Reliable Integrity Validation

Content
View full analysis
--template ``` ### Technical Analysis The renderer treats every nonempty top-level table cell that is absent from both `placeholders` and `static_texts` as disposable example data. This is an unsafe fail-open design because the fill contract is generated by an LLM and can be incomplete. `validate_contract.py` validates placeholder locations but does not verify that every original nonempty table cell is classified as either static or replaceable. Therefore, an omitted cell can pass contract validation and subsequently be erased. The final format validator primarily compares document structu ...[truncated 1795 chars]
Remediation
View remediation
\ --template \ --contract ``` 6. Extend final validation to compare every non-placeholder cell against the original template, independently of the LLM-generated `static_texts` list. 7. Treat any nonempty `cleared_cells` result as an error unless every cleared location was explicitly authorized. 8. Add tests covering incomplete contracts, merged cells, nested tables, and preservation of undeclared nonempty content. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/render_document.py:176
Finding

Unrestricted Output Path Permits Source-Template and Writable-File Overwrite

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose describes a content-generation/template-filling skill: taking a .docx template plus reference materials and writing content into the template while preserving styles. The supplied code chunk does something materially different. It opens a Word document, traverses paragraphs and tables in document order, detects headings, nested tables, and merged cells, and writes a JSON representation of that structure to an output file. There is no logic for ingesting reference materials, synthesizing content, modifying the template, or saving a filled .docx. While structure extraction could be a supporting subcomponent of a larger template-filling system, this code chunk by itself is an analyzer/parser, not a document generator. Therefore the description does not accurately represent the actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This is a material description-behavior mismatch. The declared purpose centers on producing completed Word documents from templates and source materials while preserving styles. The supplied code performs a narrower preprocessing/inspection task: it parses an existing .docx and exports style information for later validation or rendering reference. While style extraction could support a larger document-filling pipeline, this chunk by itself does not implement the declared core capability. There are no notable undeclared risky behaviors; the mismatch is that the actual behavior is substantially more limited and different in primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description centers on producing formatted Word documents from templates and source materials. The supplied code does something materially different: it validates already-generated content using rule-based checks. Its primary function is QA/contract enforcement, not document generation. There is no handling of .docx files, no template population, no style preservation, and no writing of reports into Word documents. Reading JSON inputs for content and contract is inconsistent with the declared behavior. This is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a document-generation skill that fills Word templates using source materials. The supplied code instead performs structural and semantic validation on two JSON inputs (fill_contract.json and raw_structure.json). Its checks are limited to placeholder integrity, location validity, required flags, and traceability of constraints to original text. There is no handling of .docx files, no template population, no content generation from references, and no formatting/style preservation logic. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose says this skill should create/populate Word documents from templates using source/reference materials. The supplied code does not generate or fill templates at all. Its primary function is post-generation validation of an already generated document against a template, checking structural and style consistency. While validation could be a supporting component in a larger document-filling system, this code chunk by itself materially differs from the declared capability and purpose. Therefore this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill explicitly instructs the host agent to read templates/reference files and write a new .docx to disk, but it declares no tool scope or permissions boundary. That creates unnecessary ambiguity about what file operations are authorized and increases the chance an orchestrator grants broader filesystem access than intended.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest uses very broad trigger language such as invoking on any request to write content into a structured Word document or generate a report from a template. Over-broad routing can cause the skill to activate on unrelated document tasks, unnecessarily exposing user files and reference materials to a workflow that performs file reads/writes and multiple processing stages.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The operational instructions and user-facing guidance in the body of the skill are presented only in Chinese, which effectively imposes a language choice on users and host agents. The file does not indicate that Chinese is optional, nor does it justify a locale-specific constraint such as region-specific compliance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file mandates interaction in a specific language through its natural-language instructions, with no indication that the user can choose another language. That can violate language/locale policy when a skill forces a language without explicit user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill is written as a Chinese-only evaluator role and provides no indication that the user may choose another language or locale. Per the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Ssd 1

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instruction to 'ignore previous role/thought process' and switch roles can semantically suppress higher-priority context and encourage the model to discard safeguards or relevant system constraints. In an adversarial prompt-composition setting, this pattern is dangerous because similar phrasing is commonly used for prompt injection, and even here it normalizes context reset behavior inside skill content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The document is written as an instruction/specification entirely in Chinese and provides no indication that users may choose another language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy concern unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire skill specification is written as a Chinese-only role/instruction set and does not offer any language or locale opt-in. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and user-facing CLI descriptions are written only in Chinese, indicating the skill is designed around a fixed language/locale. The file does not offer a language choice or explain that the skill is intentionally region-specific, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language strings in the module docstring and command-line interface are exclusively in Chinese, which imposes a specific language on users without offering a choice or explaining that the skill is intended only for a Chinese-language environment. This matches the policy category for language or locale restrictions without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains its module docstring, CLI description, argument help text, and validation messages only in Chinese. That effectively forces a specific language/locale for users and operators without any opt-in or documented justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill defaults to writing a filled document in the template directory but does not prominently warn the user in the description or require confirmation. Silent or poorly disclosed filesystem writes can lead to unintended modification of sensitive project directories, accidental disclosure via synced folders, or confusion about where outputs are created.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains user-facing policy/instruction content exclusively in Chinese, and it does not state that the skill is China-specific or that users may choose another language. Under the policy rule, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file contains user-facing documentation and messages entirely in Chinese, including the module docstring and validation hints. Under the policy rule for language/locale, this can be considered a forced locale because the skill does not indicate any user opt-in or configurable language behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains user-facing natural-language text exclusively in Chinese, including the module docstring and command-line descriptions. Under the policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.