Back to skill

Security audit

Feishu Chat Server API

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned for Feishu chat administration, but it asks users to run mutable remote code with Feishu credentials and includes high-impact chat actions.

Review this skill before installing. Prefer a pinned, reviewed release or commit instead of the live Git command, avoid putting Feishu secrets in command-line arguments, use least-privilege Feishu app scopes, and require explicit confirmation before member removal or chat disbanding.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:72
Finding

Execution of Unpinned Code from a Remote Git Repository

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 72–74
Vulnerability Type: Remote payload retrieval and execution
Risk Level: High

Vulnerable Code:

bash
uvx --from git+https://github.com/wodenwang/feishu-extension-skills.git feishu-extension-skills invoke <action> --args-json '<json>'

Technical Analysis

The documented command instructs the agent to use uvx to retrieve and execute a package directly from a remote Git repository. The repository reference is not pinned to a reviewed commit hash or another immutable revision.

Consequently, the code executed when the command is invoked can differ from the code that existed when this skill was reviewed. Control of the effective execution payload remains with the upstream repository. Although the repository URL is consistent with the homepage declared by the skill and there is no evidence that it is currently malicious, this design crosses a remote code-execution trust boundary without ensuring payload immutability or integrity.

This issue is best classified as remote payload retrieval and execution rather than an embedded malicious-code issue because the executable implementation is not included in the audited project.

Attack Path

  1. An attacker compromises the upstream repository, a maintainer account, or its dependency publication workflow.
  2. The attacker modifies the repository's default branch to include malicious package initialization or command-handling code.
  3. A user or agent follows the documented command without specifying a trusted commit.
  4. uvx retrieves the attacker-controlled revision and executes it locally.
  5. The payload runs with the privileges and environment of the invoking process, potentially gaining access to Feishu credentials and other locally accessible resources.

Impact Assessment

Successful exploitation can result in arbitrary code execution under the invoking user's operating-syst ...[truncated 566 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the Git dependency to a reviewed, immutable commit hash instead of using the repository's mutable default branch.
  2. Prefer a signed, versioned release from a trusted package registry with integrity hashes or lockfile verification.
  3. Verify the source and dependency tree of the pinned revision before approving it for agent execution.
  4. Execute the CLI in a restricted environment with minimal filesystem, network, and process privileges.
  5. Prevent the remotely retrieved process from receiving credentials unless they are strictly required for the selected operation.
  6. Establish an update process in which new revisions are reviewed and explicitly approved before the pin is changed.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:93
Finding

Feishu Application Secrets Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 93–99
Vulnerability Type: Insecure credential handling
Risk Level: Medium

Vulnerable Code:

bash
uvx --from git+https://github.com/wodenwang/feishu-extension-skills.git feishu-extension-skills invoke feishu-chat-create --args-json '{"app_id":"cli_xxx","app_secret":"sec_xxx","name":"项目临时群","user_id_list":["ou_xxx","ou_yyy"]}'
bash
uvx --from git+https://github.com/wodenwang/feishu-extension-skills.git feishu-extension-skills invoke feishu-chat-member-add --args-json '{"app_id":"cli_xxx","app_secret":"sec_xxx","chat_id":"oc_xxx","user_id_list":["ou_xxx"]}'

Technical Analysis

The examples place app_secret directly inside the --args-json command-line argument. Users adapting these examples may replace the placeholders with real credentials.

Command-line secrets can be exposed through shell history, terminal transcripts, automation logs, process-monitoring systems, audit records, error reports, or process argument inspection. The secret is also directly supplied to remotely retrieved code, increasing the consequences of the unpinned remote-execution issue.

The project documents configuration-file and environment-variable alternatives, but the operational examples explicitly demonstrate the less secure command-line method without warning users about its exposure risks.

Attack Path

  1. A user copies one of the documented examples.
  2. The user replaces sec_xxx with a valid Feishu application secret.
  3. The shell or an automation system records the complete command in history or logs, or another local process observes its arguments while it is running.
  4. An attacker with access to those records or process metadata extracts the application ID and secret.
  5. The attacker authenticates to Feishu and invokes APIs available to the compromised application.

Impact Assessment

Exposure of the application credentials can en ...[truncated 476 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove app_secret from all command-line examples.
  2. Prefer a dedicated secret manager or secure runtime credential injection mechanism.
  3. If a configuration file is used, require restrictive permissions such as owner-only read and write access and exclude the file from version control.
  4. If environment variables are supported, inject them only into the target process and avoid printing the environment in diagnostic output.
  5. Ensure the CLI redacts secrets from logs, exceptions, telemetry, and debug output.
  6. Add an explicit warning that credentials must not be placed in shell commands, shell history, scripts, or CI job arguments.
  7. Rotate any real secret that may already have been used in the documented command-line form.
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 (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill supports destructive administrative actions such as removing members and disbanding chats, but the description does not prominently warn users about those irreversible or disruptive effects. In an agentic context, weak signaling about destructive operations increases the chance of accidental misuse, overbroad routing, or unsafe automation against production group chats.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The skill instructs users to execute code directly from a Git repository via uvx --from git+https://... without pinning a specific commit, tag, or version. This creates a supply-chain risk: if the upstream repository is updated maliciously or compromised, future executions may run unintended code with the user's local permissions and access to Feishu credentials.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

This example command again pulls and executes code from an unpinned Git source at runtime. Because the command also passes app_id and app_secret, compromise of the upstream repo could lead to credential theft or unauthorized Feishu API actions in addition to arbitrary code execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The same unpinned uvx --from git+https://... pattern appears in another example, preserving the same remote code execution and supply-chain exposure. In this skill's context, successful exploitation could be used to add/remove members or disband chats through the provided Feishu credentials.

Content

No source excerpt is available for this finding.