Back to skill

Security audit

English Speaking Practice

Security checks for vulnerabilities and agentic risk

Overview

This English-practice skill is mostly purpose-related, but its scheduled messaging and external AI scripts handle secrets and configuration unsafely enough to require review before installation.

Review the scripts before installing. Keep config.json private, use a narrowly scoped API key, verify the API endpoint and message recipient, and avoid enabling cron until the monthly shell script is fixed or removed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/monthly-english-summary.sh:39
Finding

Python Code Injection Through a Configurable Data Path

Content
View full analysis

Vulnerability Details

File Location: scripts/monthly-english-summary.sh:9-12, 39-44
Vulnerability Type: Configuration-driven Python code injection
Risk Level: High

Vulnerable Code

bash
DATA_DIR=$(python3 -c "import json; d=json.load(open('$CONFIG_FILE')); print(d.get('data',{}).get('baseDir','$DEFAULT_DATA_DIR'))")
API_URL=$(python3 -c "import json; d=json.load(open('$CONFIG_FILE')); print(d.get('api',{}).get('url',''))")
API_KEY=$(python3 -c "import json; d=json.load(open('$CONFIG_FILE')); print(d.get('api',{}).get('apiKey',''))")
MODEL=$(python3 -c "import json; d=json.load(open('$CONFIG_FILE')); print(d.get('api',{}).get('model','glm-5'))")
bash
DATA_FILE=$DATA_DIR/$(date +%Y-%m).json

if [ -f "$DATA_FILE" ]; then
    # Read statistics
    voc=$(python3 -c "import json;d=json.load(open('$DATA_FILE'));print(d.get('vocabulary',{}).get('totalCount',0))")
    err=$(python3 -c "import json;d=json.load(open('$DATA_FILE'));e=d.get('errors',{});print(e.get('grammar',[]).__len__()+e.get('pronunciation',[]).__len__()+e.get('wordChoice',[]).__len__())")
    good=$(python3 -c "import json;d=json.load(open('$DATA_FILE'));print(d.get('goodExpressions',{}).get('totalCount',0))")

Technical Analysis

The data.baseDir value from config.json is used to construct DATA_FILE. That path is then interpolated directly into Python source passed through python3 -c.

Shell quoting around "$DATA_FILE" does not make this safe because the value is being inserted into a single-quoted Python string literal. A path containing a single quote followed by valid Python syntax can terminate the literal and inject additional Python statements.

This violates the separation between code and data. Configurable paths must be passed as ordinary process arguments rather than embedded in dynamically generated source code.

Attack Path

  1. An attacker obtains the ability to modify config.json, such a ...[truncated 1311 chars]
Remediation
View remediation

Remediation Suggestions

Pass every path to Python as a positional argument rather than interpolating it into Python source:

