Back to skill

Security audit

Crypto Market Monitor

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for crypto and economic monitoring, but it has under-disclosed financial-data accuracy problems and unsafe hard-coded root/import behavior that users should review carefully.

Review this skill before installing. It fetches public crypto prices, writes local JSON data, and can be scheduled with cron, but parts of the economic calendar are generated rather than live and the scripts contain hard-coded /root paths that may fail or tempt root execution. Install only in an isolated environment, avoid sudo, do not enable cron until paths and imports are fixed, and do not rely on its economic calendar for trading decisions without independent verification.

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 (2)

T08 · Insecure Dependencies

Warning
Location
INSTALL.md:96
Finding
Unpinned and Unnecessary Runtime Dependencies Increase Supply-Chain Exposure<![CDATA[ ## Vulnerability Details **File Location**: `INSTALL.md:96-104` **Vulnerability Type**: Uncontrolled third-party dependency resolution **Risk Level**: Medium ### Vulnerable Code ```markdown ## Requirements - Python 3.6+ - requests - pytz - feedparser Install dependencies: ```bash pip3 install requests pytz feedparser ``` ``` ### Technical Analysis The installation procedure retrieves packages from the Python package index without specifying reviewed versions, cryptographic hashes, or a lockfile. Consequently, the code installed on a user's system can change after the Skill has been audited. The instructions also do not require an isolated virtual environment. Depending on the user's pip configuration, packages may be installed into the user's shared Python environment or a system-wide environment. Installation with elevated privileges would cause package installation code to execute with those elevated privileges. The supplied scripts use `requests` and `pytz`, but the audit found no use of `feedparser`. Installing an unused package expands the supply-chain attack surface beyond what is necessary for the declared functionality. This finding does not establish that any currently named package is malicious. The risk arises from unrestricted future dependency resolution and unnecessary dependency installation. ### Attack Path 1. An upstream package release, maintainer account, package index, or dependency in the transitive dependency graph is compromised. 2. A user follows `INSTALL.md` and runs the unpinned `pip3 install` command. 3. pip resolves and downloads the compromised version because no approved version or hash is enforced. 4. Package build or installation logic executes with the privileges of the invoking user. 5. Malicious package code can subsequently execute whenever the Skill imports the affected dependency. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user runni ...[truncated 462 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `feedparser` unless a supplied and reviewed feature actually requires it. 2. Define reviewed, exact dependency versions in a dedicated requirements file: ```text requests==<reviewed-version> pytz==<reviewed-version> ``` 3. Generate and verify cryptographic hashes for every direct and transitive dependency, then install with: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Require installation in a project-specific virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Document that dependency installation must not be performed as root. 6. Add automated dependency auditing and update pinned versions only after review and testing. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/crypto_monitor_telegram.py:8
Finding
Hard-Coded Root Workspace and Import Paths Create Unsafe Module Resolution and Encourage Excessive Privilege<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/crypto_monitor_telegram.py:8-16, 257-262` - `scripts/economic_analyzer.py:15-20` - `scripts/economic_calendar.py:73-77, 383-386` - `scripts/update_economic_data.py:8-14` **Vulnerability Type**: Unsafe import-path manipulation and hard-coded privileged filesystem paths **Risk Level**: Medium ### Vulnerable Code From `scripts/crypto_monitor_telegram.py`: ```python import os import sys import requests from datetime import datetime # 添加工作目录到路径 sys.path.insert(0, '/root/.openclaw/workspace/crypto/economic') from economic_calendar import EconomicCalendar, EconomicNotifier ``` ```python def generate_economic_report(): """生成经济数据报告(简化版)""" sys.path.insert(0, '/root/.openclaw/workspace/crypto/economic') from economic_analyzer import EconomicDataAnalyzer ``` From `scripts/economic_analyzer.py`: ```python class EconomicDataAnalyzer: """经济数据分析器""" def __init__(self): self.workspace = "/root/.openclaw/workspace/crypto/data" os.makedirs(self.workspace, exist_ok=True) self.actual_data_file = f"{self.workspace}/actual_data.json" ``` From `scripts/economic_calendar.py`: ```python class EconomicCalendar: """经济日历监控器""" def __init__(self): self.workspace = "/root/.openclaw/workspace/economic" os.makedirs(self.workspace, exist_ok=True) self.timezone = pytz.timezone('Asia/Shanghai') ``` ```python class EconomicNotifier: """经济数据通知器""" def __init__(self): self.calendar = EconomicCalendar() self.last_notified_file = "/root/.openclaw/workspace/economic/last_notified.json" os.makedirs(os.path.dirname(self.last_notified_file), exist_ok=True) ``` From `scripts/update_economic_data.py`: ```python import sys import argparse from datetime import datetime sys.path.insert(0, '/root/.openclaw/workspace') from economic_analyzer import EconomicDataAnalyzer ``` ### Technical Analysis The scripts hard-code pat ...[truncated 3032 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all hard-coded `/root/.openclaw` paths. 2. Resolve packaged modules through normal package-relative imports rather than modifying `sys.path`. 3. Package the scripts as a Python module and use imports such as: ```python from .economic_calendar import EconomicCalendar, EconomicNotifier from .economic_analyzer import EconomicDataAnalyzer ``` 4. If standalone execution must be supported, derive paths from the reviewed script location: ```python from pathlib import Path PROJECT_ROOT = Path(__file__).resolve().parent.parent DATA_DIR = PROJECT_ROOT / "data" DATA_DIR.mkdir(parents=True, exist_ok=True) ``` 5. If user configuration is required, read the documented configuration file and validate that configured paths are absolute, user-owned, and not unexpectedly writable by other users. 6. Use `Path.home()` for user-specific defaults instead of `/root`: ```python WORKSPACE = Path.home() / ".openclaw" / "workspace" / "crypto" ``` 7. Keep calendar state and economic data beneath one documented Skill workspace. 8. Explicitly document that the Skill does not require root privileges and should never be run with `sudo`. 9. Add tests that run all scripts under an unprivileged temporary home directory and verify that imports resolve only to packaged modules. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The documentation claims comprehensive market monitoring, alerting, sentiment analysis, and external data retrieval, but the underlying behavior reportedly does not implement those functions. This is dangerous because users may make financial or operational decisions based on false assumptions about live monitoring, alert coverage, or data freshness, creating a trust and integrity failure rather than a direct code-execution issue.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
**Q: How to clear all data?**
A: Delete data file:
```bash
rm data/actual_data.json
```

## Best Practices
Confidence
97% confidence
Finding
The example directly instructs deletion of a file via shell command, which is a form of tool misuse risk because users may execute it without understanding permanence or adapting it safely to their environment. Although the path is relatively scoped (`data/actual_data.json`), documentation that encourages copy-paste destructive commands increases the chance of accidental or repeated data loss.

Session Persistence

Medium
Category
Rogue Agent
Content
# Or manually extract to workspace
unzip crypto-market.skill -d ~/.openclaw/workspace/skills/

# 2. Create required directories
mkdir -p ~/.openclaw/workspace/crypto/{economic,scripts,data,logs}

# 3. Copy skill files to crypto workspace
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Session Persistence

Medium
Category
Rogue Agent
Content
```bash
# Edit crontab
crontab -e

# Add these lines (adjust paths if needed):
0 8 * * * cd ~/.openclaw/workspace/crypto/economic && /usr/bin/python3 daily_economic_report_v2.py >> ~/.openclaw/workspace/crypto/logs/economic_report.log 2>&1
Confidence
85% confidence
Finding
The installation instructions explicitly direct the user to add cron jobs that execute the skill's Python scripts on a recurring basis. Even if presented as legitimate monitoring automation, this establishes persistence and repeated code execution, which increases risk because any compromised or later-modified script will continue running unattended.

File System Enumeration

Medium
Category
Data Exfiltration
Content
### Path errors
- Ensure all directories exist: `mkdir -p ~/.openclaw/workspace/crypto/{economic,scripts,data,logs}`
- Check file permissions: `ls -l ~/.openclaw/workspace/crypto/`
- Verify Python path: `which python3`
Confidence
60% confidence
Finding
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Lp3

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding
The skill documentation describes capabilities that imply file read/write and network access, but it does not declare any explicit tool scope or permissions. This weakens least-privilege boundaries and can mislead users or agents about what the skill may access, increasing the chance of unintended data exposure or unauthorized external communication when the referenced scripts are run.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The note states that all times are Asia/Shanghai (Beijing Time), which imposes a specific locale on users in natural-language documentation. The file does not offer an opt-in, conversion guidance, or explain that the skill is intentionally limited to a China-specific audience, so this appears to violate the language/locale policy criteria.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation instructs users to run a destructive deletion command (`rm data/actual_data.json`) with no warning, confirmation step, backup guidance, or safer alternative. In a skill context, users may copy-paste commands directly, so this creates a real risk of accidental data loss even if it is not arbitrary code execution.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file’s top-level description and all user-facing output strings are explicitly in Chinese, indicating the skill is designed to operate in a single language. The policy requires flagging language or locale constraints when the skill does not offer user opt-in or a documented justification for the restriction.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The script prepends a hard-coded external workspace path to sys.path and then imports Python modules from there, causing execution to depend on code outside the skill package. If that workspace path is modified by another process or user, the script will import and execute attacker-controlled code with the script's privileges, which is a classic arbitrary code execution risk.

External Transmission

Medium
Category
Data Exfiltration
Content
def get_crypto_prices():
    """获取加密货币价格数据(包含 sparkline 数据用于计算 EMA)"""
    ids = ','.join(TOKENS.values())
    url = f'https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids={ids}&order=market_cap_desc&sparkline=true&price_change_percentage=1h,24h,7d,30d'

    # 尝试 CoinGecko API(最多重试 2 次)
    for attempt in range(3):
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
def get_crypto_prices():
    """获取加密货币价格数据(包含 sparkline 数据用于计算 EMA)"""
    ids = ','.join(TOKENS.values())
    url = f'https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids={ids}&order=market_cap_desc&sparkline=true&price_change_percentage=1h,24h,7d,30d'

    # 尝试 CoinGecko API(最多重试 2 次)
    for attempt in range(3):
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
"""从 Binance API 获取加密货币价格数据(备用数据源)"""
    try:
        # 获取 24 小时价格变化
        ticker_url = 'https://api.binance.com/api/v3/ticker/24hr'
        response = requests.get(ticker_url, timeout=10)
        response.raise_for_status()
        tickers = response.json()
Confidence
60% 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

Medium
Confidence
95% confidence
Finding
The file’s natural-language descriptions, user-facing output strings, and report text are all hard-coded in Chinese, indicating the skill operates in a single language without offering a user choice. This matches the language/locale policy concern because there is no opt-in, fallback, or documented region-specific justification in the file.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The module description and all user-facing output are written exclusively in Chinese, and the code hard-codes the Asia/Shanghai timezone for all reporting. This imposes a language/locale choice on users without any opt-in or documented regional limitation.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
该 markdown 文件的全部标题和说明均以中文呈现,但未说明这是面向特定中文用户群体的区域化内容,也未提供用户可选择语言的提示。按照语言/locale 政策,若技能内容隐含强制单一语言而没有用户选择或明确正当理由,可视为自然语言策略违规。

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The usage examples show commands and outputs that use both English and Chinese names, such as `CPI 消费者价格指数`, `GDP 季度报告`, and `失业率`, but the document does not explain the language behavior or give users an option to choose a preferred locale. This can amount to an implicit language policy choice without opt-in.

Static analysis

No suspicious patterns detected.