Back to skill

Security audit

Save Douyin Video To Feishu Drive

Security checks for vulnerabilities and agentic risk

Overview

The skill’s Douyin-to-Feishu purpose is coherent, but it gives unsafe instructions for handling Feishu credentials and persisting them in a workspace preference file.

Review before installing. Use this skill only if you are comfortable connecting a Feishu app to the workflow, and do not store app_secret, tenant tokens, or bearer credentials in TOOLS.md, source files, chat, logs, or command history. Prefer environment variables or a secret manager, grant the Feishu app only the minimum Drive permissions needed, and confirm local download paths before writing files.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:59
Finding

Feishu Application Secret Instructed to Be Stored in a Plaintext Workspace File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:17
Finding

Feishu Credentials and Bearer Token Exposed Through Shell and Process Arguments

Content
View full analysis
","app_secret":""}' | python3 -c "import json,sys; print(json.load(sys.stdin)['tenant_access_token'])") # 执行上传 node scripts/parse-douyin-video.js <抖音URL> --feishu ``` ### Technical Analysis The documented workflow places the Feishu application secret in a `curl` command and passes the resulting tenant access token to Node.js as a command-line argument. When a user substitutes real values into these commands, the command text may be retained in interactive shell history, terminal logs, automation logs, support transcripts, or command auditing systems. While the command is running, command-line arguments may also be visible through process inspection facilities, subject to operating-system configuration and user permissions. The `TOKEN` shell variable prevents the token response itself from automatically appearing in the shell history, but the subsequent example explicitly passes a token as the `--feishu` argument. This creates an avoidable bearer-token exposure channel. The application secret remains directly embedded in the initial command text. The pipeline at lines 18-20 does not execute a downloaded remote script: it sends a request to the official Feishu HTTPS endpoint and parses the JSON response using local Python. Therefore, the pre-scan concern about `curl | bash` is not confirmed. The security issue is credential exposure, not remote payload execution. ### Attack Path 1. A user replaces the placeholders with a real Feishu application secret, tenant token, and folder token. 2. The command containing the application secret is ent ...[truncated 1094 chars]
Remediation
View remediation
`. - Avoid debug output, command tracing such as `set -x`, and logging around credential acquisition and upload commands. - Configure restrictive process-inspection and local-user permissions where supported, while treating these controls as defense in depth rather than the primary fix. - Redact credentials from errors, telemetry, command histories, and diagnostic output. - Use short-lived tokens, rotate any credentials that may already have appeared in command history or logs, and review Feishu API activity for misuse. - Document the minimum Feishu permissions required and avoid granting unrelated API scopes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

方式一:上传飞书云盘(推荐)

bash
# 获取飞书token
TOKEN=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"<app_id>","app_secret":"<app_secret>"}' | python3 -c "import json,sys; print(json.load(sys.stdin)['tenant_access_token'])")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill instructs operators to place Feishu app_id and app_secret directly into a shell command and immediately exchange them for a tenant access token, but it gives no guidance on secret storage, redaction, shell history exposure, or least-privilege handling. In an agent-skill context, this can normalize unsafe credential handling and lead to accidental leakage of long-lived application secrets or reuse of overprivileged tokens.

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 · SKILL.md (reported line 18)May include surrounding context.

方式一:上传飞书云盘(推荐)

bash
# 获取飞书token
TOKEN=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"<app_id>","app_secret":"<app_secret>"}' | python3 -c "import json,sys; print(json.load(sys.stdin)['tenant_access_token'])")

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill supports downloading remote content to a local path, including a user-supplied destination, without any safety guidance about overwrite risks, trusted directories, or validating the destination path. In agent-assisted workflows, this can cause unintended writes to sensitive locations or clobber existing files if the path is chosen unsafely.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.