Back to skill

Security audit

Crypto Learning

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a crypto-learning skill, but it overstates automatic fresh-content behavior and includes an unsafe scheduled helper, so it should be reviewed before installing.

Install only after reviewing the mismatch between the promises and the actual helpers. Verify whether OpenClaw will really register the daily schedule, do not rely on the static lessons as current financial information, run any scheduled task under an unprivileged account, and replace the fixed /tmp output file with a secure temporary file or private handoff directory. Be aware that reset clears saved progress.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
schedule.sh:16
Finding
Predictable Temporary File Allows Symlink-Based File Overwrite## Vulnerability Details **File Location**: `schedule.sh`, line 16 **Vulnerability Type**: Unsafe predictable temporary file **Risk Level**: Medium ### Vulnerable Code ```bash # 方式1:如果通过 cron 的 agentTurn 发送系统事件 echo "$CONTENT" > /tmp/crypto-learning-today.txt ``` ### Technical Analysis The scheduled script writes learning content to the fixed path `/tmp/crypto-learning-today.txt`. `/tmp` is ordinarily shared and writable by all local users. Shell output redirection follows symbolic links and does not verify that the destination is a regular file owned by the expected account. A local attacker can therefore create `/tmp/crypto-learning-today.txt` as a symbolic link to another file before the scheduled script runs. If the target file is writable by the account executing the script, the redirection will truncate that target and replace its contents with the generated lesson. Quoting `"$CONTENT"` prevents shell word splitting but does not mitigate destination-path or symbolic-link attacks. ### Attack Path 1. The attacker obtains local access to the host and predicts the hardcoded temporary filename. 2. Before the scheduled execution, the attacker creates a symbolic link at `/tmp/crypto-learning-today.txt` pointing to a target file. 3. The scheduler invokes `schedule.sh`. 4. `crypto_learning.py next` generates the lesson and advances the local progress state. 5. The shell processes the redirection on line 16, follows the attacker-created symbolic link, and truncates the linked target. 6. The lesson text is written into the target file under the scheduler account's privileges. Exploitation is limited to target files writable by the account executing the scheduled job. The finding does not establish that the script runs as root. ### Impact Assessment Successful exploitation permits arbitrary file overwrite within the scheduled-task account's existing write permissions. Possible consequences include: - Corruption ...[truncated 489 chars]
Remediation
## Remediation Suggestions Remove the temporary-file write if no consumer requires it. If a file is necessary, create a unique file securely, restrict its permissions, and ensure cleanup: ```bash TMP_FILE="$(mktemp "${TMPDIR:-/tmp}/crypto-learning.XXXXXX")" || exit 1 chmod 600 "$TMP_FILE" trap 'rm -f "$TMP_FILE"' EXIT printf '%s\n' "$CONTENT" > "$TMP_FILE" ``` Additional hardening measures: 1. Run the scheduled task under a dedicated, unprivileged service account. 2. If a stable handoff location is required, use a private directory owned by that account with mode `0700`, rather than a shared `/tmp` path. 3. Do not check a path and then open it in separate operations, because that introduces a time-of-check/time-of-use race. 4. Use `printf` instead of `echo` for predictable handling of content beginning with options or containing escape sequences. 5. Configure a restrictive `umask`, such as `umask 077`, before creating output files.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description overstates key capabilities that are not present in the code. The code does implement parts of the stated purpose: a cryptocurrency learning curriculum, progress tracking, skipping, reset, and three learning stages. However, several central claims are unsupported. There is no scheduler, timer, cron integration, or trigger for a daily 9 AM automatic push; the only delivery mechanism is manual invocation via the 'next' command. There is no use of web_search, HTTP requests, or any external data source; all lessons are loaded from a local content.json file. The description says every call must output a beginner-friendly detailed report rather than just titles, but many commands return only control/status text, and lesson content is simply whatever static text is stored in JSON. Therefore the actual behavior is materially narrower and different from the declared automated, up-to-date, search-backed learning assistant.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
声明描述的是一个会定时推送、联网检索最新资料并生成详细学习报告的自学系统。实际代码的核心功能仅是本地 CLI 方式管理和展示预先写在 JSON 文件中的学习内容与进度。它确实支持进度跟踪、跳过和重置,这部分与声明一致;但声明中的关键能力——早上9点自动推送、调用时生成详细可学习报告、使用 web_search 获取最新资料——都没有在代码中体现。此外,代码依赖本地文件存储内容与进度,这属于实际资源访问方式,与声明中未提及的联网检索路线不一致。综合看,主要目的有部分重合,但关键承诺能力缺失,属于明显描述与行为不匹配。

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The provided code chunk implements only a narrow scheduling wrapper: it runs a Python script with the `next` argument, stores the returned content in a temporary file, and echoes it. This partially aligns with the declared daily 9 AM automation concept, but the broader declared functionality is not represented in the supplied code. In particular, there is no visible use of web search, no logic showing detailed report generation, no curriculum construction, and no progress-management features such as tracking, skipping, or resetting. Additionally, actual outbound Telegram delivery is not performed; it is only present as commented-out example code. Therefore, the declared description materially overstates what this code chunk actually does.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill metadata promises retrieval and integration of latest materials via web_search, but the implementation only loads static local JSON content. This creates a security-relevant integrity gap: users may rely on the skill for current crypto information while receiving stale or incomplete material, which is especially risky in a fast-changing financial domain.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The manifest claims automatic daily push at 9 AM, but the code only exposes manual CLI commands and contains no scheduler, timer, cron integration, or delivery mechanism. This deceptive capability mismatch can cause users to miss expected lessons or time-sensitive financial education, undermining trust and creating operational risk through false assurances.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The manifest says each invocation must produce a directly learnable detailed report and integrate the latest materials via web_search. In practice, the implemented commands only read from local content.json/progress.json, print a stored subtopic or status, and never perform any web retrieval or report generation.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The README is entirely written in Chinese and presents the skill as operating in Chinese without indicating that users may choose another language. This can violate language/locale policy when a specific language is imposed without opt-in or clear justification.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The markdown exposes a `reset` command that likely overwrites or clears saved progress, but there is no user-facing warning that this action may erase learning history. For markdown files, destructive or data-affecting behavior should be disclosed so users understand the impact before running the command.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill describes reading and updating local state files (`progress.json`, `content.json`) but does not declare any tool scope or allowed-tools boundary. Undeclared file read/write capability weakens least-privilege controls and can let the skill access or modify local files beyond what reviewers or users would reasonably expect.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest describes a self-learning system that automatically pushes content at 9 AM, must produce detailed reports on every invocation, uses web_search to integrate the latest materials, and supports progress tracking, skip, and reset. This file only defines a static JSON syllabus and lesson text; it contains no logic or data structures for scheduling, web retrieval, per-call report generation, or learner progress state.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This JSON content consistently presents all stage names, descriptions, and instructional text in Chinese only. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation when no language choice or regional justification is provided.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The module docstring defines the skill purpose entirely in Chinese, and all user-facing messages and command guidance throughout the script are presented only in Chinese. This imposes a specific language on users without any indication of locale choice or opt-in, which matches the language-policy violation category.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The start message explicitly tells the user the first lesson will arrive tomorrow at 9 AM, but the program has no automatic dispatch capability. Misleading delivery claims are dangerous because they induce false reliance and may cause users to miss planned educational or financial decision support.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill description says each invocation must produce a beginner-friendly detailed report, but several command paths only return short status text or a list-like summary. This is a contract-integrity issue that can mislead users about the depth and suitability of the output, though it is less severe than direct code-execution or data-exfiltration flaws.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
User-visible strings, help output, and status messages are consistently presented in Chinese, and the file contains no option for users to select another language. This enforces a specific language/locale without opt-in, which matches the policy violation criteria.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The reset_progress function recreates the entire progress state and writes it to progress.json, which discards prior learning history. Although the CLI prints a success message afterward, there is no confirmation prompt or pre-action warning before this destructive overwrite occurs.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The described skill behavior includes automatic delivery every morning at 9. The code contains only a command-line entrypoint that runs when explicitly invoked and does not include scheduler integration, time-based dispatch, or any mechanism to enforce daily automatic pushes.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The style requirement states '默认中文', which imposes a language preference in the skill's behavior. Under the policy rule, forcing a specific language without explicit user choice is a natural-language policy concern unless the locale constraint is clearly justified.

Description-Behavior Mismatch

Low
Confidence
78% confidence
Finding
The manifest emphasizes automatic delivery of beginner-friendly learning content, while this script also writes the generated content to /tmp/crypto-learning-today.txt. Local file persistence is not mentioned in the skill description and goes beyond the stated push behavior, even if used as an implementation workaround.

Static analysis

No suspicious patterns detected.