Back to skill

Security audit

党政公文格式化

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a straightforward Chinese official-document Word formatter with a dependency pinning hardening gap but no evidence of hidden, persistent, or data-exfiltrating behavior.

Use this skill for Chinese official-document formatting workflows. Install dependencies in a virtual environment and consider pinning or lockfile-verifying python-docx before use in a sensitive environment. Be aware that generated output may include user-provided confidential markings and will write to the chosen output path.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unbounded Third-Party Dependency Creates Supply-Chain Risk

Content
View full analysis
=1.2.0 ``` `SKILL.md:21`: ```text Prerequisite dependency: `python-docx`; if it is missing, install it using `pip install -r requirements.txt`. ``` `README.md:22-26`: ```bash pip install -r requirements.txt ``` ```text Dependency: `python-docx>=1.2.0`. ``` ### Technical Analysis The dependency specification establishes only a minimum version. It allows pip to install any later `python-docx` release available from the configured package index. The project does not provide an exact version pin, integrity hashes, or a lockfile. Consequently, the dependency code installed and subsequently imported may differ from the version reviewed during this audit. If an allowed future release, package-index account, distribution artifact, configured mirror, or source distribution is compromised, attacker-controlled code could be introduced into the installation or document-processing workflow. This is a supply-chain hardening issue rather than evidence that the current `python-docx` package is malicious. ### Attack Path 1. A user follows the documented command: ```bash pip install -r requirements.txt ``` 2. Pip resolves `python-docx` to any available version equal to or newer than 1.2.0. 3. An attacker compromises a permitted future release, distribution artifact, package-index account, or configured mirror. 4. Pip downloads the compromised artifact because it satisfies the unrestricted version constraint. 5. Malicious code executes through a source-distribution build hook or later when the dependency is imported by one of the project scripts. 6. The code runs with the privileges of the user executing pip or the document-processing script. ### Impact Assessment Successful exploitation could ...[truncated 493 chars]
Remediation
View remediation
``` Include hashes for required transitive dependencies and install with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Use a dependency-locking tool such as `pip-tools` to produce a reproducible lockfile containing exact transitive versions and hashes. 4. Recommend installation inside a dedicated virtual environment using a trusted package index: ```bash python -m venv .venv . .venv/bin/activate python -m pip install --require-hashes -r requirements.txt ``` 5. Review and test dependency updates before changing the pinned version. Use automated vulnerability and provenance checks where available. 6. Update `SKILL.md` and `README.md` so their installation instructions require the locked, hash-verified dependency set rather than an open-ended version range. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description and usage instructions specify converting pasted Chinese text and formatting Chinese official-government documents, and the instructions are written as mandatory behavior rather than offering a language or locale option. This is a natural-language locale constraint visible in the markdown and no explicit user opt-in or justification for enforcing the language policy is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The default prompt is written entirely in English even though the skill name and description are in Chinese, which implies the skill may enforce a specific language/locale without user opt-in. This matches the policy category for language or locale constraints that are not optional or justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file is entirely a Chinese-language formatting rule set for Chinese party/government document conventions, and it states these local rules override more general standards. There is no indication that the user can choose another language or locale, which can violate language/locale policy when a skill applies these rules by default outside a clearly documented opt-in or region-specific scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The checks require Chinese punctuation and stock Chinese closing phrases such as ':', '妥否,请批示。', '签发人:', and '特此报告。', which enforces a specific language and document convention. The file does not expose any opt-in, locale selection, or explicit justification that the skill is restricted to Chinese official-document workflows.

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 description explicitly states it generates a Chinese Party/government official DOCX, and the implementation consistently enforces Chinese fonts, Chinese date formatting, and Chinese fixed text. Under the policy, forcing a specific language/locale without user opt-in is a natural-language policy concern unless the locale constraint is clearly documented and justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description states that it formats documents according to Chinese party/government official document standards and defaults to specific Chinese typography and layout conventions. This is a locale-specific constraint presented as the default behavior, and the file does not indicate any user opt-in or alternative locale/language mode.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified as python-docx>=1.2.0 without an upper bound or exact pin, which makes builds non-reproducible and can silently pull in future releases with security or compatibility regressions. In a document-formatting skill that processes user-supplied .docx files, dependency drift increases supply-chain risk and complicates verification of whether a safe version is installed.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
python-docx>=1.2.0

Unverifiable Dependency: python-docx has 2 known advisory(ies) (CVE-2016-5851 (Improper Restriction of XML External Entity Reference in python-docx); CVE-2016-5851 (python-docx before 0.8.6 allows context-dependent attackers to conduct XML Exter)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The manifest does not pin python-docx, so it is impossible to verify from this file whether the installed version is patched against known advisories such as historical XXE issues. This skill explicitly handles existing .docx documents from users, so if an affected version were resolved at install time, malformed document content could expose the parser to XML-based attacks or denial of service depending on the vulnerable code path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The docstring and required font list are framed around Chinese official-document fonts as the expected standard, which can amount to a locale-specific requirement embedded in the skill. There is no natural-language indication that this requirement is optional, user-selected, or limited to a China-specific workflow.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.