Back to skill

Security audit

Feishu Integration

Security checks for vulnerabilities and agentic risk

Overview

This Feishu integration mostly matches its stated purpose, but it ships a plaintext app secret and handles bearer tokens in ways that need review before use.

Do not use this skill as-is with real tenant privileges. Rotate the exposed Feishu app secret, replace config/feishu.env with a template, restrict the Feishu app scopes, harden token caching to private 0600 files or a secret store, validate authenticated request destinations, and update vulnerable dependencies before installing or running cron automation.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
config/feishu.env:4
Finding

Committed Feishu Application Secret

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/feishu-auth.sh:48
Finding

Tenant Tokens Stored in Predictable Files Without Explicit Access Controls

Content
View full analysis
"$CACHE_FILE" << EOF { "token": "${token}", "expiry_time": ${expiry_time} } EOF ``` The JavaScript helper similarly stores a plaintext bearer token without an explicit file mode: ```javascript const TOKEN_CACHE_FILE = path.resolve(__dirname, '../../memory/feishu_token.json'); const cacheData = { token: data.tenant_access_token, expire: now + data.expire }; const cacheDir = path.dirname(TOKEN_CACHE_FILE); if (!fs.existsSync(cacheDir)) fs.mkdirSync(cacheDir, { recursive: true }); fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cacheData, null, 2)); ``` The message implementation also reads and writes the same style of cache: ```javascript const TOKEN_CACHE_FILE = path.resolve(__dirname, '../../memory/feishu_token.json'); if (fs.existsSync(TOKEN_CACHE_FILE)) { const cached = JSON.parse(fs.readFileSync(TOKEN_CACHE_FILE, 'utf8')); if (cached.expire > now + 60) return cached.token; } ``` ### Technical Analysis Tenant access tokens are bearer credentials: any process that acquires a valid token can exercise its associated permissions without separately knowing the application secret. The shell cache is especially exposed because it uses a fixed filename in the shared `/tmp` namespace. The script does not: - Set a restrictive `umask`. - Create the file with mode `0600`. - Verify file ownership. - Reject symbolic links. - Use an atomic, securely created tempor ...[truncated 2336 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
reference-feishu-common/index.js:104
Finding

Authenticated Fetch Helper Sends Feishu Bearer Tokens to Unrestricted URLs

Content
View full analysis
` to the request. 6. The attacker-controlled server records the authorization header. 7. The attacker reuses the token against Feishu before expiration ...[truncated 627 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/group-welcome.py:175
Finding

Group Welcome Module Reads All Values from a Shared OpenClaw Credential File

Content
View full analysis
Dict[str, str]: """ 从 ~/.openclaw/.env 文件读取配置 Returns: 配置字典 """ env_path = Path.home() / '.openclaw' / '.env' config = {} if env_path.exists(): with open(env_path, 'r', encoding='utf-8') as f: for line in f: line = line.strip() # 跳过空行和注释 if line and not line.startswith('#') and '=' in line: key, value = line.split('=', 1) config[key.strip()] = value.strip().strip('"\'') return config # 加载环境配置 ENV_CONFIG = load_env_config() ``` The function subsequently needs only the Feishu application values: ```python app_id = os.getenv("FEISHU_APP_ID") or ENV_CONFIG.get("FEISHU_APP_ID") app_secret = os.getenv("FEISHU_APP_SECRET") or ENV_CONFIG.get("FEISHU_APP_SECRET") ``` ### Technical Analysis The group welcome functionality requires only `FEISHU_APP_ID` and `FEISHU_APP_SECRET`, but the module reads every key and value from the shared `~/.openclaw/.env` file into an in-memory dictionary. The read occurs at module import time through: ```python ENV_CONFIG = load_env_config() ``` This behavior exceeds the minimum credential access necessary for the declared welcome-bot functionality. A shared OpenClaw environment file may contain credentials for unrelated services. Loading those values expands the sensitive-data exposure of this process and any imported Python dependencies. No evidence in the audited code shows these unrelated values being transmitted over the network. The issue is excessive local access and increased exposure, not confirmed exfiltration. ### Attack Path 1. A user executes or imports `group-welcome.py`. 2. Module initialization opens `~/.openclaw/.env`. 3. Every parseable key ...[truncated 1001 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (110)

Tainted flow: 'app_id' from os.getenv (line 253, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/group-welcome.py (reported line 261)May include surrounding context.

python
try:
        url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
        resp = requests.post(
            url,
            json={"app_id": app_id, "app_secret": app_secret},
            timeout=REQUEST_TIMEOUT

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-common/index.js (reported line 66)May include surrounding context.

js
}

/**
 * Get Tenant Access Token (Cached)
 */
async function getToken(forceRefresh = false) {
    const now = Math.floor(Date.now() / 1000);

Known Vulnerable Dependency: axios==1.13.5 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
98% confidence
Finding

The lockfile pins axios 1.13.5, which the static analysis reports as having multiple known advisories including SSRF/proxy bypass and prototype-pollution-related request/response manipulation issues. In a shared HTTP helper package, axios is likely a core dependency, so exploitable HTTP client bugs can affect any consumer that makes outbound requests with attacker-influenced URLs, proxy settings, or request configuration.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
93% confidence
Finding

form-data 4.0.5 is flagged for CRLF injection via unescaped multipart field names and filenames. If any consuming code builds multipart requests from attacker-controlled input, this can let an attacker smuggle or alter multipart headers/content, potentially leading to request tampering against upstream services.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: axios==1.13.5 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
97% confidence
Finding

The package permits installation of axios 1.13.5 via the caret range, and the analyzer reports that version as having multiple known advisories including SSRF-related and prototype-pollution-adjacent issues. This is especially concerning in a Feishu API client and authentication utility because HTTP request handling and credential-bearing traffic are core functions, so exploitation could affect tokens, outbound request routing, or response integrity.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-common/index.js (reported line 4)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/create_chat.js (reported line 19)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/disband_chat.js (reported line 2)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/get.js (reported line 5)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/get_chat_info.js (reported line 2)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/get_latest_file.js (reported line 4)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/index.js (reported line 7)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/list_pins.js (reported line 4)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/list_pins_v2.js (reported line 4)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference-feishu-message/send-audio.js (reported line 8)May include surrounding context.

js
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });

// Try to load Lark SDK
let Lark;

Known Vulnerable Dependency: axios==1.13.4 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
93% confidence
Finding

axios 1.13.4 is directly depended on and the scanner reports multiple high-severity advisories, including SSRF/proxy bypass and prototype-pollution-related attack chains. In a messaging/integration skill that likely makes outbound HTTP requests, a vulnerable HTTP client is especially relevant because attacker-controlled URLs, redirects, headers, or proxy settings can turn these issues into credential leakage, request forgery, or traffic interception.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
89% confidence
Finding

form-data 4.0.5 is reported as vulnerable to CRLF injection through unescaped multipart field names/filenames. In a skill that likely uploads files or posts multipart requests to Feishu or other APIs, attacker-controlled field metadata could poison outbound requests, alter multipart structure, or inject unintended headers/content.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: music-metadata==11.11.2 — 1 advisory(ies): CVE-2026-32256 (music-metadata has an infinite loop vulnerability in ASF parser)

High
Category
Supply Chain
Confidence
92% confidence
Finding

music-metadata 11.11.2 is directly depended on and is reported to contain an infinite-loop vulnerability in ASF parsing. If this skill accepts or inspects user-supplied audio/media, a crafted file could hang the process or consume CPU, making the issue highly relevant in this context.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: protobufjs==7.5.4 — 12 advisory(ies): CVE-2026-44294 (protobuf.js: Denial of service from crafted field names in generated code); CVE-2026-44293 (protobuf.js: Code injection through bytes field defaults in generated toObject c); CVE-2026-44289 (protobuf.js: Denial of service through unbounded protobuf recursion) +9 more

High
Category
Supply Chain
Confidence
84% confidence
Finding

protobufjs 7.5.4 is present transitively through the Feishu SDK and the scanner reports multiple high-severity issues including denial of service and code-generation-related injection risks. Even if some advisories only apply when using code generation features, the package version is vulnerable and protobuf parsing of untrusted data could expose the application to resource exhaustion or unsafe generated output paths.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: qs==6.14.1 — 3 advisory(ies): GHSA-4mjr-xmp4-gh2g; GHSA-q8mj-m7cp-5q26; GHSA-w7fw-mjwx-w883

High
Category
Supply Chain
Confidence
80% confidence
Finding

qs 6.14.1 is included transitively and is associated with multiple high-severity advisories, commonly around prototype pollution or unsafe querystring parsing behaviors. In an API integration skill, parsing attacker-controlled query strings or merging parsed objects into config/state can enable object pollution and downstream exploitation.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==8.19.0 — 2 advisory(ies): GHSA-58qx-3vcg-4xpx; GHSA-96hv-2xvq-fx4p

High
Category
Supply Chain
Confidence
80% confidence
Finding

ws 8.19.0 is present transitively through the Feishu SDK and is flagged by the scanner with high-severity advisories. If the SDK opens WebSocket connections or processes attacker-influenced frames/handshakes, vulnerabilities in ws can expose the process to denial of service, data exposure, or protocol-level abuse depending on the specific advisory conditions.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: axios==1.13.5 — 16 advisory(ies): GHSA-35jp-ww65-95wh; GHSA-3g43-6gmg-66jw; GHSA-3p68-rc4w-qgx5 +13 more

High
Category
Supply Chain
Confidence
88% confidence
Finding

The project declares axios with a version range that static analysis associates with a known vulnerable resolved version. Because this skill performs Feishu message operations and likely makes outbound HTTP requests, a vulnerable HTTP client can expose the skill to request smuggling, SSRF-related bypasses, header handling issues, or other library-specific flaws depending on which advisories apply.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
84% confidence
Finding

form-data 4.0.5 is flagged for CRLF injection via unescaped multipart field names/filenames. In a messaging or file-upload skill, if any multipart field names or metadata can be influenced by external input, this could enable malformed requests, header injection, or abuse of downstream services that parse multipart bodies.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: music-metadata==11.11.2 — 1 advisory(ies): CVE-2026-32256 (music-metadata has an infinite loop vulnerability in ASF parser)

High
Category
Supply Chain
Confidence
81% confidence
Finding

music-metadata 11.11.2 is reported vulnerable to an infinite loop in the ASF parser, creating a denial-of-service risk when parsing crafted media files. This package is especially relevant in a message-processing skill because attachments or uploaded audio/media may be attacker-controlled, making parser-level DoS more plausible in context.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/token-management.md (reported line 109)May include surrounding context.

bash
# 删除缓存强制刷新
rm /tmp/feishu_token_cache.json

# 或调用刷新命令
bash feishu-auth.sh refresh