Back to skill

Security audit

AI短信发送工具

Security checks for vulnerabilities and agentic risk

Overview

This is a real SMS-sending skill, but it needs review because its credential handling is unsafe enough to expose or execute secrets in some setups.

Review before installing. Prefer OpenClaw-managed secrets over a .env file, do not store the SMS password in a broadly readable location, avoid setting CHANGLAN_API_URL unless you fully trust the destination, and treat this command as capable of sending paid SMS messages and transmitting recipient data to the SMS provider.

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

T09 · Insecure Skill Coding Practices

Error
Location
send-sms.sh:58
Finding

Arbitrary Code Execution Through Sourced .env File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
send-sms.sh:84
Finding

Credential Exfiltration Through Unrestricted API Endpoint Override

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:53
Finding

Documentation Creates Plaintext Credential File Without Restrictive Permissions

Content
View full analysis
.env echo "CHANGLAN_PASSWORD=你的API密码" >> .env ``` ### Technical Analysis The documented setup stores the Chuanglan account and password in plaintext but does not set a restrictive `umask` or explicitly apply mode `0600` to the resulting file. The actual permissions depend on the user's current umask. With a common umask of `022`, a newly created `.env` file can receive mode `0644`, allowing other local users to read it where directory traversal permissions permit. Existing `.env` permissions are also preserved when the file is truncated, so rewriting an already permissive file does not correct the exposure. ### Attack Path 1. A user follows the documented `.env` setup instructions. 2. The user's umask or pre-existing file permissions allow group or other users to read `.env`. 3. Another local account or process with directory traversal access reads the file. 4. The attacker obtains `CHANGLAN_ACCOUNT` and `CHANGLAN_PASSWORD`. 5. The attacker attempts to use the credentials against the SMS service, subject to provider-side restrictions such as IP allowlisting. ### Impact Assessment The vulnerability can disclose reusable SMS API credentials to other local users or compromised processes. Potential consequences include unauthorized SMS messages, paid quota consumption, spam or social-engineering activity, and service disruption. No operating-system privilege escalation is established by this issue. Exposure depends on the effective file and parent-directory permissions. ]]>
Remediation
View remediation
.env printf '%s\n' 'CHANGLAN_PASSWORD=your-password' >> .env chmod 600 .env ``` Additionally: 1. Recommend OpenClaw's protected secret configuration or a dedicated secret manager as the primary method. 2. Ensure the parent Skill directory is not writable or traversable by untrusted users. 3. Verify ownership and permissions before loading the file. 4. Warn users not to commit `.env` to source control. 5. Rotate credentials if the file was previously readable by unauthorized users. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
send-sms.sh:96
Finding

Unsafe JSON Construction Allows Request-Body Injection and Malformation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (14)

Credential Access

High
Category
Privilege Escalation
Confidence
81% confidence
Finding

The documentation instructs users to place API credentials in environment variables and nearby .env-based configuration, which can be risky if developers copy these patterns into insecure contexts such as shared shells, logs, or improperly permissioned files. In a messaging skill, these secrets enable direct access to SMS-sending capabilities and could be abused for fraud, spam, or account misuse if exposed.

Content

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

export CHANGLAN_PASSWORD=你的API密码

text

#### 方式三:.env 文件

```bash
cd ~/.claude/skills/sms-chuanglan

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The skill explicitly instructs users to write API credentials into a .env file under the skill directory. Storing credentials in plaintext on disk is dangerous because local compromise, accidental backup/sync, misconfigured permissions, or accidental commits can expose the SMS provider account and allow unauthorized message sending.

Content

Scanner excerpt · SKILL.md (reported line 60)May include surrounding context.

bash
cd ~/.claude/skills/sms-chuanglan
echo "CHANGLAN_ACCOUNT=你的API账号" > .env
echo "CHANGLAN_PASSWORD=你的API密码" >> .env

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

This line appends the API password directly into a plaintext .env file, making the most sensitive credential persist on disk in a predictable location. Because this skill's purpose is sending SMS through a third-party provider, leaked credentials could be used to send unauthorized messages, incur charges, or abuse trusted communication channels.

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

bash
cd ~/.claude/skills/sms-chuanglan
echo "CHANGLAN_ACCOUNT=你的API账号" > .env
echo "CHANGLAN_PASSWORD=你的API密码" >> .env

使用方式

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · send-sms.sh (reported line 6)May include surrounding context.

sh
set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ENV_FILE="${SCRIPT_DIR}/.env"

usage() {
    echo "用法: send-sms.sh --phone <手机号> --template <模板ID> [--vars <变量JSON>]"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · send-sms.sh (reported line 56)May include surrounding context.

sh
usage
fi

# 读取配置(优先环境变量,其次 .env 文件)
load_config() {
    # 优先使用环境变量
    if [[ -z "$CHANGLAN_ACCOUNT" ]] || [[ -z "$CHANGLAN_PASSWORD" ]]; then

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · send-sms.sh (reported line 72)May include surrounding context.

sh
usage
fi

# 读取配置(优先环境变量,其次 .env 文件)
load_config() {
    # 优先使用环境变量
    if [[ -z "$CHANGLAN_ACCOUNT" ]] || [[ -z "$CHANGLAN_PASSWORD" ]]; then

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · send-sms.sh (reported line 81)May include surrounding context.

sh
usage
fi

# 读取配置(优先环境变量,其次 .env 文件)
load_config() {
    # 优先使用环境变量
    if [[ -z "$CHANGLAN_ACCOUNT" ]] || [[ -z "$CHANGLAN_PASSWORD" ]]; then

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

Using source "$ENV_FILE" executes the contents of .env as shell code, not merely as data. If an attacker can modify that file, they can achieve arbitrary command execution in the context of the script, making this substantially more dangerous than ordinary credential loading in an agent skill that may run unattended.

Content

Scanner excerpt · send-sms.sh (reported line 60)May include surrounding context.

sh
load_config() {
    # 优先使用环境变量
    if [[ -z "$CHANGLAN_ACCOUNT" ]] || [[ -z "$CHANGLAN_PASSWORD" ]]; then
        # 尝试读取 .env 文件
        if [[ -f "$ENV_FILE" ]]; then
            source "$ENV_FILE"
        fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares shell-related runtime requirements and demonstrates command execution patterns, but it does not define any explicit tool scope such as permissions or allowed-tools. That creates an overbroad execution surface where an agent may invoke shell capabilities without a clearly constrained policy, increasing the chance of unintended command execution or misuse in a credential-handling skill.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · send-sms.sh (reported line 134)May include surrounding context.

sh
fi

    # 调用 API
    local response=$(curl -s -m 30 -X POST "${CHANGLAN_API_URL}" \
        -H "Content-Type: application/json" \
        -d "${request_body}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs an HTTP POST that includes the account, password, phone number, template ID, and optional template variables, but there is no confirmation prompt or explicit user-facing disclosure immediately before transmission. Because this is a code file and the operation sends sensitive credential and recipient data to an external API, it should provide a clear warning or notice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest exposes a command that sends phone numbers and template variables to a third-party SMS provider, but it does not warn users that personal data will leave the local system and be transmitted externally. This creates a privacy and consent risk, especially because phone numbers and message content may contain sensitive personal or business information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The usage/help text is entirely in Chinese, and the same language choice continues throughout the script's user-facing messages. Under the policy, forcing a specific language without user opt-in or a documented locale-specific justification is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The natural-language descriptions for the skill and its arguments are exclusively in Chinese, which may impose a language requirement without user opt-in. There is no accompanying note that the skill is intended only for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.