T09 · Insecure Skill Coding Practices
- Location
SKILL.md:191- Finding
Hard-Coded IMA API Credentials Exposed in a Distributable Skill
- Content
View full analysis
', content: '## New section\n\nContent...' }, { clientId: '66f4b780fc9d552fb2d6bb1a785fda3f', apiKey: '[REDACTED EXPOSED API KEY]' }); ``` The API key is redacted in this report to avoid further disclosure. The unredacted value is present in the audited file at lines 192, 206, and 221. ### Technical Analysis A reusable IMA API credential is stored directly in a Markdown file intended to be included in a publicly distributable Skill package. It is also embedded in copy-and-paste executable JavaScript examples. Anyone who obtains the package can extract the credential without requiring local system access. This violates secret-management and least-exposure principles and directly contradicts the document's own guidance that publishing packages must not contain real API keys. Removing the secret only from a later revision is insufficient because previous package versions, caches, mirrors, logs, and local clones may retain it. The credential must therefore be treated as compromised. Its current validity was not tested during this audit. ### Attack Path 1. An attacker downloads or otherwise obtains the published Skill package. 2. The attacker opens `SKILL.md` and extracts the plaintext client identifier and API key. 3. The attacker reproduces the documented `imaApi` requests or constructs equivale ...[truncated 1066 chars]- Remediation
View remediation
', apiKey: '' } ``` 7. Add automated secret scanning to local pre-commit checks and the publishing pipeline. 8. Configure the replacement credential with the minimum required API permissions, a limited lifetime where supported, and rotation procedures. ]]>
