Skip to main content

claude-code-proxy-patterns

Facilitates multi-provider model routing for Claude Code using OAuth proxy patterns, enhancing integration and resilience.

Install this skill

or
0/100

Security score

The claude-code-proxy-patterns skill was audited on May 12, 2026 and we found 28 security issues across 5 threat categories, including 9 high-severity. Review the findings below before installing.

Categories Tested

Security Issues

medium line 80

Python subprocess execution

SourceSKILL.md
80result = subprocess.run(
medium line 210

Curl to non-GitHub URL

SourceSKILL.md
210curl -s http://127.0.0.1:8082/health | jq .
low line 160

Access to hidden dotfiles in home directory

SourceSKILL.md
1603. ~/.claude/.credentials.json -> Authorization: Bearer (plaintext fallback)
low line 198

Access to hidden dotfiles in home directory

SourceSKILL.md
198~/.claude/bin/proxy-toggle enable # Adds env vars, creates flag file, checks health
low line 199

Access to hidden dotfiles in home directory

SourceSKILL.md
199~/.claude/bin/proxy-toggle disable # Removes env vars, removes flag file
low line 200

Access to hidden dotfiles in home directory

SourceSKILL.md
200~/.claude/bin/proxy-toggle status # Shows routing flag, proxy process, .zshenv state
medium line 257

Access to hidden dotfiles in home directory

SourceSKILL.md
257| CCP-05 | MEDIUM | Reading `~/.claude/.credentials.json` as primary | Keychain is SSoT; credential file is stale fallback |
medium line 281

Access to hidden dotfiles in home directory

SourceSKILL.md
281| `~/.claude/tools/claude-code-proxy-go/main.go` | Go proxy source |
medium line 282

Access to hidden dotfiles in home directory

SourceSKILL.md
282| `~/.claude/tools/claude-code-proxy-go/oauth_refresh.go` | OAuth auto-refresh (80 lines) |
medium line 283

Access to hidden dotfiles in home directory

SourceSKILL.md
283| `~/.claude/tools/claude-code-proxy-go/.env` | Provider config (chmod 600) |
medium line 285

Access to hidden dotfiles in home directory

SourceSKILL.md
285| `~/.zshenv` | Environment (ANTHROPIC_BASE_URL) |
medium line 283

Access to .env file

SourceSKILL.md
283| `~/.claude/tools/claude-code-proxy-go/.env` | Provider config (chmod 600) |
high line 70

Access to system keychain/keyring

SourceSKILL.md
70### WP-01: Keychain OAuth Token Reading
high line 72

Access to system keychain/keyring

SourceSKILL.md
72Read OAuth tokens from macOS Keychain where Claude Code stores them.
high line 95

Access to system keychain/keyring

SourceSKILL.md
95The Keychain stores a JSON envelope with the `claudeAiOauth` key.
high line 139

Access to system keychain/keyring

SourceSKILL.md
139Avoid repeated Keychain subprocess calls by caching the token for 5 minutes.
medium line 144

Access to system keychain/keyring

SourceSKILL.md
144_OAUTH_CACHE_TTL = 300 # Re-read from Keychain every 5 minutes
medium line 159

Access to system keychain/keyring

SourceSKILL.md
1592. Keychain OAuth token -> Authorization: Bearer + anthropic-beta
high line 241

Access to system keychain/keyring

SourceSKILL.md
241Background goroutine refreshes OAuth tokens every 30 minutes, 5 minutes before expiry. Falls back to Keychain if API refresh fails.
high line 256

Access to system keychain/keyring

SourceSKILL.md
256| CCP-04 | HIGH | Lowercase keychain service `"claude-code-credentials"` | Actual name has space: `"Claude Code-credentials"` |
high line 257

Access to system keychain/keyring

SourceSKILL.md
257| CCP-05 | MEDIUM | Reading `~/.claude/.credentials.json` as primary | Keychain is SSoT; credential file is stale fallback |
high line 310

Access to system keychain/keyring

SourceSKILL.md
310| Keychain read returns empty | Wrong service name (CCP-04) | Use `"Claude Code-credentials"` (with space) |
high line 316

Access to system keychain/keyring

SourceSKILL.md
316| Token expired after 5 min | Cache TTL (WP-05) | Normal behavior; proxy re-reads from Keychain |
low line 40

External URL reference

SourceSKILL.md
40| ANTHROPIC_BASE_URL=http://127.0.0.1:8082 (Go proxy)
low line 131

External URL reference

SourceSKILL.md
131export ANTHROPIC_BASE_URL="http://127.0.0.1:8082"
low line 177

External URL reference

SourceSKILL.md
177| MiniMax highspeed | `https://api.minimax.io/anthropic` | Returns `base_resp` field, extra `thinking` block |
low line 210

External URL reference

SourceSKILL.md
210curl -s http://127.0.0.1:8082/health | jq .
low line 229

External URL reference

SourceSKILL.md
229**Location**: `/usr/local/bin/claude-proxy` | **Environment**: `ANTHROPIC_BASE_URL=http://127.0.0.1:8082` in `.zshenv`
Scanned on May 12, 2026
View Security Dashboard
Installation guide →