Test the agent sandbox from inside; keep srt's settings out of /tmp
Ports CoreDesktop's security checks (05b13b2, d5925fa, 53c6c8b) as smoketest/scenarios/80-security.sh: - The sandbox: a fake opencode, Hermes and Cline Desktop, run through sandbox/bin's wrappers, can't read secrets or an SMB password through sudo, write outside their project (home, ~/.bashrc, ~/.local/bin, systemd units, autostart, the connector, its sandbox config or yours, the settings srt starts with, their project's git hooks and config), reach domains, LAN addresses or loopback servers that aren't allowed, or see other processes or the session's D-Bus. Each check also runs outside, so a pass means the sandbox blocked it. - Root: what configure installs for root to run or read is root's alone and names no home folder, and with a security key and fingerprint set up, a password user's sudo still takes the password and only it. - The install path: every hop from federated.sh/pop is HTTPS, and plain HTTP doesn't serve the script. CoreDesktop's network exposure checks (ufw, Docker, sshd) don't apply. Writing it found that sandbox/agent put the settings srt starts with in /tmp/federated-sandbox when XDG_RUNTIME_DIR wasn't set, and every sandbox can write /tmp, so an agent could put its own settings, or a link, where the next one's go. They're now always in /run/user/<uid>, which no sandbox can write, and it won't start without it. The smoketest's runner gives each scenario what a login does: USER, /run/user/<uid>, and the session bus in it, as on Pop!_OS. PLAN.md: CoreDesktop compared at 4e9b962, everything that applies ported. Neither lint nor the Docker smoketest has run on these ports yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -1,6 +1,6 @@
|
||||
# Smoketest
|
||||
|
||||
These tests run `configure`'s pieces on Ubuntu 24.04, which Pop!_OS 24.04 is built on, in throwaway Docker containers. A container has the same apt packages as Pop!_OS, except COSMIC's own, and `/etc/os-release` says Pop!_OS. Each scenario starts a session D-Bus and an unlocked gnome-keyring, as COSMIC does at login.
|
||||
These tests run `configure`'s pieces on Ubuntu 24.04, which Pop!_OS 24.04 is built on, in throwaway Docker containers. A container has the same apt packages as Pop!_OS, except COSMIC's own, and `/etc/os-release` says Pop!_OS. Each scenario starts with what a login gives: `USER`, `/run/user/<uid>`, a session D-Bus in it and an unlocked gnome-keyring, as on Pop!_OS.
|
||||
|
||||
They check what lint can't:
|
||||
|
||||
@@ -39,6 +39,7 @@ Each run writes its logs to `smoketest/results/<time>/`, one per scenario, and p
|
||||
| `60-packages` *(all)* | davfs2 installs with `mount.davfs` setuid, and `davfs2_ready` fixes one installed without. sshfs' `fusermount3` and smbclient are where `configure storage` expects them, and so is GTK's CUPS print backend. mise installs from its apt repository and a new bash has it. |
|
||||
| `70-sign-in` | `configure security-key` and `configure fingerprint` on copies of Ubuntu's sudo and polkit stacks, which start with `@include common-auth`: the line goes just before it, polkit gets its own copy and the vendor's is left alone, adding twice adds once, and stopping puts sudo back as it was. A FIDO2 key is found by its HID descriptor, a reader by its vendor (unless a driver claims it, like a touchpad) or its name. |
|
||||
| `75-taildrop-portal` | With a stand-in `tailscale`: `system/captive-portal` stops using an exit node behind a sign-in page and uses it again once online, unless you've picked another one. `system/taildrop` receives into Downloads and names the files in its notification. `configure tailscale` installs the Taildrop service and the dispatcher script, sees an old script as to do, and leaving removes the service. |
|
||||
| `80-security` *(all)* | Ported from CoreDesktop's security checks. **The sandbox**: a fake opencode, Hermes and Cline Desktop, run through `sandbox/bin`, can write in their project, /tmp and their own state, and reach allowed sites; each check below works outside and fails inside. They can't read secrets (SSH, GPG, the keyring, Bitwarden, the connector's settings, Online Accounts, Evolution, Element, davfs2, WinBoat) or an SMB password through sudo; write the home folder, other projects, ~/.bashrc, ~/.local/bin, systemd units, autostart, the connector, its sandbox config or yours, the settings srt starts with, or their project's git hooks and config; reach domains, LAN addresses or ports not allowed, or this machine's loopback; or see other processes or the session's D-Bus. **Root**: what configure installs for root is root's alone and names no home folder, and with a security key and fingerprint set up, a password user's sudo still takes the password and only it. **The install path**: every hop from federated.sh/pop is HTTPS, and plain HTTP doesn't serve the script. |
|
||||
|
||||
## What still needs Pop!_OS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user