T09 · Insecure Skill Coding Practices
- Location
SKILL.md:58- Finding
Unvalidated Custom API Endpoint Can Receive Credentials and Sensitive Essay Data
- Content
View full analysis
' ``` The same configurable base URL is also used when polling for results at `SKILL.md:76-80`. ### Technical Analysis The skill permits `INKCRAFT_BASE_URL` to override the official InkCraft service URL without requiring HTTPS or validating the destination hostname. It then sends `INKCRAFT_API_KEY` in both the `Authorization` and `x-api-key` headers. The submitted JSON can contain student essay content, the original examination prompt, titles, reference text, and other potentially sensitive educational data. Consequently, a malicious or mistakenly configured base URL receives both the credential and the submitted content. Because the command does not explicitly restrict protocols or redirects, the documented request flow also lacks defense in depth against insecure schemes or unexpected redirection behavior. ### Attack Path 1. An attacker gains the ability to influence the skill configuration, inherited environment, deployment template, or another source supplying `INKCRAFT_BASE_URL`. 2. The attacker sets `INKCRAFT_BASE_URL` to an attacker-controlled HTTP or HTTPS service. 3. A user invokes the composition-correction skill with an essay. 4. The skill sends the API key in two authentication headers and includes the essay data in the request body. 5. The attacker records the credentials and submitted content. 6. If the stolen key remains valid, the attacker may use it against the legitimate InkCraft API within the permissions and quotas assigned to that key. ### Impact A ...[truncated 558 chars]- Remediation
View remediation
