T09 · Insecure Skill Coding Practices
- Location
SKILL.md:221- Finding
Plaintext API Credential Embedded in Published Documentation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 221-222, 238-239, and 250-251
Vulnerability Type: Hardcoded secret and plaintext sensitive configuration
Risk Level: HighVulnerable Code
javascript imaApi('openapi/note/v1/import_doc', { content_format: 1, title: 'SkillHub Upload Guide', content: body }, { clientId: '66f4b780fc9d552fb2d6bb1a785fda3f', apiKey: '[REDACTED: PLAINTEXT API KEY PRESENT IN SOURCE]' }).then(r => { console.log(r); });The same Client ID and API key are also repeated in the
append_docexample at lines 250-251.Technical Analysis
SKILL.mdcontains a fixed Client ID and a long API credential directly in the published document and executable examples. Anyone who can download or inspect the skill can recover the original credential without authentication.This directly contradicts the document's own requirement that publication packages must not contain real API keys. Replacing the file in a later release does not remove the credential from previously downloaded packages, caches, mirrors, or repository history.
The credential's present validity cannot be verified from the audited files. Nevertheless, publishing credential material in plaintext is an insecure coding and secret-management practice. If it remains active, it may permit unauthorized requests to the associated IMA API.
Attack Path
- An attacker downloads or views the published skill.
- The attacker opens
SKILL.mdand extracts the Client ID and API key from lines 221-222 or an executable example. - The attacker identifies the API operations disclosed by the document, including
openapi/note/v1/import_docandopenapi/note/v1/append_doc. - The attacker submits requests using the exposed credentials.
- If the credentials remain valid and authorized, the API processes requests under the credential owner's identity.
Impact Assessment
The obtainable privilege ...[truncated 423 chars]
- Remediation
View remediation
Remediation Suggestions
- Revoke the exposed API key immediately and issue a replacement with the minimum required permissions.
- Remove the Client ID and API key from the current package, repository history, release archives, mirrors, and cached documentation where possible.
- Read credentials from environment variables or an approved secret manager:
javascript const clientId = process.env.IMA_CLIENT_ID; const apiKey = process.env.IMA_API_KEY; if (!clientId || !apiKey) { throw new Error('IMA credentials must be configured by the user'); } - Use unmistakably nonfunctional placeholders in documentation, such as
YOUR_IMA_CLIENT_IDandYOUR_IMA_API_KEY. - Add automated secret scanning to the publication process and block releases when credential patterns are detected.
- Review API logs for use of the exposed credential and investigate requests originating from unexpected clients or locations.
