T09 · Insecure Skill Coding Practices
Error
- Location
- TEST-REPORT-FINAL.md:5
- Finding
- Live API Credential Published in the Test Report<![CDATA[ ## Vulnerability Details **File Location**: `TEST-REPORT-FINAL.md:5` **Vulnerability Type**: Hardcoded and publicly exposed secret **Risk Level**: High ### Vulnerable Code ```markdown **Test Date:** 2026-03-09 21:58 **Version:** v1.0.6 **Test Environment:** WSL2 (Ubuntu 24.04.4 LTS) **KEY:** 3d616fff11599a5cf52fcacb4c76f9f5 (encrypted storage) ``` The same report indicates that the credential was successfully decrypted and used during testing: ```markdown ✅ readConfig(): Passed - ID: 10013679 - KEY: Decrypted - Encrypted: Yes ``` ### Technical Analysis A complete 32-character value explicitly identified as the API communication key is committed to the repository. Describing the key as being stored in encrypted form does not protect it when its plaintext value is separately included in project documentation. The report also discloses the associated developer ID and states that the credential was successfully used for account verification, check-in, and API requests. This provides strong evidence that the value was an operational credential rather than an obvious placeholder. Anyone with access to the repository or its history can extract the credential without needing to defeat the project's AES-GCM storage mechanism. ### Attack Path 1. An attacker obtains the repository or reads the published test report. 2. The attacker extracts the plaintext API key from line 5. 3. The attacker obtains the associated developer ID from the same test report or other project documentation. 4. The attacker submits the ID and key to the documented ApiHz endpoints. 5. If the credential remains active, the attacker can act as the account, consume quotas, retrieve account information, or invoke paid APIs. ### Impact Assessment Successful exploitation can provide unauthorized use of the affected ApiHz account. The practical scope includes: - Consumption or exhaustion of API quotas. - Unauthorized access to APIs enabled for the account. - Retrieva ...[truncated 340 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Revoke and rotate the exposed API key immediately. 2. Review service logs for unauthorized calls made with the exposed credential. 3. Remove the key from the current file and all repository history using a history-rewriting tool. 4. Replace operational values in test reports with unmistakably synthetic placeholders. 5. Add automated secret scanning to local pre-commit hooks and CI pipelines. 6. Store test credentials in a dedicated secret manager or protected CI secret rather than documentation. 7. Use a low-privilege, quota-limited test account for future integration testing. ]]>
