VS Code Extensions
P

PGAI Sentinel

by YugrajMangate

Prevent pasting sensitive data into Copilot/agents by intercepting paste actions.

Downloads

2

Rating

5.0 / 5 (1)

Version

0.1.6

Last updated

Apr 09, 2026

This minimal extension intercepts the editor paste action and scans clipboard text for sensitive patterns (emails, Aadhaar, PAN, credit-cards, AWS keys, high-entropy secrets, and image data-URLs). If sensitive data is detected, it prompts the user to redact, paste anyway, or block the paste.

Quick test (development host):

  1. Open this workspace folder (vs_code) in VS Code.
  2. Press F5 to launch an Extension Development Host.
  3. In the extension host window, open or create a file, copy some text that contains an email or number, and press Ctrl+V / Cmd+V.
  4. You should see a modal that lets you Redact & Paste, Paste Anyway, or Block Paste.

Limitations:

  • VS Code API exposes only textual clipboard access (env.clipboard.readText()); binary clipboard/image access is not available. The extension detects common data:image/...;base64, payloads in textual clipboard contents but cannot access raw image clipboard bytes.
  • This is a conservative, client-side helper. It cannot prevent other programs from sending data outside VS Code.

If you'd like, I can:

  • Add configuration options (fail-closed vs warn-only).
  • Extend live document-change scanning to detect pasted content that bypasses the command.

Related extensions