Back to skill

Security audit

Feishu Openclaw Integration

Security checks for vulnerabilities and agentic risk

Overview

The skill is a legitimate Feishu/OpenClaw integration guide, but it under-discloses sensitive enterprise message and file forwarding risks.

Review this before installing in production. Use only a trusted, preferably private OpenClaw endpoint over HTTPS, restrict Feishu scopes to the minimum needed, avoid forwarding sensitive files or full chat histories without authorization, store secrets outside versioned config files, and pin/review npm dependencies.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (4)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:64
Finding

Unpinned Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:64
Vulnerability Type: Supply-chain exposure through unpinned npm dependencies
Risk Level: Medium

Vulnerable Code

bash
npm install @larksuiteoapi/node-sdk axios

Technical Analysis

The installation command does not specify reviewed package versions. The project also contains no package lockfile or integrity metadata. Consequently, users following the documentation will install whichever package versions the npm registry resolves at that time.

This does not prove that either named package is malicious. However, the mutable dependency resolution makes the effective installed code different from the code reviewed during this audit. A compromised maintainer account, malicious future release, or registry-level package compromise could introduce arbitrary installation or runtime behavior.

Attack Path

  1. An attacker compromises a referenced package or publishes a malicious version through its release channel.
  2. A user follows the documented npm install command after that version becomes the default registry resolution.
  3. npm downloads and installs the affected version without comparison against a reviewed lockfile or integrity baseline.
  4. Malicious lifecycle or runtime code executes with the privileges of the user running npm or the bot process.
  5. That code may access Feishu credentials, enterprise messages, files, and other resources available to the process.

Impact Assessment

Successful exploitation could provide code execution under the bot's operating-system account. The accessible scope would include environment variables such as FEISHU_APP_ID and FEISHU_APP_SECRET, local files readable by that account, outbound network access, and enterprise data processed by the integration. Additional impact depends on the host account's privileges and granted Feishu scopes.

Remediation
View remediation

Remediation Suggestions

  • Define dependencies in package.json using exact, reviewed versions rather than unconstrained installation commands.
  • Commit a generated package-lock.json and instruct users to install with npm ci.
  • Review package provenance, release history, lifecycle scripts, and transitive dependencies before pinning versions.
  • Use npm integrity verification and automated dependency scanning.
  • Run the integration under a dedicated, unprivileged operating-system account.
  • Establish a controlled process for reviewing and updating dependency versions.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:35
Finding

Sensitive Credentials Stored in Plaintext Configuration Files

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:35-43 and SKILL.md:267-274
Vulnerability Type: Plaintext secret storage guidance
Risk Level: Medium

Vulnerable Code

json
{
  "feishu": {
    "enabled": true,
    "appId": "YOUR_APP_ID",
    "appSecret": "YOUR_APP_SECRET",
    "encryptKey": "YOUR_ENCRYPT_KEY",
    "verificationToken": "YOUR_VERIFICATION_TOKEN"
  }
}
yaml
app:
  id: "cli_xxxxxxxxx"
  secret: "xxxxxxxxxxxxxxxx"
  encrypt_key: "xxxxxxxxxxxxxxxx"
  verification_token: "xxxxxxxxxxxxxxxx"

Technical Analysis

Although the shown values are placeholders rather than active credentials, the templates instruct operators to place application secrets, encryption keys, and verification tokens directly into configuration files. The documentation provides no requirement for restrictive file permissions, encryption at rest, exclusion from version control, or integration with a secret manager.

Plaintext configuration may be exposed through backups, accidental repository commits, support bundles, overly broad local permissions, or another process operating under the same account.

Attack Path

  1. An operator replaces the placeholders with production Feishu credentials.
  2. The configuration file is created with permissive access, copied into a backup, or accidentally committed to a repository.
  3. An unauthorized local user or repository reader obtains the file.
  4. The exposed application secret and related verification material are used to impersonate the integration or interact with APIs within the application's granted permissions.

Impact Assessment

Exposure could allow unauthorized use of the Feishu application identity. The precise impact depends on the application's configured scopes, but may include sending messages, accessing event data, reading user information, or obtaining enterprise content available to the bot. Encryption and verification mat ...[truncated 97 chars]

Remediation
View remediation

Remediation Suggestions

  • Store secrets in environment variables, an operating-system credential store, or a managed secret service.
  • Keep only non-sensitive references or secret identifiers in configuration files.
  • If file-based secrets are unavoidable, enforce owner-only permissions such as mode 0600.
  • Add configuration and secret files to .gitignore, and provide pre-commit secret scanning.
  • Separate example files from operational files and use unmistakably nonfunctional placeholder values.
  • Document credential rotation and immediate revocation procedures.
  • Avoid printing configuration objects or secrets in application and deployment logs.

T05 · Unauthorized Access and Privilege Escalation

Note
Location
SKILL.md:331
Finding

Unnecessary User-Directory Permission Recommendation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:331-336
Vulnerability Type: Excessive application permission
Risk Level: Low

Vulnerable Code

