data_loss_prevention) finds sensitive
data — PII and secrets — in prompts and model output, and can mask it in
flight. It is the only mutable detector: the only one that can be used with
the Transform action and the only one that populates transformed_payload.
| Property | Value |
|---|---|
| Slug | data_loss_prevention |
| Category | data_loss_prevention |
| Sides | input, output |
| Protocols | all |
| Mutable | ✅ |
signal.type: "secret"; all other
entities as "pii".
Actions
As a detector, DLP only detects. What happens is set on the policy rule:- Monitor — report what was found, change nothing.
- Block — report and flag the request for the caller to block.
- Transform — report and return a
transformed_payloadwith matches masked; forward the masked payload instead of the original. (Only DLP supports Transform.)
Settings
Provide at least one ofapply_all, predefined_entities, or rules.
| Field | Type | Notes |
|---|---|---|
apply_all | boolean | Detect/mask every catalog entity. |
predefined_entities | array<{ entity, enabled, mask_with, preserve_len }> | Select specific PII entities and how to mask them. |
rules | array<{ type, pattern, mask_with, preserve_len }> | Custom rules; type is keyword or regex (pattern required for regex). |
mask_with— the replacement token. Defaults to an entity‑specific token (e.g.[MASKED_EMAIL]) for predefined entities, or***for custom rules.preserve_len— keep the original length when masking.
Entity catalog
43 built‑in entities, grouped by false‑positive risk. Pick the tier appropriate to your tolerance — Tier 1 is safe to enable broadly; Tier 3 benefits from the Monitor action first. Tier 1 — near‑zero false positives (15):api_key, access_token, email,
uuid, jwt_token, crypto_wallet, stripe_key, ip_address, ip6_address,
mac_address, device_mac, italian_cf, mexican_curp, french_nir, cvv.
Tier 2 — structural markers, some ambiguity (16): spanish_iban, iban,
us_medicare, ssn, brazilian_cnpj, brazilian_cpf, credit_card,
spanish_dni, spanish_nie, spanish_cif, spanish_nss, spanish_phone,
german_id, mexican_rfc, chilean_rut, swift_bic.
Tier 3 — pure format patterns, higher false positives (12): device_imei,
bank_account, colombian_cc, tax_id, routing_number, peruvian_dni,
argentine_dni, phone_number, vehicle_vin, drivers_license, passport,
isin.
Secrets — the four entities reported as signal.type: "secret" (the rest are
"pii"): api_key, access_token, jwt_token, stripe_key.
When to use
- Output + Transform to strip PII the model regurgitates before it reaches the user.
- Input + Transform to keep PII out of third‑party model providers entirely.
- Block secrets (
api_key,access_token,jwt_token,stripe_key) to stop credential leakage.