Back to skill

Security audit

Fill docx template

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward DOCX template-filling skill, with practical hardening gaps around oversized tables and output overwrites.

Before installing, be aware that the documentation is in Chinese and the provided code should be hardened before processing untrusted templates. Use trusted .docx files, keep table r/c values modest, and save generated documents to a new output path rather than the original template.

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
SKILL.md:134
Finding

Unbounded DOCX Table Dimensions Permit Resource Exhaustion

Content
View full analysis
current_rows: for _ in range(total_needed_rows - current_rows): table.add_row() elif total_needed_rows < current_rows: self._delete_rows_from_end(table, current_rows - total_needed_rows) if target_cols != current_cols: self._resize_columns(table, target_cols) def _resize_columns(self, table, target_cols): """调整表格列数""" current_cols = len(table.columns) tbl = table._tbl tblGrid = tbl.find(qn('w:tblGrid')) if target_cols > current_cols: for _ in range(target_cols - current_cols): gridCol = OxmlElement('w:gridCol') tblGrid.append(gridCol) for row in table.rows: for _ in range(target_cols - current_cols): tc ...[truncated 2180 chars]
Remediation
View remediation
MAX_TABLE_CELLS: raise ValueError("Requested table size exceeds the permitted cell budget") # Invoke this before storing or applying the dimensions. self._validate_table_dimensions(row_idx, target_rows, target_cols) ``` The runtime environment should additionally enforce memory and execution-time limits as defense in depth. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:356
Finding

Save Method Allows the Source Template or Existing Files to Be Overwritten

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language instructions and usage guidance are presented only in Chinese, which effectively forces a specific language on users reading the skill documentation. There is no indication that the skill is region-specific or that users may choose another language, so this appears to violate the language/locale policy.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The invocation description is broad enough to match many generic document-generation or form-filling requests, which can cause the wrong skill to be selected in contexts beyond tightly scoped DOCX template filling. Overbroad routing increases the chance of unintended file handling or misuse of document automation capabilities, especially in systems that auto-select skills from natural-language descriptions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L003 的技能描述完全以中文编写,并直接规定“当用户需要……时使用此技能”,但没有说明这是仅适用于中文用户或提供语言选择。根据规则,未获用户选择即强制特定语言属于自然语言政策违规。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.