T09 · Insecure Skill Coding Practices
- Location
scripts/parse_forward.py:233- Finding
Feishu Application Secret Exposed Through Command-Line Arguments
- Content
View full analysis
[app_id] [app_secret] MESSAGE_ID="$1" APP_ID="${2:-$FEISHU_APP_ID}" APP_SECRET="${3:-$FEISHU_APP_SECRET}" ``` `SKILL.md:31`: ```bash python3 scripts/parse_forward.py --app-id --app-secret ``` `SKILL.md:44`: ```bash ./scripts/read_forward.sh ``` ### Technical Analysis Both implementations accept the Feishu application secret directly through command-line arguments, and the documentation recommends this invocation method. Command-line arguments are not an appropriate secret transport mechanism because they can be retained in shell history and may be observable through process inspection, command auditing, CI/CD logs, terminal recording, or job orchestration metadata. The secret is subsequently exchanged with the official Feishu token endpoint for a tenant access token. The network exchange itself is necessary for the declared message-reading functionality and targets the documented Feishu domain; no unauthorized external recipient was identified. The vulnerability is the local exposure of the credential before or during that legitimate exchange. ### Attack Path 1. An operator follows the documented example and supplies the Feishu application secret in the command line. 2. The complete command is stored in shell history, captured by execution logs, or temporarily exposed through process metadata. 3. ...[truncated 1316 chars]- Remediation
View remediation
