Back to skill

Security audit

Feishu BGM

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated BGM purpose, but its command workflow and setup create review-worthy risks before installation.

Review before installing. Use an explicit invocation or confirmation in Feishu groups, do not include confidential meeting or project details in BGM requests, avoid executing generated shell strings, sanitize output filenames, prefer pinned local dependencies, and validate downloaded audio URLs before sending files back to the group.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:88
Finding

Shell Command Injection Through User-Controlled Prompt and Scene Values

Content
View full analysis
" \ --instrumental \ --out /tmp/openclaw/bgm_.mp3 # Method 2: Python script (requires MINIMAX_API_KEY environment variable) python3 scripts/generate_bgm.py \ --prompt "" \ --output /tmp/openclaw/bgm_.mp3 ``` ### Technical Analysis The workflow directs the Agent to derive both `` and `` from user-provided messages and interpolate those values into shell command templates. The scene placeholder in the output filename is unquoted, allowing shell metacharacters, whitespace, additional arguments, redirections, or command separators to alter the command. Although the prompt placeholder is shown inside double quotes, shell command substitutions such as `$(command)` and backtick expressions remain active inside double-quoted shell strings if an Agent constructs and executes the resulting command through a shell. No input validation, shell escaping, strict scene allowlist, or instruction to use an argument-array process API is provided. Consequently, an attacker may transform a legitimate music-generation request into arbitrary shell execution when the Agent follows the documented workflow. ### Attack Path 1. An attacker sends a BGM request containing shell syntax in the scene description or special requirements. 2. The Agent extracts that attacker-controlled text into `` or ``. 3. The Agent replaces the placeholders in the documented shell command. 4. The resulting command is submitted to a shell. 5. The shell interprets command substitution, separators, redirection, or injected command-line arguments. 6. The injected command executes with the same operating-system permissions ...[truncated 808 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_bgm.py:62
Finding

Insufficient Validation of API-Provided Audio Download URL and Response

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:21
Finding

Unpinned Global Installation of a Third-Party CLI Package

Content
View full analysis
Remediation
View remediation
``` - Prefer a project-local dependency over global installation. - Commit and review a lockfile so dependency resolution is reproducible. - Use `npm ci` for deterministic installation from the lockfile. - Verify package provenance, registry identity, integrity metadata, and correspondence with the linked upstream repository. - Review lifecycle scripts and dependency changes before upgrading. - Where supported, verify signed releases or published checksums. - Avoid running npm installation with administrative or root privileges. - Invoke the local binary through a pinned package script or an explicitly controlled path so an unrelated global executable cannot be selected. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tainted flow: 'headers' from os.environ.get (line 28, 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/generate_bgm.py (reported line 49)May include surrounding context.

python
start = time.time()

    try:
        resp = requests.post(url, json=payload, headers=headers, timeout=300)
        data = resp.json()
    except Exception as e:
        print(f"❌ Request failed: {e}", file=sys.stderr)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill clearly relies on external execution capabilities: it invokes a CLI, may run a Python script, reads authentication from environment or local CLI state, and makes outbound requests to MiniMax. Without an explicit tool/permission declaration, the runtime has no documented least-privilege boundary, increasing the chance of unintended access to env secrets or uncontrolled network use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description says the skill generates music via MiniMax but does not clearly warn users that their scene descriptions and prompt content are transmitted to an external third-party service. Because users may include sensitive meeting context, work topics, or internal project details in the scene description, the omission creates a real data-sharing and consent issue.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Several trigger phrases are broad everyday language, such as '背景音乐' and '放点音乐', which can cause the skill to activate in normal conversation rather than as an intentional command. In a group-chat context, accidental activation can send user-supplied text to an external service and consume paid generation quota, creating privacy and cost risks.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_bgm.py (reported line 27)May include surrounding context.

python
print("❌ MINIMAX_API_KEY not set", file=sys.stderr)
        sys.exit(1)

    url = "https://api.minimaxi.com/v1/music_generation"
    headers = {
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/generate_bgm.py (reported line 49)May include surrounding context.

python
start = time.time()

    try:
        resp = requests.post(url, json=payload, headers=headers, timeout=300)
        data = resp.json()
    except Exception as e:
        print(f"❌ Request failed: {e}", file=sys.stderr)