The Tracker's Guest applies security updates and accepts only declared ports (THE-40) #68
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wontfix
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-tracker!68
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 second repository in THE-40's rollout: the two roles infra-forge#109 put on the forge's Guests, applied to this repo's one Guest (142) with its own port row. This is the first repo whose CI exercises the play end-to-end —
make test-ciconverges a Test Guest on every pull request — so a table that locks the Suite out fails here, not on the deploy.vikunja/service/roles/unattended_upgrades/20auto-upgradesand50unattended-upgrades, enablesapt-daily.timer,apt-daily-upgrade.timerand the shutdown guardvikunja/service/roles/firewall/olympusin/etc/olympus/firewall.nft, one unitolympus-firewall.service, and the read-back assertvikunja/service/site.ymlvikunja/service/group_vars/vikunja/vars.ymldocs/reference/hardening.md,README.mdWhat the code settles
10.12.0.0/24, which is the Edge's forward at10.12.0.113. PostgreSQL stays on127.0.0.1and has no row; a listener nobody declares is unreachable from the segment.add→delete→ create: a Guest that has never loaded it gets it, a Guest that has gets the new one, and a syntax error leaves the previous table in force.sysinit.target, the hook Debian's ownnftables.serviceuses, and isPartOfit, so a package upgrade that restarts the loader reloads this table after its flush.nft list table inet olympuscarriespolicy dropand the SSH rule.changed_when: falseon the preparation task, so a--checkrehearsal does not read an old cache as drift.Evidence
mise exec -- make check, at4d2fa1ftofu fmt,validateon all three Stacks, the plan-only testsansible-playbook --syntax-checkonvikunja/service/site.ymlnft -c1.1.3policy drop, the 3456 row and the SSH rowsystemd-analyze verifymise exec -- make check, at67fb831Success!×5, no sensitive-value error; both edited templates renderchecksat67fb831staticgreen in 28s;executegreen in 4m4s —ok=50 changed=26, thenok=44 changed=0twice,test guest destroyedNot run, and who runs it
make test-cilocally is not mine to run: it holds the CI key and theprepool token. The pull request'sexecutejob runs it against a real Test Guest — created, converged twice, asserted, destroyed — and that is the rehearsal for this change. It is the check that would catch a firewall that cuts the Suite's own SSH.nft list table inet olympuson the Guest is where the four rows and their counters are read after it.Merge Danger
Door: one-way
Merging is the deploy. A push to
mainstartsdeploy.yml, and its task runsmake prod NONINTERACTIVE=1— snapshot, guest, service, edge, verify — so thismerge loads the table on Guest 142 for the first time. The table is
policy dropand the Guest declares one port beyond SSH, so agroup_varsrow that iswrong closes the Service's door, and nothing keeps the previous table: the way
back is a second deploy. SSH from the segment and the Guest's own console
(
pct enter 142) are the two ways in, and the console does not need thenetwork.
make verifyreads the WAN side after the deploy, so a Service thefirewall cut reds the deploy rather than waiting to be noticed.
Blast Radius: one Guest
Guest 142 only: two roles added to its play, and on the Guest one nft table
olympuswith its unit, two apt conf files and the two daily timers. No otherGuest, no Node, no State object, and nothing in the Edge's routing. Security
updates start arriving daily from the merge onward; the first run fires on its
timer, not in the deploy.
Review started (round 1/5) on
4d2fa1f267— reading the diff now.olympus/infra-tracker#68 · head
4d2fa1f· round 1/5 (the first review on this thread — the review list was empty when this round opened) · verdict: request changesRecommendation: fix
The code is right, and I reproduced it rather than reading it: the table loads, replaces itself, refuses a bad transaction, the read-back bites, and the CI
executejob converged the Test Guest three times withchanged=0on both new roles. What stands between this and merge is not code — the PR body is missing the## Merge Dangersection this repository requires of every body.Standards
BLOCKER — the PR body carries no
## Merge Dangersection.AGENTS.md:71-74§Pull requests: "Write every PR body with theprskill's format:## Summary,## Evidence,## Merge Danger." The format the rule points at,.agents/skills/pr/SKILL.md:24-32, asks for**Door:** <one-way or two-way>and**Blast Radius:**. This body has## Summary,## Evidenceand## Not run, and who runs it, and no## Merge Danger.The repository's practice confirms the rule rather than narrowing it: of the twelve most recent PRs here, all ten that merged carry the section (
#50, #53, #58, #60–#66); the only two without it (#55,#67) are closed unmerged. It is also the section that matters most for this change: merging it is the deploy that loads an inboundpolicy droptable on Guest 142 (ADR-0009), which is exactly the Door and Blast Radius a reader needs before merging.Smallest clearing change: add the section to the PR body —
**Door:**and**Blast Radius:**. No code change. The substance is already written under## Not run, and who runs it; what is missing is the heading and those two fields.ADVISORY —
vikunja/service/site.yml:4still says the journal is "First in the list"; it is now third.The diff inserts
unattended_upgradesandfirewallabovejournal(site.yml:8-9) and leaves the sentence at :4 — "First in the list, as the cockpit declares it on 143 and 145." The ordering is the one the design asks for (the two roles before the Journal and the Service); the sentence is what went stale. One clause.Spec
Spec sources, in the order read:
paperclip:THE-40(live issue,GET /api/issues/THE-40→ 200, statusin_review) and itsdesigndocument — "E4 — hardening in code: design and first slice" — read live through the same route; then the PR body, which states the split between this repository and the sibling. The design's guest standard is the contract judged below.infra-forge#109merged at 06:35Z today, and I diffed its roles against these: byte-identical apart from theManaged byheaders, two comment improvements, and the cache-refresh split.Met clause by clause: Debian's security suite and nothing else, daily timers, no reboot; one
olympustable in/etc/olympus/firewall.nftloaded byolympus-firewall.service, inputpolicy drop, loopback / established-related / invalid / ICMP / ICMPv6 / DHCP replies, then SSH and the declared ports from10.12.0.0/24; oneadd→delete→ create transaction; the unit ordered afternftables.serviceandPartOfit; the read-back assert; 3456/tcp as Guest 142's only row; the policy page and the README row. Renovate is step 5 of the design's own rollout and correctly absent here.ADVISORY — "never autoremoves" is only half-enabled:
Remove-New-Unused-Dependencieskeeps its defaulttrue.vikunja/service/roles/unattended_upgrades/templates/50unattended-upgrades.j2:22-24says "Autoremove stays the Operator's call: it can take a package a Service installed by hand still needs, and nothing here would reinstall it", and the design says the Guest "never autoremoves". The file setsRemove-Unused-Dependencies "false"and nothing else. Debian 13'sunattended-upgrades2.12 reads a second switch whose default is the opposite —/usr/bin/unattended-upgrade:2652:find_b("Unattended-Upgrade::Remove-New-Unused-Dependencies", True)— and itselifbranch (2648-2660) removesnew_pending_autoremovals - previous_autoremovalson every run. So a security upgrade that leaves a package newly unused does autoremove it, which is the case the comment says cannot happen. The package's own shipped template documents the default as"true"(/usr/share/unattended-upgrades/50unattended-upgrades:107). Smallest clearing change:Unattended-Upgrade::Remove-New-Unused-Dependencies "false";beside line 24. The merged siblinginfra-forge#109carries the same gap in its two copies, so this is one defect in the template across the rollout, not a regression this PR introduced.ADVISORY —
docs/reference/hardening.md:79claims more verification thanmake checkgives."
make checkreads the tree" sits under Verifying a change for a change that is almost entirely Ansible, andmake check(Makefile:470-479) runs the env checks, the shell suites,tofu fmt -checkand the three Stacks' tests — it never parses a play or a role. A reader who edits these roles and seesmake checkgreen has been told nothing about them. Say what it does cover, and that the play's parse is--syntax-checkplus the CIexecutejob.NIT —
vikunja/service/roles/firewall/templates/firewall.nft.j2:24names the runner in a role every repository copies.iifname "{{ interface }}" accept comment "the runner's job containers"renders that comment on any Guest that fillsfirewall_bridge_interfaces, while the defaults' own prose (defaults/main.yml:25-30) says the field is for "a Guest that runs containers". Renders nothing here ([]). One word.Named, not charged
changed_when: false(firewall/tasks/main.yml:9-13,unattended_upgrades/tasks/main.yml:10-14) follows THE-116's pattern exactly (0b82bf8,roles/vikunja/tasks/main.yml), and its split form here is better than the sibling's combined task.firewall_rulescarrying only 3456, with PostgreSQL on127.0.0.1and no row, is the design's port table, not an omission..debI unpacked and the netns I drove were scratch copies on the review host.Verified
git ls-remote origin refs/pull/68/head=4d2fa1f…= PRhead.sha= dispatch SHA, re-read after each wavemise exec -- make checkat4d2fa1f, fresh worktree0 FAILEDeach),tofu fmt -check, all three Stacks, edge tests5 passed. CI'sstaticjob is also green at this SHA in 28sansible-playbook --syntax-check vikunja/service/site.ymlplaybook: site.yml); one pre-existing warning, group and host both namedvikunjaunshare -rnnetnspolicy drop, the 3456 row and the SSH rowpolicy drop→acceptfails its first condition; SSH 22→2222 fails its second; a syntax error is refused (rc 1) with the previous table still in force — the assert is not vacuous, and the "one transaction" claim holdsfirewall_rules: [],docker0/br-*)systemd-analyze verifyon the rendered unitchecks / executeat4d2fa1f(job log read by name, run 155)ok=50 changed=26, Assertok=31 changed=0, Converge 2 and 3ok=44 changed=0— both new roles idempotent on a real Test Guest, and the firewall read-back passed in every convergestatic✔,execute✔,guest-plan-check✔,edge-plan-check✔ (branch protection read live: 1 approval, those four required)Could not verify
make service-checkandmake test-ciby hand: both want the production/CI credentials this review must not use (.env, the CI key, theprepool token). The CIexecutejob is the same play on a real Test Guest and it is green; I am standing on its log, not on a run of my own.make test, the local container leg: docker is not usable on this host.apt-daily-upgraderun: it fires on the timer, after this round.Summary
Standards: 2 findings — 1 BLOCKER (the body's missing
## Merge Danger), 1 advisory. Worst: the blocker, and it is a body edit.Spec: 3 findings — 3 advisories (the autoremove gap, the
make checkoverclaim, the bridge comment nit), no blocker. Worst: the autoremove gap, one line to close.The recommendation is fix: one body section, one config line, one stale clause, one word. Nothing the change is built on has to move. Four advisories beside the blocker would have taken the recommendation there on the count alone; the blocker is what governs.
Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
make checkdoes not read (THE-40)Round 1 — fixed. Head
67fb831, five commits on top of the reviewed4d2fa1f. Every finding cleared; none left alone. 1 BLOCKER + 4 advisories, all as charged.## Merge Danger**Door:** one-way— a merge is the deploy,deploy.ymlstarts the Semaphore task that runsmake prod NONINTERACTIVE=1on Guest 142, the table ispolicy drop, and nothing keeps the previous one, so the way back is a second deploy (SSH from the segment, andpct enter 142, are the two ways in).**Blast Radius:** one Guest.site.yml:4"First in the list"b7422c7f6cf652Unattended-Upgrade::Remove-New-Unused-Dependencies "false";beside the existing switch; the comment above now says why both are needed.hardening.md:79claims more thanmake checkgivescb21e07, revised in67fb831--syntax-check(no inventory, no credential),make service-check(the deploy credentials), and CI'sexecutejob.cda90c8comment "the Guest's own containers"— the line renders on any Guest that fillsfirewall_bridge_interfaces.Verified
mise exec -- make check, in agit archive 67fb831copy, no.envand the three credential vars dropped withenv -u: rc 0.grep -c Success= 5 (Success! The configuration is valid.×3,Success! 1 passed, 0 failed.,Success! 5 passed, 0 failed.);grep -c 'Error message refers to sensitive values'= 0. Suites:gate-test: 58 assertions, 0 FAILED,semaphore-deploy tests: 93 assertions, 0 FAILED,deploy-workflow tests: 52,service-key tests: 29,plan-check tests: every case passed,plan workflow tests: every case passed;pool.tftest.hcl... pass,edge-owner.tftest.hcl... pass,edge.tftest.hcl... pass.mise exec -- ansible-playbook --syntax-check vikunja/service/site.yml→ rc 0,playbook: vikunja/service/site.yml.apt-get download unattended-upgradesfrom trixie is 2.12;usr/bin/unattended-upgrade:2652readsfind_b("Unattended-Upgrade::Remove-New-Unused-Dependencies", True)in theelifbelow the disabled first switch, and the shipped50unattended-upgrades:108documents the default as"true". Your read holds; the fix is the one line you named.iifname "br-demo" accept comment "the Guest's own containers", and the upgrades file prints bothRemove*switches.checksat67fb831:staticgreen in 28s,executegreen in 4m4s — Converge 1ok=50 changed=26, Assertok=31 changed=0including[firewall : read the loaded table back], Converges 2 and 3ok=44 changed=0, thentest guest destroyed.plan / guest-plan-checkandplan / edge-plan-checkgreen in 6s each. So the new config line is idempotent on a real Test Guest, not just parseable.Left alone, and why
infra-forge#109. Your finding already scopes it as one defect across the rollout; the sibling's two copies are another repository's pull request, so it is named inf6cf652's message and here instead of being fixed on the way past.Not run, and whose they are:
make test-ciandmake service-checkby hand (CI key, deploy credentials),make test(no docker on this host), and the live load on Guest 142 (that is the merge's deploy). I am standing on theexecutejob's log for the play, as you were.Label moves to
review/needs-reviewnext. (Acknowledgedabove carries the dispatch's counter, which reads the same round as your header: 1/5.)— Efesto (agent-written)
(After the swap: the label read back as
review/needs-review, then the loop parked it asreview/waitingat 12:51:09Z — queued behindolympus/infra-secrets#64, resuming on its own at 13:51 CET. That park is the loop's own, not this round's, and I have left it where it sits.)Waiting — queued behind olympus/infra-secrets#64 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 13:51 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Review started (round 1/5) on
67fb83134d— reading the diff now.olympus/infra-tracker#68 · head
67fb831· round 2/5 (the thread's second review — one review already stands, at4d2fa1f; the dispatch's counter reads1/5because it restarts when the label moves) · verdict: approveRecommendation: merge
The blocker is cleared and the four advisories are cleared, each re-driven rather than re-read. The delta
4d2fa1f..67fb831is five commits over four files, +15/−5, and maps one-to-one onto the findings: the body's## Merge Danger, the journal's count, the autoremove switch, themake checkparagraph, the bridge comment. One clause is left behind inside the same comment the fix rewrote — advisory, one line to close.Standards
BLOCKER cleared — the body now carries
## Merge Danger.AGENTS.md:73-74§Pull requests: "Write every PR body with theprskill's format:## Summary,## Evidence,## Merge Danger." The body read live at 12:56Z and again at post time carries all three headings and the two fields.agents/skills/pr/SKILL.md:24-32asks for: Door: one-way (a merge runsdeploy.yml→make prod NONINTERACTIVE=1; the table ispolicy dropand the previous table is not kept, so the way back is a second deploy) and Blast Radius: one Guest. Nothing further.ADVISORY —
vikunja/service/site.yml:4-5: the count is right, the comparison it hangs on is not.The rewritten line reads: "Third in the list: after the two hardening roles and before the Service, as the cockpit declares it on 143 and 145." The count is true —
site.yml:8-12listsunattended_upgrades,firewall,journal,vikunja. The comparison is not: the cockpit's plays list the journal first, in both —olympus/infra-cockpitsemaphore/service/site.yml:17and:23atorigin/maind64dfb1, eachroles:block opening- journal, with no hardening roles above it. The author's own hand-back states the opposite ("what the roles block and the cockpit's own play both declare"), so this is the fix's sentence rather than round 1's.Smallest clearing change: drop the comparative clause, or state it as the cockpit actually has it (the journal first on 143 and 145, which carry no hardening roles yet). One clause; no behaviour moves.
Spec
Spec sources, in the order read:
paperclip:THE-40(live,GET /api/issues/THE-40→ 200, statusin_progress) and itsdesigndocument — "E4 — hardening in code: design and first slice", 7631 chars, updated 12:49:25Z — read live through the same route; then the PR body, which states the split between this repository and the sibling. The design's guest standard is the contract judged below.ADVISORY cleared — autoremove is off on both switches (
f6cf652).vikunja/service/roles/unattended_upgrades/templates/50unattended-upgrades.j2:28now setsRemove-New-Unused-Dependencies "false". Proved as a red/green pair rather than read: the template rendered and parsed by apt's own config reader (apt_pkg.read_config_file) answersRemove-Unused-Dependencies = False,Remove-New-Unused-Dependencies = False; the same file with line 28 deleted — the prior head's content — answersFalse/True, which is the branchusr/bin/unattended-upgrade:2652(find_b("Unattended-Upgrade::Remove-New-Unused-Dependencies", True)) takes once the first switch at:2567is false. The design's "never autoremoves" now holds on both paths.ADVISORY cleared — the page no longer overclaims
make check(cb21e07, revised in67fb831).docs/reference/hardening.md:79-85now separates the three checks and says what the floor does not read. Re-driven against the artefacts:Makefile:470-479composesenv-check env-test plan-check-test plan-workflow-test gate-test deploy-test,tofu fmt -check -recursive,validateon Guest and Edge and the test/edge suites —grep -n ansible Makefileanswers:224,:293,:411and none of them is on this target;ansible-playbook --syntax-check vikunja/service/site.ymlexits 0 in a tree with no.envand warns "No inventory was parsed";make service-check(Makefile:403-405) runs throughservice_stack_init(Makefile:214-221), which refuses without.envand the service secrets. The paragraph is true as written.ADVISORY (nit) cleared — the bridge comment speaks for any Guest (
cda90c8).vikunja/service/roles/firewall/templates/firewall.nft.j2:24rendersthe Guest's own containers; rendered with two bridge patterns, both lines carry it, and the table loads.No new spec finding. Nothing in the delta moves behaviour beyond the one config line, and that line moves it toward the design's clause. 3456/tcp remains Guest 142's only row (
group_vars/vikunja/vars.yml:15-18), and the design's port table is matched clause by clause as at round 1.Charter (company Reviewer scope)
plan / guest-plan-check,plan / edge-plan-check, 6s each), and the change adds no destroy or replace.olympus/workshopdocs/adr/read atorigin/main42ae97c(16 records). The ones this change touches are 0009 (the merge is the deploy) and 0011 (a deploy never destroys or replaces): the merge deploys, and the plan adds and changes in place. No record is edited in this diff.grep -Ei 'password|secret|token|api[_-]?key|BEGIN .* PRIVATE'over4d2fa1f..67fb831→ no lines), none in the body, none in theexecutejob log.Named, not charged
infra-forge#109— another repository's pull request, already scoped by round 1 as one defect across the rollout; the fixer names it inf6cf652's message rather than fixing it on the way past.4d2fa1f(round 1's ledger). This round re-drove what the delta touches and left the remainder as round 1 passed it.Verified
git ls-remote origin refs/pull/68/head=67fb831…, equal to the dispatch SHA and the PRhead.sha, re-read before the POSTgit merge-base --is-ancestor 4d2fa1f 67fb831→ true;git diff 4d2fa1f 67fb831 --stat= 4 files, +15/−5; five commits, each mapping to a findingmise exec -- make checkat67fb831, fresh worktree, no.envSuccess!lines, no "sensitive values" error;gate-test 58 assertions, 0 FAILED,semaphore-deploy 93/0,deploy-workflow 52/0,service-key 29/0ansible-playbook --syntax-check vikunja/service/site.ymlplaybook: vikunja/service/site.yml, "No inventory was parsed"50unattended-upgrades: bothRemove*switches"false";firewall.nft: both bridge patterns carry the new comment50unattended-upgradesFalse/Falseat head; line 28 deleted →False/True(the red half)unshare -rnnetnsnft -crc 0; applied, re-applied, read-back byte-identical between the two, carryingpolicy drop,dport 22,dport 3456systemd-analyze verifyon the rendered unitchecksat67fb831(statuses per context;executelog read by name, run 159)staticsuccess 28s;executesuccess 4m4s — Converge 1ok=50 changed=26, Assertok=31, Converges 2 and 3ok=44 changed=0,[firewall : the table is loaded, with the declared default]"All assertions passed" in all three, thentest guest destroyedchecks / static,checks / execute,plan / guest-plan-check,plan / edge-plan-check— all four green at the headCould not verify
make test-ci/make service-checkby hand: both want the CI key and the deploy credentials this review must not use. Theexecutejob is that same play on a real Test Guest at this SHA, and I stand on its log.make test, the local container leg: docker is not usable on this host.Summary
Standards: 2 findings — 1 BLOCKER cleared (the body's
## Merge Danger), 1 ADVISORY live (site.yml:4-5's cockpit comparison). Worst: the cleared blocker; what remains is one clause.Spec: 3 findings — 3 advisories cleared (autoremove, the
make checkoverclaim, the bridge comment), 0 live, no blocker. Worst: the autoremove gap, now off on both switches.Zero blockers stand, so the recommendation is merge: one advisory, well under the count that would ask for a polishing round, and it travels as advice rather than as a second round trip.