T07 · Tool Hijacking and Spoofing
- Location
scripts/okx_analyst.py:829- Finding
Default Execution of Unaudited Scripts Outside the Skill Package
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a mostly coherent crypto-analysis tool, but it needs review because normal analysis can run unaudited scripts from hard-coded external paths and it handles OKX account credentials with limited safeguards.
Review before installing. Do not run the default OKX analysis unless you are comfortable with its hard-coded external news-script calls, or use --no-news. If you configure OKX keys, use read-only keys with the minimum account permissions, avoid withdrawal/trading permissions, and keep them in a dedicated environment. Install dependencies in an isolated virtual environment and prefer pinned requirements.
scripts/okx_analyst.py:829Default Execution of Unaudited Scripts Outside the Skill Package
SKILL.md:140Unpinned and Unnecessary Third-Party Dependency Installation
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The documented behavior materially exceeds the declared market-analysis purpose by including authenticated balance access via OKX API credentials. That mismatch can mislead users into supplying secrets or approving actions they would not expect from a nominally analytical skill.
The docstring is materially misleading: the script does not use a public endpoint, it performs an authenticated request to a private account-balance API using API credentials from a local .env file. In a security review context, this kind of misrepresentation can cause operators to grant sensitive keys or run the tool under false assumptions, increasing the chance of credential exposure or unauthorized access to private financial data.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from datetime import datetime
def load_env():
"""Load OKX credentials from .env"""
env_path = os.path.join(os.path.dirname(__file__), '.env')
if os.path.exists(env_path):
with open(env_path) as f:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_env():
"""Load OKX credentials from .env"""
env_path = os.path.join(os.path.dirname(__file__), '.env')
if os.path.exists(env_path):
with open(env_path) as f:
for line in f:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import os
from dotenv import load_dotenv
# 加载环境变量(从 .env 文件)
load_dotenv()
# OKX API 配置(从环境变量读取,不要硬编码!)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import os
from dotenv import load_dotenv
# 加载环境变量(从 .env 文件)
load_dotenv()
# OKX API 配置(从环境变量读取,不要硬编码!)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import os
from dotenv import load_dotenv
# 加载环境变量(从 .env 文件)
load_dotenv()
# OKX API 配置(从环境变量读取,不要硬编码!)
The skill advertises and invokes capabilities that imply shell execution, network access, file reads, and environment-variable use, but it declares no explicit tool scope or permission boundaries. In a skill that references API keys and command execution, missing scope declarations increases the chance of over-broad access and unintended execution paths.
The markdown instructs users to configure OKX API credentials and references balance retrieval, but it does not prominently warn about sensitive credential handling, account-data exposure, or the risks of using live exchange keys. This can lead users to supply powerful secrets to a skill presented mainly as an analysis tool, increasing the chance of credential leakage or misuse.
The trigger guidance includes broad natural-language phrases like '帮我看看行情', which can cause the skill to activate in routine conversation without clear user intent. In a skill capable of shell/network operations and potentially touching authenticated exchange data, over-broad activation increases the risk of unintended execution and data exposure.
This Python file contains multiple user-facing strings in Chinese, including error messages and account output labels. The policy forbids forcing a specific language without user opt-in, and nothing in the file indicates that the skill is intentionally region-specific or provides a language selection.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
symbol = symbol.upper().replace('-', '') + 'USD'
# Try Binance US first, then OKX as fallback reference
for base_url in [
f"https://api.binance.us/api/v3/ticker/price?symbol={symbol}",
]:
try:
r = requests.get(base_url, timeout=10)
This code hardcodes Chinese-language descriptions and output strings in the argument parser and printed results, which imposes a specific language on all users. The file does not provide a language option, fallback, or justification that the skill is intended only for a Chinese-speaking or region-specific audience.
The top-level docstring describes the script as fetching the current Fear & Greed index from alternative.me. In practice, the program also interprets the value and prints actionable market advice, which contradicts the documented intent rather than merely omitting an implementation detail.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
import json
def get_fear_greed():
url = "https://api.alternative.me/fng/"
try:
r = requests.get(url, timeout=10)
data = r.json()
The user-facing strings throughout the script are fixed in Chinese, and the skill does not provide any opt-in, locale selection, or justification for enforcing that language. This can violate language/locale policy when users are not given a choice.