# 23step Security & Trust

Effective date: November 24, 2026 · Contact: konradjanica@23step.com · Web version: https://23step.com/security

Architecture, tenant isolation, secret redaction, local client hardening, verified updates, and vulnerability disclosure for 23step.

## 1. Security architecture and data flow

23step is built with explicit service boundaries so local agent hooks, browser capture, web sessions, and MCP reads are isolated from one another. Nothing leaves your machine until you explicitly configure a scoped API key (`st_...`).

Production, staging, and development run in separate Google Cloud Platform projects with dedicated Cloud SQL Postgres instances, GCS buckets, Secret Manager secrets, service accounts, and Stripe accounts.

Service boundaries:

| Component / Host | Responsibility | Isolation boundary |
| --- | --- | --- |
| `23step` CLI & hooks (local) | Captures agent events, command metadata, and optional DevTools browser frames | Runs only when configured with a `runs:write` key; fails open without a key; never reads unrelated files |
| `23step Overlay` (local desktop) | Streams live run events over SSE and opens steps in your browser | Electron sandbox (`contextIsolation: true`, `sandbox: true`, `nodeIntegration: false`), ASAR integrity, OS Keychain token encryption |
| `api.23step.com` | Authenticated run ingest, OTLP receiver, and verified binary distribution | `/mcp` is disabled (`STEP23_SERVE_MCP=0`); every route fails closed unless explicitly allowlisted |
| `app.23step.com` | Google Sign-In dashboard, step viewer, settings, and Stripe billing | `HttpOnly`, `Secure` session cookies, same-site CSRF checks, strict CSP, `X-Frame-Options: DENY` |
| `mcp.23step.com` | Stateless MCP server (`POST /mcp`) for reading recorded steps | Dedicated Cloud Run service; requires `runs:read` scoped token or OAuth 2.1 PKCE token; every call logged to `audit_log` |

## 2. Multi-tenant isolation and Row-Level Security

Every workspace is isolated at both the application layer and the database layer so one organization can never query or mutate another organization's runs:

- **Forced Postgres Row-Level Security (RLS):** Tenant tables including `runs` and `audit_log` enforce Postgres RLS policies scoped to the authenticated principal's `org_id`.
- **Non-privileged runtime role:** The Cloud Run services connect as a dedicated `step23_runtime` role (`NOSUPERUSER`, `NOBYPASSRLS`, and excluded from `cloudsqlsuperuser`). Services verify these role attributes at boot and **refuse to start** if connected as a privileged or `BYPASSRLS` login.
- **Isolated schema migrations:** Database migrations run only in a separate `step23-migrate` Cloud Run Job under its own service account and Secret Manager secret. Runtime services never hold DDL credentials.
- **Private-by-default visibility:** New steps default to `private` (visible only to the run owner) and can be explicitly scoped to `squad`, `team`, `org`, or `public`. Unauthorized callers receive `404` rather than leaking run existence.

## 3. Secret redaction and capture safeguards

Because coding agents work inside sensitive repositories and terminals, 23step applies layered privacy and credential protections before run data is persisted:

- **Pre-storage secret scrubbing:** Prompts, shell commands, logs, and OTLP payloads are automatically scanned and redacted for `st_` keys, `Authorization` headers, API tokens, passwords, and private keys before storage.
- **Configurable email PII redaction:** Email addresses in recorded run content are redacted by default and controllable per organization by workspace administrators.
- **Keystroke classification without raw text:** When the capture daemon observes desktop or browser keyboard events, keystrokes are recorded only by class (`letter`, `digit`, `enter`, etc.)—raw typed characters are never stored.
- **Command metadata without raw terminal dumps:** Command records store command text (redacted), working directory, exit code, and duration rather than raw terminal stdout/stderr streams.
- **Share-safe visual exports:** External release and audit views bake cleaned, EXIF-stripped, pixel-masked visuals so external readers never gain access to raw sessions, prompts, or internal account chrome.
- **Prompt-injection boundaries:** Recorded page titles, URLs, DOM snapshots, and third-party comments returned over MCP are explicitly framed as untrusted data.

## 4. Authentication, scoped API keys, and audit logs

Access to 23step follows least-privilege scoping across browser sessions, CLI uploads, and MCP reads:

