Skip to content

fix(ci): scope AppArmor userns exemption to bwrap instead of runner-wide#705

Merged
mkobit merged 1 commit into
mainfrom
feat/sandboxr-ci-scoped-apparmor
Jul 9, 2026
Merged

fix(ci): scope AppArmor userns exemption to bwrap instead of runner-wide#705
mkobit merged 1 commit into
mainfrom
feat/sandboxr-ci-scoped-apparmor

Conversation

@mkobit

@mkobit mkobit commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • integration CI job (both bwrap and srt backends) passes on ubuntu-24.04 with this profile in place instead of the sysctl toggle
  • sandboxr doctor output in the CI log shows the same probe results as before (no regression)

Can't validate locally: WSL2's kernel has no AppArmor LSM at all, so a real GH Actions ubuntu-24.04 run is the only way to exercise this.

🤖 Generated with Claude Code

Ubuntu 24.04's AppArmor default blocks unprivileged CLONE_NEWUSER for
otherwise-unconfined processes, which bwrap needs for rootless
sandboxing. The previous fix disabled the restriction runner-wide via
kernel.apparmor_restrict_unprivileged_userns=0; this loads a profile
scoped to /usr/bin/bwrap that grants it userns creation directly, so
every other process on the runner keeps the restriction.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mkobit
mkobit merged commit b6cdc82 into main Jul 9, 2026
6 checks passed
@mkobit
mkobit deleted the feat/sandboxr-ci-scoped-apparmor branch July 9, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant