Skip to content

Commit

Permalink
Disable AppArmor in jobs that use Puppeteer (#1630)
Browse files Browse the repository at this point in the history
Needed now that GitHub Actions switched to Ubuntu 24.
  • Loading branch information
tidoust authored Jan 7, 2025
1 parent c796309 commit d506f56
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ jobs:
fetch:
runs-on: ubuntu-latest
steps:
# Starting with Ubuntu 23+, a security feature prevents running Puppeteer
# by default. It needs to be disabled. Using the "easiest" option, see:
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
# https://github.com/puppeteer/puppeteer/pull/13196/files
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

- name: Checkout repo
uses: actions/checkout@v4
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/check-suggested-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
# We're only interested in "new spec" issues
if: ${{ contains(github.event.issue.labels.*.name, 'new spec') }}
steps:
# Starting with Ubuntu 23+, a security feature prevents running Puppeteer
# by default. It needs to be disabled. Using the "easiest" option, see:
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
# https://github.com/puppeteer/puppeteer/pull/13196/files
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

- name: Setup node.js
uses: actions/setup-node@v4
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
# Starting with Ubuntu 23+, a security feature prevents running Puppeteer
# by default. It needs to be disabled. Using the "easiest" option, see:
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
# https://github.com/puppeteer/puppeteer/pull/13196/files
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

- name: Checkout latest version of release script
uses: actions/checkout@v4

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/report-new-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ jobs:
name: Find potential new specs
runs-on: ubuntu-latest
steps:
# Starting with Ubuntu 23+, a security feature prevents running Puppeteer
# by default. It needs to be disabled. Using the "easiest" option, see:
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
# https://github.com/puppeteer/puppeteer/pull/13196/files
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

- name: Checkout latest version of release script
uses: actions/checkout@v4

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/submit-suggested-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
# https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2022-11-28#get-repository-permissions-for-a-user
if: ${{ github.event.comment.author_association == 'MEMBER' && contains(github.event.comment.body, '@browser-specs-bot ') }}
steps:
# Starting with Ubuntu 23+, a security feature prevents running Puppeteer
# by default. It needs to be disabled. Using the "easiest" option, see:
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
# https://github.com/puppeteer/puppeteer/pull/13196/files
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

- name: Setup node.js
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit d506f56

Please sign in to comment.