Back to skill

Security audit

mao-methodology

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed methodology/reference skill with a small local .docx extraction helper, and I found no hidden network, persistence, credential, or destructive behavior.

Before installing, note that the skill is largely Chinese/bilingual and uses Mao-era political and military strategy language as an analytical lens. Only run the helper script on documents you intend to process, and install python-docx in an isolated environment with a pinned version if you need the extractor.

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
scripts/extract_maoworks_articles.py:21
Finding

Unpinned Third-Party Dependency Installation Guidance

Content
View full analysis

Vulnerability Details

File Location: scripts/extract_maoworks_articles.py, lines 21–26
Vulnerability Type: Unpinned third-party dependency and insufficient supply-chain verification
Risk Level: Medium

Vulnerable Code:

python
try:
    import docx
except ImportError:
    print("ERROR: python-docx not installed. Run: pip install python-docx")
    sys.exit(1)

Technical Analysis

When the required module is unavailable, the script recommends installing python-docx without specifying a reviewed version, cryptographic hash, lockfile, package index, or isolated environment. Consequently, the installed artifact is determined by the user's active pip configuration and the package repository state at installation time rather than by an auditable dependency specification.

The code does not automatically run pip, and python-docx is not itself demonstrated to be malicious. Exploitation therefore requires compromise or manipulation of the relevant package source, package resolution process, pip configuration, or network trust boundary. If that prerequisite is met, installation or subsequent import of the resolved package could execute attacker-controlled Python code.

Attack Path

  1. A user invokes the extraction script in an environment where the docx module is unavailable.
  2. The script displays the command pip install python-docx.
  3. The user executes that unpinned command.
  4. Pip resolves the dependency using the user's configured package index and current repository state.
  5. An attacker who has compromised or influenced that supply-chain path causes a malicious or altered package artifact to be resolved.
  6. Attacker-controlled code executes during package installation or when the script subsequently imports the installed module.

Impact Assessment

Malicious dependency code would execute with the privileges of the user running pip or the extraction script. It could potential ...[truncated 520 chars]

Remediation
View remediation

Remediation Suggestions

  1. Declare python-docx in a maintained dependency file and pin it to a specifically reviewed version.
  2. Use a hash-locked installation mechanism, such as a requirements file generated with verified SHA-256 hashes.
  3. Configure installation to use an explicitly approved HTTPS package index rather than arbitrary user-configured sources.
  4. Install dependencies inside an isolated virtual environment with ordinary user privileges; do not recommend elevated or system-wide installation.
  5. Add automated dependency vulnerability and integrity checks to the release process.
  6. Replace the current message with a controlled installation instruction, for example:
text
Create an isolated virtual environment and install dependencies from the project's hash-locked requirements file:
python -m pip install --require-hashes -r requirements.txt
  1. Document the reviewed dependency version, expected hashes, supported Python versions, and the process for safely updating the lockfile.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill metadata presents the artifact as a methodology/reference skill, but the file also discloses bundled tooling for parsing local .docx files and exporting article contents. That mismatch can mislead reviewers and users about the skill's real capabilities, reducing scrutiny around file access and content extraction behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The description declares the skill as bilingual and the document consistently presents content in both Chinese and English, which implies a fixed locale behavior rather than a user-selected one. Under the policy rule, forcing a specific language or locale format without explicit opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 36)May include surrounding context.

md
| 5 | **得出结论** - 基于分析形成判断和决策 | Draw conclusions based on analysis |

**Errors to Avoid / 避免的错误**:
- **Book Worship / 本本主义**:Copying texts/orders blindly without checking reality
- **Empiricism / 经验主义**:Relying only on partial personal experience
- **Subjectivism / 主观主义**:Judging without investigation

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all instructions and workflow guidance exclusively in Chinese, which imposes a language constraint on users. Under the policy, language-specific behavior should either provide user choice or clearly justify the locale limitation, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire template, including headings and instructions, is written only in Chinese and provides no indication that users may choose another language. Under the policy, language constraints should either be optional or clearly justified as region-specific; neither is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file is entirely written in Chinese and presents the skill content in a single fixed language. Under the policy criteria, forcing a specific language without user opt-in can be a natural-language policy violation when no language choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill template is written in Chinese and provides no indication that users may choose another language or that the skill is intended only for a Chinese-language context. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.