Back to skill

Security audit

Sayba 小红书运营全流程

Security checks for vulnerabilities and agentic risk

Overview

The skill’s Xiaohongshu automation purpose is mostly clear, but its recommended setup and account-control flows include unsafe installation, persistent gateway startup, and plaintext token exposure that users should review before installing.

Install only after reviewing the one-click setup. Prefer a pinned and verified OpenClaw install, do not pipe remote scripts directly to a shell, avoid non-interactive risk acceptance, keep the gateway local and optional, and do not share terminal output that contains tokens. Use a test Xiaohongshu account first and require human confirmation before publishing or replying.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (6)

T03 · Remote Payload Retrieval and Execution

Error
Location
Openclaw一键安装.md:37
Finding
Remote Installation Script Executed Directly Through Bash<![CDATA[ ## Vulnerability Details **File Location**: `Openclaw一键安装.md`, line 37 **Vulnerability Type**: Remote code retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash ``` ### Technical Analysis The command downloads shell code from an external URL and immediately passes it to Bash. The retrieved bytes are not saved for inspection and are not verified against a cryptographic checksum or signature. The URL points to the established `nvm-sh/nvm` GitHub repository and includes a version tag, which reduces—but does not eliminate—risk. Git tags and remotely served content are not equivalent to local cryptographic verification. If the repository, referenced tag, hosting account, delivery path, or user trust chain is compromised, arbitrary replacement commands would execute with the privileges of the user running the installer. This behavior is not required for the Skill's declared Xiaohongshu research, drafting, publishing, and comment-management functionality. ### Attack Path 1. A user follows the document's recommended one-click installation instructions. 2. `curl` connects to the external GitHub-hosted URL and retrieves the current response body. 3. The response is streamed directly into Bash without inspection or integrity verification. 4. A compromised or altered response executes arbitrary shell commands. 5. Those commands can read or modify any resource accessible to the invoking user and can install additional payloads or persistence mechanisms. ### Impact Assessment Successful exploitation provides arbitrary code execution under the invoking user's account. The effective scope can include user files, browser data, locally accessible credentials, shell configuration, OpenClaw configuration, and other resources available to that account. If a user independently runs the command with elevated privileges, the impact would expand ac ...[truncated 71 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not pipe remote content directly into a shell. 2. Download the installer to a local file first. 3. Pin the source to a reviewed immutable commit rather than relying only on a mutable tag. 4. Publish and verify a trusted SHA-256 checksum or cryptographic signature before execution. 5. Display the downloaded script for review and require explicit user confirmation. 6. Prefer platform package-management mechanisms with provenance and integrity verification. 7. Keep runtime installation separate from this Skill because it is not necessary for the Skill's core content-operations workflow. A safer pattern is: ```bash curl -fL -o /tmp/nvm-install.sh "https://raw.githubusercontent.com/nvm-sh/nvm/<immutable-commit>/install.sh" printf '%s %s\n' "<trusted-sha256>" "/tmp/nvm-install.sh" | shasum -a 256 -c - less /tmp/nvm-install.sh bash /tmp/nvm-install.sh ``` ]]>

T06 · System Persistence

Error
Location
Openclaw一键安装.md:89
Finding
Automatic Installation and Startup of a Persistent Gateway Service<![CDATA[ ## Vulnerability Details **File Location**: `Openclaw一键安装.md`, lines 89-92 **Vulnerability Type**: Cross-session service persistence **Risk Level**: High ### Vulnerable Code ```bash openclaw gateway install || true openclaw gateway start || true ``` ### Technical Analysis The installation guide registers and starts an OpenClaw gateway service. Service installation creates state that can survive the current terminal session and continue running beyond the immediate Skill task. Persistent gateway installation is broader than the minimum capabilities needed for the declared Xiaohongshu Skill, which primarily consists of instructions for browser-assisted research, drafting, publication staging, and comment replies. The use of `|| true` suppresses failures, potentially leaving a partially installed or unexpectedly configured service without clearly notifying the user. The gateway may be legitimate OpenClaw functionality, but automatically creating persistence during a one-click setup increases the attack surface and should require a separate, informed decision. ### Attack Path 1. The user runs the recommended installation script. 2. The script globally installs OpenClaw and completes onboarding. 3. `openclaw gateway install` registers a persistent gateway service. 4. `openclaw gateway start` activates the service. 5. The service remains available after the installation session, subject to its platform-specific service configuration. 6. Any vulnerability, exposed authentication token, or configuration weakness affecting the gateway can subsequently be targeted while it is running. ### Impact Assessment The commands can create a long-running authenticated automation service under the user's account. The resulting access scope depends on the OpenClaw gateway configuration and tools available to it. Potential exposure includes browser automation, configured Agent functionality, and locally accessible OpenClaw resources. The commands do not explicitly ...[truncated 116 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic gateway service installation from the default setup path. 2. Run the gateway as a foreground, session-scoped process by default. 3. Present persistence as a separate optional step with an explanation of its security implications. 4. Require explicit user confirmation immediately before service registration. 5. Document the service's bind address, authentication model, stored configuration, logs, and platform-specific removal procedure. 6. Remove `|| true` so installation and startup failures are visible and actionable. 7. Verify that the gateway binds only to loopback unless the user explicitly authorizes broader network exposure. 8. Provide commands to stop, disable, and uninstall the service. ]]>

T08 · Insecure Dependencies

Error
Location
Openclaw一键安装.md:63
Finding
Unpinned Global Installation of the OpenClaw npm Package<![CDATA[ ## Vulnerability Details **File Location**: `Openclaw一键安装.md`, line 63 **Vulnerability Type**: Unpinned global third-party dependency **Risk Level**: High ### Vulnerable Code ```bash npm i -g openclaw ``` ### Technical Analysis The installer resolves `openclaw` by package name without specifying an exact reviewed version or integrity value. Consequently, the effective package contents can change after this Skill has been audited. npm packages may execute lifecycle scripts during installation. Installing globally also places commands and package files into the user's global npm environment, increasing the scope of modifications compared with a project-local installation. A compromised package release, registry account, transitive dependency, or package-resolution event could result in arbitrary code execution. No evidence establishes that the current `openclaw` package is malicious; the vulnerability is the mutable and unverified installation method. ### Attack Path 1. A user executes the documented installer. 2. npm resolves the current package release associated with the `openclaw` name. 3. npm downloads the package and its dependency graph. 4. Any enabled lifecycle scripts execute with the user's privileges. 5. A compromised release or dependency can modify files, collect accessible data, install persistence, or replace globally available tooling. 6. The resulting OpenClaw executable is then trusted by the remainder of the setup script. ### Impact Assessment Exploitation can produce arbitrary code execution with the invoking user's privileges. Because the installation is global, the compromised package can affect commands and resources shared across the user's npm environment. Accessible data may include user files, environment variables, npm configuration, OpenClaw configuration, and other credentials available to the installation process. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `openclaw` to an exact reviewed version. 2. Record and verify package integrity and provenance information. 3. Review the package's lifecycle scripts and dependency tree before recommending installation. 4. Prefer a project-local or isolated installation instead of a global installation. 5. Use a lockfile where applicable and continuously monitor pinned dependencies for known vulnerabilities. 6. Consider disabling lifecycle scripts during installation when they are not required. 7. Separate package installation from OAuth and service setup so users can inspect the installed executable before granting access or creating persistence. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
Openclaw一键安装.md:97
Finding
Gateway Authentication Token Printed in Cleartext<![CDATA[ ## Vulnerability Details **File Location**: `Openclaw一键安装.md`, lines 97-105 **Vulnerability Type**: Plaintext disclosure of an authentication secret **Risk Level**: Medium ### Vulnerable Code ```bash local model token model="$(openclaw config get agents.defaults.model.primary || true)" token="$(openclaw config get gateway.auth.token | tr -d '\"' || true)" openclaw status | sed -n '1,35p' echo echo "Model: ${model:-<unknown>}" echo "Token: ${token:-<unknown>}" echo "Dashboard: http://127.0.0.1:18789/" ``` ### Technical Analysis The script reads the gateway authentication token from OpenClaw configuration and writes it directly to standard output. Authentication tokens should be treated as secrets. Terminal output can persist in scrollback, screen recordings, screenshots, CI logs, support transcripts, remote-session logs, or Agent execution records. The audit found no command that directly transmits the token to an external server. The vulnerability is local and secondary disclosure through plaintext output. ### Attack Path 1. The user completes installation and OAuth onboarding. 2. The script reads `gateway.auth.token` from local OpenClaw configuration. 3. The complete token is printed to the terminal. 4. Terminal output is captured in scrollback, logging, screenshots, recordings, or support material. 5. A party with access to that output obtains the token. 6. The token is reused to authenticate to the gateway wherever it is reachable and accepted. ### Impact Assessment The exposed secret can permit authentication to the OpenClaw gateway within the token's configured scope. The resulting privileges depend on gateway configuration, enabled tools, network reachability, and token permissions. At minimum, disclosure compromises the confidentiality of the gateway credential and can require immediate token rotation. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not print the authentication token during normal installation or verification. 2. Display only a redacted fingerprint, such as the final four characters, if identification is necessary. 3. Provide a separate explicit local command for users who genuinely need to retrieve the token. 4. Ensure diagnostic and status commands redact credentials. 5. Warn users not to share terminal output or screenshots containing authentication material. 6. Restrict gateway binding to loopback by default. 7. Provide a documented token-rotation and revocation procedure. 8. Review file permissions on the configuration that stores the token. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
Openclaw一键安装.md:76
Finding
Automated Acceptance of Security Risk During OAuth Onboarding<![CDATA[ ## Vulnerability Details **File Location**: `Openclaw一键安装.md`, line 76 **Vulnerability Type**: Security warning bypass during account authorization **Risk Level**: Medium ### Vulnerable Code ```bash openclaw onboard --non-interactive --accept-risk "${args[@]}" ``` ### Technical Analysis The setup script passes `--accept-risk` during non-interactive onboarding. This programmatically accepts a security warning rather than preserving an informed user decision at the point where OpenClaw is configured and OAuth authorization is initiated. The concern is compounded by the earlier unpinned package installation: a package whose exact contents were not fixed or reviewed is immediately allowed to proceed through a risk-acceptance gate and begin account onboarding. The script falls back to interactive onboarding if this command fails, but successful non-interactive execution still bypasses explicit review of the warning. ### Attack Path 1. The user executes the one-click setup script. 2. The script installs a mutable npm package by name. 3. It invokes onboarding with `--accept-risk`. 4. The security warning is accepted by the script rather than by an informed user action. 5. OAuth and configuration proceed with the access requested by the installed OpenClaw version. 6. If the installed package or its authorization behavior is compromised, the user may grant access without first evaluating the warning. ### Impact Assessment The command can facilitate authorization and configuration changes without informed review. The exact privileges depend on the OAuth scopes and OpenClaw configuration presented by the installed version. The audit does not establish unauthorized privilege escalation by itself, but the bypass weakens the consent boundary surrounding access to the user's OpenAI account and local OpenClaw environment. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `--accept-risk` from the recommended installation path. 2. Display the complete security warning and require explicit interactive confirmation. 3. Explain the OAuth scopes, local configuration changes, and service behavior before authorization. 4. Pin and verify the OpenClaw package before onboarding. 5. Separate installation, inspection, OAuth authorization, and service activation into distinct user-confirmed stages. 6. Abort safely when informed confirmation cannot be obtained rather than silently accepting risk. ]]>

T08 · Insecure Dependencies

Warning
Location
references/xhs-publish-flows.md:46
Finding
Unpinned Installation Recommendation for an Additional Image-Generation Skill<![CDATA[ ## Vulnerability Details **File Location**: `references/xhs-publish-flows.md`, line 46 **Vulnerability Type**: Mutable third-party Skill dependency **Risk Level**: Medium ### Vulnerable Code ```text clawhub install nano-banana-pro ``` ### Technical Analysis The publishing workflow recommends installing another Skill by a mutable package name without an exact version, content digest, provenance verification, or permissions review. The effective contents of that dependency may therefore differ from what was available when this project was audited. An image-generation Skill may require access to generated media, local upload directories, network services, and API credentials. Installing it without reviewing its requested capabilities can extend the Agent's attack surface beyond the current Skill. No evidence in the audited project proves that `nano-banana-pro` is malicious. The confirmed issue is the unsafe, unpinned dependency-installation recommendation. ### Attack Path 1. A user follows the external-cover publishing workflow. 2. The workflow advises installation of `nano-banana-pro`. 3. ClawHub resolves the current package associated with that name. 4. The resolved Skill is installed without a documented version, digest, or permissions review. 5. If the package or distribution account has been compromised, attacker-controlled instructions or code gain access to the tools and data made available to that Skill. 6. The dependency may then process source images, generated assets, API credentials, or upload files. ### Impact Assessment Potential impact depends on the third-party Skill's granted capabilities. Plausible exposure includes generated media, files staged for upload, image-generation API credentials, network access, and Agent tool use. The current repository does not establish that these privileges are actually abused, so the finding concerns supply-chain exposure rather than confirmed exfiltration. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an audited version and immutable content digest. 2. Verify publisher identity and package provenance. 3. Review the dependency's instructions, scripts, network destinations, and requested tools before installation. 4. Document whether and how it uses API credentials. 5. Grant only the filesystem and network access required for image generation. 6. Keep generated files in a dedicated directory with restrictive permissions. 7. Make the dependency optional and require explicit user approval before installation. 8. Re-audit the dependency whenever its pinned version changes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Chaining Abuse

High
Category
Tool Misuse
Content
fi

  echo "[1/6] 安装 nvm..."
  curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
  # shellcheck disable=SC1090
  . "$NVM_DIR/nvm.sh"
}
Confidence
94% confidence
Finding
Piping `curl` output directly into `bash` creates a one-step arbitrary code execution path from a remote source. In an installation guide for operational tooling, this is especially risky because users are encouraged to run it verbatim, often with high trust and little inspection, magnifying supply-chain and content-tampering impact.

Ssd 3

High
Confidence
99% confidence
Finding
The script retrieves `gateway.auth.token` and echoes it in plaintext, which normalizes exposing a live credential during setup. This is dangerous because installation logs, terminal scrollback, screen shares, and shell capture tools can leak the token, enabling unauthorized access if the gateway is reachable or if the token is reused in local workflows.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The guide explicitly prints the gateway authentication token to the terminal as part of normal verification, but does not treat it as a secret or warn users not to share terminal output. Anyone with access to shell history, screenshots, recordings, logs, or copied output could reuse the token to access the local gateway or associated session.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README explicitly promotes autonomous posting and replying on a real Xiaohongshu account via browser automation, but does not clearly warn about account suspension, platform ToS violations, accidental public actions, or reputational harm. In a skill designed to independently operate an account, the absence of operator-consent and risk disclosures makes unintended account-impacting behavior materially more dangerous.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The README promotes 'viral post cloning' by analyzing a target post and generating/publishing similar content, without warning about plagiarism, impersonation, copyright, spam, or platform enforcement risks. Because the skill is positioned as end-to-end autonomous publishing, this materially increases the chance of policy-violating or deceptive content being published at scale.

External Transmission

Medium
Category
Data Exfiltration
Content
## Star 趋势

[![Star History Chart](https://api.star-history.com/svg?repos=Xiangyu-CAS/xiaohongshu-ops-skill&type=Date)](https://star-history.com/#Xiangyu-CAS/xiaohongshu-ops-skill&Date)
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The instruction "语言优先‘能对话’而不是‘写报告’" appears within a fully Chinese-language skill focused on output style, and elsewhere the skill mandates a platform-specific persona for all external copy. There is no indication that users may choose another language or that Chinese-only output is an explicit opt-in requirement, which creates a locale policy concern.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly instructs operators to collect per-user comment fields including `user`, `time`, `text`, `likes`, and `replies`, which creates a structured dataset of identifiable user activity without any privacy limitation, minimization guidance, or lawful-basis warning. In this context, the data is being operationalized for content production and account operations rather than incidental viewing, which increases the chance of unnecessary retention, profiling, or downstream misuse of commenter information.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This markdown file contains user-facing examples and templates exclusively in Chinese, but it does not state that the skill is Chinese-only or offer any language/locale choice. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The file explicitly defines the persona and output style for Xiaohongshu in Chinese, requiring a platform-specific tone and phrasing. This is a natural-language locale/style constraint, but the document does not offer the user a language choice or explain a justified regional limitation beyond naming the platform.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file's operational instructions are entirely in Chinese, which effectively forces a specific language for users or operators. Under the policy, locale or language constraints should either be optional, user-selected, or explicitly justified as region-specific.

External Script Fetching

Low
Category
Supply Chain
Content
fi

  echo "[1/6] 安装 nvm..."
  curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
  # shellcheck disable=SC1090
  . "$NVM_DIR/nvm.sh"
}
Confidence
85% confidence
Finding
The guide fetches and executes an external installer script directly from GitHub at runtime. Even though pinning to a tagged version reduces risk somewhat, users are still trusting remote content without integrity verification, so a compromised upstream, tag substitution, MITM in a hostile environment, or content drift could result in arbitrary code execution.

Missing User Warnings

Low
Confidence
90% confidence
Finding
The README advertises downloading target-post images and text from arbitrary URLs without any ownership, consent, copyright, or privacy warning. In a content-operations skill, this encourages reuse of third-party content in ways that can infringe rights or mishandle personal data embedded in posts.

Static analysis

No suspicious patterns detected.