T09 · Insecure Skill Coding Practices
- Location
SKILL.md:155- Finding
API Credentials Exposed by Troubleshooting and Persistence Instructions
- Content
View full analysis
> ~/.zshrc ``` ### Technical Analysis The troubleshooting instructions tell users to print the complete values of `XFYUN_APP_ID`, `XFYUN_API_KEY`, and `XFYUN_API_SECRET` to the terminal. The API key and API secret are authentication credentials and should not be exposed in diagnostic output. Terminal output can be retained in CI logs, shell transcripts, screen recordings, screenshots, remote-support sessions, or terminal logging systems. The persistence example also encourages storing credentials as plaintext in a shell initialization file. If users enter analogous commands containing literal credentials, those values may additionally remain in shell history. This behavior is not required to diagnose whether the environment variables are configured. Presence checks or masked output would provide the same diagnostic value with substantially less exposure. ### Attack Path 1. A user encounters an authentication error and follows the documented troubleshooting instructions. 2. The commands print the complete API key and secret to the terminal, or the user stores credentials in a shell profile. 3. Terminal output, shell history, the profile file, a screenshot, or a support transcript becomes accessible to another person or process. 4. The exposed credentials are copied and reused to authenticate to iFlytek services available to the associated application. 5. The attacker may consume the account's API quota or access other service capabilities author ...[truncated 1163 chars]- Remediation
View remediation
