T09 · Insecure Skill Coding Practices
- Location
scripts/upload_image.py:78- Finding
Tenant Access Token Exposure Through Command-Line Arguments
- Content
View full analysis
--token ``` ### Technical Analysis The uploader accepts a Feishu tenant access token through the `--token` command-line option. Command-line arguments are commonly exposed to other local users through process-inspection facilities while the process is running. They may also be retained in shell history, terminal session recordings, CI/CD job output, audit telemetry, or process-monitoring systems. Although the script also supports the safer `FEISHU_TENANT_ACCESS_TOKEN` environment variable, the command-line alternative remains enabled and is explicitly documented. The token is legitimately required to authenticate the image upload to the fixed official Feishu HTTPS endpoint, but exposing it through process arguments is not necessary for that functionality. No evidence indicates that the script sends the token to an unrelated destination. The network operation itself is expected for image upload; the vulnerability concerns local disclosure caused by the credential input mechanism. ### Attack Path 1. A user follows the documented example and invokes the uploader with `--token`. 2. The tenant access token becomes part of the process command line. 3. The command may be stored in shell history or captured by job logs, process monitoring, terminal recording, or loc ...[truncated 960 chars]- Remediation
View remediation
