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>
This commit is contained in:
2026-11-16 12:27:17 -07:00
co-authored by Claude Opus 5.5
parent 9dc5eb193d
commit 143473e798
8 changed files with 636 additions and 23 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ If a step fails, the other steps still run, and the failed ones are listed at th
Each run's full output is saved in ~/.local/state/coredesktop/logs/, so you can read what went wrong after the terminal is gone. `update` keeps the logs of the last 10 updates and the last 3 installs or refreshes.
If an install or update fails, it offers to send its log to the CoreDesktop team so we can find and fix the problem. Nothing is sent unless you say yes, and you can read exactly what would be sent first: your user name, host name, home folder, email addresses, IP addresses and Tailscale names are taken out. Along with the log go CoreDesktop's version, the kernel's, the names of the steps that failed and your sibling projects' versions. You get a report ID to mention if you contact us. To send a log later, run `report` (the newest log) or `report <file>`; `report --view` shows what would be sent without sending anything.
If an install or update fails, it offers to send its log to the CoreDesktop team so we can find and fix the problem. Nothing is sent unless you say yes, and you can read exactly what would be sent first: your user name, host name, home folder, email addresses, IP and MAC addresses, Tailscale names, your Core's domain and your name are taken out, and so are passwords, tokens, API keys and private keys that turn up in it. Along with the log go CoreDesktop's version, the kernel's, the names of the steps that failed and your sibling projects' versions. You get a report ID to mention if you contact us. To send a log later, run `report` (the newest log) or `report <file>`; `report --view` shows what would be sent without sending anything.
If the update installed a newer kernel, or upgraded firmware, CPU microcode, the NVIDIA driver, systemd or glibc, it says so at the end and asks whether to reboot now. The answer is no unless you type y.