T09 · Insecure Skill Coding Practices
- Location
SKILL.md:59- Finding
Feishu Application Secret Instructed to Be Stored in a Plaintext Workspace File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
SKILL.md:59Feishu Application Secret Instructed to Be Stored in a Plaintext Workspace File
SKILL.md:17Feishu Credentials and Bearer Token Exposed Through Shell and Process Arguments
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# 获取飞书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'])")
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 获取飞书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'])")
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.
No suspicious patterns detected.