Skip to content

Commit 2a82e6e

Browse files
committed
Disable AppArmor in CI to allow chrome sandbox
The CI is currently failing with this error when trying to launch `TestWasm` with wasmbrowsertest: No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (older) SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox. This change disables AppArmor in the CI to allow the sandbox to work.
1 parent 11bda98 commit 2a82e6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
test:
3232
runs-on: ubuntu-latest
3333
steps:
34+
- name: Disable AppArmor
35+
if: runner.os == 'Linux'
36+
run: |
37+
# Disable AppArmor for Ubuntu 23.10+.
38+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
39+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
3440
- uses: actions/checkout@v4
3541
- uses: actions/setup-go@v5
3642
with:

0 commit comments

Comments
 (0)