Skip to content

Commit 891846f

Browse files
committed
relax apparmor config
1 parent 4be5618 commit 891846f

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/check-rendered-specs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,15 @@ jobs:
9292
# This dodges the whole class of poisoned-.git/config attacks
9393
# (diff.external, diff drivers, filter drivers, hooks, etc.).
9494
#
95-
# SYS_ADMIN is needed for mock (mount namespaces for chroot). We avoid
96-
# --privileged to limit blast radius. --security-opt no-new-privileges
97-
# would be nice but mock's userhelper requires setuid, which that blocks.
95+
# Sandbox knobs:
96+
# --cap-add=SYS_ADMIN mock needs mount namespaces for chroot
97+
# seccomp=unconfined mock uses syscalls filtered by the default profile
98+
# apparmor=unconfined ubuntu-latest ships docker-default AppArmor which
99+
# blocks `mount -t tmpfs` on paths under /var/lib/mock
100+
# even with SYS_ADMIN granted
101+
# We still avoid --privileged (broader blast radius).
102+
# --security-opt no-new-privileges would be nice but mock's userhelper
103+
# requires setuid, which that flag blocks.
98104
- name: Render + check for drift
99105
id: check
100106
continue-on-error: true # TODO: flip off once check stabilizes (see PR #16674)
@@ -106,6 +112,7 @@ jobs:
106112
docker run --rm \
107113
--cap-add=SYS_ADMIN \
108114
--security-opt seccomp=unconfined \
115+
--security-opt apparmor=unconfined \
109116
-v "$WORKSPACE/pr-head:/workdir" \
110117
-v "$WORKSPACE/render-output:/output" \
111118
-v "$WORKSPACE/.github/workflows/scripts:/scripts:ro" \

0 commit comments

Comments
 (0)