Credential Access
- Category
- Privilege Escalation
- Confidence
- 97% confidence
- Finding
The skill explicitly instructs reading an OAuth token from
~/.claude/.credentials.json, which is direct access to sensitive credentials. Even if intended only for legitimate usage reporting, reading credential material from disk is dangerous because a compromised or over-broad skill could exfiltrate or misuse the token for unauthorized API access.- Content
md ## How It Works - **Anthropic quota:** `GET https://api.anthropic.com/api/oauth/usage` using Claude Code's OAuth token from `~/.claude/.credentials.json` (requires `user:profile` scope) - **Token auto-refresh:** If the token is expired, the script automatically refreshes it by invoking `claude --print -p "ok"` (Claude Code refreshes its own OAuth token on any invocation), then re-reads the updated credentials file. If Claude Code isn't installed, Anthropic quota is skipped gracefully. - **Session stats:** Parses `~/.openclaw/agents/main/sessions/*.jsonl` for per-provider/model token and cost data
