# Brigade security Read these three sentences before you install Brigade on a team's machines. 1. Brigade puts another person's text into your Claude Code session by itself. It does that in every permission mode, including bypass mode, auto mode and `claude -p`. 2. **The join secret is the team's security boundary.** The join secret is the password that lets someone into a team. Anyone holding it can join, pick any display name, and reach every session in the team. 3. **There is no end-to-end encryption.** End-to-end encryption would mean only the two sessions could read a message. Brigade has none, so whoever runs the backend project can read every message. This page summarises. The full threat model, with its 77 test ids, is [`docs/research/security-threat-model.md`](research/security-threat-model.md). It defines the ids; this page does not repeat them. ## 1. Who and what Brigade trusts A member of a team holds four things: - the **project URL** of the backend, such as `https://.supabase.co`; - the **publishable key** of that project; - the **join secret**; - their own **credential directory** (`~/.config/brigade/teams/`), which holds their credential. The URL and the publishable key are not secret. They are meant to be shared, and Supabase says so. The join secret and the credential directory are the two that matter. Brigade is designed against seven kinds of attacker. Six of them are held off. The seventh is accepted. - Someone on the internet holding the publishable key. They can reach the backend, but they are not a member, so they read nothing. - Someone signed in to the backend who is not a member of your team. Same answer. - A member of a different team on the same backend. - **A teammate whose session has gone hostile, or has been talked into something by text it read.** This is the biggest real risk and section 3 is about it. Where the project syncs folders, their machine also writes into yours (section 12). - Someone who got hold of the join secret. They become a member. - The supply chain: whoever could tamper with the binary you download. Section 10 covers it. - **Any program running as you, on your own machine.** This one is **accepted**, not defended against. A program running under your user account can read your credential files and Brigade's state files. Section 8 says what that means and section 10 says what narrows it. **What is not a boundary.** Display names and labels are free text. Any member can pick any of them, copy someone else's, and two members can have the same one. Brigade never treats a name as proof of anything. The only identity the server stamps is the `from-principal` value in each message, and the team roster is keyed on that same reference for every active member. `brigade team members`, which prints one line per member, puts the leading characters of the reference beside each label, in brackets (it also marked each label `(unverified)` until the owner ruling of 2026-11-09, card 193: what a person reads shows the label alone); those characters are the same on every line that member appears on, so you can recognise the same person across all of their sessions, and a reference that sanitises away to nothing prints as `[?]`, so a labelled line always carries the bracket. The session roster is a table, and a table has no width to repeat either on every row: from 0.8.0 `brigade sessions` prints a label alone in its `MEMBER` column, and the bracketed characters only for a session whose member has no label at all — the `note` in its `--json` form carries the warning the cells no longer do. The principal, never the label, is the identity; the bracketed characters are what tells two members who chose the same label apart. In the roster they are also, from 0.8.0, **forgeable**: a label is free text, so a member can choose one that reads exactly like the bracketed form an unlabelled session gets, and nothing in that table distinguishes the two. Only the `--json` form of either command prints the reference in full — and the full reference is what `revoke-member` and `transfer` take, so an administrative step reads it from `--json`, never from the brackets, and so does anything else that turns on who a session belongs to. **Where the default label comes from.** A member who gives no `--label` is labelled with the email address of the Claude account their install is signed in to. Brigade reads that address from Claude Code's own configuration file (`oauthAccount.emailAddress` in `.claude.json`: first the one under `CLAUDE_CONFIG_DIR` when it is set, or under Claude Code's default configuration directory otherwise, then the one in the home directory when the first names no account, so a Claude profile whose own file carries no account, such as one signed in with an API key, sends the default profile's address), read-only and best effort: a missing, unreadable or malformed file simply leaves the label empty. A failed read leaves one debug line on stderr saying that the account email was unavailable, and that line is fixed text — the address is never in it, and neither is the path, which would carry your home directory and your `CLAUDE_CONFIG_DIR`. Brigade **writes** exactly one thing under Claude Code's configuration directory — the `"crossSessionInbound": "accept"` member of your `settings.json`, in a session that bypasses permission prompts when the file has no `crossSessionInbound` at all (section 6: one member inserted by text, every other byte of the file as it was, checked before the atomic write; the plugin option `claude_inbound_setting` set to `false` stops it) — and the only things it ever **reads** there are this `.claude.json`, your `settings.json` (the two scans: the `crossSessionInbound` setting of section 6, at session start and again at every prompt, and the `permissions` arrays for a rule on `brigade doing`, section 5, at session start — each read for one fixed answer, with nothing from the file sent, stored or logged; in a session that was already running when the plugin updated, whose session start never read it, the `permissions` read runs once more at the first prompt after the update that does not restart the watcher, retried until the adapter answers) and the registry entry for the session's own pid (`sessions/.json`) — never the 0600 `sessions/*.key` peer keys that live in that same `sessions/` directory. Brigade does keep the label it sent: the `team join` (or the `team create`) that makes you a member sends it, and the adapter records it as `human_label` in that membership's `team.json` in the credential directory (`~/.config/brigade/teams//`, mode 0600), which is the copy `brigade team status` and `brigade whoami` print. Beside it, `label.json` records where the label came from: its source, the Claude Code configuration file an account address was read from, the time and a SHA-256 of the label, never the label itself. The session map and the start facts the hooks leave keep only the *option*, and a session start reads the address again when it needs it, so no file under the state directory holds it. The credential directory is per machine user, not per Claude profile: every Claude profile on the machine is the same member, under the label of whichever profile joined, until a profile sets the plugin option `config_dir` to a store of its own and joins from it. So joining a team shares your account email with the members of that team, and with whoever runs its backend (section 2). To opt out, set the plugin option `label` to `none` before you join, or to any text you would rather be known by; `--label` on the join command does the same for that one command. Changing the option later changes what the next **first** join on this machine sends; it does not rewrite the label the team already holds, and a re-consent (`team join` in a second checkout of a team you are already on) sends no label at all. Only your own word changes a label the team holds: `brigade team join --label