Back to skill

Security audit

multi-agent-feishu 多飞书账号接入不同agent

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only skill for configuring OpenClaw agents with Feishu bots, with credential and backup precautions users should handle carefully.

Before installing or following this skill, treat Feishu App Secret values as sensitive credentials: avoid committing or sharing ~/.openclaw/openclaw.json, restrict file permissions, encrypt any backups of ~/.openclaw or agent workspaces, and make a current backup before running restore commands that overwrite configuration or restart the gateway.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
references/backup.md:5
Finding

Unencrypted Backups May Expose Feishu Credentials and Agent Data

Content
View full analysis

Vulnerability Details

File Location: references/backup.md:5-10 and references/backup.md:41-46
Related Sensitive Configuration: SKILL.md:29-32 and references/config-fields.md:53-65
Vulnerability Type: Plaintext storage of sensitive backup data
Risk Level: Medium

Vulnerable Code Snippets

references/backup.md:5-10:

bash
# Back up the configuration file
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.$(date +%Y%m%d)

# Back up the entire configuration directory
tar -czf ~/openclaw-backup-$(date +%Y%m%d).tar.gz ~/.openclaw/

references/backup.md:41-46:

bash
# Back up all Agent workspaces
for i in 1 2 3 4; do
  tar -czf ~/workspace${i}-backup-$(date +%Y%m%d).tar.gz \
    ~/.openclaw/workspace${i}/
done

The archived configuration contains sensitive Feishu credentials as documented in references/config-fields.md:53-65:

json
{
  "channels": {
    "feishu": {
      "accounts": {
        "main": {
          "appId": "cli_xxx",
          "appSecret": "xxx"
        }
      }
    }
  }
}

Technical Analysis

The backup procedure creates unencrypted copies of the complete OpenClaw configuration directory and Agent workspaces. The configuration is expected to contain Feishu application secrets under channels.feishu.accounts, while Agent workspaces may contain state, memory, conversation-derived information, configuration, or other private files.

The instructions do not establish a restrictive umask, explicitly set archive permissions, encrypt the resulting archives, exclude unnecessary sensitive content, or define secure retention and deletion requirements. Consequently, the effective permissions of the generated files depend on the user's environment. The resulting archives may also be captured by home-directory synchronization, endpoint backup software, or unrelated processes with access to the user's files.

Compression with tar -czf does not provide encryption or access control. It creates ...[truncated 1898 chars]

Remediation
View remediation

Remediation Suggestions

  1. Apply restrictive permissions before creating any backup:
bash
umask 077
  1. Back up only the files required for restoration rather than archiving the entire ~/.openclaw/ directory.
  2. Exclude credentials, logs, temporary files, memory, and other sensitive runtime data unless they are explicitly required.
  3. Encrypt backups with authenticated encryption using a reviewed tool such as age, GPG, or an approved enterprise backup solution.
  4. Keep encryption keys separate from the backup files and protect them using an operating-system credential store, hardware-backed key store, or managed secret service.
  5. Store Feishu application secrets in a supported secret manager or protected environment mechanism instead of plaintext configuration where possible.
  6. Explicitly restrict backup permissions after creation:
bash
chmod 600 ~/openclaw-backup-*.tar.gz
chmod 600 ~/workspace*-backup-*.tar.gz
  1. Define backup retention and secure-deletion policies to prevent obsolete credentials from remaining recoverable indefinitely.
  2. Rotate Feishu application secrets after any suspected archive disclosure.
  3. Document a secure restoration procedure that preserves restrictive ownership and permissions and does not leave temporary plaintext copies behind.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (10)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs users to place Feishu appId and appSecret directly into a local configuration file but provides no guidance on secret handling, access restrictions, redaction, or avoiding accidental commits/backups. This can lead to credential exposure through permissive file permissions, shared machines, logs, screenshots, or source control, enabling unauthorized use of the Feishu bot integration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file includes recovery commands that copy backup files over the active configuration and then restart the gateway, which can replace current user settings and disrupt service. The section provides no user-facing warning about data loss risk, overwriting behavior, or the operational impact of the restart.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/backup.md (reported line 30)May include surrounding context.

bash
# 查看可用备份
ls -la ~/.openclaw/openclaw.json.*

# 恢复指定日期
cp ~/.openclaw/openclaw.json.20260309 ~/.openclaw/openclaw.json

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document explicitly shows configuration fields for storing Feishu appSecret values and provides full examples containing secrets, but it does not warn users to keep these values out of version control, restrict file permissions, or use a secret manager/environment variables. In a multi-agent setup with multiple accounts, this increases the chance that several long-lived credentials will be copied into config files and accidentally exposed through repos, backups, or support sharing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide tells users how to locate the App Secret but does not state that it is a highly sensitive credential that must not be exposed, committed to source control, or shared in chats or screenshots. In an agent-integration skill, this omission increases the chance of accidental credential leakage, which could let an attacker impersonate the app or abuse Feishu API access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

文件中的主要说明内容为中文,但标题使用英文,整体未说明该技能面向的语言环境或是否支持用户选择语言。若组织要求避免在未征得用户同意时强制或默认特定语言/locale,这种未声明的语言混用可能构成自然语言策略不清晰或潜在违反。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains user-facing architectural documentation entirely in Chinese, and there is no indication that readers may choose another language or that the Chinese-only presentation is an intentional, justified locale constraint. Under the policy, forcing a specific language without user opt-in 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
84% confidence
Finding

A language-specific document can violate locale or language policy when it implicitly forces one language without offering alternatives or noting that the content is region- or audience-specific. Here, all headings and instructions are in Chinese with no indication of optional locale selection or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The file is entirely written in Chinese and uses Chinese labels and examples, which can indicate a fixed language/locale requirement. Under SQP-3, forcing a specific language without opt-in can be a policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file presents all user-facing instructions in Chinese only, which may violate a language or locale policy if users are not given an opt-in or alternative language. The file does not indicate that the skill is region-specific or that Chinese is an intentional, documented requirement.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.