Skip to main content
Coding agents often receive more than code. They see logs, stack traces, support tickets, config snippets, test fixtures, environment examples, and production context. PasteGuard sits between the coding agent and the provider, masks PII and secrets before the request leaves your environment, and restores supported placeholders in responses.

What Gets Detected

  • Secrets: API keys, private keys, database passwords, bearer tokens, JWTs, connection strings, and .env values
  • PII: Customer names, emails, phone numbers, locations, account data, test fixtures, comments, and log output
PII detection works in many languages. Full entity lists: PII Detection, Secrets Detection.

Codex CLI

Codex users signed in with ChatGPT should use PasteGuard’s Codex endpoint:
model_provider = "pasteguard-codex"

[model_providers.pasteguard-codex]
name = "PasteGuard Codex"
base_url = "http://127.0.0.1:3000/codex"
wire_api = "responses"
requires_openai_auth = true
supports_websockets = false
Run a smoke test:
codex exec --skip-git-repo-check 'Reply with exactly: ok'
Codex Responses requests are scanned, masked, unmasked, and shown in the dashboard. In route mode, sensitive Codex requests are blocked because PasteGuard does not route Codex Responses traffic to a local provider.

Claude Code

One environment variable:
ANTHROPIC_BASE_URL=http://localhost:3000/anthropic claude
To make it permanent, add to your shell profile:
export ANTHROPIC_BASE_URL=http://localhost:3000/anthropic

Cursor

  1. Open Settings -> Models
  2. Scroll to API Keys
  3. Enable Override OpenAI Base URL
  4. Enter: http://localhost:3000/openai/v1
  5. Add your OpenAI API key

Other Coding Agents

Most coding agents respect standard provider base URL settings:
# OpenAI-compatible agents
export OPENAI_API_BASE=http://localhost:3000/openai/v1

# Anthropic-compatible agents
export ANTHROPIC_BASE_URL=http://localhost:3000/anthropic

API Endpoints

TargetPasteGuard URL
OpenAI-compatible agentshttp://localhost:3000/openai/v1
Anthropic-compatible agentshttp://localhost:3000/anthropic
Codex CLIhttp://localhost:3000/codex