T09 · Insecure Skill Coding Practices
Warning
- Location
- references/token-setup-guide.md:30
- Finding
- Sensitive Meta credentials are transmitted in query strings and stored in plaintext configuration<![CDATA[ ## Vulnerability Details **File Location**: `references/token-setup-guide.md:30-38`, with related plaintext storage instructions at `references/token-setup-guide.md:40-65` **Vulnerability Type**: Credential exposure through URL query parameters and persistent plaintext storage **Risk Level**: Medium ### Vulnerable Code Snippet ```text GET https://graph.facebook.com/v21.0/oauth/access_token?grant_type=fb_exchange_token&client_id={APP_ID}&client_secret={APP_SECRET}&fb_exchange_token={SHORT_LIVED_TOKEN} ``` ```text GET https://graph.facebook.com/v21.0/me/accounts?access_token={LONG_LIVED_USER_TOKEN} ``` The guide also directs users to persist credentials in shell configuration: ```bash export LONG_META_page_TOKEN="EAAxxxxxxx..." export META_PAGE_ID="123456789012345" export META_APP_SECRET="abcdef1234567890" ``` Alternatively, it recommends storing the same credentials in an OpenClaw JSON configuration: ```json { "skills": { "entries": { "fb-page-poster": { "enabled": true, "env": { "LONG_META_page_TOKEN": "EAAxxxxxxx...", "META_PAGE_ID": "123456789012345", "META_APP_SECRET": "abcdef1234567890" } } } } } ``` ### Technical Analysis The setup guide embeds an application secret and access tokens in URL query parameters. Query strings may be retained by browser history, command history, diagnostic tooling, HTTP client logs, reverse proxies, endpoint monitoring products, screenshots, or copied URLs. Although the documented destination is Meta's legitimate HTTPS Graph API, placing secrets in URLs unnecessarily increases the number of locations in which those secrets may persist. The guide also recommends long-term plaintext storage in a shell profile or `~/.openclaw/openclaw.json` without specifying restrictive file permissions or integration with a secret-management facility. A Page access token grants API access to the associated Facebook Page, while the application secret ...[truncated 1921 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace token-exchange examples that place secrets in URLs with POST requests that carry sensitive parameters in the request body. 2. Avoid workflows that require users to paste credential-bearing URLs into a browser address bar. 3. Use a secret manager, protected credential store, or OpenClaw-supported secure secret facility instead of ordinary plaintext configuration where available. 4. If file-based storage is unavoidable, require owner-only permissions, such as mode `0600`, and verify that parent directories are not accessible to other users. 5. Do not place secrets directly in shared shell profiles, version-controlled files, examples copied into repositories, or diagnostic output. 6. Add explicit guidance to exclude credential files from source control, backups with broad readership, support bundles, and logs. 7. Document immediate token invalidation and rotation procedures for suspected exposure. 8. Keep Page tokens and application secrets separated where practical so compromise of one storage location does not automatically disclose both. ]]>
