← localmaskpro.com
GDPR

Data Protection Impact Assessment

How LocalMask supports GDPR compliance for AI-assisted development

1. System description

LocalMask is a local-first privacy tool that scans source code repositories for secrets (API keys, passwords, tokens, connection strings) and personally identifiable information (PII — emails, names, IP addresses), then replaces each with an opaque reversible placeholder (~[TOKEN_N]~). The masked code can be safely shared with AI coding tools (Cursor, Copilot, Claude, ChatGPT) or published to external repositories.

Architecture

ComponentLocationData flow
Scan engineUser's machine (Python process)Reads local files only
Token vault~/.localmask/vault.sqliteAES-encrypted (Fernet), per-machine key, never transmitted
MCP serverLocal stdio processCommunicates with IDE over stdin/stdout — no network port
Masked outputLocal cache + optional git pushContains only placeholders, never real values
Key fact

LocalMask has zero outbound network connections. The scan engine, vault, and MCP server are entirely local processes. No data — masked or unmasked — is ever sent to LocalMask servers, because there are no LocalMask servers. The tool is a local binary.

2. Personal data processed

Data categoryExamplesProcessing
Email addresses[email protected]Detected, replaced with ~[EMAIL_0]~
IP addresses192.168.1.100Detected, replaced with ~[IP_ADDR_0]~
Names (in code comments)// Author: John SmithDetected via language packs, replaced
CredentialsAPI keys, passwords, tokensDetected, replaced with typed placeholders
Financial data (Pro)Account numbers, amountsDetected, replaced or bucketed

All personal data remains on the user's local machine. Only the placeholder tokens (which contain no real values) may be transmitted to AI services or published to git repositories.

3. GDPR Article compliance

Article 5 — Data Minimization

LocalMask ensures that only the minimum necessary data reaches external AI services. Real PII is replaced with opaque tokens before any transmission occurs. The AI receives ~[EMAIL_0]~, not [email protected].

Article 25 — Data Protection by Design and by Default

Privacy is the default behavior, not an opt-in setting. LocalMask's architecture makes it physically impossible for real values to reach the AI — the masking happens before the data enters the MCP transport layer. There is no configuration that bypasses masking.

Article 32 — Security of Processing

Article 35 — DPIA requirement

This document constitutes the DPIA for LocalMask. Because the tool processes personal data (PII in source code) and the processing purpose is to prevent that data from reaching third parties, a DPIA is appropriate. The residual risk assessment (Section 5) concludes that the risk to data subjects is near-zero.

4. Data flows

Free and Pro editions (single user)

  1. User's source code is read from the local filesystem
  2. Scan engine identifies PII and secrets using regex patterns + optional ML model
  3. Each detection is replaced with a typed placeholder token
  4. Token-to-value mapping is stored in the local encrypted vault
  5. Masked content is served to the IDE via stdio (MCP protocol) — no network
  6. When the AI returns code with tokens, the rehydration engine restores real values locally

At no point do real values leave the user's machine.

Team edition (shared vault)

  1. Token vault is stored in a shared database (Redis) within the organization's infrastructure
  2. All values are AES-encrypted (Fernet) before transmission to Redis; lookup indices are HMAC-SHA256 hashed — Redis never sees plaintext
  3. The encryption key is provided by the organization via LOCALMASK_VAULT_KEY environment variable. All team members sharing a vault must use the same key.
  4. Organization admins can see token placeholders but NOT real values
  5. On offboarding: user can export only their own PII/secrets via localmask export --my-data

5. Risk assessment

RiskLikelihoodImpactMitigation
PII reaches AI service unmaskedNear-zeroHighMasking is applied before data enters the transport layer. No bypass mechanism exists.
Vault compromise (local)LowMediumAES-encrypted (Fernet) with a per-machine key file (0600 permissions). The key is not password-protected; security relies on OS access controls and full-disk encryption. An attacker with local file-system access to the user's home directory could decrypt the vault.
Vault compromise (Team/Redis)LowMediumAll values are AES-encrypted before storage in Redis; lookup keys are HMAC-SHA256 hashed. The encryption key must be provided via environment variable (LOCALMASK_VAULT_KEY). Deployments without an explicit key use a reduced-security default. Compromising the database without the key yields encrypted blobs, not plaintext.
Token collision reveals dataNear-zeroLowTokens are typed and sequentially numbered. No real value is embedded in the token string.
Incomplete detection (PII missed)LowMedium27+ regex patterns, entropy detection, optional ML model. User can teach custom patterns. Review step catches gaps.
Overall risk level

Low. LocalMask's architecture eliminates the primary risk (PII reaching third parties) by design. The residual risks relate to local machine compromise, which is outside the tool's threat model and mitigated by standard OS-level controls.

6. Data subject rights

RightHow LocalMask supports it
Right of access (Art. 15)User has full local access to the vault. localmask status lists all scans and detections.
Right to erasure (Art. 17)localmask cleanup deletes vault, scans, and masked cache. Irreversible.
Right to data portability (Art. 20)localmask export --my-data exports user's own token mappings (Team tier).
Right to restriction (Art. 18)User controls which files are scanned via .localmaskignore.

7. Sub-processors

None. LocalMask does not transmit data to any sub-processor, cloud service, or third party. The tool runs entirely on the user's machine. The only external communication that may occur is:

8. Conclusion

LocalMask's zero-network, local-first architecture provides data protection by design and by default as required by GDPR Article 25. Personal data processed by the tool never leaves the user's machine. The residual risk to data subjects is assessed as low.

Organizations using AI coding tools can deploy LocalMask as a technical measure under GDPR Article 32 to prevent inadvertent PII exposure to third-party AI services.

9. User responsibility

LocalMask is a detection and masking tool that assists in identifying secrets and PII in source code. While it uses 350+ detection patterns, entropy analysis, and optional AI models, no automated tool guarantees complete detection. False negatives (missed secrets) and false positives (over-detection) are possible.

The user is responsible for:

LocalMask provides the complete toolchain for this purpose: detection (scan engine with 350+ patterns + ML), masking (automatic replacement with typed placeholders), review (interactive UI to inspect every detection), audit trail (who scanned what, when, and what was found), and authorization (approval gate — nothing is published or shared until explicitly authorized). The tool is an aid to the user's own due diligence, not a replacement for it.

Last updated: August 2026 · Version 1.2 · Applies to LocalMask 0.9.x (Free, Pro, and Team editions)