# Changelog All notable changes to the bastion. The version in `deploy/VERSION` on `main` is the next release, not necessarily the one machines run. A merged change waits there until it is published. The published version is whatever names at the moment, and it is the only version a bastion will update to. Between a merge and a publish, `main` is ahead of the manifest. Two things can keep a version listed here from reaching most machines: - **Superseded before publishing.** When a second release is merged before the first is published, only the later one is published, and it carries the changes of both. - **Held.** Automatic updates move our own machines to a published version first, and everyone else only after it has run on them for a day without a machine going silent. A version that fails that check is held: automatic updates move no other machine to it, and it is never released again, only superseded by a newer version. From 0.39.1 on, a heading marks a version *not published* or *held* once that is settled. The newest entries may not be published yet; the manifest says which version is. Older entries are not marked. ## 0.58.0 - **A Host answers four common questions about a machine itself, instead of handing the person a command to run.** Each is a read-only observe op, granted under `observe` like the rest of the family and listed in the ops the machine advertises, so a grant can name it. Each value is checked against a written rule before anything is read or run, and a refusal says which rule it broke without repeating the value. Off Linux each answers `unsupported`. - `observe:folders [depth]`: the 25 largest folders under an absolute path, 1 to 3 levels down (2 when not given), and the total, on that path's own filesystem only, counted the way `du -x` counts (disk blocks, a file with several links once). Only folders are named, never a file. What could not be read, and filesystems mounted under the path, are listed against the folder that holds them, with a reason and a count. `/proc`, `/sys`, `/dev`, a relative path, a path containing `..` and a link that leads into those are refused. A walk that runs out of the 20-second budget answers with what it measured and says every size is at least that. The walk follows no link: a folder swapped for one while it reads, or reached through one put above it, is listed as changed and not counted. A read that never returns (a network mount that stopped answering) is answered without at the budget, and while four such reads are still waiting no new walk starts. - `observe:journal [minutes]`: one systemd unit's journal for the last 1 to 60 minutes (15 when not given), up to 5000 lines and 200 KB, newest kept. A name with no type is a service, as with `systemctl`. The name must be in systemd's unit-name alphabet and one this machine has, loaded now or installed; otherwise it is refused, with the units whose names come close. Until now a Host could read logs only from a Loki, which most machines do not run, so it asked the person to run `journalctl` instead. - `observe:logins [hours]`: sshd's failed and accepted logins over the last 1 to 168 hours (24 when not given). Failed attempts are counted and ranked by source address and by user name, 20 of each; the last 20 accepted logins come with user, source, method and time. A user name the other side sent is cut to 32 characters, and anything outside the characters account names use reads `?`. No raw line, key fingerprint or password is returned. Only lines written by sshd running as root are read, so another account on the machine cannot add login lines or bury the real ones under its own. - `observe:cert [server name]`: the certificate this machine's own listener on a TCP port serves: subject, names, issuer, dates, days left, and whether the chain verifies against this machine's roots for that name. The port must be one `ss` shows listening here. The handshake goes to loopback first and otherwise only to an address of this machine the listener is bound to, never to one another machine could hold. - **A journal the bastion cannot read is said, not shown as empty.** `journalctl` run by an account outside the journal's groups shows only that account's own lines, which would look like a quiet machine. `observe:journal` and `observe:logins` first check that the bastion can read the system journal (as root, which is how the networked install runs it, or as a member of `systemd-journal`) and otherwise answer with the reason; `observe:logins` then reports its counts as -1, never 0. - **A grant from now on can be held to a window and a rate, by the machine.** An op grant's bounds may now carry `_window` (days, from, to and a zone, read on the machine's own clock; a window may wrap midnight) and `_rate` (at most so many applies in any 24 hours, and so many seconds between two). An apply outside them does not run, spends no use and is no strike toward the quarantine: the answer is `not_now`, exit 75, with the bound that held it and when it next could run. A dry run is never held, and an apply with arguments outside the op is still refused as before. The zone database is in the binary, so a zone reads the same on every machine. An older bastion refuses both keys as naming no param, so a grant carrying them fails closed there; the enforcing report says `grant_run_bounds` on a bastion that holds them. - **The machine keeps the runs, and who approved.** Each grant's record in `ops.json` now holds the times of the applies that spent a use, the key that approved it (the approval device's key, or the factor enrolled at this console) and the machine's own seal over the record. The rate is counted from that log, so it holds across a restart. A record edited outside the bastion holds no grant until it is dropped and approved again, and so does a grant installed by an older bastion (none was held when this shipped). A grant whose approving key is no longer pinned is refused; `unpin-device` drops every grant that key approved, so pinning it again brings none back. - **`op_grant_drop ` takes a grant back from the Host.** It is a tighten: no quarantine holds it and no approval is asked. A grant not held here is already gone and is answered as dropped. At the machine, `ops drop --all` takes back every op grant a Host holds, beside `ops drop `. - **An action op may have no program.** With `interpreter: none` and no `run` file, an action op's verbs are its whole work. Nothing the Host wrote executes, so it needs no sandbox and runs on a machine with no overlay. Its dry run is the verbs' own read of what each would move, and its apply the verbs and the log checks. Such an op that ships a `run` file is refused, as is one that names destinations, a builder, reads, or a credential no verb uses. An op with a program is still refused where the sandbox is not. A verb whose tool the machine lacks refuses the run as the machine's own state, never a strike, and the enforcing report now says, for each verb, whether this machine can run it (`verbs`). - **On your own machine, an action op reaches the internet, never your network.** On a machine no fleet has anchored, an action op's destination is never a private, ULA, CGNAT or reserved address (also inside NAT64 or 6to4): one written as an address is refused when the op arrives, and a name is refused at apply if any address it resolves to is one. Another computer of yours is reached through a bastion on that computer. An anchored machine keeps private destinations, since a fleet's ship steps reach its own private control planes. A verb's fetch is held the same way (`tree.checkout` fetching its tree's repository, `k8s.set_image` fetching its source to check ancestry): the repository's host is checked once and git is held to that address, so an op with no program reaches no more than one with a program. On an anchored machine too a verb's fetch is held to its checked address and is never this machine, its loopback, a link-local address or a cloud's metadata service. An image `k8s.set_image` would put live, which the machine's container runtime pulls by name, is refused on your own machine when its registry is on your network or this machine, both when a program reports it and when the verb would set it. `k8s.set_image` now says it needs git as well as kubectl, so a machine without git is told before a run. What stops working: a ship step on your own unanchored bastion that deploys to another computer on your LAN, fetches from a forge on it or rolls an image from a registry on it; and a verb's fetch needs git 2.37 or newer, which holds a fetch to one address. ## 0.57.0 - **Pairing with a Cloud Host is one pasted line.** A Host's "Set up a bastion" card now gives a pairing code, `skp_…`, that carries the token, the Host's enroll address and the SHA-256 of the Host's CA. `pair ` (or the code on standard input after `pair -`) takes the CA from the enroll port's own TLS chain, keeps it only under that fingerprint and only when the port's certificate verifies under it for `host.cseries.internal`, then pairs exactly as `--redeem-url` with `--host-ca` does. There is no certificate file to save, so the step people skipped ("open host-ca.pem: The system cannot find the file specified") is gone. `--host-ca` still works as before. - **The installers pair and start in one go.** `install.sh` with `PRIVATAE_PAIR_CODE=''` in its environment (the card's line is `curl -fsSL https://privatae.ai/bastion/install.sh | PRIVATAE_PAIR_CODE='skp_…' sh`) and `install.ps1 -Pair ''` install or update the bastion as before, hand the code to `pair -` on standard input, then start the bastion, or restart it when it was running, and end with one plain sentence and `status`. On Windows that is the logon task (every running copy is stopped first, so the new one gets its control port), or the service on a networked machine; on a machine whose bastion is already the Windows service, `-Pair` pairs that service from an Administrator PowerShell instead of installing a second bastion. On Linux as yourself it is a systemd user unit, with lingering asked for and the outcome said; on macOS a LaunchAgent; as root, the system service. Without the code both installers behave as they did. - **The code is in no process's arguments.** On macOS and Linux it comes only from the environment: an argument would sit in the installer shell's command line for the whole install, where any user of the machine can read it with `ps`, and one at the same address could redeem it first. A process's environment is readable only by its owner and root. `install.sh` reads the variable before it starts any program and unsets it, so nothing it starts inherits it. An empty or partial code is refused before the download. `install.sh` now names no argument it refuses, so a code given in the wrong place is never printed back. On Windows the code stays a parameter of the script, inside the person's own PowerShell. - **On Linux, as yourself, the copy that serves is the one the installer started.** Before the user unit starts, every copy of your bastion running outside it (left in a terminal, or from another path) is stopped, as install.ps1 does on Windows. Otherwise the unit's copy only waits behind the old one's run lock, and the old copy never reads the new pairing. The installer then checks for a few seconds that the unit is running and keeps the same process. A unit that keeps restarting is reported as not running, with its log command, and the install fails. - **A local bastion can serve a second Host, when you say so at the machine.** A local bastion used to serve one Host and refuse any other, so a person with two Hosts of their own (a Cloud machine beside a platform Host) could not pair the second at all. `pair` now asks on this machine's terminal, `/dev/tty` or the Windows console, never standard input, so a code piped in by an installer still needs a person to answer: "This computer already serves your Host … Add … as well? [y/N]". Only y or yes adds it; the first pairing is untouched; with no terminal it is refused. Other callers (`claim-anchor`, the pairing op) keep the refusal. On a local machine that serves two Hosts, each changes only the servers it built and stops only the coder runs it started. The name in the question is the token's, so anything in it but a plain host name is shown quoted and escaped. - **`pair` exits 3 when the Host is already paired here.** Nothing changes, and the installers report it as already connected. Over TCP, with a pairing code or `--host-ca`, a Host of the same name under another CA (Cloud names repeat) is a plain refusal, not exit 3, before the redeem and after it. A pairing code that names a field twice is refused. - **An enroll port that does not answer says why within 10 seconds.** A Cloud Host opens its pairing port only to the address the browser used when the card was opened, for 15 minutes; from anywhere else the port does not answer, and `pair` used to wait for the system's connect timeout. It now stops after 10 seconds with that reason and what to do. - **The local-mode refusal names this system's way to a networked bastion** (`install.ps1 -Networked` from an Administrator PowerShell on Windows, `install.sh --networked` as root elsewhere) and says that the Host already paired would have to be paired again with it. It used to name the Linux script on Windows. ## 0.56.0 - **New: a Host with no platform can use the model servers on this computer.** A Host running on this computer, or in a virtual machine on it, can reach the model servers here (Ollama, a local language model server, a personal-data filter) by name through the bastion, and is told which of them it can use. It starts working once your Host supports it. - **Changed: for a Host with no platform, model management reaches only this computer.** Listing, downloading and removing models for such a Host now reach the model server set here only when that server is on this computer. One set to another computer is refused, and the bastion's log says which setting is not used and what to set. Such a Host is also told only of the model servers it can use, and no longer of the service slots, or of coder runs when it is in a virtual machine, since neither runs for it. - **Changed: on a local machine, the internet lane reaches only public addresses.** A Host can no longer use a local machine's internet lane (the egress lane) to reach devices on your home or office network at their private addresses, such as 192.168.x.x or 10.x.x.x, or the private ranges many VPNs use, as was already the case on an anchored machine. Your own machines are reached through their approved lanes. A device that has a public address, as many do over IPv6, is still reached at that address. - **Changed: plain-HTTP requests through the bastion are checked one per connection.** On the internet lane and a coder run's web proxy, a plain-HTTP (not HTTPS) connection now carries one request, which is checked before it is sent on; anything sent after it closes the connection. Before, later requests on the same connection reached the destination unchecked. A malformed or ambiguous request is refused, and every refusal now says why. - **Safer: file access in a folder you shared stays inside it.** When a Host lists, reads or moves files in a folder you shared with it, the bastion stays inside that folder. If the folder, or any folder on its path, is later swapped for a link to somewhere else, the bastion refuses until the folder is shared again, and a file or folder inside it swapped for a link is never followed out of it. Search, which goes through the folder's own search agent, is not part of this change. - **Safer: the bastion limits how much it holds of what a Host sends.** On the internet lane, the terminal and root commands, coder runs, the memory mirror (the copy of your Host's database kept here) and the bastion's check-in with its Host, a message from the Host is read only up to a set size and refused past it, or passed along or dropped as it arrives. A Host can no longer make the bastion hold a message of any size in memory. A coder run's web proxy now carries at most 1024 connections at once, and the memory mirror at most 8. - **Safer: asking to share a folder with a Host has limits.** Any user on the computer can send that ask to the bastion, so each ask is now read only up to a set size, and the number of asks open at once is capped, per user and in total; past the cap, the ask is told the bastion is busy and to try again. - **For contributors: the fuzz check in CI no longer fails on a timing bug in Go's own fuzzer.** A real failure still fails it. The program itself is unchanged by this. ## 0.55.3 - **A pairing change reaches every Host on the machine at once.** Each pairing beats its Host every 60 seconds, and the beat is how every Host on the machine learns that a pairing went active or was revoked. Approving or revoking a pairing changed it on disk immediately but triggered no beat, so every Host kept the old state for up to a minute: a connection request to a Host the anchor had just approved was refused as not on a shared machine. Now a grant that makes a pairing active, and a revoke, make every running pairing beat right away. A refused grant, or a re-sync of a pairing that is already active, beats nothing. ## 0.55.2 - **A search reply says how its text was sanitized.** Every successful reply from the bastion agent (search, read range, catalog) was stamped `sanitized: true`, while the agent the bastion deploys runs in `flag` mode, which replaces e-mail addresses, phone numbers, card, bank and ID numbers, IP and MAC addresses and keys, and leaves names, street addresses and dates of birth in. A reply now carries `sanitize_mode` (the mode this bastion wrote into the agent's manifest, or for an agent run by hand the mode it reports, else `unknown`), `sanitized` true only for `sterilize`, and `sanitize_note` saying what the mode leaves in. A reply cannot raise the mode this bastion wrote. - **The README says what the bastion needs.** It said "no Docker, no Python". The bastion itself needs neither, and the README now names the optional features that do: coder runs, the service slot and the memory mirror need a container runtime, folder search needs Python 3.8 or later, Python ops need `/usr/bin/python3`, and the Linux accessibility reader needs python3 with AT-SPI. It also said Go 1.25; `client-go/go.mod` needs 1.26. - **GitHub releases carry their files.** A new workflow, `.github/workflows/release.yml`, runs on each release tag (and by hand for an earlier one): `deploy/release-assets.sh` rebuilds the release from its tag, writes the release manifest from the rebuilt binaries with `deploy/manifest.py` (which `publish.sh` now uses too, so the two cannot differ), and fetches the signature published for that manifest. Only when the signature verifies are the six binaries, `version.json`, its signature and `SHA256SUMS` attached to the release. Releases 0.53.2, 0.54.0 and 0.54.1 were rebuilt this way and each matched its signed manifest. - **The lab harness is out of the release build.** `mode=lab` drove one test lab's own cluster and database, and its layout was in the published source. It is now built only with `-tags lab` and is not in the published source; a release bastion answers a lab run with exit 126, as a bastion without a lab always did. - **staticcheck is clean** on linux, darwin and windows, for both Go modules, and CI runs it (`deploy/staticcheck.sh`, a pinned staticcheck release, with the per-OS runs merged so code used on one OS only is not reported unused). Unused code is removed and error strings no longer end in punctuation; no behaviour changes. - **The claim tests a container cannot run now run on GitHub.** 25 tests the claims table cites (the op and action-op sandboxes, the egress tests in private namespaces, the root command watch) skipped in CI, because a CI container has no systemd, no namespaces of its own and no nftables. A new job runs every cited test as root on GitHub's discarded virtual machine and fails if any skips; `deploy/check-claims.sh --skipped` names them. ## 0.55.1 - **A root op's tasks are capped.** An op's tasks were capped at 64 with `RLIMIT_NPROC`, which the kernel never applies to root, so a root op could start as many tasks as it liked until its time limit. A root op now runs in a systemd scope of its own in `privatae_ops.slice` with `TasksMax=96`, which counts every task in it, root's included: the op's 64 and the bastion's two processes that start it. Those two run with one CPU's worth of Go runtime threads (`GOMAXPROCS=1`), so they take the same share of the cap on a machine of any size: with the runtime set for 64 CPUs they took 44 of the 96, and set for 256 no root op could start. The scope's process reads its own cgroup's `pids.max` before the op starts, and the op's report carries `tasks_capped` only when that is the cap. Where no scope can be made (no systemd, no pids controller, or `systemd-run` failing), the op runs as before and its report's `tasks_note` says its tasks were not capped, and why. A user op's tasks are held by `RLIMIT_NPROC` as before, and its report says so. A scope is killed with the run at the time limit, when the bastion stops, and by the startup sweep. Two ops can run at once, so an action op's memory watch now reads each other op's unit or scope in the slice as another program: it yields when a root op beside it makes the machine wait on memory, as it did when root ops ran in the bastion's own cgroup, and its own unit still never counts. ## 0.55.0 - **A local machine's egress lane never reaches the machine itself.** Before, on a machine with no anchor the lane vetted no destination, so a host could dial this machine's own services through it: `POST http://127.0.0.1:11434/api/pull` reached ollama whatever the `models` switch said. It now refuses `localhost` names, loopback and unspecified addresses (`0.0.0.0/8` and `::` included), link-local addresses (the cloud metadata address included), the rest of `64:ff9b::/32`, the deprecated IPv6 forms below, and any address this machine takes as its own, as the anchored lane checks them, also inside an IPv4-mapped, NAT64 or 6to4 address. The LAN stays reachable: a private, CGNAT or reserved address that is not this machine's is dialled. Every address a name resolves to is checked, and only those addresses are dialled, never the name again. - **A container or VM on this machine is this machine, not the LAN.** On Linux, an address the kernel routes straight onto a container's veth, or onto a bridge whose every port is a veth, a tap or a dummy (the bridge networks Docker, Podman, LXD and libvirt make for their containers and VMs), is refused as this machine. A route through a gateway on such a link leaves, and a link an IPv4 or IPv6 default route of the main table goes out of (any nexthop's, for a multipath default) is never inside: a bastion that is itself in a container reaches the internet through the machine it runs on, and dials the network on its own veth, its LAN included, as before. Before, the local egress lane dialled such an address as LAN, so a host could reach a service in a container here, `172.17.0.2:11434` for one, though the same service on loopback was refused. A bridge with a network card, a bond or a VLAN among its ports is still the LAN. Every lane reads the same check, so a coder run's proxy, the anchored lane and the backup lanes now also refuse a public address on such a network; their private addresses were refused already. macOS and Windows have no route lookup here, so there such an address is still dialled. - **Every lane refuses the deprecated IPv6 forms.** IPv4-compatible `::/96`, IPv4-translated `::ffff:0:0/96` and site-local `fec0::/10` are no destination of their own, and where each is delivered depends on the platform. A coder run's proxy and the backup lanes already refused them; the egress lane now does too, anchored or local, by address and in any answer a name resolves to. The anchored lane refuses nothing else it did not refuse before. All the lanes now read one address classifier. - **Both egress lanes try each vetted address, as Happy Eyeballs does.** A name with more than one address is dialled at each in order, the next starting as soon as an attempt fails or when none has answered within 300 ms, and the first to answer is used; the others are cancelled, and one that connects anyway is closed. Before, the anchored lane dialled only the first address, and a coder run's proxy gave each address an even share of the dial budget, so an address whose packets go nowhere held up the next one for seconds. The next one now starts within 300 ms, about what the OS dialler took when it was given the name. - **`pair` says to enrol a second factor after every pairing that has none.** It said so only after it anchored a networked machine, so a local pairing, one over TCP or a unix socket, and a later host on an anchored machine were told nothing, and on a local machine a folder grant then installs on the host's signed grant alone. The line names `--host` when more than one host is paired, and `sudo -H` only when `pair` itself ran with machine authority, so a local install is told to enrol as its own user. A pairing that keeps its factor (a `--replace`), or a machine with an approval device pinned, is not told. - **A root-command grant lasts at most 30 days.** It was a year. `root-exec grant --for 31d` is refused and says the longest term; grant again before it ends. A grant given under the longer term ends 30 days after it was given, and `root-exec` shows that end. A grant file with no grant time is refused, since it cannot be held to the term. - **SECURITY.md, the README's license section and `docs/host-on-this-machine.md` name each kind of Host.** They described only a Host on Privatae's platform. They now say that a C-Series Host runs on your own machine in its own Linux virtual machine, is open source (Privatae/cseries, AGPL-3.0-only), needs no Privatae account, and that `npx cseries` sets the bastion up networked, paired, anchored and with a second factor on every pairing (the commands are shown); that C-Series Cloud and a network membership are optional and paid; and that a Host on Privatae's own platform is the case where the Host's software is not open source. - **Security reports go to security@privatae.ai,** the address privatae.ai/.well-known/security.txt names. SECURITY.md said info@. - **`docs/models.md` says what stops a host changing your models on a local machine.** It told you to scope the pairing on your host, which a local machine never reads. There, switching `models` off for the host is what filters the ollama forward, and the egress lane is no way around it. On an anchored machine the forward filters for every pairing, which the page now says too. - **A tunnel endpoint the host sends must be one host and port.** The pairing response's `endpoint` and `endpoints`, and the endpoints in a heartbeat's rotate directive, were written into the WireGuard configuration unchecked. That configuration is one setting per line, so an endpoint with a newline in it added settings of its own: `203.0.113.7:51820` followed by a newline and `allowed_ip=::/0` let the tunnel carry every IPv6 address, not only the host's. An endpoint must now be an IP address or a host name with a port from 1 to 65535, and nothing else, no space or control character. A pairing response with any other is refused and nothing is saved, and a rotate directive with one is not acted on. A WireGuard key must be 32 bytes. The tunnel's peer is now configured in one place, which checks every value it writes. - **A pairing file that holds such an endpoint is listed but never served.** An older build may have saved one. Its tunnel and lanes never come up, and `run` names the file and says why. Every other pairing still loads and serves, `status` shows the pairing as `invalid` with the same reason, and `unpair` removes it, as does pairing that host again with `pair --replace`. One such file no longer stops `run`, `status` and `unpair` for the whole machine. - **Such a pairing cannot hold the anchor or be approved, and no host is told of it.** `claim-anchor` marked it active and anchored the machine to it; it now refuses, says why, and changes nothing. An approval from the anchor host marked it active and started it with the endpoint its file holds; it is now refused. The heartbeat and the anchor host's pairing list leave it out: a host knows only the states active, pending and revoked, and could show a pairing in any other state as active. - **A harness run's agent credential is readable only by the harness.** The credential file was readable by every user on the machine (0644), in a folder anyone could open and write (0777), for the length of the run. A bastion running as root now hands the folder (0700) and the file (0600) to the user the harness image runs its agent as (uid 10005). One that is not root cannot hand them over, so it leaves them open for the agent, and the folder sits inside one that only the bastion's own user can enter. - **A harness run's tree is out of other users' reach.** In a worktree run the tree mounted at `/work` was opened to every user (0777), its top folder included, in the shared temporary folder. Any local user could read or change the Host's tree during the run. It now sits in a folder only the bastion's own user can enter, as a git run's tree already did, and a run refuses a tree whose folder other users can enter. Opening the tree for the agent no longer follows a link in it. Before, on a bastion running as root, a link in the repository, to `/etc/shadow` for example, made the linked file world-writable. A file is opened as 0666, or 0777 if it was executable, so a git run no longer commits every file as executable. - **A worktree run returns only what is in its tree.** A file swapped for a link while the tree was being packed, or a folder swapped for a link, was read through the link, so a bastion running as root could return any file on the machine to the Host. Each name is now opened inside the folder already open above it, never through a link, and goes in only if it is the plain file or folder that was looked at. On Linux a device or pipe swapped in for a file in that gap is not opened either: opening some devices does something by itself. Links, pipes, devices and sockets are left out (before, each came back as an empty entry of its kind), and the run's result names them in `worktree_skipped`, with `worktree_skipped_count`. - **A coding agent can no longer run code as the bastion through the repository's git settings.** In a git run the bastion committed and pushed in the agent's own folder, `.git` included, so a hook, a file system monitor, a filter, a signing program or a changed remote the agent set ran as the bastion's own user, which can be root, or sent the push, with its token, to another server. The bastion now makes its own fresh clone, in a folder the agent cannot reach, copies in the agent's plain files and folders (never a link, never anything of its `.git`), and commits and pushes only there. The branch gets one commit with the agent's final files; the agent's own commits are not pushed one by one. A link the agent made is left out and named in `worktree_skipped`; a link the repository already holds stays as it is. Every git the bastion runs for a harness or a mirror runs with no hooks, no file system monitor, no `ext::` transport, and no system or user git settings of the machine. - **The agent in a git run no longer holds the push token, and no process argument shows it.** The agent's clone named the repository with the run's token in it, so the agent could push straight to the repository during the run, past the bastion's copy, and every git the bastion ran for the run had the token in its arguments, which any local user can read. Every git call now names the repository without the token and gets it from its environment, as an `Authorization` header sent to that repository's address only; no clone's config holds it, and a run is refused if the token is in any file of the agent's clone's `.git`. - **A user-privilege op is no longer refused because other programs run as its user.** An op's tasks are capped at 64, and the cap counted every task the machine ran as the op's user (`privatae-session`, or `nobody`, which system daemons share), so on a busy machine a user op could not start or could not fork at all. The op now runs in a user namespace of its own, as the same user and seeing every file's real owner, where the cap counts only its own tasks. Where the machine has no user namespaces, the op runs as before. - **A harness run's git calls carry the harness identity.** git made one from this machine's user and host name instead, which cost a host name lookup per call (seconds where there is no resolver) and wrote this machine's name into the clone handed to the agent. - **A run whose agent container cannot be removed uses nothing of its tree.** A failed removal was ignored, so an agent still running could go on writing the tree while the bastion read it. The run now fails, says so, and copies, returns and pushes nothing. - **A git run whose commit fails pushes nothing and fails.** A failed add or commit was ignored and the branch pushed anyway, and the run read as successful. It now ends the run with an error and no push. A run in which the agent changed no file pushes no branch and reports `changed: false`. - **Repositories that keep files in Git LFS work in git runs again.** No user git settings are read any more, so the LFS filter `git lfs install` sets there was lost. When `git-lfs` is installed, the bastion now supplies the standard LFS filter itself on its own git commands, sends the large files before the push, and sends them only to the repository's own LFS address, whatever a `.lfsconfig` the agent wrote names. A filter of any other name in a `.gitattributes` still runs nothing. Tested with git-lfs 3.7.1. - **Names that open as `.git` on Windows or macOS are left out of a git run's copy.** Besides `.git` in any letter case, the copy now leaves out `.git` followed by dots or spaces or a `:`, the short name `GIT~1`, and `.git` with the characters HFS+ ignores, the names git itself refuses, so no file the agent made can be written into the clean clone's own `.git`. - **A run's tree has a size limit, and a file is never read into memory whole.** A file of any size in the tree, even one that takes no disk space, was read whole into memory, so an agent could make the bastion run out of memory. A worktree run now returns at most 9 MiB of tree, which is what fits in one message to the Host beside the transcript; a larger tree is refused with `worktree_too_large` and none of it is returned. A git run copies at most 2 GiB, and refuses a larger tree with `tree_too_large` before it pushes anything; each file and folder counts 512 bytes and its name besides its content, so a tree of millions of empty files is refused too, and the copy keeps nothing per file in memory. Of the entries left out, the count is kept in full and the first 100 names. A folder is read 512 names at a time, each counted as it is read, so a folder of millions of names is refused without being read whole first. A result too large for one message to the Host is refused with `result_too_large` instead of being lost on the way. - **The local console shows a pairing that is not served as "invalid".** A pairing whose file holds an endpoint this build refuses showed as active on the console when its stored state was empty, as it is in older files. It now reads as the setup page and `status` read it. - **Built with Go 1.26.10, golang.org/x/net 0.61.0, x/crypto 0.58.0 and x/sys 0.49.0.** `govulncheck` finds 13 known vulnerabilities this code reaches in Go 1.25.14 and x/net 0.57.0, which 0.54.1 was built with: in crypto/x509 (intermediate certificates since found compromised were still trusted), crypto/tls, net/http and HTTP/2, net/textproto, os and html/template. With these versions it finds none. The build image is still pinned by digest, and CI runs in the same one. The module now needs Go 1.26, as x/net's fixed release does. A published release is still rebuilt by `deploy/verify-release.sh` with the toolchain its own tag pins. - **`go test ./...` passes for a contributor who is not root.** A root command now starts in `/` when the process cannot enter root's home, as it already did when that home is missing; the bastion runs these commands only as root, so on a machine nothing changes, and the root-command tests now run as any user. `TestTreeCheckoutMovesOnlyForward`, which needs a tree root owns, skips as another user, and `TestClaimAnchorWithNoToken` checks the refusal without machine authority and then skips the rest, where it passed having checked nothing more. - **The tests name no folder of our own build machine.** The sandbox tests' fixture folder is `/srv/privatae-optest` (`/tmp` cannot hold an op's effects), and the action tests' run note asks for any folder outside `/tmp`. - **How this repository is published (docs only).** From this release on, GitHub receives each change merged since the last release as its own commit, titled as the change was, instead of one commit per release. The README, CONTRIBUTING.md and SECURITY.md say so, and say that releases from 0.53.2 on can be verified from a clone, since the earlier tags are not public. - **The personal-data check reads what it used to miss.** A listed term written right after a backslash escape (`\n`, `\t`, `\u00e9`) is found, and so is any value inside a run of base64 or base64url that decodes to text. The reserved entity ids are read from `/etc/privatae/reserved-entity-ids` (one per line, `RESERVED_ENTITY_IDS_FILE` to point elsewhere) instead of being written in the script; where that file is absent, as in public CI, the entity-id check is skipped and the run prints a NOTE, as the term check already does without its key. A file that holds no id, or a line that is not one, fails the run. - **The former-name check reads comments and Markdown.** A kept identifier is set aside only in Go code; in a comment, this changelog or any other file it is a hit like the bare word, and the two entries that spelled the device-fingerprint prefix out now name `fpSANPrefix` instead. - **CI on GitHub.** `.github/workflows/ci.yml` runs the jobs of `.gitea/workflows/ci.yml` on GitHub Actions in the same Go image, pinned by the same digest, with no action from the marketplace and a token that can only read. A step fails if its digest stops matching `deploy/build.sh`. - Tests use documentation addresses (`2001:db8::/32`, `203.0.113.0/24`) and neutral paths, and comments state their reason instead of citing a pull request by number; a test keeps published source free of such numbers. ## 0.54.1 - **No change to what the bastion does.** The README is now a short front page: install, quick start, local and networked modes, a summary of the security model, how this repository is published, and how to build and verify a release. The reference text moved into one page per topic under `docs/`, listed in `docs/README.md`, with only its headings and links changed. The README and CONTRIBUTING.md now say that issues and pull requests are welcome on GitHub. - **The claims table is its own file, `docs/claims.md`,** and `deploy/check-claims.sh` reads it there. Two rows that cited two tests each now cite one test per row, so the check passes again. ## 0.54.0 - **Every audit row also goes to the system log.** The rows written to `mgmt_audit.jsonl`, `pairing_audit.jsonl` and each pairing's `audit.jsonl` (terminals, root commands, store ops, op runs) are also written to the machine's system log, so a log collector can keep them where no host can write: syslog facility `auth`, tag `privatae-bastion-audit` (the journal on systemd) on Linux and macOS, and the Application event log, source `PrivataeBastionAudit`, on Windows, registered when the system service is installed and removed with it. Each line is the file's row with `audit` (the file) and `pairing` added, and a root command's text left out (its digest and length stay). The lines go through a bounded queue, so a slow or stuck system log never holds up the audited op; a full queue drops lines and the next line carries `system_log_dropped`. The file stays the record. - **A server is networked and anchored by default.** `install.sh` run as root now installs the networked bastion (systemd on Linux, launchd on macOS); `--local` keeps a root install local, a reinstall over a machine already paired in local mode keeps it local unless `--networked` is passed, and run as your own user it is local as before. On a networked machine with no anchor, the first `pair` run with machine authority anchors it to that host. Before, such a machine refused every op until `claim-anchor` was run by hand; now it is anchored at once: every terminal and every write waits for the person's approval, and any later host for the anchor's. `pair` then says to enrol the second factor. `claim-anchor` with no token on a machine already anchored to that host now succeeds and changes nothing (an installer that anchors after pairing finds the work done); naming another host is still refused without `--rotate`. The Windows installer is unchanged: `-Networked` as before. ## 0.53.2 - **No change to what the bastion does.** Two code comments named source files of the Host program; they now describe them instead, so the release's source can be published to the member repository as built. CI checks for such names before a change merges. ## 0.53.1 - **`switch` turns a capability family off for a host from a terminal.** `sudo -H privatae-bastion switch on|off` writes the same local deny list the console page's switch does, so it can only remove reach: off makes this machine refuse that family for that host and tell it why, and on clears the refusal without granting anything past the host's signed grant. Both directions need machine authority. `switch --list` prints every paired host's families, on or off, one per line, for a person or a setup script on a machine with no browser; beside a system service on macOS or Windows it is refused to an ordinary account, whose own state is not the machine's. The deny list is now replaced whole (temp file and rename) under a lock both writers take, so the gate never reads it half written and a switch from the page and one from a terminal cannot drop each other. - **`release-sign` signs C-Series Cloud manifests.** It accepts the kind `cseries-cloud` beside `bastion` and `bastion-agent`, with the same statement and keys, for the manifest a C-Series Cloud machine's updater checks before it moves to new images or a new overlay. - **`release-sign` signs the C-Series App Store catalog.** It accepts the kind `cseries-store`, with the same statement and keys, for the catalog a C-Series Host checks before it lists or installs an app from the public store. A signature for one kind does not verify as another. - **Fixed: `stepup-enroll --console-only` refused root on Linux.** The startup check recorded whether the process administers the machine only when a macOS or Windows system service was installed, and on Linux the service is the systemd unit, so that check never ran there and root was told it does not administer the machine. Root on Linux enrols into its own state, which is the state the unit reads. An ordinary account on Linux is still refused, and so is every account on macOS and Windows until the system service is installed. `approvals-owner` shares the rule and now takes root on Linux the same way. - **`pair` takes the token on standard input.** `pair -` reads it as the first line of standard input, so the token is not in the process list while `pair` runs or in the shell's history after. Every form of `pair` takes `-` in place of ``, and the token as an argument works as before. `pair` with no token is still the usage error, whatever standard input is: some terminals do not register as one, and reading there would wait with nothing said. At a terminal, `pair -` asks for the token on standard error. A first line that is empty, more than one word or longer than 4096 bytes is refused, and no refusal repeats what was read. ## 0.53.0 - **A Host with no platform in a VM on this machine can pair over TCP.** `pair --redeem-url https://127.0.0.1:8810/v1/local/redeem --host-ca ` redeems the token on the Host's enroll port (`POST /v1/local/redeem`, the platform redeem's body) over TLS that trusts that CA and nothing else, no system roots, and checks the name `host.cseries.internal` on the Host's certificate. The URL must be `https://[:]/`, with no user info, query or fragment. `--host-ca` is required with it and refused with a unix or platform pairing, and must hold CA certificates only; all of this is checked before the token is read, so a refusal dials nothing. The redeem follows no redirect: an enroll port that answers with one is refused as it answered. The Host's answer must say transport `tcp`, carry the same CA as `--host-ca` and an operator certificate for this bastion's key that the CA signed for client use, and name a lane on the host the redeem URL names. The pairing records transport `tcp`, the lane address and the CA, which is pinned as for a unix pairing: a `pair --replace` under another CA is refused before the redeem dials, and a pairing does not change transport on a `--replace`. - **Its lanes go to the Host's lane port**, the address its answer names, with the same mutual TLS as the unix lane socket: this bastion's operator certificate, which the Host knows it by, the pinned CA as the only root, and the name `host.cseries.internal`. Then the same bearer and protocol: egress, management, the two parked harness workers, sessions, git, the heartbeat and what its reply directs. `status` and `pair` show the lane address. - **What a TCP pairing does not have yet.** No WireGuard forwards: no ollama, LLM or PII forward, no service slots, no endpoint rotation, as for a unix pairing. No coder runs, on any machine, Linux included: a run's control plane is a tunnel port or a socket in a unix pairing's runs directory, and a TCP pairing has neither, so run-up for a TCP-paired Host is refused before any container starts, and so is every run-up while this machine's pairings cannot be read. Off Linux, coder runs stay refused for every pairing, as before; running them inside the Host's VM is not built. - `unix://` redeem URLs work as before. - **Beside a Windows system service, the signed-in person approves in their own tray.** The service serves a named pipe, `\\.\pipe\privatae-bastion-approvals`. Its ACL admits SYSTEM, Administrators and interactive users. Interactive users get read and write and no right to create an instance of the pipe. Remote clients are refused. The service identifies each client from the pipe (`GetNamedPipeClientProcessId` and that process's token) and serves only a process that runs as the person signed in to its own session, in an active session, and of those only the account that owns this machine's approvals (below); every other account is refused for list, deny and approve alike. Through it a client can list the pending step-up requests, in the words `approvals` prints. It can approve one request id with a code from the authenticator enrolled here, checked by the existing step-up check and bound to the sha256 of the purpose the client was shown. It can deny one, which needs no code. - **`privatae-bastion approvals-owner --sid [--replace]`**, with machine authority, records that account in the service's state (`approvals_owner.json`); an installer's elevated step passes the SID of the account that ran it. The same SID again changes nothing. A different SID is refused and the recorded owner stays, unless `--replace` is given, which is taken only on a console (an Administrator terminal), never with output captured as an installer runs it. A record that cannot be read is treated the same way. With no readable owner, the pipe serves nobody. - **The pipe's name is never free while the service serves it.** A replacement instance is created before a failed connect's instance is closed, as it already was before a connected one is handed over. If another process holds the name when the service starts, the first create fails (it insists on a new name), and the service tries again, waiting 1 s and doubling to 60 s, logging once per series of failed attempts and once when serving again. It never serves under a name it did not create. - **What never crosses the pipe.** The TOTP secret, `ui.secret` and approval ids. Device approvals are not listed, because they need no code. - **Wrong codes on the pipe are limited** (NIST SP 800-63B 5.2.2). Five are free. After that the pipe takes one attempt per 30 seconds. After 100 in a row it takes none. A code accepted on any other lane resets the count. - **`privatae-bastion tray`**: the person's icon and approvals window, run as them and drawn from the pipe. `service install` starts it at every sign-in through the HKLM Run value `PrivataeBastionTray`, and `service uninstall` removes that value. One tray runs per session. The tray checks that the pipe's server is the `PrivataeBastion` service process before it sends anything. The daemon's own tray stays as it was for a bastion that runs as the person; the service still shows none. - **`stepup-enroll --console-only`**, for an installer's elevated step. The secret is shown only when standard input and output are a console. It is saved only in the system service's state: on Windows and macOS when the service is installed and the process has machine authority, on Linux when the process is root. Both checks run before a secret exists. - **`release-anchor --host (--host-ca | --force)`**, with machine authority, for an anchor whose Host is gone, e.g. a Host on this machine deleted with its data and set up again. `--host-ca` is the new Host's CA. It is refused when that is the CA this box pinned for the host, since the same CA means the same Host, alive, and when this box pinned no CA to compare. `--force` skips that check and is taken only on a console; an installer never passes it. All of this is checked before anything changes. It drops the anchor if it is that host and refuses any other. It unpairs that host. It renames that host's DCN state (key pin, factor, grants) to `dcn/.released-