Skip to main content
Data Discovery labels sensitive columns during scheduled scans. A response-stage policy replaces matching SSNs and passwords with [REDACTED]. A request-stage rewrite can redact SSNs in LLM messages.

1. Classify sensitive columns

Deploy a Data Discovery Satellite and schedule scans for each resource. Discovery applies label matchers during scans. Editing a matcher alone does not reclassify columns. Built-in labels include social_security_number and password. Prompt labels use column metadata and up to 10 sampled values. To generate them, you need an LLM classification backend and a native user with SELECT permission. Review labels in Data Inventory, then lock columns you classified manually.

2. Mask columns by label

This response-stage policy replaces labeled SSNs and passwords with [REDACTED]:
To hash, nullify, or fake values instead, see Mask Action.

3. Test, then activate

Create the policy in Draft while you review the Rego. Set it to Dry-run to log matches. Review Logs for the expected policy and labeled columns. Then set the policy to Active and verify a test query returns masked values. Dry-run does not enforce policy actions, so use an active test query to confirm masking.

4. Redact SSNs from LLM requests

For LLM resources, use a request-stage rewrite. This example replaces dashed US SSNs in text and tool results:
This replaces matching text in input.http.body before forwarding the request. The example matches dashed SSNs only. Adjust the pattern for your formats. Start the policy in Dry-run, review the logs, and then activate it.

Next Steps

Mask Action

Review supported types and subtypes

Policy Examples

Explore label-based and request-stage policies