Commit Graph
5 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 2915917f15 Report receiver: say whether a report came from MiniServer or CoreDesktop
shellcheck / shellcheck (push) Failing after 22s
Every issue said it came from CoreDesktop. MiniServer's reports send a
version starting with "MiniServer ", so sender() reads the product from
that, and the issue's version row and footer now name it, with the prefix
taken off the version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:42:13 -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 43e227e3f3 Report receiver: don't log senders' addresses
shellcheck / shellcheck (push) Failing after 14s
The rate limit keeps addresses in memory, for at most a day; the log
lines don't need them, so the privacy policy can say they aren't stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:14:03 -07:00
davidandClaude Opus 5.5 a811c347b7 Report receiver: fix a race in its tests, and log Gitea's reasons
The first test checked that a report was no longer pending as soon as
its log reached the fake Gitea, a moment before the receiver marks it
filed, so it could fail; wait for the mark instead. The tests now close
their servers and error responses.

When Gitea refuses an issue or attachment, the receiver closes the reply
and logs Gitea's reason, such as a token without the right permission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 11:43:51 -07:00
davidandClaude Opus 5.5 ce7cf08d60 Add the receiver that files error reports as Gitea issues
server/report-receiver/receiver.py takes what report sends to
federated.sh/report, behind Caddy, and files each report as an issue in
the private Federated_Computer/coredesktop-reports repository with the
full log attached. It saves each report before replying and tries Gitea
again later if it's down, limits how many reports one address can send,
and refuses oversized logs, gzip bombs included. Standard library only.

The README has the deployment steps: a Gitea user that can only file
issues there, the systemd unit, and the Caddy route. make test runs its
tests, which send reports with the real report client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 11:36:43 -07:00