Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>SafeKeyLabNew to Visual Studio Code? Get it now.
SafeKeyLab

SafeKeyLab

SafeKey Lab

|
1 install
| (0) | Free
PII detection, prompt security, and data protection for your code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SafeKeyLab for VS Code

Protect your code from accidental PII exposure and prompt injection attacks with SafeKeyLab's VS Code extension.

Features

PII Detection

Real-time scanning of your code and text files for personally identifiable information (PII):

  • Email addresses - Detects email patterns in your code
  • Phone numbers - US and international formats
  • Social Security Numbers - SSN patterns with high accuracy
  • Credit card numbers - Major card formats (Visa, Mastercard, Amex, Discover)
  • API keys and secrets - Common API key patterns and secret tokens
  • AWS Access Keys - AWS credential detection
  • Private keys - RSA, EC, and other private key formats
  • JWT tokens - JSON Web Token detection
  • IP addresses - IPv4 address detection
  • Dates of birth - DOB patterns in various formats
  • Passport and driver's license numbers - Common ID document patterns

Prompt Security

Analyze text for prompt injection risks before sending to LLMs:

  • Instruction override attempts - Detects "ignore previous instructions" patterns
  • Role hijacking - "You are now..." and similar patterns
  • System prompt extraction - Attempts to leak system prompts
  • Known jailbreaks - DAN, STAN, and other common jailbreak patterns
  • Delimiter injection - Special tokens that manipulate conversation structure
  • Base64 obfuscation - Encoded payloads that may hide malicious content
  • Context manipulation - Attempts to reset or manipulate conversation context
  • Unicode tricks - Hidden characters that may conceal content

Status Bar Integration

Always-visible protection status in your VS Code status bar:

  • Shows current protection status
  • Displays count of detected issues
  • Quick access to scan commands

Commands

Access these commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

Command Description
SafeKeyLab: Scan File for PII Manually scan the current file for PII
SafeKeyLab: Check Prompt Security Analyze selected text for prompt injection risks
SafeKeyLab: Redact PII in Selection Replace detected PII with redacted placeholders

Configuration

Configure the extension in VS Code Settings (Ctrl+, / Cmd+,):

Setting Type Default Description
safekeylab.apiKey string "" API key for enhanced SafeKeyLab detection. Leave empty for offline mode.
safekeylab.enableRealTimeScanning boolean true Enable real-time PII scanning as you type
safekeylab.highlightPII boolean true Highlight detected PII in the editor

Offline vs API Mode

Offline Mode (Default)

The extension works out of the box with local pattern matching:

  • No API key required
  • All processing happens locally
  • Fast, real-time detection
  • Pattern-based detection for common PII types

API Mode (Enhanced)

With a SafeKeyLab API key, you get enhanced detection:

  • Machine learning-powered detection
  • Higher accuracy and fewer false positives
  • Detection of context-aware PII
  • Additional PII types and patterns
  • Continuous updates to detection capabilities

Get your API key at safekeylab.com

Usage Examples

Scanning for PII

  1. Open any file in VS Code
  2. Real-time scanning happens automatically (if enabled)
  3. PII issues appear in the Problems panel with detailed descriptions
  4. Use SafeKeyLab: Scan File for PII for a manual scan with summary

Checking Prompt Security

  1. Select text containing a prompt or LLM input
  2. Right-click and select "SafeKeyLab: Check Prompt Security"
  3. Or use the Command Palette: SafeKeyLab: Check Prompt Security
  4. View detailed results in the output panel

Redacting PII

  1. Select text containing PII
  2. Right-click and select "SafeKeyLab: Redact PII in Selection"
  3. PII will be replaced with redacted placeholders (e.g., j**************n for john@example.com)

Context Menu

Right-click in the editor to access:

  • Check Prompt Security - When text is selected
  • Redact PII in Selection - When text is selected

Diagnostic Severity Levels

  • Error (Red) - Critical PII: SSN, credit cards, API keys, private keys, AWS keys
  • Warning (Yellow) - Sensitive PII: emails, phone numbers, JWT tokens, DOB
  • Information (Blue) - Potentially sensitive: IP addresses

Requirements

  • VS Code 1.85.0 or higher
  • Node.js 18+ (for API mode)

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "SafeKeyLab"
  4. Click Install

From VSIX

  1. Download the .vsix file
  2. Open VS Code
  3. Go to Extensions
  4. Click the ... menu and select "Install from VSIX..."
  5. Select the downloaded file

Privacy

  • Offline mode: All processing happens locally. No data leaves your machine.
  • API mode: Only the text being analyzed is sent to SafeKeyLab servers. We do not store or log your code.

Support

  • Documentation: docs.safekeylab.com
  • Issues: GitHub Issues
  • Email: support@safekeylab.com

License

MIT License - see LICENSE for details.


Made with security in mind by SafeKeyLab

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft