Secret Redaction Engine
DevDiff automatically scans and redacts API keys, credentials, and private keys from the diff text before sending it to local or cloud-hosted AI providers.
🔒 Redaction Capabilities (V2 Engine)
The RedactionEngineV2 automatically scans staged changes and replaces matches with safe descriptors:
API Keys & Tokens:
- OpenAI Keys (
sk-proj-...) ->[REDACTED:OpenAI-API-Key] - Anthropic Keys (
sk-ant-...) ->[REDACTED:Anthropic-API-Key] - GitHub Personal Access Tokens (
ghp_...) ->[REDACTED:GitHub-Token] - AWS Access Key IDs (
AKIA...) ->[REDACTED:AWS-Access-Key]
- OpenAI Keys (
JWT Tokens:
- Filters signed JSON Web Tokens (matching header structure
eyJhbGciOi...) ->[REDACTED:JWT-Token]
- Filters signed JSON Web Tokens (matching header structure
Database Connections:
- Detects URI connection formats (
postgres://,mongodb://, etc.) ->[REDACTED:Postgres-Connection]
- Detects URI connection formats (
Cryptographic Material:
- Blocks and masks private key blocks (such as PEM boundaries
-----BEGIN RSA PRIVATE KEY-----) ->[REDACTED:RSA-Private-Key]
- Blocks and masks private key blocks (such as PEM boundaries
Hardcoded Passwords:
- Recognizes assignments matching patterns like
password = "..."or"pass": "..."->[REDACTED:Password]
- Recognizes assignments matching patterns like