Back to skill

Security audit

Aicodem skill

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate XMind test-case generator purpose, but its script can be directed to overwrite arbitrary writable files through an underdocumented output path.

Review before installing if this skill may run in workspaces with important writable files. It should be constrained to write only a new .xmind file inside a dedicated output directory, and output_file should either be removed from caller control or explicitly declared and validated.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_xmind.py:287
Finding

Arbitrary File Overwrite Through an Unvalidated Output Path

Content
View full analysis
2 else "测试用例.xmind" if input_file: with open(input_file, 'r', encoding='utf-8') as f: test_data = json.load(f) else: test_data = DEFAULT_TEST_DATA result = generate_xmind(test_data, output_file) ``` ### Technical Analysis The `output_file` value is used without path normalization, directory confinement, extension validation, symlink checks, or overwrite authorization. Python's `zipfile.ZipFile` with mode `'w'` creates the specified file or truncates an existing file before writing the XMind ZIP archive. Consequently, a caller can supply: - An absolute path. - A relative path containing parent-directory traversal components. - A path to an existing writable file. - Potentially a path resolving through a symbolic link. Although `output_file` is not declared in `skill.yaml`, the Python `run()` func ...[truncated 2082 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (4)

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
94% confidence
Finding

The manifest description forces a specific language for user-facing skill metadata, but does not offer any user opt-in or indicate that the skill is intentionally limited to a Chinese-speaking audience. This can violate language or locale policy for skills expected to be broadly usable.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description is written only in Chinese ("XMind 测试用例生成器"), which may indicate a language-specific skill presentation without offering any user choice or opt-in. Under the policy, forcing a specific language can be 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

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JSON file contains natural-language test case names, preconditions, steps, and expected results entirely in Chinese. Under the stated policy, forcing a specific language without user opt-in can be a locale-policy violation, and the file provides no indication of language choice or justified regional scope.

Content

No source excerpt is available for this finding.