- **Least-privilege API keys:** Keys (`st_...`) are scoped to `runs:write` (upload), `runs:read` (MCP/viewer/overlay), or `ui`. A write-only key cannot read steps over MCP, and a read-only key cannot upload or mutate runs.
- **One-time reveal & SHA-256 storage:** Full API keys are displayed once at creation and stored as SHA-256 hashes (only an 11-character lookup prefix and last 4 characters are retained for display). Keys can be revoked immediately in [Account](https://app.23step.com/app/account).
- **No query-string credentials:** Bearer tokens in URL query parameters are rejected on every route (`400 Bad Request`).
- **OAuth 2.1 for MCP:** `mcp.23step.com` supports OAuth 2.1 with PKCE, Protected Resource Metadata (`/.well-known/oauth-protected-resource`), and Client ID Metadata Documents (CIMD) without forwarding upstream identity tokens.
- **Per-org audit logging:** Reads and writes through `mcp.23step.com` and key/media access events are recorded in your organization's `audit_log`.

## 5. Encryption, storage, and data ownership

**You own your content.** We do not sell customer data or use private agent runs to train foundation models.

- **In transit:** All traffic across `23step.com`, `app.23step.com`, `api.23step.com`, and `mcp.23step.com` uses HTTPS/TLS with `Strict-Transport-Security` (HSTS), `X-Content-Type-Options: nosniff`, `Referrer-Policy: no-referrer`, `X-Frame-Options: DENY`, `Permissions-Policy`, and strict Content Security Policies.
- **At rest:** Captured frames live in Google Cloud Storage with server-side encryption and are served via HMAC-signed, short-lived `/media` URLs backed by a 32+ byte Secret Manager key. Metadata lives in Cloud SQL Postgres reachable only over private Cloud SQL sockets with automated backups and point-in-time recovery.
- **Automated retention & instant deletion:** Daily retention jobs purge expired steps according to your plan (7 days on Free, up to 30 days on Pro, up to 90 days on Team, 365+ days or keep-forever on Enterprise). Owners can immediately delete any step or session from the viewer or via `DELETE /runs/{id}`, and export steps anytime as JSON or Markdown.

## 6. Local client hardening and verified updates

Client tools installed on developer machines are hardened against tampering, credential theft, and supply-chain compromise:

Client hardening controls:

| Control | Implementation |
| --- | --- |
| Electron process isolation | `contextIsolation: true`, `nodeIntegration: false`, `sandbox: true`, strict CSP, denied `window.open`, and blocked remote navigation |
| Electron binary fuses & ASAR integrity | `RunAsNode=0`, `EnableCookieEncryption=1`, `EnableNodeOptionsEnvironmentVariable=0`, `EnableNodeCliInspectArguments=0`, `OnlyLoadAppFromAsar=1`, and macOS `EnableEmbeddedAsarIntegrityValidation=1` pinned in `Info.plist` |
| OS Keychain token protection | `23step Overlay` encrypts saved bearer tokens with Electron `safeStorage` (macOS Keychain / Linux Secret Service) instead of plaintext config files |
| Production DevTools lockdown | Packaged Overlay builds ignore `--remote-debugging-port` and `--remote-debugging-address` unless explicitly opted in for local diagnostics |
| Signed & checksummed releases | Every binary (`23step`, `23step-mcp`), Desktop Overlay archive, and hook script (`/install/*.sha256`) is SHA-256 verified before installation; updaters support pinned Ed25519 signature verification on `/dist/manifest.json.sig` and refuse downgrading signed macOS bundles to unsigned builds |
| Auto-update opt-out | Disable automatic updates anytime with `STEP23_NO_AUTO_UPDATE=1`, `STEP23_AUTO_UPDATE=0`, or the Desktop Overlay Settings toggle |

## 7. Continuous testing and gradual canary rollouts

Production changes follow a gated multi-environment rollout pipeline before reaching customer workspaces:

- **Automated test gate:** Every merge to `main` runs the Postgres + headless browser Go test suite before deploying to `dev.23step.com`.
- **Staging soak:** Changes batch and soak on `staging.23step.com` for at least 1 hour prior to production promotion.
- **3-hour gradual canary rollout:** Production shifts traffic gradually (`10% -> 25% -> 50% -> 75% -> 100%`) with automated `/health` verification before every step and automatic 100% rollback if health checks fail.

## 8. Responsible vulnerability disclosure

We welcome security researchers and customers reporting potential vulnerabilities across `23step.com`, `app.23step.com`, `api.23step.com`, `mcp.23step.com`, or our local CLI, hooks, and Desktop Overlay.

Report vulnerabilities directly to [konradjanica@23step.com](mailto:konradjanica@23step.com) or inspect our RFC 9116 policy at [/.well-known/security.txt](/.well-known/security.txt). Please include reproduction steps, affected URLs or versions, and potential impact.

- **Response target:** We acknowledge security reports within 2 business days and provide remediation updates as fixes are validated and rolled out.
- **Safe harbor:** We will not pursue legal action against researchers who conduct good-faith testing against their own accounts/workspaces, avoid accessing or modifying other customers' data, avoid denial-of-service testing, and give us reasonable time to remediate before public disclosure.
- **Privacy & legal docs:** See our [Privacy Policy](/privacy) (including our [subprocessor list](/privacy#subprocessors)) and [Terms of Service](/terms) for data processing terms.
