Back to skill

Security audit

Gongwen 公文生成

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local helper for creating and checking Chinese government-style DOCX documents, with no hidden exfiltration, destructive behavior, or persistence beyond normal installation.

Install this only if you want an agent to create Chinese official-style DOCX documents and inspect local font availability. Review the broad activation wording if you do not want ordinary notice/report drafting requests to use this format automatically, and prefer trusted or pinned install sources where possible.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Vague Triggers

High
Confidence
96% confidence
Finding
The activation text says to use the skill whenever the user wants to draft or format any official document, even if they only casually mention 公文 in passing. That broad trigger condition can cause the skill to activate without clear user intent, leading to unnecessary shell/script execution and file handling in contexts where the user did not request this workflow.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The skill description is written to apply a single domain and language context broadly—party/government-style Chinese official document generation—without requiring explicit user opt-in. In agent ecosystems, this can override user preference or context selection and steer responses into a specialized bureaucratic format unexpectedly, which is especially risky when combined with broad triggers because it can mis-handle unrelated writing tasks.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger guidance is intentionally broad: phrases like '写个通知' or even mentioning 公文 'in passing' can cause the skill to activate for ordinary requests without clear user opt-in. That increases the chance of prompt/skill hijacking at the orchestration layer, where the assistant may apply rigid formatting rules or generate files in situations the user did not actually request, reducing user control and potentially causing inappropriate document generation.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill instructs the agent to run local Python scripts, read files, and invoke shell commands, but it does not declare any explicit tool scope or allowed-tools restrictions. This creates an authorization ambiguity where the skill may gain broader execution or file access than reviewers and users expect, increasing the chance of unintended command execution or filesystem interaction.

Natural-Language Policy Violations

Medium
Confidence
83% confidence
Finding
The file is written as a Chinese-only workflow for generating official documents and does not indicate that users may choose another language or locale. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation unless the locale constraint is explicitly justified.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
def fc_list_families():
    """Linux/装有 fontconfig 的机器上用 fc-list 兜底,覆盖任意自定义字体路径。"""
    try:
        out = subprocess.run(['fc-list', ':', 'family'], capture_output=True,
                             text=True, timeout=60).stdout
    except Exception:
        return set()
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The module docstring presents usage and behavior entirely in Chinese, and the script's user-facing messages are likewise Chinese-only. This imposes a specific language on users without any opt-in or documented justification, which matches the language/locale policy violation criteria.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
Failure, warning, and success messages throughout the script are emitted only in Chinese, so all user-visible interaction is locked to a single locale. The file does not offer a language choice or explain a justified region-specific restriction.

Static analysis

No suspicious patterns detected.