Zero-Trust Data Sanitization

Automated Directory Auditing: Codebase Secrets & PII Pre-Flight Scanner

Audit Your Entire Codebase Offline

100% Local RAM Airplane Mode 0 Bytes Egress
Free to start · $0 Free / $99/mo Teams
Directory Bulk Audit

AI Summary / Key Takeaways

Verified Zero-Trust Logic

"Audit local codebases in under 4 seconds with zero telemetry. Conforms to ZTDS™ Invariant 1 to prevent API key and secret leakage to autonomous AI agents."

Initialize MCP Server: Connect the PrivacyScrubber MCP Server to your IDE. It runs completely offline.
Trigger the Audit: Instruct your AI agent to run the 'audit_directory_for_pii' tool against your current working directory.
Review the Report: The tool generates a comprehensive list of flagged files, exact line numbers, and entity types (e.g., AWS Key, Email). You can then instruct the AI to call 'sanitize_file' on the flagged items.
Sanitization ArchitectureExecution LatencyRaw Network EgressStatutory Posture (GDPR / Am. 13)Context & Reversibility
1. PrivacyScrubber (ZTDS™ RAM)< 0.8 ms (Local RAM)0.00 B (Zero-Egress)Technical Safe Harbor (Art. 32 / Sec. 17)Bijective [TYPE_N]
2. Cloud DLP Proxy Gateways250 – 600 ms (WAN Hop)100% Cleartext to 3rd PartyMandatory Art. 28 Subprocessor DPADestructive [REDACTED]
3. Containerized NLP (Docker / Python)35 – 90 ms (RPC Hop)Internal VPC Socket Egress500MB+ Container & DevOps MaintenanceOne-Way Masking

Enterprise-Grade AI Privacy

Add custom redaction rules and priority support with PRO.

GO PRO
Live Turnkey Simulator · ZTDS Engine

Interactive PII Detection & Sanitization Sandbox

Test real-time client-side RAM tokenization. Choose a specialized preset or paste your own raw prompt to test instant reversible redaction.

Protected in Automated Directory Auditing: API Access KeysSECRETEmail AddressesCustomer
0 Bytes Server Egress
<1.8ms Latency
Select Industry Test Payload:
Raw Input Payload
0 chars
RAM-Only Isolated Session
1-Click Safe AI Launch:
Automated Detection Classes:
API Access Keys / TokensSECRETEmail AddressesCustomer / Employee Names
Enterprise Challenge

The Challenge with AI Data Workflows

Developers routinely hardcode API keys or production database credentials during testing and accidentally commit them to GitHub. Existing secret scanners often send code telemetry back to cloud vendors, violating air-gapped security policies.

Zero-Egress Data Protection
Eliminates corporate data leaks before prompts hit external AI models.
Zero-Trust Resolution

How It Works

1

Initialize MCP Server

Connect the PrivacyScrubber MCP Server to your IDE. It runs completely offline.

2

Trigger the Audit

Instruct your AI agent to run the 'audit_directory_for_pii' tool against your current working directory.

3

Review the Report

The tool generates a comprehensive list of flagged files, exact line numbers, and entity types (e.g., AWS Key, Email). You can then instruct the AI to call 'sanitize_file' on the flagged items.

Supported Formats & Limitations

Supported Formats

Source Code (JS, Python, Go, etc.)JSONYAMLENV

System Limitations

  • Excludes binary files (images, compiled objects) by default
  • Scans are bounded by OS file-read constraints and local memory limits
  • Heuristics optimized for code, so prose-heavy documentation may yield false positives for specific variables
ZTDS™ Standard ConformanceInvariant 1: Pre-Flight Agentic Egress Prevention & Audit Proofs

Before autonomous coding agents (Claude Code, Cursor, Windsurf) or vector RAG pipelines ingest enterprise repositories, PrivacyScrubber's MCP server conducts local pre-flight directory auditing in compliance with Zero-Trust Data Sanitization (ZTDS™). Hardcoded secrets, staging credentials, and customer PII are flagged and neutralized locally before external network egress can occur.

Prevent Irreversible Vector Poisoning: Audit Repositories for Secrets in Under 4 Seconds

