PII Redact 🔒
Redact emails, phone numbers, and job titles in VS Code to protect sensitive information (PII).
Features
- Redact emails → keeps domain, masks local part (
[dfgdfg@asb.bh](mailto:dfgdfg@asb.bh) → d****[g@asb.bh](mailto:g@asb.bh))
- Redact phone numbers → keeps last 4 digits (
+1 234-567-8901 → *******8901)
- Redact job titles → replaces with
[REDACTED_JOB_TITLE] (Senior Manager → [REDACTED_JOB_TITLE] [REDACTED_JOB_TITLE])
- Works with a single click from the editor title bar button 🔒
- Optionally supports right-click context menu
Installation
- Install from VS Code Marketplace:
VS Code Marketplace Link
- Or install manually from VSIX:
Extensions: Install from VSIX...
Usage
- Open any text file in VS Code
- Click the Redact 🔒 button in the editor title bar, or right-click → Redact PII
- All emails, phone numbers, and listed job titles will be redacted in place
Example
Before:
From: Dave McMaster <dfgdfg@asb.bh>
Phone: +1 234-567-8901
Title: Senior Manager
After:
From: Dave McMaster <d****g@asb.bh>
Phone: *******8901
Title: [REDACTED_JOB_TITLE] [REDACTED_JOB_TITLE]
Supported Job Titles
- Manager, Director, Engineer, Teacher, Support, Consultant, Coordinator, Senior, Junior
You can extend this list in extension.ts for your organization.
Contributing
- Fork the repo
- Run
npm install
- Press
F5 to test in VS Code Extension Development Host
- Make changes and submit a pull request
License
MIT License
| |