Back to skill

Security audit

send image in feishu

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned for sending Feishu images, but it exposes and mishandles Feishu credentials in a way users should review before installing.

Review this skill carefully before installing. Rotate the exposed Feishu app secret if it was real, remove hardcoded credentials, avoid writing secrets into temporary scripts, and require explicit user/admin approval before direct API sending under a narrowly scoped Feishu app identity.

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

Error
Location
SKILL.md:136
Finding

Hardcoded Feishu Application Secret and Insecure Temporary Credential Storage

Content
View full analysis
'; // e.g. cli_a931e5b57ff89cc0 const APP_SECRET = ''; // from openclaw.json const IMAGE_PATH = '/absolute/path/to/image.jpg'; // must be absolute const RECEIVE_ID = ''; // e.g. ou_71c53ff7589f8527a27c2a057b96b6d7 const RECEIVE_ID_TYPE = 'open_id'; // or 'chat_id', 'user_id' // =================================== ``` The documentation then discloses a concrete Feishu application credential: ```markdown Read `openclaw.json` → `channels.feishu.accounts.` for `appId` and `appSecret`. For the CTO agent, these are already known: - `accountId`: `cto` - `appId`: `cli_a931e5b57ff89cc0` - `appSecret`: `Q3c78ab1ORB7xOj0JtRz2d1GwQtzZcZH` ``` The cron integration writes the generated script, including the embedded credential, into a shared temporary directory: ```javascript const { writeFileSync, unlinkSync } = require('fs'); const { execSync } = require('child_process'); const path = '/tmp/feishu-send-' + Date.now() + '.js'; const script = `/* filled template */`; writeFileSync(path, script); execSync(`node ${path}`); unlinkSync(path); ``` ### Technical Analysis The Skill contains a credential represented as the active application secret for the `cto` Feishu account. Secrets committed to documentation or source-controlled artifacts must be considered compromised because every person or system that can read the package can recover and reuse them independently of the intended workflow. The documented execution process introduces a second exposure path. It directs the agen ...[truncated 2886 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (7)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

The cleanup step uses a shell command pattern around a generated file path, and the overall workflow encourages tool-driven file creation and command execution. In an agent setting, this creates an avenue for tool-parameter abuse or path manipulation, especially if any portion of the path or command becomes influenced by untrusted input or future edits.

Content

Scanner excerpt · SKILL.md (reported line 25)May include surrounding context.

md
2. Generate a temporary Node.js script with values filled in (see Template below)
3. Write it to `/tmp/feishu-send-{timestamp}.js` using `write`
4. Run: `node /tmp/feishu-send-{timestamp}.js`
5. Confirm `✅ Image sent` in output, then clean up: `rm /tmp/feishu-send-{timestamp}.js`

### Script Template

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill obtains a tenant access token using app credentials, which is a credential-access pattern with direct security significance. In this context, token acquisition is tied to embedded/extracted secrets and can enable unauthorized messaging actions or broader API access depending on granted scopes.

Content

Scanner excerpt · SKILL.md (reported line 62)May include surrounding context.

md
}

(async () => {
  // 1. Get tenant access token
  const t = await req('https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' }

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill both instructs the agent to read credentials from a local configuration file and directly embeds a live-looking Feishu app secret in the documentation. That exceeds the stated purpose of sending images and creates an immediate risk of credential disclosure, unauthorized API use, and lateral abuse of the Feishu tenant if the skill is invoked or copied.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation handles sensitive credentials but provides no warning about secret exposure, storage, logging, or transmission. In context, the omission is particularly dangerous because the skill includes a concrete app secret and directs retrieval of secrets from local config, normalizing unsafe secret handling.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger language is broad enough to fire whenever image sending to Feishu is mentioned or rendering fails, which can cause unintended invocation of a high-risk workflow involving credentials and script execution. Over-broad activation increases the chance that the agent uses this skill in contexts where safer mechanisms should be preferred.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill tells the agent to generate, write, execute, and delete a temporary Node.js script. Even if intended for image sending, this introduces unnecessary general-purpose code execution and shell invocation, which can be repurposed or manipulated to run arbitrary code, access local files, or bypass safer built-in tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill omits any warning that it will write executable code to /tmp and run it, despite the security implications of filesystem writes, process execution, and cleanup via shell command. Users and operators are not informed that invoking the skill expands the agent's behavior beyond simple message sending.

Content

No source excerpt is available for this finding.