Commit Graph
4 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 c84e6d3aa0 Start opencode's sandbox on Pop!_OS; lint and the smoketest now pass
The first run of lint and the full Docker smoketest since the CoreDesktop
ports found:

- opencode's sandbox didn't start. Its profile didn't allow all Unix sockets,
  so srt added its socket filter, which needs a user namespace inside
  bubblewrap, and Pop!_OS' AppArmor (bwrap-userns-restrict) denies that.
  opencode now allows them and hides their paths (/run/user, /run/dbus,
  Docker, Podman, Tailscale, X11, tmux, ssh-agent), as Hermes and Cline
  Desktop do. 80-security shows it still can't reach the session D-Bus.
- 80-security's agent list was named AGENTS, and 30-agents.sh, loaded later,
  replaced it with its own, so every sandbox check ran a command that
  doesn't exist. It's FAKE_AGENTS now.
- 50-sandbox's "can't" checks would pass if the sandbox never started; a
  check that it starts now comes first.
- shellcheck read a jq variable named done as bash's keyword (SC1010).

TEST.md says to install shellcheck and Docker, which the connector doesn't.
PLAN.md: pin srt, try the real opencode, and settle on 24.04 or 26.04.

make lint passes. smoketest/run --tier all passed every scenario but 50 and
80 before the opencode change, and 50 and 80 pass after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 19:59:14 -07:00
davidandClaude Opus 5.5 fef73e8b5b 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>
2026-11-28 19:14:55 -07:00
davidandClaude Opus 5.5 1445ad7bb1 Let Hermes' gateway reach only a Matrix server you've allowed
Ports CoreDesktop's e991264, 05b13b2 and d974b91.

configure agents allowed Hermes' gateway the host in MATRIX_HOMESERVER
from ~/.hermes/.env, which Hermes can write from inside its sandbox, so
it could open the way out to any host it chose. The allowed server is
now in ~/.config/federated-connector/sandbox/hermes.json, which no
sandbox can write. configure hermes is to do while Hermes names a server
you haven't allowed, and asks about only that; configure agents says so.
Only a plain host name counts, so it can't be a wildcard or carry escape
codes into the question. sandbox/agent no longer reads
FEDERATED_SANDBOX_DOMAINS. The server an old drop-in allows is carried
over, read from the drop-in itself, when the gateway starts and when
configure agents rewrites it, so a working gateway keeps working.

Agents could read ~/.config/federated-connector, which has the Core's
domain and user name; base.json now hides it.

edit_json treats an empty settings file like a missing one: jq reads no
JSON from an empty file and writes nothing back, so configure ai-servers
said a server was added while the sandbox still blocked it.

agent_path joined the last folder on PATH to ~/.local/bin, so an agent
there wasn't found when ~/.local/bin wasn't on PATH (e.g. in a service).

Smoketest: 55-hermes-homeserver, and 50-sandbox checks that an agent
can't read the connector's settings. PLAN.md drops what's done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:55:37 -07:00
davidandClaude Opus 5.5 bc07e1d3e3 Set up Pop!_OS for a Federated Core, like CoreDesktop's configure
A port of CoreDesktop's configure to Pop!_OS 24.04 with COSMIC, in the shape
of connector-macos: its own install.sh, update and configure, installed in
~/.local/share/federated-connector/connector.

Every configure item is ported: the Core (email, calendars and contacts
through GNOME Online Accounts and Evolution, as COSMIC has no accounts of its
own; Superpanel; files over davfs2; Element; Tally; the email watcher),
Tailscale, backups, AI agents in the sandbox and their sign-ins, languages
with mise, AI servers, printers, network storage and the agent sandbox.
Folders go in the COSMIC Files sidebar. Each item installs what it needs
from apt, Flathub or the tool's own apt repository when you set it up.

smoketest/run checks it in Ubuntu 24.04 containers with Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:20:47 -07:00