When engineering organizations deploy autonomous coding agents (Claude Code, Cursor Composer, Windsurf) or feed internal codebases into enterprise Retrieval-Augmented Generation (RAG) vector databases, they confront an irreversible privacy vulnerability. Repositories frequently contain forgotten test fixtures, historical SQL seed scripts with real customer PII, uncommitted .env staging files, and hardcoded API keys.

Once an autonomous agent or RAG vectorizer (Pinecone, Chroma, pgvector) indexes these files, personal data becomes embedded into high-dimensional vector weights. Under GDPR Article 17 (Right to be Forgotten), extracting an individual's data from dense vector indexes is mathematically impossible without wiping and re-indexing the entire database at massive expense. The PrivacyScrubber Automated Directory Audit acts as an instant pre-flight firewall, scanning 10,000+ source files locally in under 4 seconds to sanitize code and data before ingestion occurs.

Enterprise Velocity: Scan 10,000+ Files Locally in <4 Seconds with 0 Network Egress

Engineered for zero-overhead local execution, the directory audit tool processes enterprise monorepos in seconds using non-blocking asynchronous file system streams:

Asynchronous I/O Streams

Reads files via Node.js fs.promises pipelines with chunked buffers, scanning 10,000+ files in under 4 seconds without disk locks or memory spikes.

Intelligent Boundary Isolation

Automatically excludes .git/, node_modules/, dist/, build/, binary executables, and images to focus exclusively on sensitive source code.

ReDoS-Hardened Regex

All 30 specialized regulatory profiles and secret heuristics are evaluated against linear-time state machines, eliminating catastrophic backtracking on 50MB minified bundles.

Immediate Actionable Reports: Pinpoint Violations with Exact Line Numbers & Compliance Citations

Whether invoked directly via the CLI or triggered autonomously by an AI agent through the audit_directory_for_pii MCP tool, PrivacyScrubber generates an actionable structured report pinpointing exact file paths, line numbers, and compliance framework violations:

$ npx @privacyscrubber/mcp-server audit ./services --profile=DevOps --verbose

[PRIVACYSCRUBBER] Initializing Zero-Trust Directory Audit Engine...
[STATUS] Target: /workspace/services (Recursive) | Active Profile: DevOps & Cloud Secrets
[STATUS] Scanning 1,482 source files across 84 subdirectories...

========================================================================================
AUDIT FINDINGS SUMMARY: 4 SENSITIVE VIOLATIONS DETECTED ACROSS 2 FILES
========================================================================================

[!] FILE: services/auth/src/config/database.ts:18
    FOUND:    postgresql://dbadmin:Sup3rS3cr3tP4ss!@prod-cluster.internal:5432/app_prod
    ENTITY:   [DB_URI_1] (Database Connection String with Credentials)
    SEVERITY: CRITICAL | COMPLIANCE: SOC 2 Type II CC6.6, ISO 27001 A.8.24

[!] FILE: services/billing/fixtures/stripe_mock.json:42
    FOUND:    sk_live_51OzSecretKeyProductionLiveStripeKey991
    ENTITY:   [TOKEN_1] (Stripe Live Secret Key)
    SEVERITY: CRITICAL | COMPLIANCE: PCI DSS v4.0 Requirement 3.4

[!] FILE: services/billing/fixtures/stripe_mock.json:88
    FOUND:    Marcus Sterling <m.sterling@fintechventures.co.uk>
    ENTITY:   [NAME_1], [EMAIL_1] (Real Customer PII in Mock Data)
    SEVERITY: HIGH | COMPLIANCE: GDPR Article 4(1), CCPA § 1798.140

----------------------------------------------------------------------------------------
EXECUTION BENCHMARK: 1,482 files audited in 1.14s | Network Egress: 0 Bytes (Air-Gapped)
REMEDIATION ACTION:   Agent can invoke `sanitize_file` to tokenize flagged files in RAM
========================================================================================

Automated Prevention: Block Unmasked Secrets at Git Pre-Commit in 1 Step

Prevent accidental commits of credentials and customer test dumps by embedding PrivacyScrubber's zero-dependency scanner directly into your Git lifecycle. Add this snippet to .husky/pre-commit or .git/hooks/pre-push:

.husky/pre-commit Zero-Dependency Shell Script
#!/bin/sh
# PrivacyScrubber Pre-Commit Guard: Verify no unmasked credentials in staged files
echo "[PrivacyScrubber] Auditing staged files for PII and cloud secrets..."

