T09 · Insecure Skill Coding Practices
- Location
utils/feishu_sender.py:13- Finding
Hardcoded API Keys and Feishu Application Credentials
- Content
View full analysis
" # Default API Key DEFAULT_API_KEY = "" ``` ```python # config/settings.py:4-12 NANO_BANANA_API_KEY = "" NANO_BANANA_ENDPOINT = "https://grsai.dakka.com.cn" NANO_BANANA_MODEL = "nano-banana-pro" NANO_BANANA_TIMEOUT = 120 NANO_BANANA_MAX_RETRIES = 3 VOLCENGINE_API_KEY = "" VOLCENGINE_ENDPOINT = "https://ark.cn-beijing.volces.com/api/v3" ``` ```python # utils/feishu_sender.py:13-16 APP_ID = "" APP_SECRET = "" ``` ### Technical Analysis The project embeds service credentials directly in source files. The Nano Banana key is duplicated in runtime code, test code, configuration, and an executable demonstration block. A Volcengine key and Feishu application secret are also committed in plaintext. Any person or automated system able to download the Skill package can extract these credentials without executing the project. The runtime also automatically uses the embedded Nano Banana key, removing the security boundary that would normally require each operator to supply an authorized credential. Source-code deletion alone is insufficient if the repository or package has already been distributed because the credentials may remain in cached copies, release archives, logs, or version-control history. ### Attack Path 1. An attacker obtains the published Skill package or repository contents. 2. The attacker searches the source for key and secret patterns. 3. The attacker ...[truncated 912 chars]- Remediation
View remediation
