T09 · Insecure Skill Coding Practices
Error
- Location
- references/aika_config.json:58
- Finding
- Production Credentials and Sensitive Tracking Identifiers Stored in Plaintext## Vulnerability Details **File Location**: `references/aika_config.json:14-18, 58-65` **Vulnerability Type**: Hard-coded credentials and sensitive identifiers **Risk Level**: High ### Vulnerable Code ```json "7028888047": { "device_id": "OBD-88047", "device_number": "7028888047", "device_name": "รถช่าง / ไทรทัน", "iccid": "896603252520506488678F", ``` ```json "authentication": { "username": "7028888047", "password": "123456", "session_timeout": 3600, "auto_refresh": true, "demo_mode": false, "ready_for_production": true, "credentials_status": "complete" }, ``` The credentials are consumed when the application authenticates in `scripts/aika_gps.py:52-55`: ```python auth_data = { 'username': self.config['authentication']['username'], 'password': self.config['authentication']['password'] } ``` ### Technical Analysis An apparent production username and password are committed directly in the project configuration. The same configuration includes a GPS device number, device identifier, and SIM ICCID. The flags `demo_mode: false`, `ready_for_production: true`, and `credentials_status: complete` indicate that the values are intended for operational use rather than being clearly marked examples. Secrets committed to a project can be recovered from distributed copies, backups, build artifacts, and repository history even after deletion from the latest revision. The application automatically reads these values and submits them to the configured AIKA login endpoint. ### Attack Path 1. An attacker obtains the Skill package, repository contents, backup, or derived deployment artifact. 2. The attacker reads the username, password, device number, device identifier, and ICCID from `references/aika_config.json`. 3. The attacker submits the exposed credentials to the configured AIKA service. 4. If the credentials remain valid and the upstream service permits access, t ...[truncated 743 chars]
- Remediation
- ## Remediation Suggestions 1. Immediately revoke and rotate the exposed AIKA password and invalidate existing authenticated sessions. 2. Verify whether the credentials appeared in repository history, logs, packages, backups, or deployment artifacts and treat all such copies as compromised. 3. Remove passwords, session tokens, ICCIDs, and production device identifiers from version-controlled configuration. 4. Load authentication data from a protected secret manager or environment variables at runtime. 5. Commit only a redacted example configuration containing placeholders. 6. Restrict configuration-file permissions to the service account that requires access. 7. Use a dedicated least-privilege AIKA account that can access only the devices required by this integration. 8. Add automated secret scanning to pre-commit checks and continuous integration. 9. Avoid returning full device numbers or other unnecessary identifiers in command output.
