Back to skill

Security audit

Feishu Multiagent Onboard

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real Feishu/OpenClaw onboarding helper, but it handles app secrets and persistent OpenClaw configuration too broadly for a simple installer-style tool.

Install only if you are comfortable letting this skill edit your persistent OpenClaw configuration. Back up ~/.openclaw/openclaw.json first, review existing bindings, avoid running it on shared machines, protect or rotate Feishu App Secrets if exposed, and inspect the config after the wizard before restarting the gateway or approving pairings.

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

Warning
Location
index.js:68
Finding

Shell Command Injection Through an Unquoted Configuration Path

Content
View full analysis
/dev/null 2>&1`); logSuccess('JSON format is valid'); return true; } catch (error) { logError('JSON format is invalid'); return false; } } ``` `CONFIG_PATH` is constructed from the current user's home directory: ```js const CONFIG_PATH = path.join(require('os').homedir(), '.openclaw/openclaw.json'); ``` ### Technical Analysis The configuration path is interpolated directly into a command interpreted by a shell. It is not quoted or passed as a discrete process argument. If the home-directory value contains shell metacharacters or command substitutions, the shell can interpret those characters rather than treating the entire value as a file path. This execution occurs when `validateJSON()` is reached through `--check` or `--debug`. Shell execution is unnecessary because `readConfig()` has already parsed the same file with `JSON.parse`. Exploitation requires an attacker to influence the home-directory value used by the Node.js process and ensure that `readConfig()` can read a valid configuration from the resulting literal path. This limits practical exploitability but does not eliminate the command-injection primitive. ### Attack Path 1. An attacker influences the home-directory environment or account metadata used by `os.homedir()`. 2. The resulting home path contains shell syntax or command substitution. 3. A valid `openclaw.json` is placed at the literal path so that `readConfig()` succeeds. 4. The user invokes the Skill with `--check` or `--debug`. 5. `validateJSON()` interpolates the path into `execSync()`. 6. The shell evaluates the attacker-controlled syntax and executes the injected command. ### Impact Assessment Successful exploitation permits arbitrary command execution ...[truncated 271 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
index.js:56
Finding

Feishu Secrets Are Echoed During Entry and Written Without Enforced Restrictive Permissions

Content
View full analysis
{ readline.question('Feishu App Secret: ', (appSecret) => { accounts[id] = { appId: appId, appSecret: appSecret, }; ``` ### Technical Analysis `readline.question()` displays ordinary terminal input and does not mask the App Secret. The secret can therefore be seen by nearby observers and may be captured by terminal recording or session-monitoring systems. The subsequent `writeFileSync()` call does not request mode `0600` or verify the permissions of an existing configuration file. For a newly created file, effective permissions depend on the process umask. For an existing file, its prior permissions are retained. Under a permissive environment, other local users may be able to read the stored credentials. The documentation also instructs users to store actual App ID and App Secret values in the JSON configuration rather than using a protected secret source. ### Attack Path **Terminal disclosure path:** 1. A user starts the interactive configuration wizard. 2. The wizard prompts for a Feishu App Secret using unmasked input. 3. The user types the secret, which remains visible on the terminal. 4. A nearby observer or terminal-capture mechanism records the credential. **File disclosure path:** 1. The wizard receives a Feishu App Secret. 2. `wri ...[truncated 769 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
index.js:157
Finding

Configuration Wizard Destructively Replaces Existing Agent Bindings

Content
View full analysis
Remediation
View remediation
{ return !( binding?.match?.channel === 'feishu' && managedIds.has(binding?.match?.accountId) ); }); config.bindings = [...preservedBindings, ...bindings]; config.channels = config.channels || {}; config.channels.feishu = { ...(config.channels.feishu || {}), enabled: true, accounts: { ...(config.channels.feishu?.accounts || {}), ...accounts, }, }; ``` ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (13)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README includes example Feishu credentials fields such as appId and appSecret, but it does not warn users that real secrets will need to be entered and may be stored in local configuration files. In a setup/onboarding skill, this omission can lead to accidental plaintext storage, insecure file permissions, or inadvertent commits of secrets to version control.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document title and all user-facing guidance are presented in Chinese, and there is no indication that other languages are supported or that Chinese is required for a region-specific reason. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide instructs users to place App ID and especially App Secret directly into a local configuration file, but it does not warn that these are sensitive credentials or describe secure storage and access control expectations. If the config file is exposed through backups, source control, screenshots, shared home directories, or weak filesystem permissions, an attacker could reuse the secret to impersonate the application or access associated messaging capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide tells the user to approve a pairing code received in chat without instructing them to verify that the code originated from the expected OpenClaw gateway, account, and enrollment flow. Pairing or device-authorization steps are security-sensitive; if users approve unsolicited or spoofed codes, they could bind an attacker-controlled session or authorize unintended access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Most user-visible strings, including prompts, status messages, and instructions, are presented only in Chinese. This imposes a language choice on users without offering an alternative locale or documenting that the skill is intentionally region/language-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The JSON validation routine invokes a shell pipeline through execSync instead of using in-process parsing. Although CONFIG_PATH is derived from the local home directory and not direct user input, shell execution adds unnecessary command-injection and environment-manipulation risk, and it broadens the attack surface beyond simple JSON validation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The wizard prompts for Feishu App Secret and stores it to a JSON file without warning, masking, permission checks, or secure storage. This can lead users to expose long-lived credentials through terminal history, shoulder surfing, or weakly protected filesystem storage, especially in shared or multi-user environments.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The plugin check executes a shell command with a pipe to grep, which is more privileged and complex than needed for status inspection. In this specific code the command string is static, so direct injection risk is low, but shelling out still creates avoidable dependency on PATH, shell behavior, and potentially attacker-controlled binaries in the environment.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The Gateway check relies on execSync to run an external CLI for status inspection. Because the command is static, this is not a strong injection case, but it still exposes the skill to shell/PATH hijacking and makes a simple status read depend on external command execution.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The log check executes a shell pipeline over wildcarded log files, combining tail, grep, redirection, and shell globbing. Even though the command is static, this expands exposure to shell semantics, PATH hijacking, and unintended file access patterns, which is unnecessary for reading local logs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The user-facing natural-language instructions in this file are presented only in Chinese, including setup, usage, and documentation labels. Under the stated policy, forcing a specific language without user opt-in or a documented locale-specific justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language content describing the skill's purpose and features is presented exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in can be a locale-policy violation unless the regional constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The skill invokes shell commands via execSync for JSON validation and debugging tasks, including cat, python3, grep, tail, and openclaw commands. While these are part of the debug/check behavior, the user-facing help text does not warn that running --check or --debug will execute subprocesses and inspect local files/logs.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
index.js:70