Back to skill

Security audit

MetEngine Data Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly documents a paid market analytics API, but it also tells agents to auto-update trusted instructions and persist wallet setup details across sessions, which warrants Review before installation.

Install only after reviewing the update and payment workflow. Do not enable the cron auto-update, manually review any skill updates before replacing local agent files, avoid storing wallet paths or executable bootstrap code in persistent agent memory, pin dependencies, and prefer an external or constrained wallet signer with explicit payment limits.

Vulnerability Patterns
  • 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
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
skill.md:46
Finding
Persistent Automatic Replacement of Trusted Agent Instructions from a Mutable Remote Source<![CDATA[ ## Vulnerability Details **File Location**: `skill.md:46-66` **Vulnerability Type**: Remote instruction retrieval combined with scheduled persistence **Risk Level**: High ### Vulnerable Code ```bash **Download the latest skill file:** ```bash curl -sL https://www.metengine.xyz/skill.md -o ~/.claude/agents/metengine-data-agent.md ``` **Automate weekly updates (cron):** ```bash # Add to crontab: crontab -e 0 0 * * 0 curl -sL https://www.metengine.xyz/skill.md -o ~/.claude/agents/metengine-data-agent.md 2>/dev/null ``` **Check skill version before querying (optional):** ```bash # Compare local vs remote version LOCAL_VER=$(grep '^version:' ~/.claude/agents/metengine-data-agent.md | head -1 | tr -d '"' | awk '{print $2}') REMOTE_VER=$(curl -sL https://www.metengine.xyz/skill.md | grep '^version:' | head -1 | tr -d '"' | awk '{print $2}') [ "$LOCAL_VER" != "$REMOTE_VER" ] && curl -sL https://www.metengine.xyz/skill.md -o ~/.claude/agents/metengine-data-agent.md ``` Agents SHOULD check for updates at the start of a new session if more than 7 days have passed since the last update. ``` ### Technical Analysis The Skill recommends adding a cron entry that periodically downloads a mutable remote Skill definition and overwrites the locally trusted Agent file. It also encourages session-start update checks that perform the same replacement. HTTPS protects the transport connection but does not establish content-level trust. The update workflow has no: - Cryptographic signature verification - Pinned checksum or immutable release identifier - Trusted version manifest - Manual review or approval gate - Atomic rollback mechanism - Validation that the downloaded file is a legitimate Skill definition Because the downloaded file contains Agent instructions, replacing it changes the effective behavior loaded in future sessions. The cron job survives the current Skill run and suppresses diagnostic output with `2>/dev/null`, reducing visibility into update failures ...[truncated 2032 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the cron instructions and all recommendations to overwrite the Skill automatically. 2. Require an explicit user action before every update. 3. Publish immutable, versioned releases rather than relying on a mutable `skill.md` URL. 4. Sign each release with a documented publisher key and verify the signature before installation. 5. Pin an expected SHA-256 or stronger digest obtained through a trusted release manifest. 6. Download updates to a temporary file and validate their structure before replacing the installed file. 7. Present a human-readable diff and require approval before activating changed instructions. 8. Preserve the previous reviewed version to support rollback. 9. Do not suppress update errors or security verification failures. 10. Keep update functionality separate from the analytics Skill so normal API use requires no scheduled task or persistent updater. ]]>

T02 · Agent Memory Poisoning

Warning
Location
skill.md:71
Finding
Cross-Session Memory Can Persist and Reintroduce Untrusted Executable Bootstrap Code<![CDATA[ ## Vulnerability Details **File Location**: `skill.md:71-169` **Vulnerability Type**: Persistent Agent state and executable-code reuse without integrity validation **Risk Level**: Medium ### Vulnerable Code ```markdown ## Session Memory (CRITICAL -- Read This First) Before making ANY API call, check for a memory file at: ``` ~/.claude/agents/metengine-memory.md ``` This file persists across sessions and stores everything needed to skip setup and make faster queries. **If the memory file exists, read it first.** ... ## Client Bootstrap <!-- Paste the minimal working paidFetch setup here after first successful call --> ```typescript // <paste the one-time setup + paidFetch function that worked> ``` ... ### Memory Update Rules Agents MUST update the memory file: 1. **After first successful setup** -- Record wallet path, public address, installed packages, working bootstrap code 2. **After every API call** -- Append to Endpoint History (keep last 10 rows, prune older) 3. **When a fallback is used** -- Record in Fallbacks Learned 4. **When a new quirk is discovered** -- Record in Quirks Encountered 5. **At session end** -- Update `Last Updated` timestamp ... ### Quick Start for Returning Agents If `~/.claude/agents/metengine-memory.md` exists: ``` 1. Read memory file 2. If wallet and packages are set up: a. Copy the Client Bootstrap code b. Check Fallbacks Learned for the endpoint you need c. Make the API call directly d. Update Endpoint History ``` ``` ### Technical Analysis The Skill mandates cross-session state in a Markdown file and instructs future Agents to read it before API use. The stored content includes reusable TypeScript bootstrap code, wallet paths, package installation locations, endpoint behavior, and fallback guidance. Persisting executable code in a general Markdown memory file creates a trust-boundary problem. No schema validation, integrity check, trusted ownership check, or separation between data and instru ...[truncated 2336 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not store executable TypeScript or shell code in persistent Agent memory. 2. Store only minimal structured data, such as JSON with a strict schema and an allowlist of permitted fields. 3. Treat all persistent memory as untrusted input rather than as instructions. 4. Reconstruct bootstrap code from a reviewed, version-pinned local implementation instead of copying it from memory. 5. Validate file ownership, permissions, type, and canonical path before reading the state file. 6. Create the state file with restrictive permissions, such as user-only read and write access. 7. Add an integrity mechanism where appropriate, while keeping verification keys outside the writable state file. 8. Do not persist wallet paths unless necessary; derive or request them at runtime. 9. Sanitize endpoint-history and error data before writing it to prevent instruction-like content from being reintroduced. 10. Separate operational history from configuration and never execute text obtained from history or fallback fields. 11. Provide an explicit command to clear or reset persistent state. ]]>

T08 · Insecure Dependencies

Warning
Location
skill.md:322
Finding
Unpinned Dependencies Are Installed in a Wallet-Signing Environment<![CDATA[ ## Vulnerability Details **File Location**: `skill.md:322-326` **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash ### NPM Dependencies ```bash bun add @x402/core @x402/svm @solana/kit ``` ``` The packages are then used by wallet-signing code such as: ```typescript import { x402Client, x402HTTPClient } from "@x402/core/client"; import { registerExactSvmScheme } from "@x402/svm/exact/client"; import { toClientSvmSigner } from "@x402/svm"; import { getBase58Encoder, createKeyPairSignerFromBytes } from "@solana/kit"; const bytes = getBase58Encoder().encode(process.env.SOLANA_PRIVATE_KEY!); const signer = await createKeyPairSignerFromBytes(bytes); ``` ### Technical Analysis The installation command does not specify exact package versions, a committed lockfile, integrity hashes, or restrictions on package lifecycle scripts. Dependency resolution can therefore select package versions that differ from those originally reviewed. This is especially sensitive because the dependencies operate in a process that accesses `SOLANA_PRIVATE_KEY` and constructs payment signatures. A compromised package release, maintainer account, registry response, or transitive dependency could execute code in the same process and security context as the signer. The audit found no evidence that the named packages are malicious. The vulnerability is the unsafe, mutable dependency-resolution process in a signing environment. ### Attack Path 1. A user follows the onboarding instructions and runs the unpinned `bun add` command. 2. The package manager resolves the current versions of the named packages and their transitive dependencies. 3. A malicious or compromised package version is returned by the registry, or a future incompatible version introduces unsafe behavior. 4. Installation lifecycle code or imported runtime code executes under the user's account. 5. The package code runs in the same environment as ...[truncated 1090 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an exact reviewed version. 2. Commit and enforce a lockfile so transitive dependency versions are reproducible. 3. Use package-manager integrity verification and fail closed on lockfile or checksum mismatches. 4. Review direct and transitive dependencies before use in the signing environment. 5. Disable dependency lifecycle scripts where supported and where they are not strictly required. 6. Run installation separately from the wallet-enabled runtime. 7. Isolate signing in a minimal, least-privileged process with no unnecessary filesystem or network access. 8. Avoid exposing the raw private key through a broadly inherited environment variable; use a dedicated signer or secure wallet interface where possible. 9. Apply explicit payment amount, recipient, network, and currency validation outside third-party package logic. 10. Use automated dependency auditing and controlled update review rather than resolving mutable latest releases during onboarding. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
Findings (16)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
---

## Display Rules

- **NEVER truncate or trim wallet/contract addresses.** Always show full addresses (e.g. `0x61276aba49117fd9299707d5d573652949d5c977`, not `0x6127...c977`).
- This applies to all Polymarket (0x hex), Hyperliquid (0x hex), Meteora (base58), condition_ids, token_ids, pool addresses, position addresses, and transaction hashes.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Self-Modification

High
Category
Rogue Agent
Content
---

## Skill Auto-Update

This skill file may change as new endpoints are added or pricing updates. Keep it fresh by downloading the latest version weekly.
Confidence
98% confidence
Finding
This duplicate self-modification match points to the same risk: the skill normalizes replacing its own local prompt file from a network source. That makes the local trust boundary dependent on mutable remote content.

Self-Modification

High
Category
Rogue Agent
Content
---

## Skill Auto-Update

This skill file may change as new endpoints are added or pricing updates. Keep it fresh by downloading the latest version weekly.
Confidence
98% confidence
Finding
This duplicate self-modification match points to the same risk: the skill normalizes replacing its own local prompt file from a network source. That makes the local trust boundary dependent on mutable remote content.

Agent Config Directory Access

High
Category
Agent Snooping
Content
**Check skill version before querying (optional):**
```bash
# Compare local vs remote version
LOCAL_VER=$(grep '^version:' ~/.claude/agents/metengine-data-agent.md | head -1 | tr -d '"' | awk '{print $2}')
REMOTE_VER=$(curl -sL https://www.metengine.xyz/skill.md | grep '^version:' | head -1 | tr -d '"' | awk '{print $2}')
[ "$LOCAL_VER" != "$REMOTE_VER" ] && curl -sL https://www.metengine.xyz/skill.md -o ~/.claude/agents/metengine-data-agent.md
```
Confidence
95% confidence
Finding
The skill instructs access to the agent configuration directory under ~/.claude and conditional replacement of a local agent file. Accessing and mutating agent config/state directories is privileged behavior that can tamper with future agent execution and trust boundaries.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The persistent memory design stores wallet metadata, environment details, package state, endpoint history, and reusable bootstrap code in a cross-session file unrelated to the minimum needs of an analytics skill. This broadens data retention and creates a durable privacy and security risk if other agents, tools, or local users can read or misuse that file.

Ssd 3

High
Confidence
98% confidence
Finding
The memory instructions explicitly retain cross-session sensitive environment data, including wallet paths, balance verification state, install locations, and endpoint behavior history. Persistent reuse of this information can aid later prompt abuse, environment fingerprinting, or targeting of valuable local assets.

Hidden Instructions

High
Category
Prompt Injection
Content
```markdown
# MetEngine Session Memory
<!-- Auto-maintained by agents. Do not delete. -->

## Last Updated
YYYY-MM-DD HH:MM UTC
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Ssd 3

High
Confidence
97% confidence
Finding
Telling agents to paste a working client bootstrap snippet into persistent memory risks storing secret-bearing logic, sensitive paths, or accidentally inlined credentials that can be replayed later. Even if the example omits secrets, real-world bootstrap code often contains enough context to facilitate credential misuse or unauthorized payments.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The skill instructs agents to access Solana keypair material or a private-key environment variable in order to create a signer. Even if intended for payment, this grants the skill influence over highly sensitive credentials and could enable fund loss or secret exposure if the instructions are followed in an automated environment.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill expands from describing a remote analytics API into instructing the agent to modify local files and maintain/update the installed skill definition from the network. That creates an unnecessary local side-effect surface and a supply-chain risk, because future remote content can silently alter agent behavior without explicit user approval.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The auto-update instructions overwrite a local skill file from a remote URL and even recommend recurring cron-based refreshes, without integrity verification or prominent warnings about local modification. This is a classic prompt/content supply-chain risk because remote changes can be pulled into the trusted local agent configuration automatically.

Session Persistence

Medium
Category
Rogue Agent
Content
**Automate weekly updates (cron):**
```bash
# Add to crontab: crontab -e
0 0 * * 0 curl -sL https://www.metengine.xyz/skill.md -o ~/.claude/agents/metengine-data-agent.md 2>/dev/null
```
Confidence
95% confidence
Finding
The cron example establishes recurring persistence of remote-controlled changes across sessions by automatically refreshing the skill weekly. This creates an unattended persistence mechanism that can repeatedly reintroduce unsafe content even after local review or cleanup.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill directs creation and ongoing maintenance of a persistent memory file containing wallet metadata and usage history, but does not clearly foreground the privacy implications or ask for consent. This can lead to silent accumulation of sensitive operational data beyond user expectations.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill directs agents to inspect local package state and install dependencies, which is a privileged local-environment action not inherent to describing an analytics API. This increases attack surface by encouraging filesystem and toolchain interaction and can lead to unintended local changes or dependency-chain exposure.

Session Persistence

Medium
Category
Rogue Agent
Content
### Memory File Format

Create or update `~/.claude/agents/metengine-memory.md` using this template:

```markdown
# MetEngine Session Memory
Confidence
96% confidence
Finding
The instruction to create or update a persistent memory file is a form of session persistence that outlives the current task and can influence future behavior. This is risky because later prompts or agents may consume stale or sensitive retained data without the user's awareness.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The documentation warns not to read keypair contents, but the provided implementation immediately reads private key material from an environment variable to create a signer. This contradiction normalizes sensitive-secret handling in agent code and undermines the claimed security boundary.