Commit Graph
8 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 1870f3723a Security checks skill: the new report receiver is deployed
shellcheck / shellcheck (push) Failing after 1m0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:06:39 -07:00
davidandClaude Opus 5.5 7e80d37986 Plan: find storage and AI servers on the tailnet, not only over mDNS
shellcheck / shellcheck (push) Failing after 17s
configure storage and configure ai-servers find machines only over mDNS,
which stays on the LAN, so a laptop away from home finds nothing. This
skill holds the plan for also looking at the Core's tailnet: a
lib/tailnet.sh helper, probing tailnet peers in find_servers and
find_storage, listing a machine found both ways once, tests, and what
to check against headscale (MagicDNS, Online, the agent sandbox).

Nothing is built yet. Written from the MiniServer session, which now
runs Tailscale and joins the Core's headscale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 14:22:26 -07:00
davidandClaude Opus 5.5 ffbaf71ba7 Keep other machines on the network from reaching Docker containers
shellcheck / shellcheck (push) Failing after 19s
60-security.sh now checks network exposure (step 4), from two other
machines made of network namespaces in the VM: one on private addresses,
like a neighbour on the same Wi-Fi, and one on public-looking ones. From
each, over IPv4 and IPv6: only SSH and LocalSend are open, a container's
published port can't be reached, containers still reach both machines,
and SSH takes keys only. It also checks ufw's rules and sshd -T.

It found that ufw-docker's rules let any private address (10/8,
172.16/12, 192.168/16) reach published ports, so anyone on a café's or
hotel's Wi-Fi could. system/docker-firewall.sh lets only Docker's own
bridges (docker0, br-+) past instead; firewall.sh runs it on a new
install and migration 1794878760 on existing machines. To let other
machines reach a container's port: sudo ufw-docker allow <container> <port>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:32:44 -07:00
davidandClaude Opus 5.5 53c6c8b52e Test the install path
shellcheck / shellcheck (push) Failing after 20s
60-security.sh now also checks the way in: federated.sh sends wget to
install.sh on Gitea over HTTPS at every hop, plain HTTP goes to HTTPS
without serving the script, and a browser goes to the Install page.

For the [federated] repo, it checks that pacman.conf needs signatures on
packages and the database, gets them from Gitea over HTTPS, and lists
the repo after core and extra; that pacman trusts the pinned key; and
that Gitea's repository.key is that key alone. Then it serves a package
from a stand-in repo with [federated]'s settings and pacman's keyring:
pacman refuses it unsigned, signed by a key it doesn't have or doesn't
trust, or in a signed database but unsigned itself, and installs it when
its key is trusted.

It found nothing to fix. Each repo check was shown to fail with
[federated] weakened, moved above core, or its key deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:38:56 -07:00
davidandClaude Opus 5.5 d5925fa551 Test that what root runs is root's alone
60-security.sh now also checks, in the smoketest VM, that each file
CoreDesktop installs for root (the pacman guard and hook, the captive
portal script, sshd, ufw and systemd settings, and after configure
security-key and fingerprint, the PAM files, the lid check and the key
list), and every folder above it, is root's and not writable by the
user; that nothing in /etc, /usr, /boot or /opt is the user's to write;
and that nothing root runs names a path in a home folder.

pam_env gives logins ~/.local/bin on PATH, so it checks that root's
PATH under sudo, sudo -i and systemd has only root's folders, also for
a user who types a password: tester's sudo needs none, and then PAM's
auth step, where Arch runs pam_env, never runs. With a security key
registered but not plugged in and fingerprints turned on, the password
still works for sudo and a wrong or missing one doesn't.

It found nothing to fix. Each check was shown to fail on a machine
broken the way it looks for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:07:44 -07:00
davidandClaude Opus 5.5 e991264ddc Let Hermes' gateway reach only a Matrix server you've allowed
sandbox/setup.sh allowed Hermes' gateway the host in MATRIX_HOMESERVER
from ~/.hermes/.env, which Hermes can write from inside its sandbox. On
the next update, Hermes could have opened the way out to any host it
chose.

The allowed server is now in ~/.config/coredesktop/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; update says so.
Only a plain host name counts, so it can't be a wildcard or carry escape
codes into the question. A migration carries over the server the
gateway's systemd drop-in allows now, so a working gateway keeps
working. sandbox/agent no longer takes domains from
COREDESKTOP_SANDBOX_DOMAINS, which nothing else used.

The security checks skill now records step 3 as done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:13:32 -07:00
davidandClaude Opus 5.5 143473e798 Test the report receiver and redaction against attacks
shellcheck / shellcheck (push) Failing after 19s
server/report-receiver/test_security.py sends the receiver what anyone
on the internet could, and the Redaction tests in tests/report.bats feed
report logs full of secrets. Each test was checked to fail before its fix.

The receiver now refuses a negative Content-Length (read without limit),
parts nested thousands deep (a RecursionError dropped the connection)
and more than 20 parts (thousands took seconds of CPU to parse). It
counts an IPv6 address's /64 for the rate limit, since a home has a
whole /64 to send from. Report fields go into the Gitea issue as inline
code, and titles keep only the characters of step names and versions,
so a report can't @mention the team, link issues, or show a tracking
image. It refuses reports while its disk has less than 2 GB free.

report now also takes out passwords in URLs, Bearer and Basic tokens,
password= and token: values, API keys by their prefixes, Nextcloud app
passwords, private keys, IPv6 and MAC addresses, the Cores' domains and
the user's name. It reads the Core settings rather than sourcing them,
and escapes extended regex characters in names, which it didn't before.

The plan for the checks still to do, in the smoketest VM (the agent
sandbox, network exposure, what root runs, the install path), is a
Claude Code skill: /coredesktop-security-checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:27:17 -07:00
davidandClaude Opus 5.5 d1108698bb Add the plan for merging Pop!_OS support into configure
shellcheck / shellcheck (push) Failing after 14s
A Claude Code skill (/coredesktop-pop-merge) with the plan for folding
connector-popos, the Pop!_OS port of configure, back in here behind a
platform layer, so one Linux configure runs on Arch and Pop!_OS. It records
the facts verified while porting and the decisions still open, so the work
can be picked up later.

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