T09 · Insecure Skill Coding Practices
- Location
references/api-doc.md:321- Finding
Hardcoded Alchemy RPC API Key in Documentation
- Content
View full analysis
Vulnerability Details
File Location:
references/api-doc.md:321
Vulnerability Type: Hardcoded credential-like RPC API key
Risk Level: MediumVulnerable Code Snippet:
json "rpc_url": "https://solana-devnet.g.alchemy.com/v2/_ztkT79iUO-dFpkTNDBFB",Technical Analysis
The documentation embeds an Alchemy project key directly in a complete RPC endpoint. Although it appears inside an example API response, it is not identified as fictitious or redacted. Users and agents may therefore copy and use it as a functional endpoint.
If the key is active, anyone with access to the Skill package can extract and reuse it without authorization. API keys and credential-bearing RPC URLs should not be committed to distributable Skill files, including documentation and examples.
The reviewed runtime script sends public wallet addresses, chain names, and optional token symbols to the documented Cleanverse HTTPS APIs. That transmission is necessary for the declared A-Pass and deposit-address functionality and does not expose private keys, seed phrases, local files, or environment credentials.
Attack Path
- An attacker obtains the publicly distributed Skill package.
- The attacker reads
references/api-doc.mdand extracts the key from the Alchemy RPC URL. - The attacker submits arbitrary supported RPC requests using the exposed project endpoint.
- Those requests consume the associated project's quota and may trigger throttling, service disruption, or usage-based charges.
- If the project grants capabilities beyond ordinary public RPC access, the attacker could exercise those capabilities within the key's configured scope.
Impact Assessment
Exploitation does not provide local system privileges or access to wallet private keys. Its scope is limited to the Alchemy project associated with the exposed key and whatever API permissions, quotas, and billing configuration that project has.
Potential con ...[truncated 275 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace the embedded endpoint with an unmistakable placeholder:
json "rpc_url": "https://solana-devnet.g.alchemy.com/v2/<REDACTED>", -
Revoke or rotate the exposed Alchemy key if it is active.
-
Search repository history, generated artifacts, release packages, and external mirrors for the same key and remove or invalidate all copies.
-
Configure provider-side restrictions, including allowed origins, IP ranges, networks, methods, quotas, and billing alerts where supported.
-
Add secret scanning to CI and pre-commit checks, including detection of credential-bearing RPC URLs in Markdown and example files.
-
Ensure generated API examples redact URL path tokens and clearly label all credentials and endpoint identifiers as placeholders.
-
Store real provider credentials in an approved secret manager or protected runtime configuration rather than source-controlled documentation.
-
