Repository navigation
revisit later if this is determined to bea useful way to deploy and worth the time to understand it - [infra] - Add a throwaway Ubuntu 26.04 bwrap AppArmor canary - #1628
Conversation
Co-authored-by: Chris Grady <cgfixit@users.noreply.github.com>
|
PR template check (blocking) This PR is not a complete fill of
This check fails the job. Copy |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Proposed changes
Adds a throwaway, non-required Ubuntu 26.04 canary for the three bwrap AppArmor steps that the required
ubuntu-latesttest leg runs on 24.04. Linked issue: #1626.GitHub's
ubuntu-26.04label is generally available for public repositories (runs-on: ubuntu-26.04, changelog 2026-09-17).ubuntu-latestmoves from 24.04 to 26.04 gradually between 2026-10-19 and 2026-11-19. This PR runs the same probes on 26.04 before that window, without changing any check that gates merges.The new job is
ubuntu-26-04-bwrap-canaryin.github/workflows/ci.yml. It usesruns-on: ubuntu-26.04,continue-on-error: true, and a 15 minute timeout. It checks out the repo, installs bubblewrap, then runs the three probes copied from theubuntu-latestleg:1, and bwrap must fail with a userns/permission denial).deploy/apparmor/cyclaw-bwrapwithapparmor_parser -r.The refusal script is byte-for-byte the same as the 24.04 leg. It is not loosened. The job does not write
kernel.apparmor_restrict_unprivileged_userns. The noble apt pinbubblewrap=0.9.0-1ubuntu0.3is used when that version is in the image cache, and the version string must then matchbubblewrap 0.9.0. If the pin is absent, the job installs the distro package, printsbwrap --version, and continues. The required 24.04 leg still hard-fails on a pin miss.actionlint 1.7.12 (the
workflow-lintpin,actionlint-py==1.7.12.24) does not knowubuntu-26.04and has no ignore-comment syntax..github/actionlint.yamlallowlists that one label soworkflow-lintstays green. The label is a GitHub-hosted runner, not a self-hosted machine. CIworkflow-lint (actionlint + zizmor)passed on this head.The
testmatrix, theubuntu-latestandubuntu-22.04legs, required check names, and the six invariants are unchanged.First canary run (do not retune from this): the 26.04 image ran. Stock refusal failed even though the sysctl was
1, because bwrap succeeded. Profile load passed. Confinement then failed withRTM_NEWADDR: Operation not permitted. Details are in Further comments.Workflow changes need the Advisor's pass on the exact head SHA before merge. This PR is a draft and must not be merged or auto-merged. The canary is throwaway and non-required.
Invariant / Governance Impact
gate.py,graph.py, soul handling, the sanitizer, auth, or retrieval.python3 .claude/skills/invariant-guard/check_invariants.pyreported 46 passed, 0 failed on this head.doc-syncreported 0 drift, so no doc or registry update was required for the new job.tests/test_repo_hygiene.pystill requires a timeout on every job; this job setstimeout-minutes: 15.Types of changes
Optional free-text scope note (recommended):
Infrastructure / CI only
Benefits / why
deploy/apparmor/cyclaw-bwrapstill loads, and whether confinement still works. Issue [infra] - Verify the bwrap AppArmor profile CI step on Ubuntu 26 after 2026-10-19 #1626 calls that unknown. The first run answered it: the sysctl is still1, and stock bwrap is not refused.continue-on-error: trueat job level means it does not fail the workflow or rename a required check. The canary check itself is red, which is the finding.kernel.apparmor_restrict_unprivileged_usernsandbwrap --version, which is the evidence [infra] - Verify the bwrap AppArmor profile CI step on Ubuntu 26 after 2026-10-19 #1626 asks for.Risks to monitor
main. It is not a release gate. Delete the job after the migration window answers the question.ubuntu-lateststarts landing on 26.04, the required refusal step will fail the same way this canary did, unless the image or the check changes first. That is the point of running this before 2026-10-19..github/actionlint.yamlallowlistsubuntu-26.04for actionlint only. It does not provision a runner. A future actionlint release that knows the label can drop the file.kernel.apparmor_restrict_unprivileged_userns=line and the three step conclusions. This run's signal is sysctl1plusbwrap succeeded under stock AppArmor.Checklist
docs/THREAT_MODEL.md,INVARIANTS.mdandSECURITY.md(and any relevant Phase docs)GROK_API_KEY=dummy pytest tests/ -q --tb=short, andbash .claude/skills/CyClaw-Sandbox/verify.shfor core RAG/agentic paths) and passes with no regressionsFurther comments
Head SHA for Advisor review:
b84eb6820e43900c73e161c655342f4d78a7401e. Workflow changes need the Advisor's pass on that exact head SHA before merge. This PR is a draft and must not be merged or auto-merged. The canary is throwaway and non-required.Human review note: this diff touches
.github/workflows/ci.ymland adds.github/actionlint.yaml. Both are CI control files. The checkout action pin is the existing SHAactions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1(v7.0.1) withpersist-credentials: false. No new third-party action.Local checks on this head, not the full suite:
actionlint1.7.12 (actionlint-py==1.7.12.24) on.github/workflows/*.yml, with ShellCheck 0.9.0: exit 0. Without.github/actionlint.yamlthe same binary reportslabel "ubuntu-26.04" is unknown.zizmor1.28.0--gh-token --min-severity=high .github/workflows/: no high findings.python3 .claude/skills/invariant-guard/check_invariants.py: 46 passed, 0 failed.python3 .claude/skills/doc-sync/doc_sync.py: 0 drift. No doc update.pytest tests/test_repo_hygiene.pyfor the timeout, SHA-pin, and workflow-permission tests only, with--noconftest: passed. The fullpytest tests/suite was not run.The three
run:scripts in the canary match theubuntu-latestcopies. The matrixif:lines are omitted so the probes are not skipped on a non-matrix job. Later probes useif: ${{ !cancelled() }}so a failed refusal still attempts the profile load and the confinement probe. That does not change the refusal check.First CI run of
ubuntu-26-04-bwrap-canaryon headb84eb6820e43900c73e161c655342f4d78a7401e:ubuntu-26.04did run. Imageubuntu-26.04version20260927.149.1, OS Ubuntu 26.04.1 LTS.0.11.1-1ubuntu0.3(already installed). Warning: noble pinbubblewrap=0.9.0-1ubuntu0.3is not in this image apt cache.bwrap_version=bubblewrap 0.11.1, path/usr/bin/bwrap.kernel.apparmor_restrict_unprivileged_userns=1thenbwrap succeeded under stock AppArmor; expected a refusal before the cyclaw-bwrap profile loads. The sysctl matched the 24.04 requirement. The probe was not refused. The check was not changed.apparmor_parser -rprinted no error.bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted.Suggested merge order of open PRs
Trial merges verified (
git merge --no-commit --no-ff+ abort) against main @ b9573b0 on 2026-10-10.#1628 · Blocked ⛔
Impact: Throwaway non-required
ubuntu-26.04bwrap canary. No file overlap with #1617, #1618, #1619, #1625, or #1627.Action: Do not merge and do not auto-merge. Draft until the Advisor passes the exact head SHA. Trial merge of this branch onto main was clean.
ELI5
The required Ubuntu test still runs on today's 24.04 image and still has to prove that stock AppArmor blocks bubblewrap, then load our small AppArmor profile, then prove bubblewrap can run. GitHub will start moving that "latest" image to Ubuntu 26.04 on October 19, 2026. This PR adds a separate practice run on the Ubuntu 26.04 image and does not change the required jobs. That practice run already happened. Ubuntu 26.04 has bubblewrap 0.11.1, not the 24.04 package pin. The kernel switch is still 1, but bubblewrap was allowed to run anyway, so the "stock refuses bubblewrap" step failed. Loading the profile succeeded. The confinement command then failed with "Operation not permitted" while adding a network address. That failure is the finding. The refusal check was not loosened to hide it. The practice job is continue-on-error, so it is not supposed to block a merge by itself. Do not merge this draft.
Last updated: 2026-10-10 14:59 ET