# DPIA input (processor-side)

Technical inputs for your data-protection impact assessment of a Swarrm
deployment. Your organization must assess lawful basis and erasure obligations
for its use. See the [review guide](README.md) for version and scope.

## Nature and purpose of processing

Swarrm records tamper-evident receipts of AI-agent activity so that what an
agent said and did can later be proven or disproven. Processing is
record-keeping: capture, sealing, storage, verification and bounded export
of evidence about agent actions.

## What personal data can appear where

| Location | Content | Mechanism |
|---|---|---|
| Receipt commitments | Payload fields (which may contain personal data) as **salted, domain-separated SHA-256 commitments** — not readable without the per-field nonce | `core/commitment.py`, `SPEC/receipt-v1.md` |
| Receipt context | Bounded, non-secret operational metadata (model ref, status, latency, token counts). Customer-chosen identifiers may be personal data; Microsoft 365 also writes the actor fields described below | `core/receipt.py` (8,192-byte canonical cap), `SPEC/m365-action-gateway-v1.md` §4 |
| Nonce vault | Commitment nonces, encrypted at rest, customer/operator-held | `core/vault.py` |
| Gateway transit (hosted path only) | Model/business payload bytes pass through in transit and are not persisted in the evidence store | `docs/RELIANCE.md` §Data-processing posture |
| Action-door transit (Microsoft 365) | Action request and upstream response bodies pass through in transit wherever the operator hosts the door; they enter receipts only as salted commitments | `proxy/m365.py`, `SPEC/m365-action-gateway-v1.md` §5 |
| Node source artifacts (where Node is deployed) | The raw source objects Node reads or is handed — for example ISO 20022 bank statements, or a Microsoft Purview unified audit log export, whose records carry a `UserId` (normally a user principal name) and, if exported unfiltered, records of every workload — and the source events derived from them, envelope-encrypted under customer-held key material | `node/evidence_store.py`, `node/state.py`, `node/log_stream.py` |

Identifiers the customer chooses — `agent_id`, `session_id`, source identity
fields — may be personal data if the customer makes them so. Receipts written
by the Microsoft 365 action door additionally carry, by design rather than by
customer choice, the Entra token's issuer, tenant (`tid`), subject (`oid`, else
`sub`), calling application (`azp`/`appid`), scopes and roles as plaintext
`actor` context; for a delegated token the subject is the signed-in user's
directory object id.

The evidence log persists **no payload bodies**; where Node is deployed, the
customer evidence store retains source artifacts encrypted, as in the table
above. Metadata can itself be
sensitive; that sentence appears in our own reliance document rather than
being footnoted away.

## Storage, retention, access

Stores are SQLite files under the deployment owner's control (per-tenant
physical isolation). Retention is operator-controlled. Access: per-tenant
API keys; selective disclosure lets a single committed field be opened to a
named recipient with a receipt of the release (`verify/disclosure.py`,
portal grants).

## The erasure question, stated honestly

The log is **append-only by design** — deleting or rewriting an entry is
exactly what the product exists to make evident. The design intent is that
personal data enters receipts as commitments, not plaintext. Opening a commitment
requires its payload and nonce; deleting one local nonce copy does not establish
that all copies were destroyed. Backups, prior disclosures and recipient-held
copies must be considered separately.
Whether nonce destruction satisfies a given erasure obligation is a legal
question we do not answer. The mechanism is a salted hash designed to resist
recovery without the nonce, subject to its cryptographic assumptions. It does
not revoke a previous disclosure or erase recipient-held payloads. Plaintext identifiers the customer
chose to put in `context` do not get this property — the DPIA should treat
context fields as retained for the life of the log, and the customer should
choose them accordingly. The `actor` fields written by the Microsoft 365
action door are plaintext context in the same sense and should be treated the
same way. Node source artifacts sit outside the append-only log, in the
customer evidence store; removing one is possible, and its absence then
surfaces as a `vault_unreadable` finding rather than silently.

## Security measures (summary)

Ed25519-signed receipts; RFC 6962 Merkle log with signed checkpoints;
log-witnessed key rotation/revocation; file or KMS-sealed key custody;
encrypted nonce vault; no external targets in the default Compose configuration;
exact-authority, DNS-pinned controls in shipped outbound clients; offline
verifiability by any holder. Configuration does not prove live zero egress.
`swarrm compliance-pack` reports non-exhaustive configured or potential targets.