text
im:message
im:message:group_at_msg
contact:user.base:readonly

Technical Analysis

The documentation recommends the contact:user.base:readonly scope, but the demonstrated message-reply integration does not use the contact directory. Recommending an unrelated scope violates least-privilege principles and increases the data available to the bot if its credentials or runtime are compromised.

This is an access-control hardening issue rather than proof that the skill actively abuses the permission.

Attack Path

  1. An administrator grants all scopes recommended by the documentation, including contact-directory read access.
  2. An attacker compromises the bot credentials, host process, or one of its dependencies.
  3. The attacker invokes Feishu APIs using the compromised application identity.
  4. The unnecessary contact scope enables access to user information that was not required for the documented message workflow.

Impact Assessment

Exploitation may expose enterprise user-directory information permitted by contact:user.base:readonly. It does not directly grant write access or operating-system privileges. The scope of disclosure depends on Feishu's tenant policy and the exact data exposed by the granted API permission.

Remediation
View remediation

Remediation Suggestions

  • Remove contact:user.base:readonly from the minimum required permissions for the demonstrated workflow.
  • Document mandatory and optional scopes separately.
  • For every optional scope, identify the feature requiring it and the data it exposes.
  • Configure production applications with only the minimum messaging and event scopes needed.
  • Periodically review and revoke unused Feishu permissions.
  • Use separate application identities for features requiring materially different data access.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:76
Finding

Enterprise Messages and Files Forwarded Without Destination or Transport Safeguards

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:76-89, SKILL.md:175-188, and SKILL.md:232-240
Vulnerability Type: Unsafe transmission of sensitive enterprise content
Risk Level: High

Vulnerable Code

javascript
const OPENCLAW_URL = process.env.OPENCLAW_URL || 'http://localhost:3000';

const response = await axios.post(`${OPENCLAW_URL}/api/chat`, {
  message: content.text,
  userId: message.sender_id,
  channel: 'feishu',
});
javascript
const messages = await client.im.message.list({
  params: {
    container_id_type: 'chat_id',
    container_id: chatId,
    page_size: 100
  }
});

const analysis = await axios.post(`${OPENCLAW_URL}/api/analyze`, {
  data: messages,
  task: 'Summarize today’s discussion points'
});
javascript
const file = await client.im.file.download({
  params: { type: 'file', file_key: fileKey }
});

const result = await axios.post(`${OPENCLAW_URL}/api/analyze-file`, {
  file: file.data,
  task: 'Summarize the key information in this document'
});

Technical Analysis

The examples forward message text, sender identifiers, up to 100 chat messages, and downloaded files to a configurable OPENCLAW_URL. The documentation does not validate or allowlist that destination, require TLS for non-loopback endpoints, minimize or redact payloads, obtain user consent, or describe retention and access controls.

The loopback HTTP default is not itself exposed to an external network, but the environment variable can redirect the same sensitive payloads to any configured HTTP or HTTPS endpoint. If an operator selects an untrusted external destination or uses plaintext HTTP over a network, enterprise information can be disclosed to the endpoint operator or intercepted in transit.

The unconditional forwarding examples also conflict with the broad claim that enterprise data does not leave the enterprise unless OpenClaw is guaranteed to be ...[truncated 1138 chars]

Remediation
View remediation

Remediation Suggestions

  • Require HTTPS with certificate validation for every non-loopback destination.
  • Reject arbitrary endpoint schemes and hosts; maintain an explicit allowlist of approved OpenClaw services.
  • Permit plaintext HTTP only for an explicitly enabled loopback development mode.
  • Authenticate requests to OpenClaw and rotate credentials regularly.
  • Minimize payloads by removing sender identifiers and metadata unless required.
  • Redact sensitive information before model processing.
  • Require explicit authorization before retrieving chat history or forwarding files.
  • Enforce file-size, type, malware-scanning, and data-classification controls.
  • Document destination hosting, subprocessors, retention periods, deletion behavior, and access controls.
  • Add clear warnings that externally hosted endpoints cause enterprise content to leave the enterprise boundary.
  • Apply request timeouts, size limits, audit logging, and egress network restrictions.
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 (3)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly claims '数据不离开企业' ('data does not leave the enterprise') while multiple examples later send message contents, chat history, and files to an OpenClaw HTTP API for processing. This is a material privacy and security misrepresentation: operators may deploy it under false assumptions, causing sensitive enterprise communications or documents to be transmitted to another service without informed consent or proper controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file-processing example downloads user-uploaded files from Feishu and forwards file data to the OpenClaw analysis endpoint with no warning about external transmission or sensitivity handling. Files often contain the most sensitive enterprise data, so this pattern can result in confidential documents, credentials, personal data, or intellectual property being sent to another service without adequate review or controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The report-generation example retrieves group messages and sends the resulting conversation data to the OpenClaw analysis endpoint without any privacy warning, minimization guidance, or mention of consent/authorization. In an enterprise chat context, this can expose sensitive internal discussions, personal data, or regulated information to downstream systems unexpectedly.

Content

No source excerpt is available for this finding.