postrundocs Back to siteSign in
Browse docsSecurity model

Security model

Postrun records full prompts, assistant responses, tool input and tool output from your machine. Everything it records stays local and is meant for one user. This page sets out what is recorded, where it lives, who can reach it, and what happens when you choose to share a session.

What is recorded

  • Your prompts and the agent's replies.
  • Every command the agent runs, with its output and exit code.
  • Every file the agent reads or edits, with the before and after text.
  • Other tool calls, with their raw input and result.
  • The cost and token counts the agent reports.

Capture files can hold anything a session printed, including the output of commands such as env. Treat ~/.postrun as sensitive.

Postrun does not ask Claude Code to dump raw API request bodies to disk. If an earlier Postrun setup turned that on, postrun setup turns it off again.

Where it lives

PathContents
~/.postrun/postrun.dbThe SQLite store and its WAL files
~/.postrun/captures/Claude Code hook and telemetry logs
~/.postrun/ingest-tokenThe ingest API's bearer token
~/.postrun/bin/capture-hook.shThe hook script Claude Code runs
~/.postrun/postrun.log, config.json, postrun.pidThe background process's log, ports and process id

Everything Postrun writes under ~/.postrun is created owner-only: directories 0700, files 0600. Older files with wider permissions are tightened when they are opened. The hook script sets umask 077 for the same reason.

There is no account and no copy anywhere else. postrun uninstall offers to delete ~/.postrun; once it is gone, so is the recorded data.

To remove one session, use the review app's Delete button or postrun delete. The store runs with SQLite's secure_delete on, so deleted content is overwritten rather than left in free pages, and the write-ahead log is checkpointed and truncated straight after. The raw capture files are removed too. Only the session id is kept, so the recorder does not record it again. The agent's own copy under ~/.claude or ~/.cline is not touched.

What Postrun reads and writes outside ~/.postrun

  • Reads, never writes: Cline's session store under ~/.cline, and the Claude Code hook events passed to its hook script.
  • Writes one file: ~/.claude/settings.json, to add telemetry settings and hooks. It is backed up once to settings.json.postrun-backup before the first change and merged in place. See Claude Code.
  • Exports: the HTML report you ask for, where you ask for it.

Who can reach it

Postrun opens two listeners:

ListenerAddressPurpose
API server and review app127.0.0.1:1234Postrun's background process
OTLP receiver127.0.0.1:4318Postrun's background process, for Claude Code telemetry

Both bind to 127.0.0.1 only. The host cannot be configured, so other machines cannot connect.

DNS rebinding

Binding to loopback keeps remote machines out, but not a browser on your own machine. A web page could point its own domain at 127.0.0.1 and then read the API as if it were same-origin. The browser still sends that domain in the Host header, so both listeners refuse any request whose Host is not 127.0.0.1, localhost or [::1], with status 421. No CORS headers are ever sent, so other sites cannot read responses either.

The key

Every API route except GET /api/health needs this computer's key: the random token in ~/.postrun/ingest-token, which only your user account can read. It is sent as Authorization: Bearer <key>, or as ?key= for downloads and the live stream, which cannot set headers, and is compared in constant time. That keeps other accounts on a shared computer out of your sessions, settings and backups.

A browser gets the key from postrun open (and from setup), which opens the app at http://127.0.0.1:1234/#key=…. The part after # is never sent to any server or written to a log. The app keeps the key in that browser, removes it from the address bar, and sends it with every request. A browser without it sees Connect this browser, which asks you to run postrun open. To change the key, delete the file and restart Postrun; each browser then connects again.

POST /api/ingest uses the same key. A web page can send a blind cross-site request to 127.0.0.1, but a browser cannot attach an Authorization header to it without a CORS preflight, which the server never approves. Every batch is validated against the v1.2 schema before anything is written. See the ingest API.

Cross-site requests and framing

Routes that change something also need a same-origin request (Sec-Fetch-Site and Origin are checked) with a JSON body, so another site cannot send one even blind. Every response carries x-frame-options: DENY and a content security policy with frame-ancestors 'none', so another site cannot show the review app inside its own page to trick a click.

The telemetry receiver

