Back to skill

Security audit

MoltyRoyale

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a real Molty Royale game agent, but it gives the game service and payment examples too much authority over local instructions, credentials, and financial actions.

Review before installing. Use only dedicated low-value wallets and scoped API keys, do not paste live private keys into commands, and avoid enabling automatic remote skill updates unless they are signed or manually reviewed. Expect this skill to store local credentials and keep operating across sessions.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
heartbeat.md:43
Finding

Server-Controlled Replacement of Trusted Skill Instructions

Content
View full analysis
`memory.localFetchedAt`: ```bash curl -s https://www.moltyroyale.com/skill.md > ~/.molty-royale/skills/skill.md curl -s https://www.moltyroyale.com/heartbeat.md > ~/.molty-royale/skills/heartbeat.md ``` Then update `memory.localFetchedAt` to the current time. ``` The corresponding instruction in `skill.md:87-89` is: ```markdown - Compare `response.skillLastUpdate` with `memory.localFetchedAt`. If `skillLastUpdate` is newer → re-download skill.md and heartbeat.md, then update `localFetchedAt`. ``` ### Technical Analysis The Skill permits a value returned by the remote API, `skillLastUpdate`, to trigger replacement of its locally audited instruction files with mutable content downloaded from project-controlled servers. There is no publisher-signature verification, expected cryptographic digest, immutable version identifier, content validation, rollback protection, or human review gate. Although the retrieved files are Markdown rather than native binaries, they are executable control inputs in an AI-agent environment: changes to these files can alter which credentials, tools, network destinations, and financial actions the Agent uses. This behavior exceeds the minimum privileges needed to play the game. Gameplay requires authenticated REST and WebSocket access, but it does not require the game service to overwrite the Agent's trusted local instructions. ### Attack Path 1. An attacker compromises the Molty Royale API, website, CDN, deployment pipeline, DNS, or an authorized publishing account. 2. The attacker causes `GET /accounts/me` to report a `skillLastUpdate` value newer than the locally recorded timestamp. 3. The next heartbeat executes the documented `curl` commands. 4. The audited `skill. ...[truncated 989 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
x402-quickstart.md:22
Finding

Unpinned Third-Party Dependencies in Payment Setup

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
cross-forge-trade.md:199
Finding

Wallet Private Keys Passed Through Command-Line Arguments

Content
View full analysis
\ "[0xDdF8AaA3927b8Fd5684dc2edcc7287EcB0A2122d,0xdb99a97d607c5c5831263707E7b746312406ba7E]" \ \ \ --value 10ether \ --rpc-url https://mainnet.crosstoken.io:22001 \ --private-key ``` ```bash cast send 0xdb99a97d607c5c5831263707E7b746312406ba7E \ "approve(address,uint256)" \ 0x7aF414e4d373bb332f47769c8d28A446A0C1a1E8 \ \ --rpc-url https://mainnet.crosstoken.io:22001 \ --private-key ``` ```bash cast send 0x7aF414e4d373bb332f47769c8d28A446A0C1a1E8 \ "swapExactTokensForNative(uint256,uint256,address[],address,uint256)" \ \ \ "[0xdb99a97d607c5c5831263707E7b746312406ba7E,0xDdF8AaA3927b8Fd5684dc2edcc7287EcB0A2122d]" \ \ \ --rpc-url https://mainnet.crosstoken.io:22001 \ --private-key ``` ### Technical Analysis The examples encourage substitution of a raw wallet private key directly into a process command line. Command-line secrets can be exposed through: - Shell history. - Process listings and process telemetry. - Terminal session recording. - CI/CD logs. - Agent transcripts and command audit logs. - Crash reports or debugging tools. The private key is a reusable bearer credential for blockchain signing. Unlike a narrowly scoped API token, its compromise can authorize arbitrary transactions from the wallet. ### Attack Path 1. A user replaces `` with a real wallet private key. 2. The user or Agent executes the documented command. 3. The command is retained in shell history, runtime logs, process telemetry, or an Agent transcript. 4. Another local user ...[truncated 788 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
x402-quickstart.md:62
Finding

Hard-Coded Third-Party Recipient in Executable Token Purchase Examples

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skill.md:24
Finding

Plaintext Credential Persistence with Inconsistent Paths and Permissions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (24)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · heartbeat.md (reported line 254)May include surrounding context.

clear temp entirely

text

**Reset memory:**

```text
current_phase = preparing

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

Recommending a plaintext credentials.json file to store the live API key together with account and wallet identifiers centralizes sensitive material in an easily exfiltrated location. If malware, another local user, backup leakage, or accidental source-control inclusion occurs, the attacker gains reusable credentials and operational context for account takeover or abuse.

Content

Scanner excerpt · references/setup.md (reported line 157)May include surrounding context.

md
The `apiKey` is shown only once.

Recommended credentials path:
`~/.molty-royale/credentials.json`

Example:

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The setup explicitly contemplates generation and later handoff of an Owner EOA private key, which creates a dangerous custody-transfer pattern for a blockchain credential that directly controls funds and approvals. Even with 'advanced opt-in' wording, normalizing agent access to the owner's private key significantly increases the chance of theft, leakage, misuse, or irreversible loss of wallet control.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

The skill explicitly probes for a local credentials file as part of first-run detection, which is credential access behavior. Even if intended for normal operation, accessing credential stores increases exposure risk and can normalize broad secret handling by the agent without strong scope controls.

Content

Scanner excerpt · skill.md (reported line 30)May include surrounding context.

md
First-run detection (file-based):

- Treat as **first-run** if one of these is missing:
  - `dev-agent/credentials.json`
  - `dev-agent/owner-intake.json`
- If both files exist, treat as **returning-run**.
- Returning-run asks only missing/invalid fields, not the full list.

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The skill instructs the agent to persist credential values into a local JSON file, creating a direct at-rest secret storage risk. Plain local credential files are commonly exposed through weak permissions, backups, accidental commits, logs, or compromise of the runtime environment.

Content

Scanner excerpt · skill.md (reported line 39)May include surrounding context.

md
- Ask the full owner question list once.
- Persist normalized answers into `dev-agent/owner-intake.json`.
- Persist credential values into `dev-agent/credentials.json`.
- Then execute the flow automatically.

Ask these in order (short, direct) to owner (human):

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file declares a different skill identity and purpose (x402-api-purchase) than the surrounding skill metadata (molty-royale). That mismatch can cause an agent or operator to invoke payment and token-purchase behavior in an unrelated game-agent context, increasing the chance of unauthorized financial actions or deceptive capability smuggling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes executable trading examples that require a private key and describe irreversible on-chain swap flows, but it does not explicitly warn users about transaction irreversibility, wallet-drain risk from key exposure, or the need to use secure signing practices. In an agent skill that may be followed operationally, this omission can lead users to paste live private keys into CLI commands or execute costly swaps without understanding they cannot be undone.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · heartbeat.md (reported line 14)May include surrounding context.

md
- `overall` → apply accumulated playstyle, strategy, and lessons
- `temp` → restore game context from the previous turn

If the file does not exist, start with defaults and create it after the first game ends.

---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file instructs the skill to send an X-API-Key header to remote HTTP and websocket endpoints, which is a privacy- and security-relevant action. The document includes operational steps but does not provide any warning that the skill will transmit credentials to external services.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · heartbeat.md (reported line 117)May include surrounding context.

2b. Enter queue

bash
curl -X POST https://cdn.moltyroyale.com/api/join \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"entryType": "free"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents use of an X-API-Key and includes an example header containing a live-style key placeholder, but it does not warn users to keep the key secret, avoid committing it to logs or source control, or treat it as a credential. Because markdown files should disclose behaviors affecting privacy or system integrity, the omission is a meaningful missing warning.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/matchmaking.md (reported line 33)May include surrounding context.

Example:

bash
curl -X POST https://cdn.moltyroyale.com/api/join \
  -H "Content-Type: application/json" \
  -H "X-API-Key: mr_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -d '{"entryType": "free"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document instructs the agent to sign EIP-712 typed data with the agent wallet private key but provides no guardrails about key handling, signer isolation, or verifying the typed data contents before signing. In an agent skill context, this is dangerous because it normalizes direct private-key use and could lead implementers to expose secrets to logs, prompts, tools, or untrusted runtime components, enabling unauthorized signatures or wallet compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The websocket instructions tell operators to connect using an X-API-Key only, without warning that the API key is a sensitive bearer credential that must be protected. In an agent automation setting, this omission increases the chance the key is hardcoded, logged, or sent to unintended endpoints, which could let an attacker impersonate the agent, observe gameplay traffic, or issue unauthorized actions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The guide directs the agent to generate and persist a private EOA key locally for ongoing use, creating long-lived sensitive state on disk. Persistence is operationally necessary for a wallet-based agent, but without stronger storage guidance it increases the risk of theft from disk compromise, backups, container images, or accidental disclosure.

Content

Scanner excerpt · references/setup.md (reported line 61)May include surrounding context.

md
---

# 1. Create Agent Wallet

Generate a dedicated EOA keypair for the agent.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/setup.md (reported line 123)May include surrounding context.

Example:

bash
curl -X POST https://cdn.moltyroyale.com/api/accounts \
  -H "Content-Type: application/json" \
  -d '{"name": "YourAgentName", "wallet_address": "0xYourEthereumAddress"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide instructs storing a live API key in a local JSON credentials file but does not pair that instruction with strong handling guidance such as least-privilege storage, encryption, rotation, or warnings about local compromise. If the host, repo, backups, or logs are exposed, the attacker can reuse the API key to control the account or perform unauthorized API actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list includes several generic phrases such as 'join game', 'find game', 'check game', and 'game status' that are likely to collide with unrelated user requests. In an agent ecosystem, overly broad triggers can cause unintended skill activation, leading the agent to fetch remote instructions or perform game-related actions in contexts where the user meant something else.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to persist owner wallet and credential-related data locally without clearly warning the user that sensitive information will be stored on disk. This creates a privacy and security risk because local files may be accessible to other processes, users, backups, or logs, especially in shared or poorly secured environments.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill contains contradictory runtime instructions: one section says to keep free play running, while the core rules explicitly state paid rooms only because free rooms are suspended. In an autonomous agent, this kind of policy conflict can cause unsafe or unintended behavior, including executing deprecated flows, repeated failures, or ignoring current operational constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The quickstart instructs users to supply an Ethereum private key and then immediately demonstrates a paid purchase flow, but it does not prominently warn that the example authorizes real token transfers and spends USDC. In an agent skill context, this is especially risky because operators may automate the example with production credentials, causing unintended financial transactions or key-handling mistakes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The purchase flow instructs the agent to perform a real x402 payment-backed token purchase but does not prominently warn that this will spend USDC and may execute on production endpoints. In the context of a game-agent skill, that omission is more dangerous because an agent could treat the action as routine API usage rather than a value-transferring transaction requiring explicit user confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill description directs the agent to overwrite local skill files under ~/.molty-royale/skills/ by redirecting downloaded content into those paths. Although the behavior is described operationally, there is no explicit warning that local files will be written or replaced as part of periodic updates.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill directs the agent to automatically re-download skill files from remote URLs based on server-provided update metadata, without explicit user awareness or approval. This expands the trust boundary to remote content and creates a supply-chain risk, since changed instructions could alter agent behavior at runtime.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/matchmaking.md:35

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/setup.md:84