---
title: Private data rules · Kip docs
description: What Kip treats as private, and what happens to it.
url: https://www.quietrobot.ai/docs/kip/data-rules
---

# Private data rules

What Kip treats as private, and what happens to it.

Kip scans the work it's given for private data and treats each kind according to a rule. Detection is plain pattern matching on purpose: it's predictable, testable and can't be talked out of a decision. It only catches formats it knows, so treat it as a safety net rather than a guarantee, and add patterns for your own kinds of private data.

## The defaults

| Kind | Rule |
|---|---|
| Social Security numbers | `redact` |
| Payment card numbers | `redact` (card numbers are checked with the Luhn test) |
| Bank account and routing numbers | `redact` |
| Passwords | `block` |
| Health record numbers | `keep_local` |

## What each rule does

| Rule | |
|---|---|
| `redact` | Cloud models see a placeholder like `[SSN_1]`. Tools still get the real value. |
| `keep_local` | Work that touches it is answered by the local model only. Without a local model, it stops. |
| `block` | The work stops and tells the owner why. |

And separately: by default, no kind of private data may **leave the business** through an outside action such as sending an email or an integration call. Kip Check blocks any such action that carries it.

## Your own rules

`dataRules` in `kip.config.json` **replaces** the defaults, so copy the ones you want to keep.

```json
{
  "dataRules": [
    { "id": "ssn", "label": "Social Security numbers", "pattern": "\\b\\d{3}-\\d{2}-\\d{4}\\b", "action": "redact" },
    { "id": "policy", "label": "Insurance policy numbers", "pattern": "\\bPOL-\\d{8}\\b", "action": "redact", "mayLeave": true }
  ]
}
```

| Field | |
|---|---|
| `id` | A short name. |
| `label` | What the owner sees. |
| `pattern`, `flags` | A JavaScript regular expression. |
| `action` | `redact`, `keep_local` or `block`. |
| `mayLeave` | `true` lets this kind go out through outside actions. Default `false`. |
