T09 · Insecure Skill Coding Practices
- Location
SKILL.md:18- Finding
Feishu App Secret Exposed Through Command Output and Process Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to send Feishu urgent reminders as claimed, but its credential handling can expose the Feishu App Secret and its permission guidance is broader than some users need.
Install only if you are comfortable giving this skill a Feishu app credential that can send urgent messages, trigger phone urgency, and look up users if those scopes are enabled. Before use, change the preflight check so it reports only whether FEISHU_APP_SECRET is set, avoid passing secrets on the command line in logged/shared environments, store .feishu.env outside shared repos with restrictive permissions, grant only the Feishu permissions you need, and rotate the App Secret if it has already appeared in logs or transcripts.
SKILL.md:18Feishu App Secret Exposed Through Command Output and Process Arguments
SKILL.md:245Optional Feishu Permissions Are Requested Unconditionally
The declared purpose focuses on sending urgent Feishu reminders, but the skill also performs identity lookup by phone/email and stores App ID, App Secret, and user open_id in local configuration. This mismatch is security-relevant because users may authorize a simple messaging skill without realizing it collects identifiers and persists credentials, creating secrecy, privacy, and misuse risks.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _parse_env_file(path):
"""
解析 .env 文件,返回 {key: value} 字典。
支持格式:
KEY=VALUE
The README instructs users to store the Feishu App ID and App Secret in a local .feishu.env file but does not warn that the secret is sensitive, should be excluded from version control, and should have restricted file permissions. In a skill/workspace context, users may copy this pattern directly, accidentally commit credentials, or leave them readable to other local users or processes, enabling unauthorized use of the Feishu app and message/phone-urgent capabilities.
The skill uses sensitive capabilities including shell execution, environment-variable access, file writes, and outbound network calls, but it does not declare any explicit tool scope or allowed-tools boundary. That increases the blast radius because an agent may invoke more capabilities than users expect, including reading secrets and persisting credentials locally.
The entire skill description and all required user-facing prompts are written only in Chinese, including mandatory interaction text such as credential requests and feedback templates. There is no indication that the skill supports user language choice or that the Chinese-only constraint is a documented, justified regional requirement.
The manifest describes a narrowly scoped reminder capability: sending urgent Feishu messages, including in-app and phone escalation. This file goes beyond that by adding .feishu.env discovery/loading and a separate lookup flow that resolves user open_id from email or phone, which are additional account/configuration management capabilities not reflected in the stated description.
The save-config command persists FEISHU_APP_SECRET and related identifiers to disk, but this sensitive credential-handling behavior is not disclosed by the manifest. Hidden secret storage is dangerous because users may invoke the skill assuming it only sends reminders, while it actually creates a reusable local secret file that could be exposed via backup, workspace sharing, or later file reads by other tools.
These lines write sensitive Feishu credentials directly into a plaintext .feishu.env file, and the write path does not present an explicit warning at the moment secrets are persisted. Even with chmod 600 afterward, plaintext secret storage remains risky in shared workspaces, synchronized folders, backups, or environments where permissions are not reliably enforced.
The changelog explicitly states the skill uses a Chinese interface and prompt text. Under the policy, forcing a specific language is a natural-language policy concern unless the skill offers user choice or clearly documents a justified region-specific constraint, which is not shown here.
The natural-language help text states that 11-digit phone numbers default to the +86 China mainland prefix, and the CLI help repeats this behavior. This imposes a specific locale assumption on user input without offering a language/locale choice or explicit opt-in.