Skip to content

SensitiveDataGuard

Stable

Warns before a message with a card number, password or other private detail is sent.

Also known as pii warning, data leak warning, privacy check

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

A card number and a phone number

This message has 2 private details

The assistant does not need these to help. Take them out, or send as it is.

  • Card number•••• 4242
  • Phone number•••• 210

Take one out, take both out, or send anyway. Edit the message and the warning follows.

When to use it

Stops people sharing private details with an AI by accident, without blocking them when they meant to.

Made of: Lock icon and heading · One-line reason · List of details with previews · Take them out · Send anyway

Use it for

  • Checking a message just before it is sent.
  • Pasted text that may hold card numbers, keys or passwords.

Not for

Do and avoid

This message has a private detail

The assistant does not need these to help. Take them out, or send as it is.

  • Card number•••• 4242
Do. A safe preview, a way to take it out, and Send anyway for when it was meant.
Avoid. Repeating the full card number and blocking the message helps nobody.

Do

  • Check when the person presses Send, so they are not interrupted while typing.
  • Show a safe preview, never the whole detail.
  • Make taking it out the main action, and keep Send anyway.

Avoid

  • Do not send the message to a server to check it.
  • Do not block sending. People may mean to share it.
  • Do not show the full card number or password in the warning.

On a phone

  • It sits above the message box at full width, so the box and keyboard stay where they are.
  • Each detail's row wraps so its button drops under the text on a narrow screen.

Seen in products

  • Microsoft Purview DLP for Microsoft 365 Copilot acts on prompts that contain sensitive information types such as credit card numbers.
  • Google's Sensitive Data Protection lists the kinds of private detail a check can find, such as card numbers and phone numbers.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started