T09 · Insecure Skill Coding Practices
- Location
SKILL.md:338- Finding
Shell Command Injection in the Documented OpenClaw Invocation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This package has a real selfie-generation feature, but it also bundles broad persistent OpenClaw agent setup and inconsistent third-party image/provider flows that users should review before installing.
Install only if you intentionally want a Suhe/OpenClaw agent bootstrap package, not just a selfie skill. Review the persistent writes under ~/.openclaw, avoid using sensitive prompts or private images, require explicit confirmation before any channel send or public hosting, and verify which provider and gateway will receive prompts, image URLs, captions, and tokens.
SKILL.md:338Shell Command Injection in the Documented OpenClaw Invocation
skill/scripts/suhe-selfie.sh:159Unsafe JSON Construction and Unrestricted Gateway Destination
skill/SKILL.md:142Unnecessary Public Republishing of Generated Images over Plaintext HTTP
The skill requires sensitive credentials and performs outbound requests to external and local services, but this is only partially reflected in the high-level description and can surprise users. In skill ecosystems, undisclosed token use and message-sending capability are dangerous because they can lead to unauthorized external actions or leakage of user-provided content.
The skill requires sensitive credentials and performs outbound requests to external and local services, but this is only partially reflected in the high-level description and can surprise users. In skill ecosystems, undisclosed token use and message-sending capability are dangerous because they can lead to unauthorized external actions or leakage of user-provided content.
The skill requires sensitive credentials and performs outbound requests to external and local services, but this is only partially reflected in the high-level description and can surprise users. In skill ecosystems, undisclosed token use and message-sending capability are dangerous because they can lead to unauthorized external actions or leakage of user-provided content.
The skill requires sensitive credentials and performs outbound requests to external and local services, but this is only partially reflected in the high-level description and can surprise users. In skill ecosystems, undisclosed token use and message-sending capability are dangerous because they can lead to unauthorized external actions or leakage of user-provided content.
The trigger phrases are very broad and overlap with routine conversation such as 'what are you doing?' or 'how are you doing?'. In context, this is dangerous because the skill can activate unexpectedly and proceed toward generating and sending images to messaging channels, creating consent, impersonation, and unwanted outbound-action risks.
The Node.js implementation contradicts the rest of the skill by using fal.ai/Grok Imagine instead of Tongyi Wanxiang/DashScope. This inconsistency is dangerous because operators may trust one vendor/data flow while the code actually sends images and prompts to a different external provider, causing unintended data disclosure and breaking security review assumptions.
The CLI reads environment-derived paths via process.env.HOME and later stores secrets and configuration under that location. Undeclared environment access matters because it influences where files are copied and where configuration is written, expanding the skill's effective privileges beyond a narrowly scoped selfie utility.
This installer copies workspace, skill, and documentation trees into broad ~/.openclaw locations immediately on execution, far beyond the manifest's stated selfie-editing/sending purpose. That scope mismatch is dangerous because users invoking a media skill would not reasonably expect full agent bootstrap and persistent environment modification.
The module documentation explicitly describes a general OpenClaw agent initialization template installer, which contradicts the declared selfie-focused purpose. This documentation mismatch is a strong signal of deceptive packaging or at least materially misleading functionality, increasing the risk of users granting trust under false assumptions.
The banner and installation flow advertise and deploy identity, metacognition, covenant, and safety systems unrelated to a selfie skill. Hidden or bundled capability expansion increases the chance of over-privileged installation and deceptive user expectations about what the package actually changes.
The installer interactively collects persona and user-profile data, then persists it into workspace files unrelated to image editing or message sending. In the context of a selfie skill, this broad collection and durable storage of identity/profile data creates unnecessary privacy exposure and silently transforms the package into an agent-persona configurator.
The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The skill does not clearly warn users that prompts, reference images, and resulting media may be transmitted to third-party AI providers and messaging platforms. This is dangerous because the skill is designed specifically to exfiltrate user-supplied content to external services and then redistribute generated media to potentially public channels.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 敏感信息定义
- API Key(如 `DASHSCOPE_API_KEY`、`KIMI_API_KEY`)
- Access Token
- 数据库连接字符串
- 私钥、证书文件
- 密码、密钥
该文件全文仅使用中文编写,且没有说明这是可选语言、提供多语言版本,或明确限定为仅面向特定中文区域贡献者。根据规则,若技能或项目文档在自然语言层面强制特定语言而未取得用户选择/同意,可构成语言/区域政策问题。
The manifest says this skill edits Suhe's reference image with Tongyi Wanxiang and sends selfies via OpenClaw, implying a narrowly scoped image/selfie capability. However, the README primarily documents a full agent bootstrap package with identity, memory, metacognition, covenant, A2A networking, installation tooling, and workspace initialization, which is materially broader than the manifest's stated purpose.
The README tells users to configure a DashScope API key for the selfie feature but does not clearly warn that prompts, reference images, and related metadata may be transmitted to a third-party external service. In a selfie-editing skill that also sends outputs to messaging channels, this omission can mislead operators about privacy and data-flow risks.
The example triggers for the selfie feature include broad, ordinary conversational phrases such as '你在做什么?', which can cause the skill to activate when the user did not intend to request image generation or message sending. In this skill context, that increases the chance of accidental external API usage and unintended transmission of generated selfies to messaging channels.
The description does not prominently warn that the skill will transmit prompts/images to external AI services and distribute generated media to messaging platforms. In this context, lack of upfront disclosure is risky because users may provide personal or sensitive context without understanding it will be sent off-platform and rebroadcast.
This code performs external transmission of user-derived prompt content and a reference image URL to DashScope. In a skill that can be triggered from conversational context, sending data to a third-party model provider is security-relevant because it may expose personal content, sensitive context, or regulated data without adequate consent or minimization.
}
}')
curl -X POST "https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d "$JSON_PAYLOAD"
The complete script again transmits prompts and reference-image information to an external DashScope endpoint, reinforcing that third-party data sharing is an operational behavior of the skill. The main danger is privacy and policy exposure: user context can be forwarded externally and then used to generate media that is subsequently distributed elsewhere.
}
}')
RESPONSE=$(curl -s -X POST "https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d "$JSON_PAYLOAD")
The inline docs and captions reference Grok Imagine even though the skill is presented as a Tongyi Wanxiang skill. While not an exploit by itself, this kind of provider confusion undermines informed consent and safe deployment because users may not realize which third party receives their prompts and images.
This code presents user-facing logs, prompts, and generated profile defaults in Chinese, and later hard-codes a China timezone, with no mechanism to select another language or locale. That is a natural-language locale policy concern because the skill imposes a specific language/locale experience on all users rather than offering choice or documenting a justified regional constraint.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The skill description does not justify invoking platform command discovery via which/where through execSync. Checking for external CLI availability is part of a system installer/bootstrapper, not an obvious requirement for a selfie image-editing and messaging skill itself.
Detected: suspicious.dangerous_exec, suspicious.env_credential_access