diff --git a/.github/workflows/publish-current-server.yml b/.github/workflows/publish-current-server.yml index d83be2cc17..ef580b9ebd 100644 --- a/.github/workflows/publish-current-server.yml +++ b/.github/workflows/publish-current-server.yml @@ -129,7 +129,7 @@ jobs: --file source/server/Dockerfile.web-compose-release \ --tag "$SECURITY_PROBE_IMAGE" source/server docker run --rm --read-only --security-opt no-new-privileges \ - --tmpfs /tmp:rw,nosuid,size=256m \ + --tmpfs /tmp:rw,exec,nosuid,nodev,size=256m \ --mount "type=bind,source=$GITHUB_WORKSPACE/source/scripts/probe-security-payload-recovery.sh,target=/probe/run.sh,readonly" \ --mount "type=bind,source=$GITHUB_WORKSPACE/source/server/scripts/download-ubuntu-security-updates.sh,target=/probe/download.sh,readonly" \ --mount "type=bind,source=$GITHUB_WORKSPACE/source/server/security/ubuntu-security-approved-records.tsv,target=/probe/approved.tsv,readonly" \ diff --git a/scripts/probe-security-payload-recovery.sh b/scripts/probe-security-payload-recovery.sh index 611a78cf11..ad4c897164 100644 --- a/scripts/probe-security-payload-recovery.sh +++ b/scripts/probe-security-payload-recovery.sh @@ -28,6 +28,10 @@ sources_before=$(find /etc/apt -type f -exec sha256sum {} + | LC_ALL=C sort | sh mkdir "$scratch/bin" cat >"$scratch/bin/apt-get" <<'SH' #!/bin/sh +if test "$#" -eq 1 && test "$1" = --probe-wrapper; then + printf 'PASTURESTACK_TEST_WRAPPER_BOUND\n' + exit 0 +fi download=0; print_uris=0; target=0 for value do case "$value" in @@ -44,6 +48,7 @@ fi exec /usr/bin/apt-get "$@" SH chmod 0700 "$scratch/bin/apt-get" +test "$(PATH="$scratch/bin:$PATH" /bin/sh -c 'apt-get --probe-wrapper')" = PASTURESTACK_TEST_WRAPPER_BOUND if PATH="$scratch/bin:$PATH" TMPDIR="$scratch" \ PASTURESTACK_NATIVE_FAULT_COUNT="$scratch/fault-count" \ PASTURESTACK_SECURITY_SNAPSHOT="$snapshot" \