T09 · Insecure Skill Coding Practices
- Location
scripts/setup.cjs:9- Finding
Shell Command Injection Through OPENCLAW_HOME
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears purpose-built for Xiaohongshu publishing, but it stores reusable login state and has installer hardening issues that users should review before installing.
Install only if you are comfortable giving this skill local OpenClaw workspace access and a reusable Xiaohongshu browser session. Treat ~/.openclaw/workspace-xiaohongshu-publisher/.session/state.json like a credential, do not share or sync it, review the setup script before running it, and prefer pinned Playwright dependencies.
scripts/setup.cjs:9Shell Command Injection Through OPENCLAW_HOME
scripts/xhs_publish.cjs:33Authenticated Browser Session Stored Without Explicit Access Restrictions
scripts/xhs_publish.cjs:316User-Controlled Note Identifier Used in Screenshot Output Path
SKILL.md:25Unpinned Playwright and Browser Installation Instructions
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
将账号信息写入配置:
mkdir -p ~/.openclaw/workspace-xiaohongshu-publisher
cat > ~/.openclaw/workspace-xiaohongshu-publisher/.env << 'EOF'
XHS_ACCOUNT_NAME=用户输入的账号名
XHS_POSITIONING=用户输入的账号定位
XHS_TARGET_AUDIENCE=用户输入的目标受众
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
将账号信息写入配置:
mkdir -p ~/.openclaw/workspace-xiaohongshu-publisher
cat > ~/.openclaw/workspace-xiaohongshu-publisher/.env << 'EOF'
XHS_ACCOUNT_NAME=用户输入的账号名
XHS_POSITIONING=用户输入的账号定位
XHS_TARGET_AUDIENCE=用户输入的目标受众
The skill performs file writes, environment persistence, agent registration, and invokes shell commands, yet it declares no explicit tool scope or permissions. This increases the chance that an agent or runtime grants broader capabilities than users expect, reducing transparency and weakening least-privilege controls.
The setup instructs use of npx playwright install chromium without pinning a version, which can fetch whatever package/version is current at execution time. This creates supply-chain and reproducibility risk, especially for an automation skill that later handles authenticated browser sessions.
The skill collects user profile/account information and writes it to a persistent local .env file without clearly warning the user that the data will be stored on disk and reused by multiple agents. Even if the fields are not passwords, they can still be sensitive business/profile data and may leak through backups, logs, or later prompts.
The skill explicitly persists user-supplied account/profile information to ~/.openclaw/workspace-xiaohongshu-publisher/.env, creating durable local state that may later be read by agents or exposed through filesystem compromise. Persistent state is contextually more sensitive here because it is tied to a social-media publishing workflow and business identity.
将账号信息写入配置:
mkdir -p ~/.openclaw/workspace-xiaohongshu-publisher
cat > ~/.openclaw/workspace-xiaohongshu-publisher/.env << 'EOF'
XHS_ACCOUNT_NAME=用户输入的账号名
XHS_POSITIONING=用户输入的账号定位
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
XHS_POST_FREQUENCY=用户输入的发布频率 XHS_FOLLOWER_SCALE=用户输入的粉丝规模 EOF chmod 600 ~/.openclaw/workspace-xiaohongshu-publisher/.env 2>/dev/null || true
## Step 3:部署文件
This duplicate finding points to the same .session directory creation and carries the same concern: the skill prepares local storage for reusable authenticated browser state. Because the skill is for automated Xiaohongshu publishing, persisted sessions directly increase the blast radius of local compromise or accidental sharing.
mkdir -p ~/.openclaw/workspace-xiaohongshu-publisher/.session
This duplicate finding points to the same .session directory creation and carries the same concern: the skill prepares local storage for reusable authenticated browser state. Because the skill is for automated Xiaohongshu publishing, persisted sessions directly increase the blast radius of local compromise or accidental sharing.
mkdir -p ~/.openclaw/workspace-xiaohongshu-publisher/.session
The skill recommends browser login initialization and states that the session is automatically saved, but it does not prominently warn that this creates a reusable authenticated Xiaohongshu session on local disk. A stolen or reused session could allow account access and posting without re-authentication.
The file’s user-facing description and runtime messages are entirely in Chinese, including setup guidance and next-step instructions. For a general deployment tool, this effectively forces a specific language/locale without any opt-in or documented regional justification in the file.
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.
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.
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.
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 script saves Playwright storage state to ~/.openclaw/workspace-xiaohongshu-publisher/.session/state.json, which can contain authentication cookies and other session material that may grant account access if copied. There is no explicit warning to the user about the sensitivity of this file, no permission hardening, and no encryption or lifecycle controls around the stored session.
The skill explicitly instructs the agent to persist session-derived content into memory/YYYY-MM-DD.md and MEMORY.md, but provides no user-facing notice, consent step, retention limit, or sensitivity filter. This creates a real privacy and data-governance risk because user drafts, account preferences, performance data, or accidental secrets could be stored long-term and later reused outside the original interaction context.
The instruction states that the language should be Xiaohongshu-style 'girlfriend chat' rather than other styles, which imposes a specific linguistic register by default. Under the policy, forcing a specific language or locale without offering user choice can be a natural-language policy violation.
All natural-language instructions and constraints in this file are presented only in Chinese, which can amount to a language-policy violation when no user opt-in or alternative language support is offered. There is also no explicit statement that this skill is intentionally limited to a Chinese-language or region-specific workflow.
The tool list explicitly includes network search capabilities for topic and competitor research, but provides no warning that prompts or content may be transmitted to external services. In a content-publishing setup, users may reasonably provide drafts, strategy notes, or other sensitive business information, so the absence of privacy and data-sharing disclosure creates a real risk of unintended external exposure.
The entire user-facing template is written in Chinese and includes Chinese-specific content fields such as '爆款参考' and '笔记标题', which implies a fixed language/locale expectation. There is no indication that users may choose another language or locale, nor any justification that the skill is region-specific.
This markdown file presents all user-facing headings and instructions exclusively in Chinese, which can amount to a language/locale policy violation when no opt-in or alternative language is offered. The file does not state that the skill is intentionally region-specific or limited to Chinese-speaking users.
The script captures a full-page screenshot of the creator data page and saves it to disk without warning that it may include account metrics, note performance, profile details, or other sensitive business data. In the context of a publishing automation skill, persisting such images increases privacy and data-handling risk, especially on shared machines or synced home directories.
This markdown file presents all operational instructions and the required response format solely in Chinese, including the mandated output token context. Under the policy for natural-language violations, forcing a specific language without offering user choice can be a locale-policy issue.
Detected: suspicious.dangerous_exec