T09 · Insecure Skill Coding Practices
- Location
references/full_sop.md:182- Finding
Live GetNotes API Credentials Embedded in Documentation
- Content
View full analysis
Vulnerability Details
File Location:
references/full_sop.md, lines 182–183
Vulnerability Type: Hardcoded API credentials
Risk Level: HighVulnerable Code
text - API Key: [REDACTED LIVE-LOOKING gk_live CREDENTIAL] - Client ID: cli_a1b2c3d4e5f6789012345678abcdef90The API key has been redacted from this report to prevent further disclosure. The source file contains the complete value.
Technical Analysis
The documentation contains a complete live-looking GetNotes API key and client identifier. This directly contradicts the Skill's stated credential-handling design, under which credentials should only be read from
~/.openclaw/openclaw.json.Documentation is normally distributed with the Skill and may be copied into package registries, source repositories, logs, backups, or model context. Therefore, embedding credentials in a reference file exposes them to every party that can obtain the Skill package.
The
gk_liveprefix indicates that the value may be intended for a live environment. Whether it remains active cannot be established through static analysis, but it must be treated as compromised.Attack Path
- An attacker downloads or otherwise obtains the Skill package.
- The attacker opens
references/full_sop.mdand extracts the API key and client ID. - The attacker submits authenticated requests to the GetNotes API using the exposed values.
- The attacker performs any image-upload, note-creation, knowledge-base, or other operations authorized by the credential.
- Unauthorized activity is attributed to the legitimate credential owner and may continue until the credential is revoked.
Impact Assessment
An attacker can obtain the same GetNotes API privileges granted to the exposed credential. The demonstrated code uses credentials for obtaining image-upload tokens, creating notes, and adding notes to knowledge bases. Additional scope depends on server-side authorizati ...[truncated 426 chars]
- Remediation
View remediation
Remediation Suggestions
- Revoke and rotate the exposed API key and client ID immediately.
- Remove the credentials from the current file and all repository history, package releases, caches, and generated artifacts.
- Replace real values in documentation with unmistakably nonfunctional examples:
text API Key: gk_live_REDACTED Client ID: cli_REDACTED - Continue loading credentials from a protected runtime secret store or
~/.openclaw/openclaw.json, with file permissions restricted to the owning user. - Add automated secret scanning to pre-commit and CI workflows.
- Review GetNotes audit logs for unauthorized use of the exposed credential.
- Apply server-side least privilege, expiration, rotation, and rate limits to replacement credentials.
