Operate bay

Security and privacy

What bay sends, where it sends it, what it guards, and how you can check every claim yourself.

bay runs on your machines, against your own Git remote. It has no server, no account and no telemetry. Your code goes only where your own Git remote is. bay is free and open source under the MIT licence, so you can read every line.

This makes bay fit for private repositories, in a company of any size. It does not replace your host's access control: anyone who can push to your remote can still push.

What leaves your machine

WhatWhere it goesWhen
Changes, evidence, talks, fleet records and each machine's last doctor verdictYour own Git remote, as commits, notes and refsWhen a bay command fetches or pushes
A download of bay's release list and archiveGitHub, over HTTPSbay update, and a background check at most once an hour
Your GitHub token, when GH_TOKEN or GITHUB_TOKEN is setGitHub's API only, over HTTPSWhen bay update reads the release list
A large file's bytes, over max_file_mibYour remote's own store, with your Git loginWhen bay stores or reads a large file, with no [plugin.assets] command
What your plugins sendWhere your plugin sends itOnly when your config names a plugin

Machines with no route out

bay needs no internet access. It needs only a Git remote that the machine can reach. With no network at all, move changes between machines with bay share --bundle. Turn off the update check there, and install bay from a release archive you verified.

Checks run in a sandbox

On Linux, a check runs in bwrap. On macOS, it runs in sandbox-exec. The check sees only its candidate, its adapter paths and system files. It gets no network unless its [[check]] entry says network = true. bay reads that entry from main, so a change cannot grant itself the network.

Your home folder, .git, other views and signing keys stay out of its sight. There are two read-only exceptions. One is a directory named in bay.checkReadPath, never the repository, a view or a key. The other is the repository's object store, for a check whose entry on main says inputs = ["history"].

Signed releases

A bay release key signs each release: the key held in hardware, or the 0.x build key. The install script trusts those two keys. bay update and the regular check trust the same two keys.

Both verify the signature and the sha256 before they install, and refuse a release that does not verify. A refused release leaves the installed program as it was. BAY_INSTALL_SKIP_SIGNATURE=1 checks only the sha256, which catches corruption but not tampering. Leave it unset.

Read the code yourself

bay is one Rust program that forbids unsafe code, with five direct dependencies: clap, serde, serde_json, sha2 and toml. Of the tools bay starts, only git, ssh and curl reach the network, and only your remote or GitHub. git may in turn run ssh, credential helpers or remote helpers that your Git config names. With no [plugin.assets] command, bay itself stores and reads large files in your remote's own store. It uses Git's ssh command on an SSH remote, and curl with your Git login on an https remote.

The rest run locally: ssh-keygen, tar, nice, ps, sudo -n true, id, hostname, kill, df, claude --version, codex --version, the sandbox and bay itself. On Windows, bay also starts tasklist, taskkill and Git for Windows' sh for a script check. On macOS, it also starts xcode-select. Your plugins and an external runner run outside the sandbox, with whatever access you give them.

sh
git clone https://github.com/gudjon/bay.git
grep -rn 'Command::new' bay/src    # every program bay starts
grep -rn 'https://' bay/src        # every fixed address bay reads

What each command writes

Every bay command declares what it writes, and what it never writes. bay help shows both under each command, and the CLI reference lists them. bay install --machine never writes hook entries, a project's settings or its Git config. Each Claude Code entry first checks that bay is present, so it blocks nothing on a machine without bay.

What bay guards, and when

bay guards four things, and each one holds only under its own condition. Read the condition before you count on a guard.

What bay guardsWhen it holds
Its own merges: what bay merges into main is exactly the candidate it checked.Always, unless you turn on batching or footprint reuse.
An agent's Git commands: the hook refuses a push to main, a force push in any flag spelling, git reset --hard and the other shapes Agents and hooks lists. It refuses an edit or a git commit in another actor's view too.Only with the hook: [agent] product = "claude" in .bay/config.toml on main, and bay's hook entries in the project's settings file on main. One clone runs bay install and merges that file. Every clone gets the hooks from main. With "codex", the hook refuses too. On both, a hook that crashes, hangs or fails lets the command run.
A file that never merges, a path main marks lockable, merges only from the change that holds its lock.For merges through bay: a change without the lock is refused LOCK_NOT_HELD. The hook stops a second edit tool's write early. bay stops a shell write only at the merge. A push to main outside bay checks no lock.
Everything that reaches main, such as a merge in a forge's web page or a script's push.Only on a main from bay host with a key registry that signs everything, or on a forge main that only the runner's identity may push.

Keys are optional

Without a key registry, bay runs unsigned, and every check and review record counts. Add a registry with bay enrol when only enrolled keys may sign. The Keys page shows how.

Report a vulnerability

Report it privately: follow SECURITY.md in the bay repository, or email hello@getbay.io. Do not open a public issue.

Limits

  • Windows has no check sandbox, so a check there fails unless its owner sets bay.runnerSandbox to none.
  • The update check reaches GitHub at most once an hour, and a download stops after 300 seconds.