The OTLP receiver stores an export only when it:

  • carries Postrun's telemetry key in an x-postrun-key header (setup puts it in Claude Code's settings as OTEL_EXPORTER_OTLP_HEADERS; the key lives in ~/.postrun/otlp-key);
  • has the content type application/json exactly;
  • carries no browser Origin and no cross-site Sec-Fetch-Site.

A request from a web page is refused with 403. An export without the key is acknowledged and dropped, so a Claude Code session started before setup added the key shows no errors; it simply has no cost data until restarted. Each session's telemetry file stops growing at 256 MB.

Nothing on your computer is rate limited, because neither listener is reachable from the network. app.postrun.app is, see Share links.

Request hardening

  • The OTLP receiver caps each export at 32 MB, before and after gzip, and accepts only its three signal paths.
  • The ingest route caps bodies at 8 MB, before and after gzip.
  • The server never echoes internal error text: internal errors are logged to stderr and returned as a generic 500.
  • Every response carries x-content-type-options: nosniff, referrer-policy: no-referrer, cache-control: no-store, x-frame-options: DENY and a content security policy.
  • JSON bodies sent by the review app are capped at 64 KB; a larger one is refused without being read to the end.
  • A backup is made in a private temporary folder and removed however the download ends.
  • Static file paths are resolved and checked against the review app's folder, and any path containing .. is refused.
  • Session ids read from Claude Code's hook files and Cline's folder names must be plain tokens (letters, digits, _, ., -) before they are used in paths or logs.
  • The git branch is read from the repository's .git/HEAD file; Postrun never runs git inside a project an agent worked on, so a repository's own git configuration cannot run anything.
  • postrun stop signals the process in its pid file only after checking it really is Postrun.

What never leaves your machine

Postrun has no telemetry and never phones home. The recorder, the store and the review app all run locally. Nothing leaves your machine unless you export or share a session yourself, one session at a time. The one optional exception is Check for new versions in Settings, off until you turn it on, which asks the npm registry for the latest version number once a day.

Your usage counts

Postrun counts how often you use its features (opening the app, marking a review, copying a PR summary, exporting, searching and a few more) in a usage_daily table in the store: a day, a feature name from a fixed list, and a number. Nothing else: no session ids, paths or text. The counts are never sent anywhere. Settings → Your usage and postrun stats show them, so you can share a summary if you choose. Days older than about 13 months are dropped, and Delete all data clears them.

Sharing on purpose

postrun export and the Export report button write one session to a single HTML file. Before it is written:

  • Secrets are masked. Known formats (private keys; AWS, GitHub, Anthropic, OpenAI, Stripe, Slack and Google keys; JWTs), passwords in URLs, Authorization header values, and values assigned to credential names such as API_KEY, token or password become [REDACTED:<kind>].
  • Home paths are shortened. /Users/<name>, /home/<name> and C:\Users\<name> become ~.
  • Local details are dropped. Your machine name (captured_on), owner_id, the local capture paths (source and segment source_files), and your review verdict are left out.
  • Every masked value is listed with its location and surrounding text, for you to check before sending.

The file has no scripts, makes no network requests, and carries a Content-Security-Policy that forbids scripts, frames, forms and fetches.

The full rules are on Exporting and redaction.

Feedback

Feedback leaves your computer only when you send it: from the review app's Feedback form, postrun feedback, or app.postrun.app. You see every field before it goes. It holds your rating, your message, your email if you gave one, your Postrun version and system, and, only if you tick the box, the usage summary (counts only). It never includes sessions, paths or anything an agent did.

A share link uploads that same redacted file, and nothing else, to app.postrun.app. It only happens when you click Create link or run postrun share. Links are unlisted, expire after 1 to 90 days, and turning one off deletes the report. The sign-in that uploads them (~/.postrun/account.json, owner only) can make links and nothing else, and you can sign any computer out from Settings. On app.postrun.app the report is shown in a sandbox with no scripts, forms or network access, with an opaque origin, so it cannot reach your account. The sign-in a computer gets from postrun login is handed over with a one-time code and PKCE, never in a URL, and is stored on the server only as a hash.

Redaction is a safety net, not a guarantee

Redaction catches the formats and patterns it knows. It can miss a secret in free text, a token with an unfamiliar prefix, or a value under a name that is not a credential word. Skim every report before you send it.