The silo Guest applies security updates and accepts only 9000, 9001 and SSH (THE-40) #42
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-silo!42
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 the Service:
roles/unattended_upgrades(Debian's security suite daily, no reboot, no autoremove, journald and root's mail) androles/firewall(oneolympustable, inputpolicy drop, the segment's SSH and the ports this Guest declares). The Guest declares two: 9000, its S3 API, and 9001, its console.silo/service/roles/{unattended_upgrades,firewall}/silo/service/site.ymlsilosilo/service/group_vars/silo/vars.yml10.12.0.0/24docs/hardening.md,docs/index.mdEvidence
mise exec -- make checkatef7ebf9ansible-playbook site.yml --syntax-checknft -crc 0; loaded, loaded again and replaced in a throwaway network namespace;nft list table inet olympusshowspolicy dropand the three accepts, counters at 0What the merge does
The deploy applies the roles to 150 and loads the table; the play's read-back fails the run unless the loaded table carries
policy dropand the SSH rule, so a bad load is a red deploy rather than a silent one. The Guest carries no table today — this merge is the first live load. After it:nft list table inet olympuson the Guest, and the 9000 and 9001 counters moving as the Stacks read their state and the console is opened.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.Review started (round 1/5) on
3ed790e7c7— reading the diff now.olympus/infra-silo#42 · head
3ed790e7c7170f25afceadc60a28978fba8b591a· round 1/5 · verdict: fixRecommendation: fix
The roles themselves are right: the table, its unit and both roles are byte-identical to the template
infra-forge/infra-trackercarry onorigin/main(only theManaged by infra-…lines differ), and I reproduced the load and the filtering by hand. All three findings are in the page that describes the behaviour, not in the behaviour — zero blockers; the recommendation turns on the count of three advisories, not on their weight.Spec
ADVISORY —
docs/hardening.md:31-32(andsilo/service/roles/unattended_upgrades/defaults/main.yml:6): the page says the next deploy restarts the Service; it does notNothing in the deploy restarts
silounless something changed. The only notifier ofrestart silois the/etc/default/silotemplate (silo/service/roles/silo/tasks/main.yml:102, handler atsilo/service/roles/silo/handlers/main.yml:2);make service(Makefile:382-387) runs the play once and the role ends withsystemd: state: started(tasks/main.yml:107-112), which does not restart a running unit. A deploy on an unchanged tree installs the security updates and leaves the daemon on the old library — the page's own next sentence ("Until then the running daemon keeps the old copy") is the true half. Same claim in the role default: "the next deploy restarts it, or the Operator does" (defaults/main.yml:6).Smallest fix: one clause — the Operator restarts it, or a deploy that changes the unit/environment does — in both places. (The design doc, E4 § The guest standard / Updates, carries the same sentence; if a deploy-time restart is actually wanted, that is a behaviour change and a different PR.)
ADVISORY —
docs/hardening.md:27-28: a point release does not wait for "the next deploy'saptrun"The deploy's apt calls are
update_cacheplusname: <pkg> state: present(roles/unattended_upgrades/tasks/main.yml:11-18,roles/firewall/tasks/main.yml:7-9,roles/silo/tasks/main.yml:59-62).state: presentinstalls a missing package; it does not upgrade an installed one, and nothing runsupgrade. A pendingtrixie-updatesversion of any package the play does not name is not applied by a deploy at all — it waits for the Operator.Smallest fix: "…waits for the Operator — or for a deploy that reinstalls that package."
ADVISORY —
docs/hardening.md:77: the failure of an undeclared port is a timeout, not a refusalpolicy dropdrops the SYN silently, so a client hangs and times out;ECONNREFUSEDis what it would see if nothing were listening. My throwaway-netns run measured exactly that (nc -zto an undeclared 9100 from10.12.0.0/24→ rc 124 after 3 s; to 9000 → rc 0). An operator debugging "connection refused" would be sent to the Service's bind address instead of to the table.Smallest fix: "a dropped connection that times out, rather than an open door."
Standards
No findings. Checked at the head:
AGENTS.md(§ Docs — one file per single-page section, relative links resolve, glossary is definitions only; § Code comments; § Secrets; § Pull requests),docs/agents/{workflow,issue-tracker,domain,triage-labels}.md, andolympus/workshopdocs/adr/read atorigin/main(45790e7, 16 records) — no record covers hardening, nftables or the Guest's input chain, so no ADR compliance question is raised by this change itself. No secret is in the diff; noenv.map/.env.examplerow is touched.The board's card (cited, not duplicated)
paperclip:THE-113— "olympus/infra-forge#109 sets a default-drop inbound firewall on the Forgejo Guest, and its boot hook never fires (tier-1)" — isin_progress, assignee slot0d346060-1c73-49b0-83c5-76e45eee5a7e,reviewAttention.state: none; its comment list answers 200 with 3 entries, allauthorType=agentfrom that assignee and all reading "ACP agent reported a terminal limit failure" — no ruling. Its first ask (the boot hook) is answered in this tree: the unit shipsWantedBy=sysinit.target, not thenetwork.targetthe card charged. Its second ask — whether a Guest-level default-drop policy needs its own ADR before the other repositories copy the template — is open, and this PR is one of the followers it names. I opened no second card: that one is the card for this cutover. The dispatch's narrowing applied here: the review state is the findings' (three advisories, no blocker), and merging remains the board's/pit's gate for the ADR question.Also worth the board's eye: at merge this is the first live load on
10.12.0.150, the Guest whose store holds every Stack's state. The table is correct — I drove it — and the play's read-back fails the run whenpolicy dropor the SSH rule is missing.Verified
git ls-remote origin refs/pull/42/head=3ed790e7c7170f25afceadc60a28978fba8b591a, re-read at post time and unchanged.mise exec -- make check→ rc 0,git status --porcelainempty afterwards (reproduced the PR body's line).ansible-playbook site.yml --syntax-check→ rc 0, the repo's knowngroup and host with same name: silowarning only.firewall.nft.j2with this Guest's vars:nft -c -frc 0; loaded into a private net ns, reloaded (theadd/deletetransaction) rc 0;nft list table inet olympusshowspolicy dropand the three accepts with counters at 0.10.12.0.150's segment, 9000/9001/22 connect (rc 0) and 9100 times out (rc 124); from192.168.50.0/24, 9000 and 22 time out. Accept counters move, drop counters stay with the policy.systemd-analyze verifyon the rendered unit → rc 0.infra-forgeandinfra-trackerorigin/main: identical but for theManaged byline.silo/guest/container.tf:5,debian-13-standard_13.6-1_amd64.tar.zst) does shippostfixand/usr/sbin/sendmail, so the page's local-mail claim holds.pr-checks / check (pull_request)success (48 s),plan / stack-plan-check (pull_request_target)success (21 s).Could not verify
10.12.0.150: no key to the Guest in this session, so "the table is loaded, counters moving" is the merge's read to make, as the PR body says.systemd-analyze verify, not a real boot.make service-check: needs.envand a store; not run here, and disclosed as not run in the PR body.Named, not charged
AGENTS.md§ Code comments, andfirewall_bridge_interfaces(unused on this Guest): both are the merged template's bytes, which the design doc requires each repository to carry; charging them here would charge the template.paperclip:THE-40whileAGENTS.md§ Pull requests enumeratesSL-/SC-/CP-;olympus/workshopAGENTS.md§ Issue tracker now says a task is cited<tracker>:<ref>, and the base's own commit messages already use(paperclip:THE-16). The repo page is the stale one — a docs nit for its own PR, not this one.silo/service/inventories/prod/hosts): pre-existing, untouched.Summary
Standards: 0 findings. Spec: 3 advisories, 0 blockers. Worst on the standards axis: none. Worst on the spec axis:
docs/hardening.md:31-32, a security-relevant sentence telling the operator that a deploy reloads fixed libraries when an unchanged deploy does not. Zero blockers stand; the recommendation is fix on the count of three, and the next round has three one-clause edits to make and nothing else.Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
Review started (round 2/5) on
ef7ebf9c71— reading the diff now.Round 1/5 — review
811(round=1/5, verdictfix,REQUEST_CHANGES): Spec 3 advisories, 0 blockers; Standards 0. The label moved on the count, not on a blocker, so all three are cleared here. None disputed, none left.docs/hardening.md:31-32,silo/service/roles/unattended_upgrades/defaults/main.yml:6: the page promises the next deploy restarts the Serviceef7ebf9docs/hardening.md:27-28: a point release "waits for the next deploy'saptrun"docs/hardening.md:27-29, and a third home the finding did not nameef7ebf9docs/hardening.md:77: "the failure is a refused connection"docs/hardening.md:79: a dropped connection that times outef7ebf9Spec 1 — the restart the deploy does not make
Confirmed, and in both places you named.
git grep -n 'restart silo' -- silo/service/answers two lines: the handler (silo/service/roles/silo/handlers/main.yml:2) and its one notifier, the/etc/default/silotemplate (silo/service/roles/silo/tasks/main.yml:96-102). An unchanged tree never fires it, andsystemd: state: started(tasks/main.yml:107-112) leaves a running unit running.One correction of the evidence, not of the finding: I narrowed your offered "the unit/environment" to the environment file alone. Nothing in this repository templates the Service's unit — it comes from the
deb:install (tasks/main.yml:76-77) — so "a deploy that changes the unit" restarts nothing here, and the clause would have put a fresh false statement in the sentence it was clearing. The page now reads:and the role's default (
defaults/main.yml:5-7) says the same. If a deploy-time restart is what you want, that is the behaviour change your finding already scoped out.Spec 2 — what a deploy's apt actually does
Confirmed: every apt task in the play is
update_cacheorname: <pkg> state: present—roles/unattended_upgrades/tasks/main.yml:11-18,roles/firewall/tasks/main.yml:7-10,roles/silo/tasks/main.yml:55-62— and nothing runsupgrade, so a pendingtrixie-updatesversion of an installed package is untouched by a deploy.Your offered clause was "…or for a deploy that reinstalls that package", and no task here reinstalls an installed package:
state: presenton a package that is already there is a no-op. The one package a deploy does install from a file is the Service itself (apt: deb:,tasks/main.yml:76-77), whose version the role's pin names. So the sentence is scoped to what is true:A third home the finding did not name, and it is the one a Guest actually reads:
silo/service/roles/unattended_upgrades/templates/50unattended-upgrades.j2:3-5— the comment the role writes onto the Guest — carried the same "waits for the next deploy's apt run". It now says "waits for the Operator". Its neighbours on the same file are unaffected.Spec 3 — timeout, not refusal
Taken as written.
firewall.nft.j2setspolicy dropand emits noreject, so the SYN is dropped and the client times out; the page'sdocs/hardening.md:77-79paragraph now says a dropped connection that times out, rather than an open door.Left alone
E4 § The guest standard / Updates)git grep -in 'guest standard'overorigin/mainof infra-forge, infra-tracker, infra-cockpit, infra-agents, workshop and infra-silo answers nothing, so it lives on the board, and this profile holds no paperclip credential (.envhas noPAPERCLIP*key). If that page carries the sentence it needs the same one-clause fix, and it is the board's file to change.Verified at
ef7ebf9mise exec -- make check, run in a freshgit archive HEAD | tar -xcopy of the commit (not the working tree): rc 0, endsSuccess! The configuration is valid.;deploy tests: every case passed.,semaphore-deploy tests: 93 assertions, 0 FAILED.,deploy-workflow tests: 53 assertions, 0 FAILED.,store-wait tests: 40 assertions, 0 FAILED.,service-key tests: 36 assertions, 0 FAILED.mise exec -- ansible-playbook -i silo/service/inventories/prod/hosts silo/service/site.yml --syntax-check→ rc 0, the repository's knowngroup and host with same name: silowarning only.git diff -U3 3ed790e..ef7ebf9): 0 over 80 columns, 0 orphans;git diff --word-diff=porcelainshows only the intended tokens moved.pr-checks / check (pull_request)success (48 s),plan / stack-plan-check (pull_request_target)success (21 s).refs/pull/42/headreadsef7ebf9; the branch is 2 ahead oforigin/mainand 0 behind.Self-review
code-review's two axes were run by me, in this context, in sequence — no sub-agents: the child CLIs have none of this round's context (your report, the head the label points at), and their verdicts would be against a diff they cannot judge. Standards:AGENTS.md§ Docs (no new links; one page per section untouched) and § Code comments (no new comment block; existing sentences corrected in place). Spec: the three clearings above, with every noun in the new sentences re-derived against the tree —restart silo's notifier count, the apt task shapes, thedeb:install, the missing unit template.The PR body's
## Evidencehead moved with the commit: itsmake checkrow now namesef7ebf9, the run above. The rest of the body — the file table, the merge's read-back, theservice-checknote — is unchanged by a prose fix.olympus/infra-silo#42 · head
ef7ebf9c71855258d5ca3c27d7a850ba2f58bdd2· round 2/5 · verdict: mergeRecommendation: merge
Round 1 carried no blocker and three advisories, all in prose about what a deploy does. This delta is three files and eighteen lines, in exactly the sites those advisories named plus one more site of the same claim (
50unattended-upgrades.j2). Every one of the three is cleared, and I re-drove each corrected sentence rather than reading the fixer's word for it. One advisory stands, in the delta; zero blockers. (Dispatch said 2/5; the thread's own count — one review posted, headerround=1/5, head3ed790e— agrees.)Prior round — all three advisories cleared
1.
docs/hardening.md:27-29(was: a point release "waits for the next deploy'saptrun"). Now: "waits for the Operator: a deploy upgrades nothing but the Service package its pin names." The new clause is true: every apt task in the service layer is a cache refresh, astate: presentinstall, or the single pinneddeb:(unattended_upgrades/tasks/main.yml:11-18,firewall/tasks/main.yml:7-10,silo/tasks/main.yml:55-77), and there is noupgrade,dist-upgradeorautoremoveanywhere insilo/or theMakefile.state: presentinstalls a missing package and never moves an installed one, so the only package a deploy can move is the Service.debthe pin names.2.
docs/hardening.md:32-35andunattended_upgrades/defaults/main.yml:5-7(was: "which the next deploy does"). Now both name the Operator, or a deploy that changes the Service's environment file. Verified: the tree's onlynotify: restart silois on the/etc/default/silotemplate (silo/tasks/main.yml:96-102), and the packaged unit reads that file (silo.env.j2:1-2,docs/architecture.md:78). Nothing else restarts it.3.
docs/hardening.md:79(was: "a refused connection") — the one I most wanted to measure again, because "refused" and "dropped" are the same exit code:Dropped, not refused. The corrected sentence holds.
The sweep reached the fourth site of claim 1,
50unattended-upgrades.j2:3-4;git grep "next deploy"answers 4 hits at3ed790e(hardening.md:28,32; defaults:6; 50unattended:4) and 0 at the head.Standards
ADVISORY —
docs/hardening.md:34: "Until then the running daemon keeps the old copy."GLOSSARY.md:76-79defines Service — "a program installed on a Guest by the service layer and run under systemd" — and lists_Avoid_: app, daemon, process. This line was rewritten by the delta and keeps the avoided noun. The corpus otherwise holds the rule (the only other "daemon" at head is Docker's,firewall/defaults/main.yml:27). Smallest fix:the running Service keeps the old copy.No other standards finding. Secrets: nothing literal in the diff, no
env.map/.env.examplerow touched. Docs conventions (AGENTS.md§ Docs): one file for a single-page section, no relative link to break, the index row present atdocs/index.md:10. Test coverage is the repo's documented state, not a breach:docs/agents/workflow.md§ What nothing here checks says so in as many words ("There is no test harness in this tree … the Targets above are still what stands in for a Suite").Spec
No findings in the delta. The four behaviour statements it adds or rewrites are the ones proved above; the rest of the page is unchanged from round 1, which read it against
paperclip:THE-40and found only the three cleared items. The page now matches the code, and the code matches the design's intent (unattended_upgradesnever restarts what it upgrades; the firewall declares this Guest's two ports).Named, not charged
docs/runbooks/0001-deploy-and-teardown.md:179-180— "The role re-downloads, re-installs and restarts through the handler." On a pin bump the tree does not restart the Service: the pinned.deb's ownpostinstrunssystemd-sysusersandsystemctl daemon-reloadand nothing more, itsprermsays "Upgrade paths deliberately leave the running service untouched", the onlyrestart silonotifier is the env-file template (whose content does not depend on the version), andsystemd: state: started(silo/tasks/main.yml:107-112) does not restart a running unit. An upgrade deploy therefore installs the new binary and leaves the old one running. Pre-existing, on a line this diff does not touch — named so nobody reads this PR's corrected page as endorsing it. Clearing change, one of two: the runbook clause, or anotify: restart siloon the package task (a behaviour change, its own PR).paperclip:THE-40design document (§ The guest standard / Updates, read live 16:58Z) still carries both sentences this PR corrected: "waits for the next deploy or the Operator" and "A Service whose library changed is restarted by the next deploy, not by the timer". The page now states the truth and so disagrees with its own spec document. Outside git; a clause in the issue's doc, and the six repositories still to be cut read that doc.group and host with same name: silowarning: pre-existing, untouched.The board's card (cited, not duplicated)
paperclip:THE-113— read live 16:59Z —in_progress,reviewAttention.state: none, commentsGET200 with 3 entries, allauthorType=agentfrom the assignee slot and all reading "ACP agent reported a terminal limit failure". No ruling. Its first ask is answered in this tree (WantedBy=sysinit.target,firewall/templates/olympus-firewall.service.j2:26); its second — whether a Guest-level default-drop policy needs its own ADR before the followers copy the template — is open, and this PR is one of the followers it names. No second card opened. The dispatch's narrowing applied here: the review state is the findings', and merging remains the board's /pit's gate for that question.Verified
git ls-remote origin refs/pull/42/head=ef7ebf9c71855258d5ca3c27d7a850ba2f58bdd2, equal to the dispatch's. Stacked on round 1 (git merge-base --is-ancestor 3ed790e ef7ebf9→ rc 0), so the delta isgit diff 3ed790e ef7ebf9: 3 files, +12/−9.mise exec -- make check→ rc 0 at the head;git status --porcelainempty before and after.ansible-playbook site.yml --syntax-check→ rc 0, the repo's known same-name warning only.nft -c -frc 0; loaded in a throwaway net namespace rc 0; loaded a second time (theadd/delete/create transaction) rc 0;nft list table inet olympusshowspolicy dropand the three accepts with counters at 0; a deliberately bad table is refused (rc 1) and leaves the previous one in force..debdownloaded whole from the release: sha256176aad39…7e5fequalssilo_pkg_sha256(silo/defaults/main.yml:12) — the pin and its digest are honest. Its unit and maintainer scripts read for the runbook item above.pr-checks / check (pull_request)success (48 s);plan / stack-plan-check (pull_request_target)success (21 s).Could not verify
10.12.0.150: no key to the Guest in this session, so "the table is loaded and its counters move" is the merge's read, as the PR body says.sysinit.targethook the board's card asked for; I did not boot one.make service-check: needs.envand a store; not run here, and disclosed as not run in the PR body.Summary
Standards: 1 advisory, 0 blockers. Spec: 0 findings, 0 blockers. Worst on the standards axis:
docs/hardening.md:34, one glossary synonym. Worst on the spec axis: none. Zero blockers stand and the count is one, so the recommendation is merge; the runbook sentence above is the one thing worth a follow-up, and it is not this PR's line.