T09 · Insecure Skill Coding Practices
- Location
scripts/codex_usage_report.py:167- Finding
Raw usage API response is disclosed in JSON output without explicit opt-in
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a legitimate Codex OAuth debugging purpose, but its default diagnostics can expose unredacted account, session, and usage details without clear opt-in.
Use this skill only when you are comfortable letting the agent inspect local OpenClaw OAuth profile and session files. Run diagnostics locally, prefer selecting specific profiles, review or redact output before sharing it, and treat JSON output from the usage script as potentially containing raw account metadata.
scripts/codex_usage_report.py:167Raw usage API response is disclosed in JSON output without explicit opt-in
scripts/summarize_codex_profiles.py:122Default diagnostic report exposes unredacted profile and session-routing identifiers
The skill instructs the agent to read local files and run local scripts, but it does not declare any explicit tool scope such as allowed tools or permissions. This creates a capability/scope mismatch: a host may grant broader file or network access than an operator expects, increasing the risk of unintended data exposure or over-privileged execution during troubleshooting.
The guidance explicitly recommends displaying user_id, account_id, and email during debugging, which are sensitive identifiers that can expose personal or account-linkage data in logs, screenshots, chat transcripts, or support channels. In this skill context, debugging multi-profile OAuth and usage mismatches increases the chance that these identifiers are surfaced across multiple accounts or workspaces, making accidental disclosure more likely.
This code loads auth profile data from local state files, extracts access tokens, and uses them in an HTTP request to the ChatGPT usage endpoint. While the script purpose is to fetch usage, there is no user-facing warning in comments or CLI help that it accesses sensitive credential material and transmits it over the network.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
payload = access.split('.')[1]
payload += '=' * (-len(payload) % 4)
decoded = json.loads(base64.urlsafe_b64decode(payload.encode()).decode())
return ((decoded.get('https://api.openai.com/profile') or {}).get('email'))
except Exception:
return None
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
payload = access.split('.')[1]
payload += '=' * (-len(payload) % 4)
decoded = json.loads(base64.urlsafe_b64decode(payload.encode()).decode())
return ((decoded.get('https://api.openai.com/profile') or {}).get('email'))
except Exception:
return None
The script prints profile emails, session targets, and profile identifiers directly to stdout in both human-readable and JSON modes. Because this skill is specifically for inspecting OAuth profile state and debugging account/workspace selection, the output is likely to contain sensitive identity and routing metadata that can be exposed through terminal logs, screenshots, shell history capture, CI logs, or pasted diagnostics.
The script prints stored and API-returned email addresses, user IDs, and account IDs to stdout. The current help text does not warn users that personally identifying account data will be displayed, which can matter in shared terminals or logs.
No suspicious patterns detected.