Repository navigation
Apply cve.yml from CI too - #24
Merged
Merged
Conversation
cve.yml puts the CVE-2026-98432 filter on sf and sf2, ipni/infra's indexers. It joins site.yml and platform.yml in CI: a dry run on pull requests, and on merge a dry run then the apply, once a required reviewer approves it in `production`. It runs on its own, in cve-main, since it needs nothing from the other two and they never touch these boxes. CI cannot sign in there as `ipni` (those boxes do not have it) or as the operators' shared `user`, whose sudo wants a password. So cve.yml now creates and keeps an account of its own for CI, ipni-ci: key only, with CI's existing key and nothing else, password locked, passwordless sudo. ci-playbook.sh makes CI sign in as it, reading the name from group_vars/infra_boxes. No new secret. CI only connects to pinned host keys, so sf's and sf2's go into inventory/known_hosts in ssh's [ip]:5222 form; the scanned key, the key file on each box and an operator's known_hosts agreed. CI cannot create its own account, so the first run on each box is an operator's, with -K. Until then cve.yml's CI dry runs fail to connect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
cve.yml(the CVE-2026-98432 filter on sf and sf2, from #21) now applies from CI likesite.ymlandplatform.yml:production.It runs on its own, in its own concurrency group
cve-main. It needs nothing from the other two playbooks, and they never touch these boxes.cve.ymlnow creates and keeps CI's own account on sf/sf2,ipni-ci:keys/github-actions.pub), installed exclusively.userincluded.group_vars/infra_boxes/main.yml: addsinfra_ci_user: ipni-ciandinfra_ci_pubkey_file. Operators still sign in asuserwith-K.scripts/ci-playbook.shacceptscveand signs in asinfra_ci_user, read from group_vars and passed as an extra var so it outranks the operators'ansible_user. No new secret.inventory/known_hosts: sf's and sf2's host keys in ssh's[ip]:5222form. For each box, the scanned key, the key file on the box and an operator'sknown_hostsagreed.cveis added to the manual run'splaybookchoice and to thechangesjob.cve-dry-runandcve-applyjobs, the apply inproduction.cve.yml, the hardening role's CVE tasks, templates or defaults,host_vars/sf*/, CI's public key, or the shared paths change.Why
So what runs on sf/sf2 is what's on
main, reviewed and approved like every other box, instead of whatever an operator last ran from their machine.Reviewer notes
cve.yml, then on each box runsudo userdel -r ipni-ciandsudo rm /etc/sudoers.d/90-ipni-ci.cve-dry-runwill fail to connect at first.ipni-cidoesn't exist yet, and CI can't create it. The first run on each box is an operator's, from this branch:ansible-playbook cve.yml -K --check --diff -l sf ansible-playbook cve.yml -K -l sf # then the same for sf2cve-dry-run: it should connect asipni-ciand report no changes.site.ymlandplatform.ymldry runs will also run. This PR touches the workflow,inventory/andgroup_vars/, which both treat as shared. Neither should change anything.--syntax-check.{"ansible_user": "ipni-ci"}forcveand unchanged forsite.cvepath pattern matches the intended files and not others (e.g. notroles/hardening/tasks/main.yml,host_vars/sing-1/,keys/takgn.pub).bash -nand shellcheck are clean, and yamllint is clean.main.cve.yml --check --diff -l sfasuserwith sudo off: no failures.🤖 Generated with Claude Code