# Data handling

> What Kavach Enterprise records, what leaves the pod, where it is stored, for how long, and what Kavach Labs can see. Written for security and compliance review.

Kavach Enterprise runs entirely in your cluster and stores everything in your own cloud account. This page lists every place data goes, so a security review can check each one.

![Raw recordings stay in the pod's memory. Scrubbed archives go to your bucket; a proof receipt can go to GitHub and to your webhook. Kavach Labs receives nothing.](https://www.thekavachlabs.com/docs/enterprise-data-flow.diagram.svg)

## What is recorded

The SDK in your service records each step's input, every clock, random, query and config read, and every effect it emits. See [Journal](https://www.thekavachlabs.com/docs/concepts#journal). These recordings hold real production data, so they are treated as sensitive from the start:

- They are written to a **shared-memory volume** inside the pod (`emptyDir` with `medium: Memory`), so they are not written to the node's disk and are gone when the pod is. Fixtures cut from them stay on that volume (`--fixtures-dir`).
- The daemon's work directory, on the pod's ephemeral disk, holds only scrubbed copies and their replay output.
- They are read only by the `kavach-daemon` container in the same pod.

## What leaves the pod

| Destination | When | What is sent |
| --- | --- | --- |
| **Your bucket** | Every distinct incident. | The fixture **after scrubbing**, packed as an incident archive (`.kar`), plus coordination state and the audit trail. A raw recording is never uploaded. |
| **GitHub** | Only when a fix passes every proof and pull requests are configured. | A pull request: the title (service and incident ID) and a proof receipt with the verdict, the patch summary, the number of variants and past incidents checked, and the outputs the fix would undo or apply, taken from the scrubbed replay. |
| **Your webhook** | Only when `--webhook-url` is set. | The same proof receipt, as JSON. |
| **Kubernetes API** | Operator only. | Deployments, network policies and status for the resources it manages. |

Nothing is sent anywhere else. There is no telemetry, no usage reporting, and no licence check that contacts Kavach Labs. You can enforce this with a default-deny egress policy; see [Network](https://www.thekavachlabs.com/docs/enterprise/operations#network).

## Scrubbing

Before a fixture leaves the pod, sensitive values are replaced with keyed HMAC-SHA256 tokens, and the scrubbed fixture is **replayed to check it still fails the same way**. If it does not, it is not uploaded. What counts as sensitive, and how to tune it, is in [Security](https://www.thekavachlabs.com/docs/enterprise/security#sensitive-data-in-fixtures).

- Tokens cannot be turned back into the original values without the HMAC key. The key stays in your cluster, in a secret you manage.
- Tokens are deterministic, so the same value scrubs to the same token across fixtures. That keeps replay correct, and it means anyone holding the key could test whether a guessed value appears. Restrict the key as you would a database credential.
- Values that are not recognised as sensitive are kept as they are. Review the denylist against your own schema before go-live.

## Where it is stored

Everything is in the bucket you name, in the account and region you choose. Kavach adds no other storage location, so data residency is the bucket's region.

| Data | Location | Kept until |
| --- | --- | --- |
| Raw recordings and cut fixtures | Pod memory | The pod is deleted. |
| Scrubbed incident archives | Your bucket | You delete them. Kavach does not expire them. |
| Immunity vault | Your bucket | You delete them. Every new fix is replayed against them, so deleting entries weakens regression checks. |
| Fleet coordination state | Your bucket, `fleet/` | Reclaimed automatically once no node needs it. |
| Audit trail | Your bucket, `audit/<service>/` | You delete it. Do not put a lifecycle rule on this prefix: a missing entry fails verification. |

To set a retention limit, add a lifecycle rule on the archive prefix in your cloud provider. Turn on server-side encryption on the bucket; Kavach stores what it is given and adds no encryption of its own.

## Deleting a customer's data

Incident archives are ordinary objects in your bucket. To delete one customer's data, delete the archives for the incidents that involved them, and any vault entries made from those incidents. Because sensitive values are tokenized before upload, archives hold a customer's raw personal data only where a field was not recognised as sensitive.

## What Kavach Labs can see

Nothing, unless you send it. Kavach Labs has no access to your cluster, your bucket or your repositories, and the daemon does not contact Kavach Labs. If you share an incident archive with us for support, it is the scrubbed copy.

## Questions from a security review

Write to hello@thekavachlabs.com for anything this page does not answer, including questionnaires and architecture reviews.

Source: https://www.thekavachlabs.com/docs/enterprise/data-handling
