T09 · Insecure Skill Coding Practices
- Location
SKILL.md:44- Finding
Hard-Coded OpenClaw OAuth Token in Skill Documentation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 44–48
Vulnerability Type: Hard-coded secret / exposed OAuth credential
Risk Level: HighVulnerable Code
markdown API Key 使用你的 OpenClaw OAuth Token: ```bash openclaw config set skills.entries.minimax-coding-plan-tool.apiKey "sk-cp-gr3tv5pdbN3aPQRhXbREJQrHymKxPZhdn9mdS2Ak9B2uD39bKTTJyRJhBdLRjWrd2KbkEFV8-Zd03HgRkJwCTbLq3NYtmAzZ6U2C2Dfb35o5g89RoDBLBv8"text ### Technical Analysis The documentation contains a complete credential-shaped OpenClaw OAuth token instead of a redacted example or environment-variable placeholder. Anyone able to access the distributed skill package or its repository history can extract and attempt to reuse this credential. The implementation reads the configured value from `MINIMAX_API_KEY` and sends it to the fixed MiniMax API host as an HTTP Bearer credential: ```javascript const API_KEY = process.env.MINIMAX_API_KEY; const API_HOST = 'api.minimaxi.com'; // ... headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${API_KEY}` }Consequently, a user who follows the documented configuration command installs the exposed shared credential into their OpenClaw configuration. The problem is the disclosure and distribution of the token, not the normal use of Bearer authentication over HTTPS.
Attack Path
- An attacker downloads the skill package or reads
SKILL.md. - The attacker extracts the embedded
sk-cp-...OAuth token. - The attacker configures the token as
MINIMAX_API_KEYor submits it directly as a Bearer credential to supported MiniMax API endpoints. - If the credential remains active, the attacker invokes API operations under its associated account and authorization scope.
- The attacker may consume available quota, generate attributable API activity, or access any other capabilities granted to that token.
No additional prerequisite beyond access to the published file is required.
Impact Assessment
Succ ...[truncated 931 chars]
- An attacker downloads the skill package or reads
- Remediation
View remediation
Remediation Suggestions
- Revoke the exposed token immediately through the relevant OpenClaw or MiniMax credential-management interface.
- Issue a replacement credential only if it is still required, and do not commit or publish it.
- Replace the documented secret with a nonfunctional placeholder, for example:
bash openclaw config set skills.entries.minimax-coding-plan-tool.apiKey "$MINIMAX_API_KEY"or:
bash openclaw config set skills.entries.minimax-coding-plan-tool.apiKey "sk-cp-..."- Require each user to supply an independently issued credential through protected environment variables or an approved secret store.
- Remove the token from all repository branches, tags, release artifacts, caches, and documentation history. Rotation remains mandatory because deleting the current copy does not invalidate previously downloaded copies.
- Add automated secret scanning to commits and release pipelines, including detection rules for the
sk-cp-token prefix. - Apply least-privilege scopes, quota limits, expiration, and usage monitoring to replacement credentials.
- Review API logs for unauthorized activity associated with the exposed token and respond to any identified misuse.
