Repository navigation
docs(legal): list the new sign-in notices and what the export leaves out - #35
Merged
kalaspuff merged 1 commit intoOct 21, 2026
Merged
Conversation
app.fctl.sh now emails people when a Google account is linked to their account or an address connected to it, when their password is changed, set or reset, and when an admin makes a password reset link for them (hyperstructure/fctl#171). Its export takes the sessions and projects of the workspaces open to the person, not those of workspaces they left.
kalaspuff
pushed a commit
to hyperstructure/fctl
that referenced
this pull request
Oct 21, 2026
…171) A security review of the control plane and the web app found ways into workspaces and accounts that their rules don't allow. Each commit fixes one; together they close them. **Workspaces people left or were never in** - **Open sockets kept their access.** Session viewer and dashboard feed WebSockets kept the identity and role they opened with. Someone removed from a workspace, whose project role or share went, who signed out or was disabled kept reading a session's transcript live and could still message and interrupt its agent; their feed kept sending session summaries and runners. SessionObject now checks a viewer's token and role again in D1 on its pings (at most once a minute) and before every message and interrupt, and closes it with 4403 once access is gone; FleetObject does the same for feeds. A socket that stops pinging closes after five minutes and reconnects through the Worker. The web app takes the role from `session` frames, so a changed role shows. - **Runners that no longer serve a workspace kept its sessions.** A runner taken out of a workspace, or whose owner left it, was demoted or disabled, kept running the sessions it had there, with fresh GitHub tokens and Claude credentials, their messages and files: FleetObject only checked that the session was assigned to it, which a host that ignores a stop keeps true. Credential requests, uplinks, file downloads and screenshot uploads now also take that the runner serves the session's workspace now (`spec::runner_serves`); FleetObject stops its sessions in workspaces it no longer serves, closes its uplinks to them and forgets it as their sandbox's home. Disabling a runner or replacing its token closes its sessions' uplinks too, and a runner's report that a session ended counts only for its own sessions. - **The account export ignored workspaces.** It streamed the transcript of every session the person had started, including those of workspaces they had left or been removed from. It now takes the workspaces open to them, as the API does, and leaves out the IP addresses of other people's requests that concerned them. - **Uplinks could put words in people's mouths.** SessionObject stored people's messages, interrupts and status changes that came over an uplink, which only the control plane makes; no agent or host ever sent them. They are now dropped there. - **Project owners could be demoted by being added again.** `POST /projects/{id}/members` for an existing member replaced their role without the checks a role change makes, so a maintainer could demote an owner, the last one too. **Ways into an account** - Linking a Google account, setting a first password and connecting an invitation's address each add a way to sign in, and any session or token, however old, could do them. They now take a browser sign-in from the last 15 minutes, as adding a passkey does. Connecting an address mattered most: it then gets the account's password reset links, so an invitation for one's own address, forwarded to someone signed in and connected with a click, let its sender reset their password. The invitation page now says whoever has the address can reset the password. - People are emailed (when email is set up) when a Google account or an address is connected, when their password changes, when an admin makes a reset link for them and when a reset link is used: an instance admin's reset link sets a member's password, and with it reaches their workspaces, and nothing told the member. - Sign-in redirects (`?next=`, Google's `return_to`) took `/\evil.example` and `/<tab>/evil.example` as paths of the app; browsers read them as other sites (`fctl_domain::validate::is_app_path`, `appPath` in the web app). - `POST /auth/logout` cleared the session cookie for anyone, a page of another site too; it now does only for a signed-in request, which passed the origin check. - Only the primary instance owner enables and disables admins, but adding an allowlist entry re-enabled a disabled admin, and removing one disabled admins it alone admitted. Both are now the owner's. **Hardening** - Attached files keep their type only when the app shows or plays them (PNG, JPEG, GIF, WebP, MP4, WebM, QuickTime); the rest are served as `application/octet-stream`, so no upload can pass for a script of the app's origin. - A session's Remote Control link is kept only when it is an https page of claude.ai (or claude.com): `fctl open --claude` handed it to `open`/`xdg-open`, which on a Mac also start the app or file at a path. **What a person should decide.** Instance admins see the link of every instance invitation they make, also when it is emailed, so an admin can sign up as an invited address that has no account yet and join the workspaces that invited it. Hiding the link when the email went out would close that on instances that send email, at the cost of the "you can also send them this link" option; I left it as it is. docs/security.md says instance admins don't see inside workspaces they aren't in, which reset links (now announced to the person) and this soften. **Verification.** `cargo xtask check --quick` passes. End to end on `cargo xtask dev`, with scripts driving the API and sockets as a second member and as admins: on `main` a removed member's open socket stays up and their message reaches the agent, their export still holds the workspace's transcripts, a disabled member's feed stays open, a session keeps running on a runner taken out of its workspace, a maintainer demotes an owner by adding them again and an admin brings back an admin the owner disabled; on this branch each of those is refused or closed (4403 on the sockets within a minute, at once on a message), the session stops with "Its runner no longer runs this workspace's sessions" and resumes once the runner is back. Unit tests cover the app path check (Rust and web). ## Screenshots At 579b52b, light theme, 1280 px wide, with the dev stack's data. The invitation page, signed in, when the invitation's address can be connected: it now says what connecting gives whoever has the address. The settings page after a Google link that didn't come from a recent sign-in, which `main` answers with a generic error. | Before | After | |---|---| |  |  | |  |  | Other pull requests from the same review: #172 (Lima sandboxes saw the host's home directory), #173 (Docker sandboxes reached each other; host files), #174 (fctl login and terminal output). app.fctl.sh's privacy policy changes with it (the new emails, and what the export holds): hyperstructure/fctl-site#35. Made in fctl session https://app.fctl.sh/s/ses_01M5FGE9QB2HQVK1S59KEC4TYY --------- Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
kalaspuff
approved these changes
Oct 21, 2026
kalaspuff
deleted the
fctl/105-run-a-thorough-security-pass-of-the-enti
branch
October 21, 2026 16:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
app.fctl.sh's privacy policy, to match hyperstructure/fctl#171, a security fix:
updatedmoves to 2026-10-21. This should merge with, or after, hyperstructure/fctl#171, and be live once app.fctl.sh runs it.Made in fctl session https://app.fctl.sh/s/ses_01M5FGE9QB2HQVK1S59KEC4TYY