Back to skill

Security audit

COCOS CLI Game Development

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its Cocos game-development purpose, but it asks the agent to start and automatically register a long-running MCP server without approval and gives unsafe command-construction guidance.

Install only if you are comfortable with the agent running Cocos CLI commands, creating/modifying project files, and starting a local MCP server. Before use, require confirmation before MCP registration, keep the server local and shut it down after work, and validate project names with a strict allowlist.

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

Error
Location
SKILL.md:20
Finding

Command Injection Through Unsanitized Cocos Project Name

Content
View full analysis
` to generate the project structure. ``` ### Technical Analysis The skill instructs the agent to obtain a project name from the user and interpolate it into a command executed through the `exec` tool. It does not require validation, shell escaping, path normalization, or structured argument-array execution. If the execution environment passes the resulting string to a command shell, shell metacharacters in the project name may be interpreted as additional commands, redirections, substitutions, or pipelines instead of as literal project-name characters. Merely consulting `cocos create --help` does not mitigate this issue because it validates CLI syntax rather than the safety of user-controlled input. This is an insecure skill coding practice because the skill establishes a direct path from untrusted input to an operating-system command without defining a trust boundary or sanitization controls. ### Attack Path 1. An attacker asks the agent to create a Cocos project. 2. The agent requests the project name as required by the skill. 3. The attacker supplies a name containing shell-control syntax, conceptually such as `valid-name; `. 4. The agent substitutes that value into the documented command: ```text cocos create ``` 5. If `exec` uses a shell-backed command string, the shell parses the injected syntax. 6. The attacker-controlled command executes with the same operating-system identity, en ...[truncated 913 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to automatically connect/register a newly started MCP server and enumerate its tools without waiting for user approval. That creates an unauthorized external trust boundary crossing: a long-running local or network-exposed service is brought online and then trusted for capability discovery, which could leak project context or expand the agent's reachable action surface without informed consent.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.