# The exposure report

What a credential, OAuth client, agent or principal was served over a window of up to 90 days,
about how many people, and where it went. It is the record a processor owes its controller after
an incident (GDPR Art. 33(2): categories and approximate number of data subjects and records;
Art. 28(3)(f): assistance with the controller's obligations), built from ledgers Bucker already
keeps. It writes no ledger of its own; only the two human acts below leave an audit row.

## What it says, and from what

| Section | Source | Attribution |
| --- | --- | --- |
| `reads`: data classes, tiers, personal-data categories, records, reads that went on to a model | the `data.read` rows of the read ledger | the subject |
| `subjects`: how many people, per project, never listed | the served-pseudonym index (30 days) | the subject |
| `writes`: operations applied by act, and the approval each ran under | `operation.applied` rows and approval requests | the subject |
| `untrusted`: the share of read calls in an hour that carried untrusted-labelled fields | hourly read counts | the subject (an upper bound) |
| `context`: AI egress and deliveries for the projects the subject reached | the egress ledger and the delivery ledger | the project, never added to the subject's figures |
| `controllerNotice`: the Art. 33(2) / 28(3)(f) fields, with `gaps` | derived from the above | n/a |

Neither the egress ledger nor the delivery ledger has a principal column, so they can say where a
project's data went, not that this credential sent it. They are marked `attribution: "project"`.

A subject is a reference by kind (`principal`, `agent`, `oauth_client`, `credential`). The ledger
carries no token id, so a `credential` resolves to the principal or agent that holds it
(`subject.granularity` says so).

## Doors

| Door | Who | What |
| --- | --- | --- |
| `GET /orgs/:o/exposure-report` and MCP `exposure_report_get` | `security:read` on the org | counts and categories only; an agent may have it |
| `GET /orgs/:o/exposure-report/export` | a person's own session with `pii:read` (act `exposure_report.export`, human-only) | the subject list of one project; writes a stored-tier `data.read` row and an audit row; no MCP tool |
| `POST /orgs/:o/exposure-report/trace` | an OWNER's own session (dashboard) | takes an uploaded list of subject keys; no MCP tool |

An incident-bound token is refused on every door. A subject that is not the organization's answers
404, the same as one that does not exist.

## Leak tracing

Pseudonyms at the agent tier are stable, so the same subject key is served again and again.
`served_pseudonym_index` keeps, for 30 days, an HMAC of `<projectId, subjectKey>` per response under
a key derived per organization. A leaked list pasted into the trace finds which credentials were
served those values, in which project and when. The subject key is never stored and a digest cannot
be reversed. Another organization's index is never searched. The index records what the dispatcher
tells it to record; a read that never called `recordServedPseudonyms` is absent, and the report
says how far back the index can see. An erased subject's digests are removed from the index
(`eraseServedSubjects`), so a trace cannot confirm an erased person was served.

The notice's `recipients` come from the same project-level ledgers as `context` and are marked
`attribution: "project"`: they are where the reached projects' data went, not proof that this
credential sent it.

## Limits

The report states its own `gaps`. It does not assess whether a breach occurred, its likely
consequences or the measures the controller should take (`notAssessedByBucker`); those are the
controller's judgement.
