pushleft
Deploy your first app
Manual contents
Handbook
HandbookPushleftArchitecture
Operate
Install the control planeYour own serversFleetOperations and alertsAuthenticationAccess gateDomains and DNSUsage and budgetsScheduled jobsAbuse controlsAI provider proxyCustomer mailErrors and performanceLogs and metricsRetentionObject storageContainer registryGit server
Develop
The .pl.yaml manifestOnboard with an AI agentThe pl up demoBuild executorSource ingestionAgent gatewayManaged databasesSecurity findingsTunnels and shellsDev workspacesPrivate hostnamesMesh coordinatorsDesign baseline
Runbooks
Control-plane host failoverControl-plane PostgreSQL failoverControl-plane PostgreSQL restoreCustom domains and certificatesGateway key compromiseIngress host failureNode busyNode disk fullNode drain and replacementNode lostRegistry outageHetzner Robot hostsSecret rotationSecurity incidentStaging fleet on ProxmoxStaging build cacheStuck deploymentVault/OpenBao backup and recovery
More
CI pipelines
Manual · docs/runbooks/security-incident.md

Security incident

Use this checklist for a suspected credential leak, tenant data exposure, a compromised node or control-plane host, or abuse. The alerts failed_auth_burst (page) and auth_rate_limited_spike (ticket) also send you here.

Before you start

  • Open a ticket. Write a timestamped log there as you work.
  • Use the read-only pushleft_ops role ($OPS_URL) for every audit command until you decide to act.
  • Do the sections in order.

1. Scope (first 15 minutes)

  • Record what was reported, by whom, and when. Name the organizations, nodes and credentials involved. pushleft-controller fleet orgs lists every organization with its id, handle and tier.

  • Take a pg_dump now to freeze the evidence (taking a dump).

  • Copy the journals of the gateway, the API and the affected nodes.

    journalctl -u 'pushleft-*' --since ...
  • Get the audit trail for each affected organization.

    DATABASE_URL="$OPS_URL" pushleft-api audit --org <org> --since 2026-10-01T00:00:00Z > audit-<org>.jsonl

    The output merges auth_events, deployment_events and agent_job_results, oldest first. From migration 0034, deployment_events carries actor_user_id and actor_credential_id. The command leaves out log tails and deletes nothing.

  • Search across organizations when you do not know them yet. Filter by user (email or id), token or session id, or node:

    DATABASE_URL="$OPS_URL" pushleft-controller fleet audit-search --actor <email or id> --since 2026-10-01T00:00:00Z

2. Credentials and identity (auth_events)

Run these on the audit-<org>.jsonl file of each affected organization:

# Who logged in, created or revoked tokens, changed memberships, and every failure.
jq -c 'select(.source == "auth")' audit-<org>.jsonl
# Failure reasons (revoked or expired tokens still being presented, reused login codes).
jq -r 'select(.kind == "failed_auth") | .detail.reason' audit-<org>.jsonl | sort | uniq -c | sort -rn
# Deployments and teardowns attributed to a credential.
jq -c 'select(.actor_credential_id == "<token or session id>")' audit-<org>.jsonl
# Developer sessions (pl db connect, pl tunnel, pl exec) opened in the organization.
jq -c 'select(.kind | startswith("developer_session"))' audit-<org>.jsonl

Tripped rate-limit buckets (credential stuffing or a misbehaving client) have no organization:

DATABASE_URL="$OPS_URL" pushleft-api audit --org none --since <rfc3339> | jq -c 'select(.kind == "rate_limited")'
  • Revoke each leaked token with DELETE /v1/auth/tokens/{id} (secret rotation).

  • End each open developer session of a leaked credential with DELETE /v1/sessions/{id}.

  • Or disable the user. This revokes the user’s console sessions and API tokens now, in every organization. Use the pushleft_controller role:

    pushleft-controller fleet disable-user <email> --reason "<ticket and reason>"

    The command refuses an unknown or already disabled user. It writes an audit row (operator_cli_action), and a token_revoked event in the organization of each token.

  • Search the API journal for unauthorized bursts. The API logs unknown tokens and unknown login codes, and does not store them, so guessing cannot grow the table. Rate limits are in authentication.

  • Know the limits of the trail:

    • Development-mode requests have no actor.
    • Events from before migration 0034 have no actor.
    • auth_events.user_id is NULL for actions taken with a service token. The service token id is not recorded there (gap).

3. Nodes and execution (agent_job_results)

Find the organizations with work on the node. Open the node’s page in the Fleet app. Placements and Deployments list the current work, and Recent jobs lists its last 25 jobs. Or list the deployments with instances on the node, lost instances included:

pushleft-controller fleet deployments-on <node>

Read everything the node reported, in order, across all organizations. The output is bounded and refuses secret-shaped fields:

DATABASE_URL="$OPS_URL" pushleft-controller fleet audit-search --node <node> --since <rfc3339>
  • Compromised node: revoke its certificates, drain it and replace it (one node’s agent key, node drain and replacement).

  • Rotate the secrets of the work placed on that node: the database passwords and backup keys of its organizations. Its pending mesh keys expire in 10 minutes. Nodes hold no Vault token.

  • If the node still had a legacy Vault token file, revoke that token (Vault/OpenBao token).

  • Build node: while it held a build_image lease, the node could get push tokens for that build’s repository (registry tokens). Each token is valid for 15 minutes. Audit the registry for pushes from that node, and for pushes outside organizations/<org>/projects/<project> repositories.

  • Gateway or control-plane host: it holds the agent CA key, the registry token signing key and realm secret, and the database credentials. Treat all of them as leaked, and rotate each one (secret rotation, CA compromise).

  • Operator machine or SSH key: SSH to the hosts goes through pl-cp as the jump host. The Fleet app’s Terminal uses the Mac’s own ssh the same way (operator access). Remove the key from /root/.ssh/authorized_keys on every host and remove the machine from the operator’s tailnet. Disable the operator in the fleet admin, which revokes their sessions.

    set -a; . /etc/pushleft/admin.env; set +a; pushleft-admin operator disable --email <email>

4. Tenant data

  • Telemetry and analytics in ClickHouse are scoped to the organization by the gateway. Pushleft does not store raw IP addresses or full referrers.
  • The control plane cannot read the contents of managed databases. Secret values are in Vault, and PostgreSQL holds only references. Check the Vault audit logs for the affected paths.

5. Recover and close

  • Redeploy the affected applications from known-good commits with pl up.
  • Tear down the suspect deployments with pl down.
  • Run the audit commands of sections 2 and 3 again after the fix. Confirm that revoked identities show no new activity. failed_auth rows with reason = revoked are expected.
  • Write the timeline, the root cause and the customer notification decision in the ticket.

Check it worked

  • failed_auth_burst and auth_rate_limited_spike have cleared.
  • The section 2 and 3 audit commands show no new activity from revoked tokens, disabled users or the replaced node.

Do not

  • Do not delete or edit auth_events, deployment_events or agent_job_results. They are the evidence, and their triggers refuse changes.
  • Do not grant the API role BYPASSRLS or ownership to see more rows. Use pushleft_ops.
  • Do not export audit JSON into tickets that tenants can read. It contains the ids of other identities.
Rendered from the repository at build time. Edit docs/runbooks/security-incident.md to change it.