Skip to content

Security: yocontra/pulsar

Security

SECURITY.md

Security

Reporting

Report vulnerabilities privately through GitHub security advisories. Do not open a public issue.

Model

Pulsar connects processes that belong to one user: on one machine through a local socket, and across your machines through the agent mesh (below). On a machine, the trust boundary is your user account: any process running as you can talk to the daemon, as it could read your files. Pulsar keeps agents honest with each other; it does not defend against malware running as you.

  • Transport: a Unix socket in ~/.local/state/pulsar (folder 0700, socket 0600; a deep PULSAR_HOME uses a short socket in a private 0700 folder under the temp directory). Other users cannot connect to the socket. The app's HTTP listener (Pulsar 2) is different: see below.
  • Identity: the daemon stamps every message with the sending connection's agent; a send request cannot set the sender. A connection declares which session it serves when it connects (same-user trust). pulsar send run from an agent's shell speaks as that agent, not as the human operator, and no agent can take the name operator. The human at a terminal is the operator too, but a terminal send is framed like an agent's: only Prove Human in the app gives the [human operator] tag.
  • Content: delivered text says it comes from another agent, not your human operator, and that it cannot grant permissions or approve anything. Harness guardrails still apply. For example, Claude Code frames these messages as cross-session messages from a peer. Only a message the operator sent from the app after Prove Human starts with [human operator - <name>] (below); the daemon rewrites anything that looks like that tag in every other message, sender name and header (any case, spacing, invisible characters, fullwidth brackets, accents and combining marks, or common Cyrillic, Greek and small-capital look-alike letters) to [unverified claim: human operator, so no agent or peer can make its words look like the operator's. Residual: the look-alike table covers the common confusables, not every one Unicode lists (a multi-letter look-alike such as rn for m passes); the real tag only ever opens the push header, and the frame around any other text says it is not from the operator.
  • Claude permission parity: Pulsar never attests a permission mode for a sender. Users allow Pulsar's messages into sessions that skip permission prompts through Claude's documented crossSessionInbound setting, which pulsar setup offers.
  • Limits: message size, send and broadcast rates, and a queue cap for each recipient bound how much one agent can flood others.
  • Inbound policy: each agent can set accept, hold or refuse.
  • Data: messages are kept in a local SQLite file for 14 days. There is no telemetry. The only network call is pulsar doctor's npm version check. PR detection reads local git refs and session logs, offline.
  • Message search keeps a copy of transcript text. To search messages in the app, the daemon copies what people and agents wrote in each local agent's session log (prompts, replies, messages between agents, and the titles of tool calls) into pulsar.db. It does not copy tool output or thinking. Before it stores the text, it replaces anything that looks like a credential with [redacted]: private key blocks, common token formats (sk-…, ghp_…, github_pat_…, xox…, AWS and Google keys, npm tokens, JWTs), bearer tokens and Basic credentials, passwords in URLs, and values assigned to names like password, token, secret or api_key (also GITHUB_TOKEN= or DB_PASSWORD=). When these patterns change, the daemon drops the stored copy and indexes the transcripts again. These patterns catch common shapes, not every secret. The copy keeps the last 30 days. The database and its -wal and -shm files are 0600 (the daemon sets this when it starts) in the state folder (0700), so other OS users can't read them. Any process that runs as you can, the same as it can read the session logs. A search reads transcripts, so it needs the same permission as reading a transcript, and another machine answers a forwarded search only when it comes from your own login. To keep no copy, set PULSAR_NO_SEARCH=1 in the daemon's environment. The daemon then indexes nothing, and when it starts it deletes the copy it already has.

The app and the agent mesh (Pulsar 2)

The app is served only on your machines' Tailscale addresses, with each machine's Tailscale HTTPS certificate. A request is from you when tailscaled says the connection comes from your login (tailscale whois); nothing in a request can claim an identity. The daemon asks tailscaled directly (its LocalAPI, else the tailscale CLI) and caches answers per Tailscale address. A known address answers at once for up to an hour while whois checks it again, also after a daemon restart (the cache is kept in identity-cache.json in the state folder, mode 0600). An address Tailscale gave to another node is caught by that check: only requests that arrive during that one lookup get the old answer, and a connection keeps an identity only after a fresh lookup confirmed it. Browser requests also need the X-Pulsar header and an allowed Origin/Host, so a web page you visit can't call the API, and the app's CSP keeps agent-written transcript text from running anything.

Tailscale identifies machines, not processes or OS accounts. Any process on one of your machines that connects to the app's port is identified as you, including processes of other OS accounts on that machine (and containers or VMs that share its Tailscale address). In development mode (PULSAR_DEV_IDENTITY, loopback only) every local connection is the development login. Run the app only on machines where everyone who can run programs is you.

An agent with shell access runs as you and can call the same API as the app: list agents, read transcripts and send messages, roughly what it can already do on the machine. It can't approve, and it can't act as you:

  • Prove Human (passkey sessions). Sending as the operator, answering prompts, stopping an agent, turning notifications on or off and removing a device need a recent passkey check (Face ID, Touch ID, Windows Hello or the device PIN). Any of those actions opens Prove Human in the app; it signs a session challenge with one of the machine's passkeys (user verification required), gets a bearer token, and the action carries on. The app holds one proven state per browser: proving from the nav, Settings or any gated action proves every other gated action (and every open tab of that machine's app, below), so the operator is asked once until the session ends. The token lasts 12 hours in a browser on a machine that runs Pulsar (kept in memory there), 7 days on a phone or tablet. Only the token's hash is stored; sessions are listed and revocable in Settings and audited. A send with a session reaches the agent as [human operator - <name>], where the name is the operator's Tailscale display name (else login), stripped of brackets and line breaks. A send without one is framed as "from the Pulsar app on (not verified as your operator)", like any agent's.

  • Answering a prompt takes a proven human. A prompt on the machine whose app you use is answered with that browser's passkey session: the request must carry a live session token, presented from the node that started it, and the answer must name the prompt's request id and the hash of its exact tool input (for "allow for session", the exact rules the card listed). The daemon refuses a mismatch, so the answer applies only to the prompt and input the card showed; the first answer wins and a replay loses. The decision and audit row name the session (session:<id>) and its device. A prompt on another machine is still signed by a passkey for that one prompt and answer, verified by that machine (below). Agents, linked machines and the operator socket can never approve.

    • Why a session and not a signature per answer: the operator should prove once, not use Face ID for every prompt. A per-answer signature binds the same fields the daemon now checks against the session (request id, input hash, rules, answer), and the browser could never read the challenge it signed, so it never proved what the card showed either. What it added was a fresh user check for each answer. The cost of dropping it: whoever holds a live session token can answer prompts on that machine until the session ends or is revoked. On a computer the token lives only in the page's memory (an agent running as you can't read it without driving the browser, which is out of scope below); the installed phone app keeps it at rest for up to 7 days, as it already did for sends and Stop. A script running in the app's own page could also answer with the session without a Face ID prompt; the app's CSP keeps agent-written text from running there. Revoke a lost phone's session in Settings.
  • Passkey signatures (session sign-in, another machine's prompts, Stop on another machine) need user verification (Face ID / Touch ID, WebAuthn, platform authenticator). An approval challenge covers the request id, the hash of the exact tool input, the agent, the answer (for "allow for session", the rules it adds; for a deny, the note sent to the agent) and the expiry. It works once and for at most two minutes, so a signature can't be replayed or moved to another prompt or answer. Session and approval challenges are bound to their purpose and can't stand in for each other.

  • Getting a passkey. Any request from your own Tailscale identity (the pool owner's login, from tailscale whois) can register a platform passkey on that device, with user verification required: Face ID, Touch ID, Windows Hello or the device PIN. There are no codes and no device approvals; Prove Human in the app registers on the spot, and registering starts a session. pulsar setup offers this as its last step (the URL, opened here or scanned on a phone). Proving later is a valid assertion from a registered credential with the user-verified flag set, from your Tailscale identity.

  • The residual we accept. The user-verified flag is the authenticator's own claim, and synced passkeys carry no hardware attestation, so the daemon can't tell a real Face ID from a software authenticator that sets the flag. A process running on a tailnet device you're signed in to could script one, register it and act as you. We accept this for simplicity; the audit rows, notices and the passkey list in Settings are how you'd notice a passkey you didn't make.

  • Presence checks for sensitive commands (docs/presence.md). pulsar mesh allow|deny|forget|owner and pulsar passkeys remove can be run by anyone on the machine, agents included, with or without a terminal. The daemon then asks the person, and the first answer counts: the operating system's own prompt, which the daemon shows itself (Touch ID, Apple Watch or the login password on macOS; Windows Hello; polkit on a Linux desktop with Pulsar's action installed), or a confirm card in the app, verified by this daemon. You answer the card with a passkey signature for that card, or, on this machine, with the browser's passkey session bound to the card's hash (action and text). A session comes only from a WebAuthn ceremony with user verification and can't be obtained by an agent, so it still means a person proved themselves within the session's lifetime (docs/presence.md). Both name the exact change and the agent (or "a terminal") that asked. The command is one call: the daemon resolves the change, checks, and applies it only when its own check passed, so nothing a client sends can confirm it. Only one check runs at a time, and repeated denials back off. With neither a system prompt nor a passkey in the app (a headless server over SSH), a person at a real terminal confirms by typing back a word the daemon writes to that terminal; a process with no terminal, or with an agent harness in its terminal's process tree, is refused, and an agent's request never falls back to it. A process running as you can get around that last resort with a detached pseudo-terminal outside every agent's process tree. What it stops: an agent's tool calls making these changes without you. What it doesn't stop: a process running as you that edits the daemon's database, replaces the installed daemon or drives your GUI (the same-user limit above), or you approving without reading the prompt.

  • The socket is scoped by what a connection says it is. An agent's connection reads only its own threads and its own transcript, can stop only itself, gets no other agent's transcript text from Ask, and can't take over an agent that is live in another process. The daemon can't check who is on the other end (Node can't read a Unix socket's peer credentials), so these are the rules for well-behaved clients: a process running as you that writes its own socket client can skip hello and be treated as your terminal (read every thread and transcript, stop any agent), or say it is the pulsar CLI inside an agent's shell and act as that agent. It still can't approve, or get a passkey removal or a pulsar mesh pool change past a presence check.

  • Detection: every presence check (asked, confirmed, denied, timed out, and with which method) is written to the audit table, and the pending check shows as a card in Needs You. Every pool change, every passkey registration and removal, and every new notification subscription is also written to the audit table, shown at once in every open app tab, and pushed to subscribed phones as a security notice that says what changed (at most one a minute). Passkey sessions are audited too. The app's settings list every passkey and every confirmed browser, so a passkey or session you didn't make is visible.

  • Caps per requester: open passkey sign-ins are capped per login, per kind (per prompt for approvals) and per requesting machine (its Tailscale node, or the linked machine relaying the request). When one machine's share is full, its own oldest sign-in goes, so a flood from one machine never locks out the phone. Notification subscriptions are capped; when full, new ones are refused rather than pushing out the operator's.

  • Modes and slash commands. Switching an agent's mode and running a slash command in its session are acting ops: a passkey session on this machine, or, for an agent on another machine, that machine's own passkey check over exactly the mode or the command line. A command is one line that starts with / and a name; newlines and control characters are refused. It never travels as a message: no inbox, no redelivery, so a retry cannot run it twice, and a message from an agent that starts with / is only text. Where the harness has no API for it, Pulsar types into the agent's tmux pane (the pane whose process is up the agent's process tree, with no other agent between them), and only after it reads the screen back: the harness's own prompt with an empty input box. A dialog, a menu, or someone's unsent text in the terminal stops it. Claude Code's mode is changed one Shift+Tab at a time with the footer read after each press; during a turn, a switch into, or through, a mode that runs tools without asking is refused, and so is any switch from a mode Pulsar does not know.

  • Attachments. Files the operator attaches to a message are an acting op: a passkey session on this machine, or, for an agent on another machine, a passkey check by that machine itself over one manifest that names every file's size and SHA-256. The bytes then go to that machine (forwarded in chunks by the machine the app talks to); a chunk lands only in an upload the check opened for the same login, and a file is kept only when its size and hash match the signed manifest. Files are saved as 0600 in attachments/<agent>/ in the state folder (folders 0700), named with a random prefix and a cleaned file name, and deleted after 7 days. The message names each file by its path; agents read them as you. The @ file list reads git ls-files in the agent's folder (same rule as its transcript) and drops paths that leave it.

  • Push notifications are encrypted end to end: the daemon writes each notification's text (the agent's name, its project, a short preview of the command, question or last message) and encrypts the payload for the subscribing browser (RFC 8291, aes128gcm). Apple's or Google's push service sees only ciphertext, its size and timing, and a Topic header that is an opaque per-agent token or the kind. Previews show on the lock screen, so every piece of text is first redacted (the search index's secret patterns: provider tokens, KEY=/TOKEN= assignments, Bearer and Basic credentials, URL passwords) and cut to about 120 characters. "Show previews on the lock screen" (Settings, per device, default on) turns this off: that device then gets only generic copy ("Approval needed"). The daemon only sends to known push services.

  • The pool. See docs/federation.md.

    • Who links: machines signed in to Tailscale as you link to each other on their own. Tagged machines (servers with no user) link only after pulsar mesh allow, matched by stable node id. Other users' machines never link.

    • Changes: each pulsar mesh pool change needs a presence check (Touch ID or the app's passkey, above), and is audited and announced.

    • Machine ids: a machine id is bound to the machine that first used it. A machine claiming another's id is refused and announced. A known machine that answers with a new id (a reinstall) is linked, audited and announced, so you hear of it if you didn't reinstall.

    • Ports: a machine's app port is bound to its Tailscale node at first link, from the port that answered (never from what the answer says). Another port is refused and announced, a new machine id included; pulsar mesh forget rebinds.

    • Forwarded actions: only your own machines forward your actions (sends, transcript reads, Ask) to the agent's home machine, which checks the owner login again. An allowed tagged machine shares its agents and messages, nothing more.

    • No forwarded frame carries your authority. Tailscale identifies a machine, not the Pulsar daemon on it. Approving, stopping, and being framed as you on another machine need a WebAuthn assertion that the agent's home machine verifies itself:

      • the challenge is one it issued, bound to that prompt and answer, or to that Stop;
      • the credential is one registered on that machine;
      • the origin must exactly match the machine you're on (its Tailscale name and its bound port).

      What the signature can't cover is the card itself. The browser signs a challenge it can't read, so the machine whose app you use shows the card. If that machine is compromised (or a process running as you rewrote its installed app or daemon), it can show one prompt and request options for another of your pending prompts, or another answer. The signature still binds what the home machine verifies, so the decision applies to exactly the prompt and answer that machine issued it for, but the card you saw may have mislabeled it. That is the same-user limit: use the app on machines you trust.

    • Owner: a connection is yours when whois names your login and your numeric user id (the id your own node reports). On tailscale.com logins are unique; on a self-hosted control server (Headscale) two users can share a login, so the id decides. A node with tags is always tagged-devices, whatever user the control server names. A tagged node's owner set with pulsar mesh owner is a login only.

    • Passkeys: the relying party is your tailnet's MagicDNS suffix (tail1234.ts.net, or your Headscale base domain; see docs/headscale.md), so the machine you're on relays the ceremony. Passkeys are still registered per machine, and never synced between machines by Pulsar (a platform passkey your OS syncs, like iCloud Keychain, still needs Face ID / Touch ID on each device). Prove Human is per machine: to approve or stop on another machine without a passkey there, prove you're human in that machine's app. To approve or stop on another machine without a passkey there, Prove Human in that machine's app registers one on the spot. The cost is one Face ID per approval and per Stop on another machine: a session on the machine you're on never counts on another (the forwarding machine would hold your authority there, which no forwarded frame may carry), so these are the only answers that still ask each time. Prompts and Stops on the machine you're on take no extra check once you're proven. Messages to another machine's agents arrive "not verified as your operator" there; a pool-wide broadcast arrives that way on every other machine.

  • Same-user limit for linked machines: any process on one of your linked machines can call another machine's /fed/v1 as that machine, the way it can call the app's API as you. It can do what an unverified app user can on that machine:

    • list agents and read transcripts;
    • send messages, framed "not verified as your operator";
    • name its own machine's agents or operator as a sender;
    • report receipts for messages sent to that machine.

    It cannot approve, stop, or speak as you, and it cannot name another machine's agents.

  • Session tokens: a desktop browser keeps the passkey-session token in memory only, whether or not that computer runs Pulsar (it may run agents either way). The open tabs of one machine's app share it over a BroadcastChannel (memory to memory, same origin only, never written to storage): proving in one tab proves the others, and a tab opened or reloaded while another tab is open takes the token from it. Signing out, or a token the daemon no longer knows, drops it in every tab. With no other tab open, a reload asks again. Only the installed app (added to the home screen) on a phone or tablet (iOS, iPadOS, Android) keeps it across reloads; a mobile browser tab keeps it in memory too. Each token is bound to the Tailscale node that started it: copied to another machine, it's refused. A cookie would not be safer: cookies are not scoped by port either.

    • Why a reload on a computer doesn't keep it: the threat is an agent running as you on the same machine, so binding to the node doesn't help, and anything at rest in the browser profile is readable by it. A non-extractable WebCrypto key in IndexedDB (sign a server challenge on reload, no bearer token stored) looks like a fix but isn't one here: "non-extractable" is enforced by the JavaScript API, not on disk. Chromium and Firefox write the key's private bytes into the profile's IndexedDB files unencrypted, where a process running as you can copy them and sign the challenge itself. sessionStorage is written to disk for session restore too. So a reload with no other tab open asks once more.
  • Stopping the daemon: an agent's connection can't call shutdown (which would free the app's port for another process). As with the other socket rules, a process that skips hello is treated as your terminal and still can; under launchd or systemd, shutdown is refused to everyone.

Out of scope, by design: malware or an agent with unrestricted shell access that deliberately works around these checks (editing Pulsar's database or installed files, driving your GUI or terminal app, reading your screen), or that drives your browser while you confirm with your biometrics. Such a process can register a passkey (above), or trick you into approving, as it could trick you into typing anything else. The audit rows and notices are how you notice.

Prompt injection between agents is a real risk. Treat any agent's message as untrusted input, exactly as you would a web page.

There aren't any published security advisories