fix(runtime): fail closed without bubblewrap; install it in CI and the image
ci / check (push) Failing after 1m8s
ci / publish (push) Skipped

The function runtime silently ran untrusted code as a plain process when
/usr/bin/bwrap was missing. The CI job image (node:24-bookworm) has no
bubblewrap, so the stage-6 sandbox tests got 'leak' no matter which
capabilities the runner granted. Now execute() returns an error outcome
instead, CI installs bubblewrap, and the runtime image ships it
(bubblewrap: required by the sandbox, from Debian).

Also commits the runner's job-container options (SYS_ADMIN + AppArmor
unconfined), already live on VM103, needed for bwrap to create namespaces.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
homelab-updaterandClaude Opus 5 committed 2026-09-22 17:02:49 +02:00
1 parent 2950f93831
commit 9518627e3e
7 files changed
+68 -42

No files matched your search

+2
View File
@@ -21,6 +21,8 @@ jobs:
- uses: actions/checkout@v4
with:
github-server-url: ${{ env.GITEA_INTERNAL_URL }}
# The function-runtime sandbox tests need bubblewrap; the runtime refuses to run functions without it.
- run: apt-get update -qq && apt-get install -y -qq --no-install-recommends bubblewrap >/dev/null && bwrap --version
- run: npm ci
- run: npm run check