bash
voc=$(python3 -c '
import json
import sys

with open(sys.argv[1], encoding="utf-8") as stream:
    data = json.load(stream)
print(data.get("vocabulary", {}).get("totalCount", 0))
' "$DATA_FILE")

Apply the same pattern when reading CONFIG_FILE and for all other Python invocations.

Additional hardening should include:

  1. Resolve the configured data directory using a canonical path.
  2. If arbitrary storage locations are unnecessary, require the directory to remain beneath an approved application data root.
  3. Reject paths containing unexpected control characters.
  4. Ensure config.json and the project directory are writable only by the intended service user.
  5. Replace repeated inline Python programs with a dedicated Python helper that accepts paths through sys.argv.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/daily-english-push.py:69
Finding

API Bearer Credential Exposed Through Curl Process Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/daily-english-push.py:69-80; scripts/monthly-english-summary.sh:55-62
Vulnerability Type: Sensitive information exposure through process arguments
Risk Level: Medium

Vulnerable Code

In scripts/daily-english-push.py:

python
cmd = [
    "curl", "-s", API_URL,
    "-H", f"Authorization: Bearer {API_KEY}",
    "-H", "Content-Type: application/json",
    "-d", json.dumps({
        "model": MODEL,
        "messages": [{"role": "user", "content": prompt}],
        "max_tokens": 1000
    })
]

result = subprocess.run(cmd, capture_output=True, text=True, timeout=60)

In scripts/monthly-english-summary.sh:

bash
SUMMARY=$(curl -s "$API_URL" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"model\": \"$MODEL\", \"messages\": [{\"role\": \"user\", \"content\": \"$SUMMARY_PROMPT\"}], \"max_tokens\": 300}" \
  | python3 -c "import json,sys;d=json.load(sys.stdin);print(d.get('choices',[{}])[0].get('message',{}).get('content',''))")

Technical Analysis

Both scripts place the complete Authorization: Bearer ... header in curl's command-line argument vector. Depending on the operating system's process visibility configuration, command arguments can be observed through process-listing utilities, /proc, diagnostic agents, monitoring systems, or logs that capture command invocations.

The Python list-form invocation prevents shell command injection, but it does not hide the argument from operating-system process inspection. The shell implementation has the same credential-exposure property.

Attack Path

  1. Daily or monthly scheduled execution starts curl with the API key in its argument vector.
  2. A local process-monitoring user, diagnostic service, or compromised process with sufficient visibility inspects active process command lines while curl is running.
  3. The observer ext ...[truncated 931 chars]
Remediation
View remediation

Remediation Suggestions

Avoid placing secret headers directly in process arguments. Preferred options include:

  1. Use a Python HTTP client so the authorization header remains inside the Python process rather than a child process's argument vector.
  2. If curl must be used, provide sensitive configuration through a protected temporary configuration file or standard input, ensuring the secret does not appear in argv.
  3. Create temporary files with restrictive permissions such as mode 0600, and delete them reliably after use.
  4. Store config.json with permissions limited to the service account.
  5. Use a narrowly scoped API key with quota limits and rotate the currently configured key if process arguments may have been captured.
  6. Ensure error and diagnostic logging never records authorization headers.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/monthly-english-summary.sh:69
Finding

Messaging CLI Option Injection Through Unquoted Configuration Values

Content
View full analysis

Vulnerability Details

File Location: scripts/monthly-english-summary.sh:69
Vulnerability Type: Argument and option injection
Risk Level: Medium

Vulnerable Code

bash
# Send message
openclaw agent --channel $PUSH_CHANNEL --to $TARGET_USER_ID --message "$MESSAGE" --deliver

Technical Analysis

PUSH_CHANNEL and TARGET_USER_ID originate from config.json and are expanded without shell quoting. The shell therefore performs word splitting and pathname expansion on their contents.

A value containing spaces can become multiple command-line arguments. An attacker who can alter the configuration may consequently insert additional options into the openclaw agent invocation. This is argument injection rather than direct shell command injection: shell metacharacters introduced through ordinary variable expansion are not reparsed as shell operators. Nevertheless, injected arguments may alter message routing or other behavior supported by the OpenClaw CLI.

The daily Python implementation uses a list-form subprocess call and does not have this specific word-splitting issue.

Attack Path

  1. An attacker modifies the push.channel or push.targetUserId field in config.json.
  2. The attacker includes whitespace followed by additional OpenClaw CLI options in the configured value.
  3. The monthly summary script runs.
  4. Unquoted shell expansion splits the malicious value into separate arguments.
  5. The OpenClaw option parser processes the injected arguments.
  6. Depending on OpenClaw's supported options and precedence rules, the message may be redirected or the agent invocation may be altered.

The exact effect is constrained by the options accepted by the installed OpenClaw version. This finding does not establish arbitrary shell-command execution.

Impact Assessment

Potential impact includes:

  • Delivery of the monthly summary to an unintended recipient
  • Selection of an unintended ...[truncated 337 chars]
Remediation
View remediation

Remediation Suggestions

Quote all configuration-derived values:

bash
openclaw agent \
  --channel "$PUSH_CHANNEL" \
  --to "$TARGET_USER_ID" \
  --message "$MESSAGE" \
  --deliver

Quoting should be combined with strict validation:

  1. Allowlist supported channels, such as exactly feishu and openclaw-weixin.
  2. Validate recipient identifiers against channel-specific formats.
  3. Reject whitespace, control characters, and values beginning with option prefixes where they are not valid identifiers.
  4. Use an end-of-options marker where supported by the CLI.
  5. Prefer invoking OpenClaw from Python with a fixed argument array after validation.
  6. Check the command's exit status and report delivery failure rather than always printing a success message.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的主要能力是英语口语对话训练,以及定时任务推送;其中强调对话训练需要用户发送语音或文字消息且内容与英语练习相关时触发。实际代码并未实现任何用户输入驱动的对话训练,也不处理语音或文本练习消息。相反,它在每月最后一天检查学习数据文件,统计词汇、错误和好表达数量,调用外部模型API生成总结,再通过消息渠道向特定用户推送月度总结。这属于与声明不同的主要功能和触发方式。虽然都与英语学习有关,且“定时推送”方向有一定相关性,但实际是月度总结推送,不是声明中的对话训练或任务推送,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个面向交互的英语口语练习助手,而代码块只是一个数据维护脚本。它从配置读取数据目录,将当月学习数据保存到JSON文件中,支持添加词汇、错误、好表达、推送记录以及输出月度总结。虽然这些数据结构与英语学习场景相关,也包含“push”记录能力,但代码本身并不执行对话训练、语音处理、消息判断、任务生成或定时推送。因此其主要行为与声明的核心功能不一致,且存在未声明的本地数据持久化/统计能力,应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/monthly-english-summary.sh (reported line 54)May include surrounding context.

sh
用友好的语气,100字以内。"
        
        # 调用 AI 生成总结
        SUMMARY=$(curl -s "$API_URL" \
          -H "Authorization: Bearer $API_KEY" \
          -H "Content-Type: application/json" \
          -d "{\"model\": \"$MODEL\", \"messages\": [{\"role\": \"user\", \"content\": \"$SUMMARY_PROMPT\"}], \"max_tokens\": 300}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The configuration guide instructs users to store personal identifiers, learning data paths, API endpoints, API keys, and push recipient IDs without warning that these values may be stored locally and sent to third-party AI or messaging services. This can lead to unintentional disclosure of personal data and secrets, especially if users assume the skill is fully local or do not secure config.json and practice-data properly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The cron setup enables unattended message delivery but the guide does not clearly warn that, once configured, the skill will automatically send outbound messages on a schedule. In a messaging-integrated skill, this can cause unexpected transmissions, privacy issues, spam-like behavior, or sends to the wrong recipient if the targetUserId is misconfigured.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The README presents the skill as conducting English conversation practice and describes users sending English speech or text, but it does not mention any option to choose another language or explicitly opt into this language restriction. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README instructs users to configure a cron job for daily push notifications and a target account ID, but does not clearly warn that the skill will automatically send outbound messages on a schedule. This can lead to unexpected automated messaging, privacy issues, or accidental delivery to the wrong recipient if the target account is misconfigured.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% 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.

Content

Scanner excerpt · CONFIG.md (reported line 71)May include surrounding context.

配置 cron 任务,每天 10:00 自动推送:

bash
crontab -e
# 添加以下行
0 10 * * * cd /path/to/english-speaking-practice && python3 scripts/daily-english-push.py

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% 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.

Content

Scanner excerpt · README.md (reported line 56)May include surrounding context.

配置 cron 任务,每天 10:00 自动推送:

bash
crontab -e
# 添加以下行
0 10 * * * cd /path/to/english-speaking-practice && python3 scripts/daily-english-push.py

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states that user learning data is stored in a local practice-data/ directory but does not warn users about what is retained, how long it is kept, or whether spoken/text practice content may contain personal information. For a language-practice skill that processes user messages and voice input, silent persistence creates a real privacy risk because sensitive conversational content may be stored without informed consent.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill describes shell execution and persistent file writes via python scripts/update-english-data.py ... and storage under practice-data/YYYY-MM.json, but it does not declare any explicit tool scope or permissions boundaries. This increases risk because a runtime may grant broader shell/file capabilities than necessary, enabling abuse if user-derived content reaches these commands or if the skill is modified later.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The section for Chinese-speaking users says to understand the user's request and answer in English, which forces a specific language behavior. Under the policy, language constraints should be user-selectable or clearly documented as a justified locale-specific limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill automatically records conversation-derived practice data, including vocabulary, mistakes, corrections, and examples, without any user-facing disclosure, retention policy, or consent mechanism. Because this content comes directly from user interactions and may include sensitive personal details embedded in speech or text, silent persistence creates privacy and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill schedules proactive push messages to configured target users without documenting explicit recipient consent, opt-in, or unsubscribe behavior. Unsolicited outbound messaging can violate user expectations, platform policy, or privacy requirements, especially when messages are sent on a timer rather than in direct response to a request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON example hard-codes Chinese text for user-facing placeholder values such as the name, learning goal, and target user ID description. Because the file does not offer an alternative language or explain that the skill is intentionally Chinese-only, it creates a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language description and generated content instructions require Chinese translations and Chinese usage notes, effectively enforcing a specific language/locale behavior. There is no indication that users can choose another language or that the locale restriction is documented as a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script silently sends generated prompt content and an API credential to an external service with no user-facing disclosure or consent path. In a scheduled skill, this can cause administrators or users to unknowingly transmit data to third-party infrastructure, creating privacy, compliance, and secret-handling risk.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/daily-english-push.py (reported line 90)May include surrounding context.

python
})
]