# Run local audit against staged git changes
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|js|py|json|env|sql)$')

if [ -n "$STAGED_FILES" ]; then
  npx -y @privacyscrubber/mcp-server audit $STAGED_FILES --fail-on-secrets
  if [ $? -ne 0 ]; then
    echo "[BLOCK] PrivacyScrubber detected raw secrets in staged files!"
    echo "Run 'npx @privacyscrubber/mcp-server sanitize [file]' or use .env variables."
    exit 1
  fi
fi

exit 0

Security & Compliance Comparison: Air-Gapped Directory Audit vs. Cloud SaaS Scanners

How PrivacyScrubber's AI-native, client-side directory audit compares against legacy cloud-based secret scanners:

Scanning CapabilityCloud Scanners (GitGuardian SaaS)Static CLI Tools (TruffleHog)PrivacyScrubber Directory Audit
Execution PrivacyUploads code snippets to vendor cloudLocal CLI execution100% Air-gapped (0 network calls)
Customer PII DetectionZero (Secrets/API keys only)Zero (High-entropy strings only)30 Profiles (Names, SSN, PHI, IBAN)
Autonomous AI IntegrationWebhook alerts (No agent loop)CLI shell only (Manual review)Native MCP tool (Cursor, Claude Code)
Autonomous RemediationNone (Requires manual Git edit)None (Alert only)1-Click sanitize_file token swap
Vector Ingestion DefenseNot designed for RAG pipelinesNot designed for RAG pipelinesPrevents irreversible vector poisoning

Closed-Loop Remediation: Find, Sanitize, and Unblock Autonomous AI Agents in 4 Steps

When integrated with autonomous agent workflows like Cursor Composer or Claude Desktop, the directory audit creates a closed-loop security workflow:

  1. Pre-Flight Audit: The AI agent triggers audit_directory_for_pii before analyzing the repository to fulfill a complex refactoring task.
  2. Report Parsing: The agent receives structured JSON metadata with exact line numbers and entity types without leaking plaintext values to the conversation history.
  3. Automated Redaction: The agent invokes sanitize_file on flagged test fixtures or replaces hardcoded database URIs with process.env references.
  4. Clean Ingestion: The agent proceeds with code generation and testing against a completely sanitized, compliant context window.

Learn more about integrating local sanitization into your editor with the IDE Prompt Security Gateway (MCP) guide, or inspect our enterprise Developer SDK for programmatic backend integration.

Client-Side ZTDS™ Execution & Conformance Verification

All PII detection and deterministic tokenization execute 100% inside local client memory — eliminating cloud proxies, external subprocessors, and network data egress.

ZTDS™ Verified
ZTDS-CERT-2026-PRIVACYSCRUBBER-WEB-D02DC6
ZTDS™ RFC v1.0 Verified Capability·ZTDS-CERT-2026-PRIVACYSCRUBBER-WEB-D02DC6
Verify Cryptographic Seal

Frequently Asked Questions

Technical Details & Privacy Architecture

How fast is the directory audit?
The audit tool is heavily optimized using asynchronous I/O and worker threads in Node.js. It can scan a 10,000-file repository in under 4 seconds.
Does it upload my code anywhere?
No. The MCP server runs as a local process on your machine. The audit tool reads files locally and returns the report directly to the IDE's agent context. Zero data is transmitted to our servers.
Which IDEs and agentic tools support the directory audit MCP tool?
Any MCP-compliant client, including Cursor, Claude Desktop, Windsurf, Roo Code, Continue.dev, and custom LangChain/LlamaIndex pipelines.
Does the directory audit respect .gitignore and .env conventions?
Yes. The scanner automatically respects standard ignore rules and can be configured to selectively audit or exclude .env, .env.production, or test/fixtures directories.
Can the MCP server automatically fix flagged secrets and PII?
Yes. Agents can call the companion sanitize_file or scrub_text tool to replace hardcoded production keys with environment variables or deterministic tokens.
What file types are supported during directory auditing?
All text-based source files including JavaScript, TypeScript, Python, Go, Rust, Java, C/C++, JSON, YAML, TOML, Markdown, and configuration files.
100% Zero-Trust Deployment

Audit Monorepos & Secrets Before AI Ingestion

No server uploads. No account required. 100% offline in your browser's local RAM.