Back to skill

Security audit

Neo Market

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real Neo Market blockchain CLI, but it asks users to expose wallet keys and sign USDC-related transactions without enough safeguards or reproducible installation controls.

Review this skill carefully before installing. Use only a dedicated low-balance wallet, do not pass private keys on the command line, avoid storing valuable wallet keys in plaintext .env files, pin and verify the npm package version, and confirm the RPC network and contract addresses before signing any transaction.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
cli.ts:27
Finding
Wallet Private Key Exposed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `cli.ts:27-38` **Vulnerability Type**: Sensitive credential exposure through process arguments **Risk Level**: Medium ### Vulnerable Code ```ts program .name("agent-market") .description("CLI for Autonomous Agents") .version("0.1.0") .option("--rpc <url>", "Override RPC URL", DEFAULT_RPC) .option("--key <private_key>", "Override Private Key"); function getProvider(options: any) { const rpc = options.rpc || process.env.BASE_RPC_URL || DEFAULT_RPC; return new ethers.JsonRpcProvider(rpc); } function getWallet(options: any, provider: ethers.JsonRpcProvider) { const key = options.key || process.env.PRIVATE_KEY; if (key) return new ethers.Wallet(key, provider); return null; } ``` ### Technical Analysis The CLI accepts a complete wallet private key through the `--key` command-line option. Command-line arguments are not a secure credential transport mechanism. Depending on the operating system and execution environment, arguments can be exposed through: - Shell history files. - Process inspection utilities and process metadata. - Terminal session recordings. - Audit, endpoint monitoring, or orchestration logs. - Agent execution traces and diagnostic output. - Wrapper scripts or automation configuration. The key is used to instantiate an `ethers.Wallet`, granting the process unrestricted signing authority for that wallet. Although the reviewed code does not transmit the raw private key to the RPC endpoint, disclosure through local process metadata is sufficient to compromise the wallet. This credential access is required for signing transactions, but accepting the credential as a normal command-line argument exceeds the minimum privilege and secrecy controls necessary for that functionality. ### Attack Path 1. A user or autonomous agent invokes the CLI with `neo-market --key 0x...`. 2. The complete private key is recorded in shell history, execution telemetry, process arguments, or an ...[truncated 891 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `--key` command-line option entirely. 2. Support protected signing mechanisms such as: - Encrypted JSON keystores with a hidden password prompt. - Hardware wallets. - OS-native credential stores. - External signers that do not expose raw key material to the CLI. 3. If interactive key entry is necessary, use a no-echo terminal prompt and retain the key only in memory for the minimum required duration. 4. Avoid recommending persistent plaintext `.env` files for valuable wallet keys. 5. If environment-variable support remains available, clearly warn that inherited environments, crash reports, and child processes can expose the value. 6. Encourage use of a dedicated, least-value operational wallet rather than a primary wallet. 7. Add automated tests ensuring that private keys are never printed, included in errors, or accepted through process arguments. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
cli.ts:19
Finding
Unvalidated RPC Endpoint Controls Wallet Network Operations<![CDATA[ ## Vulnerability Details **File Location**: `cli.ts:19-38` **Vulnerability Type**: Untrusted network endpoint and missing chain validation **Risk Level**: Medium ### Vulnerable Code ```ts // Contracts are on Sepolia L1 const DEFAULT_RPC = "https://ethereum-sepolia-rpc.publicnode.com"; const CURRENT_CHAIN_ID = 11155111; const program = new Command(); program .name("agent-market") .description("CLI for Autonomous Agents") .version("0.1.0") .option("--rpc <url>", "Override RPC URL", DEFAULT_RPC) .option("--key <private_key>", "Override Private Key"); function getProvider(options: any) { const rpc = options.rpc || process.env.BASE_RPC_URL || DEFAULT_RPC; return new ethers.JsonRpcProvider(rpc); } function getWallet(options: any, provider: ethers.JsonRpcProvider) { const key = options.key || process.env.PRIVATE_KEY; if (key) return new ethers.Wallet(key, provider); return null; } ``` The delivery signature domain is independently hardcoded: ```ts const domain = { name: "AgentMarket", version: "1", chainId: CURRENT_CHAIN_ID, verifyingContract: ADDRS.TokenEscrow }; ``` ### Technical Analysis The `--rpc` option and `BASE_RPC_URL` environment variable can select an arbitrary JSON-RPC endpoint. The CLI then trusts that endpoint for network identification, account balances, contract reads, nonce and fee information, transaction submission, and transaction confirmation. Before signing operations, the CLI does not call `provider.getNetwork()` and compare the returned chain ID with the expected value in `deployed_addresses.json` or `CURRENT_CHAIN_ID`. Contract addresses are fixed to the Sepolia deployment, while the provider remains user-configurable. This creates an unsafe trust boundary and a risk of wrong-network operation. A hostile RPC does not directly receive the raw private key because `ethers.Wallet` signs locally. Nevertheless, it can observe wallet activity, falsify read responses, interfere with fee and nonce inf ...[truncated 2110 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Before any signing operation, obtain and validate the network: ```ts const network = await provider.getNetwork(); if (network.chainId !== BigInt(ADDRS.chainId)) { throw new Error( `Wrong network: expected chain ${ADDRS.chainId}, received ${network.chainId}` ); } ``` 2. Derive the EIP-712 `chainId` from a successfully validated provider rather than an independent hardcoded constant. 3. Maintain separate, explicit address maps for every supported network. 4. Reject networks for which no trusted deployment configuration exists. 5. Restrict RPC URLs to HTTPS by default. Require an explicit unsafe override for local HTTP development endpoints. 6. Display the validated chain ID, destination contract, method, token amount, and transaction value before signing. 7. For high-value operations, require interactive confirmation or a policy-based transaction approval layer. 8. Optionally verify deployed contract bytecode hashes at configured addresses before first use. 9. Rename `BASE_RPC_URL` or replace it with network-specific variables; it currently controls a CLI whose deployment is fixed to Ethereum Sepolia. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:21
Finding
Unpinned Global Package Installation Creates Supply-Chain Exposure<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:21-26` **Vulnerability Type**: Unpinned executable installation and mutable dependency resolution **Risk Level**: Low ### Vulnerable Code ```md ## Setup 1. **Install**: ```bash npm install -g @wangwuww/neo-market-cli ``` ``` The installed package also declares mutable dependency ranges: ```json "dependencies": { "commander": "^14.0.3", "dotenv": "^17.2.4", "eth-crypto": "^3.1.0", "ethers": "^6.13.5" } ``` No dependency lockfile is present in the reviewed project structure. ### Technical Analysis The installation instruction globally installs the latest package version matching the registry request rather than the audited version. Consequently, the code executed by a future installation can differ from the source reviewed in this audit. The runtime dependencies use caret ranges, and no lockfile was included in the audited project. Dependency resolution may therefore change over time. This is especially sensitive because the installed executable is expected to run in an environment containing `PRIVATE_KEY` and to sign blockchain transactions. There is also a provenance inconsistency: `_meta.json` identifies Skill version `1.0.2`, while `package.json` identifies CLI version `1.0.1`. This does not establish malicious behavior, but it makes it harder for operators to determine whether the installed artifact exactly matches the reviewed Skill. No malicious dependency was confirmed. The issue is the absence of reproducibility and integrity controls around a security-sensitive global executable. ### Attack Path 1. An attacker compromises the npm publisher account, a future package release, or a transitive dependency version allowed by the declared ranges. 2. A user follows the Skill instruction and runs the unpinned global installation command. 3. npm resolves and installs content that may differ from the audited source. 4. The global executable later runs in an environment c ...[truncated 867 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the audited CLI version in installation instructions, for example: ```bash npm install -g @wangwuww/neo-market-cli@1.0.1 ``` 2. Publish integrity information for the expected package artifact, such as a cryptographic digest or signed provenance attestation. 3. Include and maintain a lockfile for reproducible dependency resolution. 4. Pin security-sensitive runtime dependencies to reviewed versions rather than broad mutable ranges. 5. Enable npm provenance and use protected, multi-factor-authenticated publisher accounts. 6. Run automated dependency vulnerability and package-integrity scanning in CI. 7. Prefer isolated execution over global installation, and avoid running installation lifecycle operations in an environment containing wallet secrets. 8. Reconcile the Skill version in `_meta.json` with the CLI package version, or document the independent versioning scheme. 9. Document how users can verify that the npm package corresponds to the reviewed source commit. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The declared purpose describes a marketplace-integrated skill for discovering jobs, placing bids, and handling USDC payments on Neo Market. The actual code does not implement any Neo Market interaction, job discovery, bidding logic, or payment handling. Instead, it sets up Hardhat for smart contract development and deployment across Ethereum/Base-related networks, including use of RPC endpoints, account keys, and explorer verification APIs. That is a materially different primary purpose and involves undeclared blockchain deployment capabilities.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README instructs users to place a blockchain `PRIVATE_KEY` in a plain `.env` file without any warning about its sensitivity, use of a low-value dedicated wallet, or operational safeguards. In a skill meant to interact with on-chain escrow and bidding, compromise of that key can directly lead to theft of funds, fraudulent bids, impersonation, and irreversible blockchain transactions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Lp3

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding
The skill references environment-based secrets handling via PRIVATE_KEY and RPC configuration, but it does not declare any explicit tool scope or permissions boundary. In an agent setting, undeclared access to environment data increases the chance that a runtime can expose or misuse sensitive wallet credentials without clear user consent or sandboxing expectations.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The setup instructs users to provide a raw PRIVATE_KEY but does not prominently warn that this is a highly sensitive credential that can irreversibly transfer funds from the associated wallet. In agent environments, encouraging direct secret injection into env vars or interactive prompts materially raises the risk of theft, accidental logging, or misuse by other tools and subprocesses.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest description frames the skill around supplier-side activity: finding work, bidding on jobs, and receiving payment. This file additionally implements requester-side marketplace administration via `publish` and `select-bid`, which expands the behavior beyond the stated scope.

External Transmission

Medium
Category
Data Exfiltration
Content
network: "base",
        chainId: 8453,
        urls: {
          apiURL: "https://api.basescan.org/api",
          browserURL: "https://basescan.org"
        }
      }
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
该文件全文以中文编写,且未说明这是面向特定中文用户群、区域合规场景,或提供其他语言/本地化选项。按规则,若技能内容强制特定语言而无用户选择或明确正当说明,可构成自然语言层面的语言/地区策略问题。

Description-Behavior Mismatch

Low
Confidence
85% confidence
Finding
The closest payment-related behavior here is `deliver`, which signs and submits a delivery receipt to escrow. That may be part of a payout workflow, but the code shown does not actually provide a command to collect or verify receipt of USDC, so the implemented behavior falls short of the manifest's payment claim.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
The entire document is written in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific context. Under the stated policy, imposing a specific language without opt-in is a natural-language policy violation.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"test": "hardhat test"
  },
  "devDependencies": {
    "@nomicfoundation/hardhat-toolbox": "^5.0.0",
    "@types/node": "^20.12.7",
    "hardhat": "^2.22.3",
    "ts-node": "^10.9.2",
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "devDependencies": {
    "@nomicfoundation/hardhat-toolbox": "^5.0.0",
    "@types/node": "^20.12.7",
    "hardhat": "^2.22.3",
    "ts-node": "^10.9.2",
    "typescript": "^5.4.5"
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"devDependencies": {
    "@nomicfoundation/hardhat-toolbox": "^5.0.0",
    "@types/node": "^20.12.7",
    "hardhat": "^2.22.3",
    "ts-node": "^10.9.2",
    "typescript": "^5.4.5"
  },
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
    "@types/node": "^20.12.7",
    "hardhat": "^2.22.3",
    "ts-node": "^10.9.2",
    "typescript": "^5.4.5"
  },
  "dependencies": {
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"@types/node": "^20.12.7",
    "hardhat": "^2.22.3",
    "ts-node": "^10.9.2",
    "typescript": "^5.4.5"
  },
  "dependencies": {
    "commander": "^14.0.3",
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"typescript": "^5.4.5"
  },
  "dependencies": {
    "commander": "^14.0.3",
    "dotenv": "^17.2.4",
    "eth-crypto": "^3.1.0",
    "ethers": "^6.13.5"
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "dependencies": {
    "commander": "^14.0.3",
    "dotenv": "^17.2.4",
    "eth-crypto": "^3.1.0",
    "ethers": "^6.13.5"
  }
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"dependencies": {
    "commander": "^14.0.3",
    "dotenv": "^17.2.4",
    "eth-crypto": "^3.1.0",
    "ethers": "^6.13.5"
  }
}
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"commander": "^14.0.3",
    "dotenv": "^17.2.4",
    "eth-crypto": "^3.1.0",
    "ethers": "^6.13.5"
  }
}
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Static analysis

No suspicious patterns detected.