Both cockpit Guests apply security updates, and the server accepts only 3000 and SSH (THE-40) #39
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-cockpit!39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/THE-40-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
paperclip:THE-40
Summary
The two Guest roles land in this repository's service layer, in front of both Services:
roles/unattended_upgradesandroles/firewall, added to each of the site's two plays — the server, then the runner — right afterjournal.semaphore(143)semaphore-runner(145)The watchdog keeps working. It calls the instance's own address from 143, and a packet to the machine's own address never leaves
lo; the table's first rule accepts it.semaphore/service/roles/{unattended_upgrades,firewall}/semaphore/service/site.ymlsemaphore/service/group_vars/semaphore/vars.yml10.12.0.0/24semaphore/service/group_vars/runner/vars.ymldocs/hardening.md,AGENTS.mdEvidence
mise exec -- make checkat36f3640ansible-playbook site.yml --syntax-checknft -crc 0; loaded, loaded again and replaced in a throwaway network namespace;policy dropand the two accepts read backpolicy dropand the one acceptWhat the merge does
The deploy's
servicestep applies the roles before each Service and reads the loaded table back; a table that does not carrypolicy dropand the SSH rule reds the deploy. Neither Guest carries a table today, so this merge is the first live load on both. The play's own SSH sessions survive the load: the server is reached from the segment, and the runner's play reaches it over the loopback.This change adds no restart of its own: the firewall role's handler restarts only
olympus-firewall, and neither Service's config changes. The cockpit deploy's own handling of a Semaphore restart is unchanged.make service-checkis the rehearsal — check mode,--diff, no change — but it needs the environment; the PR does not run it on the agent host, and the merge's deploy is the first real apply.Waiting — queued behind olympus/infra-secrets#66 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 17:12 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Review started (round 0/5) on
36f3640e60— reading the diff now.olympus/infra-cockpit· PR #39 · head36f3640· round 1/5 — the dispatch numbered it 0/5; the review list carried no earlier review, so this is the thread's first.Recommendation: merge
Spec source.
paperclip:THE-40and itsdesigndocument ("E4 — hardening in code: design and first slice"), fetched live at 17:21Z on 2026-12-02. The PR body is this repository's share of that design, so it is judged against the design's "guest standard" and port table, not against its own wording.Spec
The change matches the design clause for clause, and I drove each one rather than reading it:
semaphore/service/site.yml:18-19,26-27group_varsgroup_vars/semaphore/vars.yml:50-51(3000),group_vars/runner/vars.yml:6(none)add→delete→ create, one transactionroles/firewall/templates/firewall.nft.j2:9-1010.12.0.0/24roles/firewall/templates/firewall.nft.j2:14-29roles/firewall/tasks/main.yml:57,70-76policy dropanddport 22, which is whatnft list tableprintsroles/unattended_upgrades/templates/50unattended-upgrades.j2Two advisories, both about wording rather than behaviour:
docs/hardening.md:29and:33. The page promises the deploy closes both gaps the roles deliberately leave, and it does not. Nothing in the tree runs an upgrade —aptis called only withname: <one package>, in the two new roles and everywhere else — so a pendingtrixie-updatespackage waits for the Operator, full stop; and every restart inroles/semaphore/tasks/main.yml:133,230,240,257,303androles/semaphore_runner/tasks/main.yml:119,216,225,264,282is anotify:on a changed file, so a deploy that changes nothing restarts nothing. Both sentences are true if they say the next changed deploy, and the point-release one should drop the deploy entirely.docs/deploy.md:75already carries the same overstatement about the restart, so this is a two-line correction to wording the repo inherits, not a defect the roles introduce.inventories/prod/hosts:4,10) from a deploy host on the segment, so no hop toucheslo. The conclusion survives — the SSH source is inside10.12.0.0/24, which the table accepts — but the sentence names a route that is not there.Standards
The repo's written rules are
AGENTS.md§Secrets, §Toolchain, §Docs, and the org records inolympus/workshop@main:docs/adr/. None of them governs the wording of a docs page, so the finding above is general good practice (a page should describe the artifact it describes), and I say that plainly rather than cite a rule that does not exist.Nothing else deviates. No literal secret in the diff or the body;
mise exec -- make checkis the route the toolchain rule names; no workflow file moved, so thepr-checksgate is not touched; and the records that bind this change — 0009 (merge is the deploy), 0010 (no deployer deploys the machines it runs on — the forge runner deploys 143 and 145, not itself), 0011 (never destroy or replace) — all hold, with all three plan checks green at this head.Standards findings: 0.
What I verified
git ls-remote origin refs/pull/39/head, at the first fetch and again immediately before the POST:36f3640….diffagainstinfra-forge@origin/mainforgejo/service/roles/{firewall,unattended_upgrades}: identical in every file but the "Managed by infra-…" attribution line. The design records that table loaded and green on 141 and 146, so the mechanism is not on its first outing here.group_vars, passnft -c, load, load a second time (theadd→deletepath with the table already present), and read back carryingpolicy dropanddport 22— the two strings the role's own assert searches for.nft -freject the transaction and the loaded table still carries both accepts — the page's safety argument, driven.10.12.0.0/24→ 22 and 3000 connect, 8080 times out; from192.168.9.3→ 22 and 3000 both time out; and the Guest dialling its own address on the undeclared 8080 connects throughlo. That last one is the watchdog's path thatdocs/hardening.md:78claims, reproduced — and its script does callsemaphore_web_root, i.e.https://10.12.0.143:3000, from 143 itself (roles/semaphore/templates/semaphore-watchdog.sh.j2:19).apt-configand dump exactly the values the page lists: security origins only,Automatic-Reboot "false",Remove-Unused-Dependencies "false",Mail "root",SyslogEnable "true". A deliberately malformed control file does error, so the parse is not vacuous.mise exec -- make checkexit 0 at this head; all four contexts green at36f3640(pr-checks / check,plan / guest-plan-check,plan / runner-guest-plan-check,plan / projects-plan-check).What I could not verify
ss -ltnpon 143/145 needs the deploy key; this host is refused (Permission denied (publickey,password)), and the agent class here may not fetch.env. The rows rest on the design document's live reads, not on my own.docs/hardening.md:40) is unproven from here. The journal half does not depend on it.Named, not charged
AGENTS.md's tracker paragraph still says Vikunja andCP-<n>, while this body — like the last several merged bodies — citespaperclip:THE-40. Pre-existing drift on a section this diff does not touch.README.mddoes not listdocs/hardening.md. It does not listdocs/drift.mdeither, so the omission follows the page's own precedent;AGENTS.md§Docs, which is the list this repo keeps, does name it.make checkparses no Ansible and runs no test for either new role. That was already true ofroles/semaphore, so it is not this change's to answer for.Findings: spec 2 (0 blockers, 2 advisories), standards 0. Worst in Spec: the page's two "the next deploy does it" clauses (
docs/hardening.md:29,:33), which name a mechanism the deploy does not have. Worst in Standards: none.The recommendation is merge; both findings are advice and neither moves the state.