T08 · Insecure Dependencies
- Location
scripts/okx_analyst.py:829- Finding
Default Execution of Unverified External Skill Scripts
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This crypto analysis skill largely fits its stated purpose, but it runs unbundled local helper scripts by default and handles exchange credentials with misleading documentation.
Review before installing. Use only read-only OKX API keys with no trading or withdrawal permissions, avoid placing broad credentials in the project .env, and run okx_analyst.py with --no-news unless the external helper scripts are reviewed, trusted, and expected on your machine.
scripts/okx_analyst.py:829Default Execution of Unverified External Skill Scripts
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
If the skill can invoke external scripts or news aggregation beyond what the description discloses, that hidden expansion of behavior materially increases attack surface and user surprise. Undisclosed external execution paths are risky in agent skills because they can introduce unreviewed network destinations, data handling, or shell execution not anticipated by the user.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
OKX Account Balance Checker
Requires OKX API Key with read permissions. Uses only public endpoints (no trading).
.env 需要: OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE
"""
import sys
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
OKX Account Balance Checker
Requires OKX API Key with read permissions. Uses only public endpoints (no trading).
.env 需要: OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE
"""
import sys
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
OKX Account Balance Checker
Requires OKX API Key with read permissions. Uses only public endpoints (no trading).
.env 需要: OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE
"""
import sys
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
OKX Account Balance Checker
Requires OKX API Key with read permissions. Uses only public endpoints (no trading).
.env 需要: OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE
"""
import sys
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
OKX Account Balance Checker
Requires OKX API Key with read permissions. Uses only public endpoints (no trading).
.env 需要: OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE
"""
import sys
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
OKX Account Balance Checker
Requires OKX API Key with read permissions. Uses only public endpoints (no trading).
.env 需要: OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE
"""
import sys
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
OKX Account Balance Checker
Requires OKX API Key with read permissions. Uses only public endpoints (no trading).
.env 需要: OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE
"""
import sys
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_env():
"""Load OKX credentials from .env (优先项目根目录,其次脚本目录)"""
for env_path in [
os.path.join(PROJECT_ROOT, '.env'),
os.path.join(SCRIPT_DIR, '.env'),
]:
if os.path.exists(env_path):
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_env():
"""Load OKX credentials from .env (优先项目根目录,其次脚本目录)"""
for env_path in [
os.path.join(PROJECT_ROOT, '.env'),
os.path.join(SCRIPT_DIR, '.env'),
]:
if os.path.exists(env_path):
The skill advertises and orchestrates scripts that require shell execution, network access, file reads, and environment-based secrets, but it does not declare any explicit tool scope or permissions boundaries. This increases the risk of over-privileged execution, accidental secret exposure, or unsafe tool invocation because consumers cannot tell what capabilities the skill actually needs before running it.
The skill metadata and instructions are entirely presented in Chinese, with no indication that the user may choose another language or locale. Under the stated policy, a language constraint should either be optional for the user or explicitly justified as region-specific.
The trigger phrase includes broad, everyday language such as asking for market views, which can cause the skill to activate unintentionally in contexts where the user did not explicitly request this crypto tool. Unintended invocation is more dangerous here because the skill can lead to network access, script execution, and potentially credential-dependent flows.
The script claims it 'uses only public endpoints' but actually calls OKX's authenticated private /api/v5/account/balance endpoint and requires API key, secret, and passphrase. This mismatch can mislead users into supplying sensitive credentials under a false assumption, increasing the chance of unsafe deployment or over-trust.
The module docstring materially contradicts the implementation by presenting the API usage as public/non-sensitive while the code performs signed private account access. In a security-sensitive crypto skill, this deception-by-documentation can cause operators to expose exchange credentials they would not otherwise provide.
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)