> For the complete documentation index, see [llms.txt](https://kerno.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kerno.gitbook.io/docs/kerno-audit/data-and-privacy.md).

# Data and privacy

What stays on your machine, and what you choose to share with the judge and with your team.

The audit measures on your machine. Two things can leave it, and you choose both.

* **Code extracts for the judge**, so it can settle what counting can't.
* **The finished run**, so your team can read it in the portal.

Your first run asks about each one. To change your answers, run `kerno audit --data-sharing`. An unattended run, with `-y` or in CI, has no one to ask, so it sends both.

### On your machine

* The report, caches and run history, under `~/.kerno/audit`.
* The code index, in a `.codegraph/` folder at the root of the repository. It stays after the run, so delete it or add it to `.gitignore`.
* Temporary checkouts of earlier commits, in your system's temp folder while the audit runs.

### Sent to the judge

One small extract at a time, through Kerno. An extract is a function body, one commit's diff, or a commit message. Each run has a $20 spending cap by default, set with `--budget`.

Run with `--no-judge` to send no code. Judged measures then read **unjudged**, and everything else runs the same.

For how Kerno handles model providers, see [Security & Privacy](/docs/references/security-and-privacy.md).

### Sent to Kerno when you upload

* The measurements and monthly series.
* The detail behind them, which is file paths, commit ids and messages, and the author names and emails in your commits.
* The quoted code behind each finding, so your team can check it.
* Usage events, such as which steps the run reached and how long it took. These carry no code, paths or commits, and go whenever uploading is allowed.

Run with `--no-evidence` to upload without the quoted code, or `--no-upload` to keep the run on your machine.

### Send nothing

```bash
kerno audit --local
```

`--local` sends nothing to the judge or to Kerno, whatever else you pass.

### Retention and deletion

How long an upload is kept, and how to have it deleted, is in the [Kerno privacy policy](https://kerno.io/privacy).
