Back to skill

Security audit

market_test_price

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent OKX token-price skill that uses disclosed API credentials for a fixed OKX endpoint, with no hidden, destructive, or unrelated behavior found.

Before installing, treat OKX keys and passphrases as sensitive, prefer environment variables or a secrets manager, use a key limited to the needed OKX Web3 API access, and avoid enabling debug output in shared logs. For reproducible use, install dependencies from a trusted index and consider pinning requests.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Note
Location
scripts/market_test_price.py:36
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: scripts/market_test_price.py, lines 36–39
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

Vulnerable Code

python
try:
    import requests
except ImportError:
    raise ImportError("Please install requests: pip install requests")

Technical Analysis

The error message instructs users to install requests without specifying an approved version or verifying package integrity. The project also contains no lock file or hashed dependency manifest.

The package name is the legitimate and widely used requests package, so this is not evidence of deliberate dependency confusion, typosquatting, or malicious behavior. Nevertheless, installing an unconstrained version means the code executed by the project can vary over time and has not necessarily been reviewed with the skill. A future compromised release, unsafe package-index configuration, or malicious package-index mirror could introduce supply-chain code execution.

The static pre-scan warnings concerning sensitive-data encoding and network transmission were also reviewed. Base64 is used only to encode the HMAC-SHA256 authentication signature, which is required by the declared OKX API protocol. The API key, passphrase, signature, and token-query body are transmitted only to the fixed HTTPS endpoint https://web3.okx.com/api/v6/dex/market/price. No covert exfiltration destination or malicious encoding behavior was identified.

Attack Path

  1. A user runs the script without requests installed.
  2. The import failure recommends running pip install requests.
  3. The user's package manager resolves the latest available release from its configured index or mirror.
  4. If that source or resolved release has been compromised, installation hooks or imported package code execute under the user's account.
  5. Malicious dependency code could access the process environment, including the OKX cred ...[truncated 899 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a dependency manifest and pin requests to a reviewed version or narrowly reviewed compatible range.
  2. For reproducible deployments, maintain a lock file containing cryptographic hashes, such as a hash-locked requirements.txt generated with pip-tools.
  3. Replace the installation message with a reference to the repository's approved dependency installation procedure.
  4. Install dependencies only from an explicitly trusted package index, preferably through a controlled internal mirror.
  5. Enable automated dependency vulnerability scanning and update pinned versions through a reviewed process.
  6. Run the client in a minimally privileged virtual environment or container and expose only the credentials required for the OKX price endpoint.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

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.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill requires API credentials and instructs authenticated requests to a third-party service, but it does not give an explicit user-facing warning that secrets will be transmitted to OKX and must be handled carefully. This can lead to inadvertent exposure or misuse of production credentials, especially when users copy examples into insecure environments, logs, or shared notebooks. The context makes this somewhat more sensitive because the skill is specifically designed around signed requests using live secrets.

Content

No source excerpt is available for this finding.