Download Latest Version v0.3.0 source code.tar.gz (10.1 MB)
Email in envelope

Get an email when there's a new version of PasteGuard

Home / v0.2.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-01-20 2.2 kB
v0.2.0 source code.tar.gz 2026-01-20 10.1 MB
v0.2.0 source code.zip 2026-01-20 10.2 MB
Totals: 3 Items   20.3 MB 0

Anthropic API support is here! PasteGuard now works with Claude, Claude Code, and the full Anthropic ecosystem.

Highlights

🤖 Anthropic Support — Native /anthropic/v1/messages endpoint with full PII and secrets detection

🔧 Claude Code Integration — One environment variable: ANTHROPIC_BASE_URL=http://localhost:3000/anthropic claude

🎯 Role-Based Filtering — New scan_roles config to scan only user messages, reducing false positives on system prompts

✅ Whitelist — Exclude known text patterns (company names, product IDs) from PII masking

New Features

Anthropic API Support

Full support for the Anthropic Messages API:

:::bash
curl http://localhost:3000/anthropic/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'
  • Transparent header forwarding (x-api-key, Authorization, anthropic-beta)
  • Streaming support with real-time unmasking
  • Scans system prompts, messages, thinking blocks, and tool results
  • Works with mask mode and route mode

Role-Based Filtering

Scan only user-controlled content to reduce Presidio API calls and avoid false positives:

:::yaml
pii_detection:
  scan_roles:
    - user
    - tool
    - function

secrets_detection:
  scan_roles:
    - user
    - tool

Whitelist

Prevent false positives on known text patterns:

:::yaml
masking:
  whitelist:
    - "Acme Corp"
    - "Product XYZ"

Quick Start

:::bash
docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:en
Provider PasteGuard URL
OpenAI http://localhost:3000/openai/v1
Anthropic http://localhost:3000/anthropic

Dashboard: http://localhost:3000/dashboard

Breaking Changes

None. Fully backward compatible with v0.1.0.

Documentation

📚 Full documentation: https://pasteguard.com/docs

Full Changelog: https://github.com/sgasser/pasteguard/compare/v0.1.0...v0.2.0

Source: README.md, updated 2026-01-20