result = subprocess.run(cmd, capture_output=True, text=True, timeout=60)

try:
    data = json.loads(result.stdout)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill automatically delivers generated content to a configured user/channel without an explicit user-facing warning at runtime or a confirmation mechanism. In the context of scheduled messaging, this can lead to unintended disclosures, spam, or delivery to the wrong recipient if configuration is stale or mis-set.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/daily-english-push.py (reported line 158)May include surrounding context.

python
# 发送消息
send_cmd = ["openclaw", "agent", "--channel", PUSH_CHANNEL, "--to", TARGET_USER_ID, "--message", message, "--deliver"]
subprocess.run(send_cmd, capture_output=True)

print(f"已推送 5 条知识(包含翻译和用法)")

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest says the skill has two functions: English speaking practice triggered by user messages and timed task pushes. This script implements a timed push that sends an AI-generated monthly learning summary derived from stored user practice data, which is a distinct analytics/reporting behavior not clearly described by the manifest's "任务推送" wording. Because it processes accumulated user data and performs summarization before pushing, the actual behavior exceeds a plain task reminder/push interpretation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This code performs an external network transmission to a configurable URL using an authorization bearer token. Because the endpoint is fully configuration-driven and there is no validation, allowlisting, or disclosure, the skill can exfiltrate user-derived data and secrets to an arbitrary remote service if misconfigured or tampered with.

Content

Scanner excerpt · scripts/monthly-english-summary.sh (reported line 54)May include surrounding context.

sh
用友好的语气,100字以内。"
        
        # 调用 AI 生成总结
        SUMMARY=$(curl -s "$API_URL" \
          -H "Authorization: Bearer $API_KEY" \
          -H "Content-Type: application/json" \
          -d "{\"model\": \"$MODEL\", \"messages\": [{\"role\": \"user\", \"content\": \"$SUMMARY_PROMPT\"}], \"max_tokens\": 300}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends user learning statistics to an external AI API without any visible disclosure, consent check, or data-minimization control. Even though the transmitted fields are aggregate counts, this is still outbound sharing of user-derived data to a third party, which creates privacy and compliance risk in a language-practice skill handling personal learning activity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code sets Chinese-language defaults for the user's learning goal and later presents user-facing CLI messages exclusively in Chinese. That creates a locale/language policy issue because the skill forces a specific language experience without any documented opt-in or user-selectable alternative.

Content

No source excerpt is available for this finding.