Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Qualify exact candidate containers on PVE
rcourtman51f4c643223e
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.ymlindex 02ffb1c6fe..783602fe6b 100644--- a/.github/workflows/create-release.yml+++ b/.github/workflows/create-release.yml@@ -377,124 +377,76 @@ jobs:- name: Run backend testsrun: ./scripts/run-release-backend-tests.sh --data-root "$RUNNER_TEMP/pulse-test-data"- # Docker build - amd64 only for prereleases, multi-arch for stable+ # Assemble the immutable candidate into both release container targets,+ # verify their embedded binaries, and exercise that runtime through Helm.docker_build:- needs: prepare+ name: Exact-Candidate Container and Helm Smoke+ needs:+ - prepare+ - build_release_candidateif: ${{ needs.prepare.outputs.historical_asset_backfill_only != 'true' }}- runs-on: ubuntu-24.04- timeout-minutes: 30- permissions:- contents: read- packages: write+ runs-on: [self-hosted, Linux, X64, pulse-pve-build]+ timeout-minutes: 15steps:- name: Checkout repositoryuses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3- - name: Set up QEMU- if: needs.prepare.outputs.is_prerelease != 'true'- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0-- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0+ - name: Download immutable release candidate+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1+ with:+ name: ${{ needs.build_release_candidate.outputs.artifact_name }}+ path: release- - name: Log in to GHCR- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0+ - name: Download release candidate manifest+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1with:- registry: ghcr.io- username: ${{ github.actor }}- password: ${{ secrets.GITHUB_TOKEN }}+ name: ${{ needs.build_release_candidate.outputs.manifest_artifact_name }}+ path: release-candidate-manifest- - name: Derive license public key Docker cache key- id: license_key_cache- env:- PULSE_LICENSE_PUBLIC_KEY: ${{ secrets.PULSE_LICENSE_PUBLIC_KEY }}+ - name: Verify immutable release candidate+ run: |+ python3 scripts/release_candidate_manifest.py verify-local \+ --release-dir release \+ --manifest release-candidate-manifest/release-candidate.json \+ --version "${{ needs.prepare.outputs.version }}" \+ --source-sha "${GITHUB_SHA}"++ - name: Prepare exact-candidate container context+ run: ./scripts/prepare-release-container-context.sh release "${{ needs.prepare.outputs.version }}" "$RUNNER_TEMP/release-container-context"++ - name: Assemble exact-candidate runtime and agent imagesrun: |set -euo pipefail- decoded_len="$(printf '%s' "${PULSE_LICENSE_PUBLIC_KEY}" | base64 -d | wc -c | tr -d ' ')"- if [ "${decoded_len}" != "32" ]; then- echo "PULSE_LICENSE_PUBLIC_KEY must decode to 32 bytes." >&2- exit 1- fi- key_sha256="$(printf '%s' "${PULSE_LICENSE_PUBLIC_KEY}" | base64 -d | sha256sum | awk '{print $1}')"- echo "sha256=${key_sha256}" >> "${GITHUB_OUTPUT}"+ docker buildx build \+ --target runtime_prebuilt \+ --platform linux/amd64 \+ --build-context "release_payload=${RUNNER_TEMP}/release-container-context" \+ --load \+ --tag "pulse-helm-smoke:${{ needs.prepare.outputs.version }}" \+ .+ docker buildx build \+ --target agent_runtime_prebuilt \+ --platform linux/amd64 \+ --build-context "release_payload=${RUNNER_TEMP}/release-container-context" \+ --load \+ --tag "pulse-agent-candidate:${{ needs.prepare.outputs.version }}" \+ .- - name: Build Docker image (verify only)- uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0- with:- context: .- target: runtime- # amd64 only for prereleases (faster), multi-arch for stable releases- platforms: ${{ needs.prepare.outputs.is_prerelease == 'true' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}- push: false # Don't push staging images, just verify build- provenance: mode=max- sbom: true- cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/pulse:buildcache- cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/pulse:buildcache,mode=max- build-args: |- VERSION=${{ needs.prepare.outputs.tag }}- PULSE_LICENSE_PUBLIC_KEY_SHA256=${{ steps.license_key_cache.outputs.sha256 }}- PULSE_UPDATE_SIGNING_PUBLIC_KEY=${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}- secrets: |- pulse_license_public_key=${{ secrets.PULSE_LICENSE_PUBLIC_KEY }}- pulse_update_signing_key=${{ secrets.PULSE_UPDATE_SIGNING_KEY }}-- - name: Build Pulse agent image (verify only)- uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0- with:- context: .- file: ./Dockerfile- target: agent_runtime- platforms: ${{ needs.prepare.outputs.is_prerelease == 'true' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}- push: false- provenance: mode=max- sbom: true- # Cache under the published pulse package, not a pulse-agent package.- # No workflow pushes a pulse-agent image, so a buildcache ref there- # resurrects an empty package in the repo's Packages sidebar that- # reads like a pullable agent image. Blobs are also shared with the- # runtime build, which uses the same backend-builder layers.- cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/pulse:agent-buildcache- cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/pulse:agent-buildcache,mode=max- build-args: |- VERSION=${{ needs.prepare.outputs.tag }}- PULSE_LICENSE_PUBLIC_KEY_SHA256=${{ steps.license_key_cache.outputs.sha256 }}- PULSE_UPDATE_SIGNING_PUBLIC_KEY=${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}- secrets: |- pulse_license_public_key=${{ secrets.PULSE_LICENSE_PUBLIC_KEY }}- pulse_update_signing_key=${{ secrets.PULSE_UPDATE_SIGNING_KEY }}-- helm_smoke:- needs: prepare- if: ${{ needs.prepare.outputs.historical_asset_backfill_only != 'true' }}- runs-on: ubuntu-24.04- timeout-minutes: 30- steps:- - name: Checkout repository- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3+ - name: Verify container binaries match immutable candidate+ run: |+ set -euo pipefail+ expected_server="$(sha256sum "$RUNNER_TEMP/release-container-context/amd64/bin/pulse" | awk '{print $1}')"+ actual_server="$(docker run --rm --entrypoint /bin/sh "pulse-helm-smoke:${{ needs.prepare.outputs.version }}" -c 'sha256sum /app/pulse' | awk '{print $1}')"+ expected_agent="$(sha256sum "$RUNNER_TEMP/release-container-context/amd64/bin/pulse-agent-linux-amd64" | awk '{print $1}')"+ actual_agent="$(docker run --rm --entrypoint /bin/sh "pulse-agent-candidate:${{ needs.prepare.outputs.version }}" -c 'sha256sum /usr/local/bin/pulse-agent' | awk '{print $1}')"+ test "${actual_server}" = "${expected_server}"+ test "${actual_agent}" = "${expected_agent}"- name: Set up Helmuses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0with:version: v3.15.2- - name: Build local Pulse runtime image for Helm smoke- env:- DOCKER_BUILDKIT: 1- PULSE_LICENSE_PUBLIC_KEY: ${{ secrets.PULSE_LICENSE_PUBLIC_KEY }}- PULSE_UPDATE_SIGNING_KEY: ${{ secrets.PULSE_UPDATE_SIGNING_KEY }}- PULSE_UPDATE_SIGNING_PUBLIC_KEY: ${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}- run: |- PULSE_LICENSE_PUBLIC_KEY_SHA256="$(printf '%s' "${PULSE_LICENSE_PUBLIC_KEY}" | base64 -d | sha256sum | awk '{print $1}')"- docker build \- --target runtime \- --secret id=pulse_license_public_key,env=PULSE_LICENSE_PUBLIC_KEY \- --secret id=pulse_update_signing_key,env=PULSE_UPDATE_SIGNING_KEY \- --build-arg VERSION="${{ needs.prepare.outputs.tag }}" \- --build-arg PULSE_LICENSE_PUBLIC_KEY_SHA256="${PULSE_LICENSE_PUBLIC_KEY_SHA256}" \- --build-arg PULSE_UPDATE_SIGNING_PUBLIC_KEY="${PULSE_UPDATE_SIGNING_PUBLIC_KEY}" \- -t pulse-helm-smoke:${{ needs.prepare.outputs.version }} \- .-- name: Helm smoke test with local release-line imageenv:SMOKE_IMAGE_REPOSITORY: pulse-helm-smoke@@ -536,9 +488,9 @@ jobs:trap 'diagnose' ERR- curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64- chmod +x ./kind- sudo mv ./kind /usr/local/bin/kind+ curl -fsSL -o "$RUNNER_TEMP/kind" https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64+ chmod +x "$RUNNER_TEMP/kind"+ export PATH="$RUNNER_TEMP:$PATH"kind create cluster --name pulse-test --wait 5mkind load docker-image "${SMOKE_IMAGE_REPOSITORY}:${SMOKE_IMAGE_TAG}" --name pulse-test@@ -839,12 +791,11 @@ jobs:- windows_install_command_smoke- backend_tests- docker_build- - helm_smoke- integration_tests- release_smoke# Run if integration_tests passed OR was skipped (prereleases). The# release smoke has no skipped escape: it runs for prereleases too.- if: ${{ needs.prepare.outputs.historical_asset_backfill_only != 'true' && always() && needs.build_release_candidate.result == 'success' && needs.frontend_bundle.result == 'success' && needs.frontend_checks.result == 'success' && needs.windows_install_command_smoke.result == 'success' && needs.backend_tests.result == 'success' && needs.docker_build.result == 'success' && needs.helm_smoke.result == 'success' && needs.release_smoke.result == 'success' && (needs.integration_tests.result == 'success' || needs.integration_tests.result == 'skipped') }}+ if: ${{ needs.prepare.outputs.historical_asset_backfill_only != 'true' && always() && needs.build_release_candidate.result == 'success' && needs.frontend_bundle.result == 'success' && needs.frontend_checks.result == 'success' && needs.windows_install_command_smoke.result == 'success' && needs.backend_tests.result == 'success' && needs.docker_build.result == 'success' && needs.release_smoke.result == 'success' && (needs.integration_tests.result == 'success' || needs.integration_tests.result == 'skipped') }}runs-on: ubuntu-24.04timeout-minutes: 30permissions:diff --git a/Dockerfile b/Dockerfileindex 7b9e5ba62b..a65b675100 100644--- a/Dockerfile+++ b/Dockerfile@@ -263,11 +263,10 @@ RUN apk --no-cache add python3 py3-pip && \/opt/apprise/bin/pip install --no-cache-dir "apprise==${APPRISE_VERSION}" && \/opt/apprise/bin/apprise --version | grep -F "Apprise v${APPRISE_VERSION}"-# Base Pulse server runtime shared by self-hosted and hosted tenant images.-FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc AS pulse-runtime-base+# Base operating-system surface shared by source-built and candidate-assembled+# Pulse server images.+FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc AS pulse-runtime-foundation-# Use TARGETARCH to select the correct binary for the build platform-ARG TARGETARCHARG APPRISE_VERSIONRUN apk --no-cache add ca-certificates tzdata su-exec openssh-client python3@@ -278,17 +277,6 @@ RUN ln -s /opt/apprise/bin/apprise /usr/local/bin/apprise && \WORKDIR /app-# Copy the correct pulse binary for target architecture directly-# Use separate COPY commands with TARGETARCH to avoid copying both binaries-# (copying to /tmp then deleting wastes space due to Docker layer immutability)-COPY --from=backend-builder /app/pulse-linux-${TARGETARCH:-amd64} ./pulse-RUN chmod +x ./pulse----# Copy VERSION file-COPY --from=backend-builder /app/VERSION .-# Copy entrypoint scriptCOPY docker-entrypoint.sh /docker-entrypoint.shRUN chmod +x /docker-entrypoint.sh@@ -322,6 +310,25 @@ ENTRYPOINT ["/docker-entrypoint.sh"]# Run the binaryCMD ["./pulse"]+# Canonical source-built runtime base.+FROM pulse-runtime-foundation AS pulse-runtime-base++ARG TARGETARCH++COPY --from=backend-builder /app/pulse-linux-${TARGETARCH:-amd64} ./pulse+COPY --from=backend-builder /app/VERSION .+RUN chmod +x ./pulse && chown pulse:pulse ./pulse ./VERSION++# Exact-candidate runtime base. release_payload is a named BuildKit context+# produced from the verified linux-amd64 and linux-arm64 release archives.+FROM pulse-runtime-foundation AS prebuilt-runtime-base++ARG TARGETARCH++COPY --from=release_payload /${TARGETARCH:-amd64}/bin/pulse ./pulse+COPY --from=release_payload /${TARGETARCH:-amd64}/VERSION .+RUN chmod +x ./pulse && chown pulse:pulse ./pulse ./VERSION+# Hosted tenant runtime excludes embedded release installer and agent artifacts.# Those endpoints can still proxy canonical release assets instead of requiring# production tenant hotfix builds to carry installer-signing material.@@ -360,7 +367,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ln -s pulse-linux-amd64 /opt/pulse/bin/pulse; \fi-# Unified agent binaries (all platforms and architectures) plus detached signaturesCOPY --from=release-assets-builder /app/pulse-agent-* /opt/pulse/bin/# Create symlinks for Windows without .exe extension@@ -382,3 +388,55 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \else \ln -s /opt/pulse/bin/pulse-agent-linux-amd64 /usr/local/bin/pulse-agent; \fi++# Release qualification and publication target assembled from the immutable+# candidate rather than recompiling source inside Docker.+FROM prebuilt-runtime-base AS runtime_prebuilt++ARG TARGETARCH++RUN mkdir -p /opt/pulse/scripts /opt/pulse/bin+COPY --from=release_payload /amd64/scripts/ /opt/pulse/scripts/+COPY --from=release_payload /amd64/bin/pulse-agent-* /opt/pulse/bin/+COPY --from=release_payload /amd64/bin/pulse /opt/pulse/bin/pulse-linux-amd64+COPY --from=release_payload /arm64/bin/pulse /opt/pulse/bin/pulse-linux-arm64+RUN chmod 755 /opt/pulse/scripts/*.sh /opt/pulse/scripts/*.ps1 && \+ if [ "$TARGETARCH" = "arm64" ]; then \+ ln -sf pulse-linux-arm64 /opt/pulse/bin/pulse; \+ ln -sf /opt/pulse/bin/pulse-agent-linux-arm64 /usr/local/bin/pulse-agent; \+ else \+ ln -sf pulse-linux-amd64 /opt/pulse/bin/pulse; \+ ln -sf /opt/pulse/bin/pulse-agent-linux-amd64 /usr/local/bin/pulse-agent; \+ fi && \+ ln -sf pulse-agent-windows-amd64.exe /opt/pulse/bin/pulse-agent-windows-amd64 && \+ ln -sf pulse-agent-windows-arm64.exe /opt/pulse/bin/pulse-agent-windows-arm64 && \+ ln -sf pulse-agent-windows-386.exe /opt/pulse/bin/pulse-agent-windows-386 && \+ chown -R pulse:pulse /opt/pulse++# Unified Agent image assembled from the same immutable candidate payload.+FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc AS agent_runtime_prebuilt++ARG TARGETARCH+ARG TARGETVARIANT++RUN apk --no-cache add ca-certificates tzdata && mkdir -p /var/lib/pulse-agent+WORKDIR /app+COPY --from=release_payload /amd64/bin/pulse-agent-linux-* /tmp/+RUN if [ "$TARGETARCH" = "arm64" ]; then \+ cp /tmp/pulse-agent-linux-arm64 /usr/local/bin/pulse-agent; \+ elif [ "$TARGETARCH" = "arm" ]; then \+ cp /tmp/pulse-agent-linux-armv7 /usr/local/bin/pulse-agent; \+ else \+ cp /tmp/pulse-agent-linux-amd64 /usr/local/bin/pulse-agent; \+ fi && \+ chmod +x /usr/local/bin/pulse-agent && \+ rm -rf /tmp/pulse-agent-*+COPY --from=release_payload /amd64/VERSION /VERSION+ENV PULSE_NO_AUTO_UPDATE=true \+ PULSE_DISABLE_AUTO_UPDATE=true \+ PULSE_ENABLE_HOST=true \+ PULSE_ENABLE_DOCKER=true \+ PULSE_AGENT_ID_FILE=/var/lib/pulse-agent/agent-id \+ PULSE_STATE_DIR=/var/lib/pulse-agent+VOLUME ["/var/lib/pulse-agent"]+ENTRYPOINT ["/usr/local/bin/pulse-agent"]diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.mdindex 1a5b580fce..29334eb739 100644--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md@@ -495,6 +495,9 @@ upgrade, update, release, or artifact-selection behavior.1. Add or change deployment-type detection, update planning, or apply behavior through `internal/updates/`2. Add or change release-build metadata injection, Docker build-context allowlists, release artifact assembly, governed promotion metadata resolution, artifact release-line validation, post-install live-runtime claim proof, the canonical version file, operator-facing release packet content, prerelease feedback intake wording, historical published-release integrity backfill, release asset validation status publication, download endpoint checksum/signature header proof, end-to-end install.sh smoke against staged or published release assets, or the canonical in-repo v6 upgrade guide through `scripts/build-release.sh`, `scripts/build-release-binaries.sh`, `scripts/release_build_targets.sh`, `scripts/run-release-backend-tests.sh`, `scripts/shard_go_tests.py`, `scripts/release_asset_common.sh`, `scripts/backfill-release-assets.sh`, `scripts/release_ldflags.sh`, `scripts/check-workflow-dispatch-inputs.py`, `scripts/release-preflight-worker.sh`, `scripts/run-release-preflight.sh`, `scripts/release_control/live_runtime_proof.py`, `scripts/release_control/live_runtime_proof_test.py`, `scripts/release_control/mobile_release_gate.py`, `scripts/release_control/render_release_body.py`, `scripts/release_control/resolve_release_promotion.py`, `scripts/release_control/validate_artifact_release_line.py`, `scripts/release_control/record_rc_to_ga_rehearsal.py`, `scripts/release_control/internal/record_rc_to_ga_rehearsal.py`, `scripts/release_control/release_promotion_policy_support.py`, `pulse-enterprise:scripts/build-pro-binaries.sh`, `pulse-enterprise:scripts/build-pro-release.sh`, `pulse-enterprise:scripts/validate-pro-release-line.sh`, `.dockerignore`, `Dockerfile`, `.github/ISSUE_TEMPLATE/v6_rc_feedback.yml`, `docs/RELEASE_NOTES.md`, `docs/releases/`, `docs/UPGRADE_v6.md`, `docs/release-control/v6/internal/RELEASE_PROMOTION_POLICY.md`, `docs/release-control/v6/internal/PRE_RELEASE_CHECKLIST.md`, `docs/release-control/v6/internal/RC_TO_GA_REHEARSAL_TEMPLATE.md`, `scripts/validate-release.sh`, `scripts/validate-published-release.sh`, the operator dispatch helpers `scripts/trigger-release.sh` and `scripts/trigger-release-dry-run.sh`, and the governed release workflows `.github/workflows/backfill-release-assets.yml`, `.github/workflows/build-release-candidate.yml`, `.github/workflows/create-release.yml`, `.github/workflows/deploy-demo-server.yml`, `.github/workflows/helm-pages.yml`, `.github/workflows/install-sh-smoke.yml`, `.github/workflows/promote-floating-tags.yml`, `.github/workflows/promote-private-pro-runtime.yml`, `.github/workflows/publish-docker.yml`, `.github/workflows/publish-helm-chart.yml`, `.github/workflows/release-convergence.yml`, `.github/workflows/release-dry-run.yml`, `.github/workflows/retry-release-convergence.yml`, `.github/workflows/update-demo-server.yml`, `.github/workflows/validate-release-assets.yml`, and `pulse-enterprise:.github/workflows/build-pro-release.yml`+ The governed release-build surface also includes+ `scripts/prepare-release-container-context.sh` for exact-candidate container+ assembly.Operators may configure an external Linux amd64 worker for the two triggerhelpers. `scripts/run-release-preflight.sh` must resolve an immutable pushedcommit, stream the worker implementation stored in that commit over SSH,@@ -546,6 +549,14 @@ upgrade, update, release, or artifact-selection behavior.worker count. The verified dual-SHA Pro path must stage its five archivesdirectly from the precompiled public-agent and Pro-server payloads; it mustnot build, sign, and then discard a complete public release packet first.+ Container qualification must consume the verified immutable candidate+ archives through `scripts/prepare-release-container-context.sh`, assemble+ the prebuilt runtime and agent targets without recompiling source, and+ compare the embedded server and agent digests with the candidate bytes+ before exercising the same local runtime through the Helm install/upgrade+ smoke. This credential-free lane may run against the isolated rootless+ Docker daemon owned by the low-priority PVE build identity; it must not gain+ host-Docker access, signing keys, registry login, or package-write authority.The public orchestrator may stage the exact private packet and private imageconcurrently with public qualification when it binds the anticipated tag tothe immutable public commit, uses a run-scoped R2 prefix, and keeps the livediff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 19a2345d17..4430caa727 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -4222,6 +4222,7 @@"scripts/install.sh","scripts/lib/hot-dev-auth.sh","scripts/lib/hot-dev-runtime.sh",+ "scripts/prepare-release-container-context.sh","scripts/pulse-auto-update.sh","scripts/release-preflight-worker.sh","scripts/release_asset_common.sh",@@ -4437,6 +4438,7 @@"scripts/backfill-release-assets.sh","scripts/build-release-binaries.sh","scripts/build-release.sh",+ "scripts/prepare-release-container-context.sh","scripts/release_asset_common.sh","scripts/release_build_targets.sh","scripts/release_ldflags.sh",diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.goindex b591ca99ae..a58941e156 100644--- a/scripts/installtests/build_release_assets_test.go+++ b/scripts/installtests/build_release_assets_test.go@@ -138,6 +138,43 @@ func TestBuildReleaseUsesV6InstallScripts(t *testing.T) {}}+func TestReleaseContainerTargetsConsumeImmutableCandidate(t *testing.T) {+ dockerfileBytes, err := os.ReadFile(repoFile("Dockerfile"))+ if err != nil {+ t.Fatalf("read Dockerfile: %v", err)+ }+ prepareBytes, err := os.ReadFile(repoFile("scripts", "prepare-release-container-context.sh"))+ if err != nil {+ t.Fatalf("read prepare-release-container-context.sh: %v", err)+ }+ dockerfile := string(dockerfileBytes)+ prepareScript := string(prepareBytes)++ for _, needle := range []string{+ "FROM pulse-runtime-foundation AS prebuilt-runtime-base",+ "COPY --from=release_payload /${TARGETARCH:-amd64}/bin/pulse ./pulse",+ "FROM prebuilt-runtime-base AS runtime_prebuilt",+ "COPY --from=release_payload /amd64/bin/pulse /opt/pulse/bin/pulse-linux-amd64",+ "COPY --from=release_payload /arm64/bin/pulse /opt/pulse/bin/pulse-linux-arm64",+ "FROM alpine:3.20@sha256:",+ "AS agent_runtime_prebuilt",+ } {+ if !strings.Contains(dockerfile, needle) {+ t.Fatalf("Dockerfile missing immutable-candidate container target: %s", needle)+ }+ }+ for _, needle := range []string{+ `pulse-v${version}-linux-${arch}.tar.gz`,+ `validate_archive_entries "${archive}"`,+ `tar --no-same-owner -xzf`,+ `diff -qr --exclude=pulse`,+ } {+ if !strings.Contains(prepareScript, needle) {+ t.Fatalf("prepare-release-container-context.sh missing candidate guard: %s", needle)+ }+ }+}+func TestProviderMSPReleaseBundleIsRequiredAndValidated(t *testing.T) {validateBytes, err := os.ReadFile(repoFile("scripts", "validate-release.sh"))if err != nil {@@ -300,13 +337,12 @@ func TestAgentBuildCacheDoesNotResurrectPulseAgentPackage(t *testing.T) {if err != nil {t.Fatalf("read create-release.yml: %v", err)}- for _, required := range []string{- `cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/pulse:agent-buildcache`,- `cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/pulse:agent-buildcache,mode=max`,- } {- if !strings.Contains(string(release), required) {- t.Fatalf("create-release.yml must cache the agent_runtime build under the published pulse package; missing %q", required)- }+ releaseText := string(release)+ if !strings.Contains(releaseText, `--target agent_runtime_prebuilt`) {+ t.Fatal("create-release.yml must assemble the candidate agent image without targeting an unpublished package")+ }+ if strings.Contains(releaseText, "agent-buildcache") {+ t.Fatal("exact-candidate release qualification must not create a remote agent image cache")}values, err := os.ReadFile(repoFile("deploy", "helm", "pulse", "values.yaml"))@@ -967,7 +1003,9 @@ func TestDockerBuildUsesCanonicalReleaseLdflags(t *testing.T) {`FROM --platform=linux/amd64 golang:1.26.5-alpine@sha256:0178a641fbb4858c5f1b48e34bdaabe0350a330a1b1149aabd498d0699ff5fb2 AS backend-builder`,`FROM backend-builder AS release-assets-builder`,`FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc AS agent_runtime`,- `FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc AS pulse-runtime-base`,+ `FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc AS pulse-runtime-foundation`,+ `FROM pulse-runtime-foundation AS pulse-runtime-base`,+ `FROM pulse-runtime-foundation AS prebuilt-runtime-base`,`FROM pulse-runtime-base AS hosted_runtime`,`FROM pulse-runtime-base AS runtime`,`COPY scripts/release_ldflags.sh ./scripts/release_ldflags.sh`,@@ -1155,28 +1193,31 @@ func TestReleaseWorkflowsUseSecretSafeAttestedImageBuilds(t *testing.T) {}createRelease := string(createReleaseBytes) + "\n" + string(candidateWorkflowBytes)createReleaseRequired := []string{- `provenance: mode=max`,- `sbom: true`,- `secrets: |`,- `id: license_key_cache`,- `PULSE_LICENSE_PUBLIC_KEY_SHA256=${{ steps.license_key_cache.outputs.sha256 }}`,- `PULSE_UPDATE_SIGNING_PUBLIC_KEY=${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}`,- `pulse_license_public_key=${{ secrets.PULSE_LICENSE_PUBLIC_KEY }}`,- `pulse_update_signing_key=${{ secrets.PULSE_UPDATE_SIGNING_KEY }}`,+ `Exact-Candidate Container and Helm Smoke`,+ `./scripts/prepare-release-container-context.sh`,+ `--target runtime_prebuilt`,+ `--target agent_runtime_prebuilt`,+ `Verify container binaries match immutable candidate`,`PULSE_UPDATE_SIGNING_PUBLIC_KEY: ${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}`,`Validate installer signing key pins`,`go run ./scripts/release_update_key.go public-key-ssh`,`install.sh scripts/pulse-auto-update.sh release/pulse-auto-update.sh`,`does not trust the configured release signing key.`,- `DOCKER_BUILDKIT: 1`,- `--secret id=pulse_license_public_key,env=PULSE_LICENSE_PUBLIC_KEY`,- `--secret id=pulse_update_signing_key,env=PULSE_UPDATE_SIGNING_KEY`,- `--build-arg PULSE_LICENSE_PUBLIC_KEY_SHA256="${PULSE_LICENSE_PUBLIC_KEY_SHA256}"`,- `--build-arg PULSE_UPDATE_SIGNING_PUBLIC_KEY="${PULSE_UPDATE_SIGNING_PUBLIC_KEY}"`,`id-token: write`,`attestations: write`,`uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4`,}+ containerJob := workflowJobBlock(t, string(createReleaseBytes), "docker_build")+ for _, forbidden := range []string{+ "PULSE_UPDATE_SIGNING_KEY",+ "PULSE_LICENSE_PUBLIC_KEY",+ "packages: write",+ "docker/login-action",+ } {+ if strings.Contains(containerJob, forbidden) {+ t.Fatalf("PVE exact-candidate container qualification must not receive release authority: %s", forbidden)+ }+ }for _, needle := range createReleaseRequired {if !strings.Contains(createRelease, needle) {t.Fatalf("create-release.yml missing attested secret-safe release build contract: %s", needle)@@ -2358,7 +2399,7 @@ func TestCreateReleasePublishesPrivateProRuntime(t *testing.T) {convergencePromotionJob := workflowJobBlock(t, string(convergenceContent), "promote_private_pro_runtime")for _, needle := range []string{- `needs.create_release.result == 'success'`,+ `needs.prepare.result == 'success'`,`github.event.inputs.draft_only != 'true'`,`startsWith(needs.prepare.outputs.version, '6.')`,`GH_TOKEN: ${{ secrets.WORKFLOW_PAT }}`,@@ -2366,6 +2407,7 @@ func TestCreateReleasePublishesPrivateProRuntime(t *testing.T) {`r2_prefix="${TAG}-pro-${run_created_date}-${GITHUB_RUN_ID}"`,`return_run_details: true`,`pulse_ref: $pulse_ref`,+ `pulse_checkout_ref: $pulse_checkout_ref`,`version: $version`,`upload_actions_artifact: "false"`,`upload_to_r2: "true"`,@@ -2373,6 +2415,7 @@ func TestCreateReleasePublishesPrivateProRuntime(t *testing.T) {`docker_image: "license.pulserelay.pro/pulse-pro"`,`r2_prefix: $r2_prefix`,`reuse_existing_packet: "true"`,+ `allow_pre_activation_staging: "true"`,`allow_stable_ga_publish: $allow_stable_ga_publish`,`repos/rcourtman/pulse-enterprise/actions/workflows/build-pro-release.yml/dispatches`,`build_run_id="$(jq -r '.workflow_run_id // empty' <<<"${build_dispatch}")"`,diff --git a/scripts/prepare-release-container-context.sh b/scripts/prepare-release-container-context.shnew file mode 100755index 0000000000..0f4bc93361--- /dev/null+++ b/scripts/prepare-release-container-context.sh@@ -0,0 +1,111 @@+#!/usr/bin/env bash++set -euo pipefail++if [[ $# -ne 3 ]]; then+ echo "Usage: $0 <release-dir> <version> <output-dir>" >&2+ exit 64+fi++release_dir="$(cd "$1" && pwd -P)"+version="$2"+output_dir="$3"++if [[ -z "${output_dir}" || "${output_dir}" != /* ]]; then+ echo "Error: refusing unsafe release container context output: ${output_dir:-<empty>}" >&2+ exit 1+fi+output_dir="${output_dir%/}"+output_basename="$(basename "${output_dir}")"+output_parent="$(dirname "${output_dir}")"+if [[ -z "${output_dir}" || "${output_dir}" == "/" || "${output_basename}" == "." || "${output_basename}" == ".." ]]; then+ echo "Error: refusing unsafe release container context output: ${output_dir:-<empty>}" >&2+ exit 1+fi+mkdir -p "${output_parent}"+output_parent="$(cd "${output_parent}" && pwd -P)"+output_dir="${output_parent}/${output_basename}"+if [[ -L "${output_dir}" ]]; then+ echo "Error: refusing symlink release container context output: ${output_dir}" >&2+ exit 1+fi++validate_archive_entries() {+ local archive="$1"+ python3 - "${archive}" <<'PY'+import pathlib+import posixpath+import sys+import tarfile++archive = sys.argv[1]+seen: set[str] = set()+with tarfile.open(archive, "r:gz") as candidate:+ for member in candidate.getmembers():+ raw_name = member.name+ name = raw_name[2:] if raw_name.startswith("./") else raw_name+ if name in {"", "."} and member.isdir():+ continue+ parts = pathlib.PurePosixPath(name).parts+ unsafe_name = (+ not name+ or name.startswith("/")+ or "\\" in name+ or "//" in name+ or any(part in {"", ".", ".."} for part in parts)+ )+ unsafe_link = False+ if member.issym():+ target = member.linkname+ resolved = posixpath.normpath(posixpath.join(posixpath.dirname(name), target))+ unsafe_link = (+ not target+ or target.startswith("/")+ or "\\" in target+ or resolved == ".."+ or resolved.startswith("../")+ )+ if unsafe_name or unsafe_link or not (member.isfile() or member.isdir() or member.issym()):+ raise SystemExit(f"Error: release archive contains an unsafe member: {raw_name}")+ canonical = pathlib.PurePosixPath(*parts).as_posix()+ if canonical in seen:+ raise SystemExit(f"Error: release archive contains a duplicate member: {raw_name}")+ seen.add(canonical)+PY+}++rm -rf "${output_dir}"+mkdir -p "${output_dir}/amd64" "${output_dir}/arm64"++for arch in amd64 arm64; do+ archive="${release_dir}/pulse-v${version}-linux-${arch}.tar.gz"+ if [[ ! -f "${archive}" ]]; then+ echo "Error: immutable candidate is missing ${archive}." >&2+ exit 1+ fi+ validate_archive_entries "${archive}"+ tar --no-same-owner --no-same-permissions -xzf "${archive}" -C "${output_dir}/${arch}"+ for required in \+ bin/pulse \+ bin/pulse-agent-linux-amd64 \+ bin/pulse-agent-linux-amd64.sig \+ bin/pulse-agent-linux-amd64.sshsig \+ scripts/install-container-agent.sh \+ scripts/install-docker.sh \+ scripts/install.sh \+ scripts/install.sh.sig \+ scripts/install.sh.sshsig \+ VERSION; do+ if [[ ! -f "${output_dir}/${arch}/${required}" ]]; then+ echo "Error: ${archive} is missing candidate container input ${required}." >&2+ exit 1+ fi+ done+done++if ! diff -qr --exclude=pulse "${output_dir}/amd64" "${output_dir}/arm64"; then+ echo "Error: candidate container inputs differ outside the target server binary." >&2+ exit 1+fi++echo "Prepared exact-candidate container context at ${output_dir}."diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.pyindex 079a4ce033..338c79ead2 100644--- a/scripts/release_control/release_promotion_policy_test.py+++ b/scripts/release_control/release_promotion_policy_test.py@@ -1298,6 +1298,7 @@ class ReleasePromotionPolicyTest(unittest.TestCase):def test_release_workflow_enforces_rc_lineage_soak_and_v5_notice(self) -> None:content = read(".github/workflows/create-release.yml")+ docker_build = workflow_job_block(content, "docker_build")update_demo_workflow = read(".github/workflows/update-demo-server.yml")deploy_demo_workflow = read(".github/workflows/deploy-demo-server.yml")demo_ssh_helper = read(".github/scripts/setup-demo-ssh.sh")@@ -1428,7 +1429,7 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn('./scripts/validate-published-release.sh "${{ needs.prepare.outputs.tag }}" "${{ github.repository }}"', content)self.assertIn("PULSE_UPDATE_SIGNING_KEY: ${{ secrets.PULSE_UPDATE_SIGNING_KEY }}", content)self.assertIn("PULSE_UPDATE_SIGNING_PUBLIC_KEY: ${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}", content)- self.assertIn("PULSE_UPDATE_SIGNING_PUBLIC_KEY=${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}", content)+ self.assertNotIn("pulse_update_signing_key=${{ secrets.PULSE_UPDATE_SIGNING_KEY }}", docker_build)self.assertIn("Validate installer signing key pins", candidate_workflow)self.assertIn("timeout-minutes: 60", candidate_workflow)self.assertIn("Verify Native Signing Configuration", candidate_workflow)@@ -1512,8 +1513,8 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn("Upload integration failures", content)self.assertIn("tests/integration/test-results/", content)self.assertIn("tests/integration/release-integration-diagnostics/", content)- self.assertIn("provenance: mode=max", content)- self.assertIn("sbom: true", content)+ self.assertIn("--target runtime_prebuilt", docker_build)+ self.assertIn("--target agent_runtime_prebuilt", docker_build)self.assertIn("id-token: write", content)self.assertIn("attestations: write", content)self.assertIn("uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4", content)@@ -1560,13 +1561,10 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn('./scripts/backfill-release-assets.sh --tag "${{ inputs.tag }}" --repo "${{ github.repository }}"', backfill_workflow)self.assertIn('./scripts/validate-published-release.sh "${{ inputs.tag }}" "${{ github.repository }}"', backfill_workflow)self.assertIn("PULSE_UPDATE_SIGNING_PUBLIC_KEY: ${{ vars.PULSE_UPDATE_SIGNING_PUBLIC_KEY }}", backfill_workflow)- self.assertIn("id: license_key_cache", content)- self.assertIn("PULSE_LICENSE_PUBLIC_KEY_SHA256=${{ steps.license_key_cache.outputs.sha256 }}", content)- self.assertIn("pulse_license_public_key=${{ secrets.PULSE_LICENSE_PUBLIC_KEY }}", content)- self.assertIn("pulse_update_signing_key=${{ secrets.PULSE_UPDATE_SIGNING_KEY }}", content)- self.assertIn("--secret id=pulse_license_public_key,env=PULSE_LICENSE_PUBLIC_KEY", content)- self.assertIn("--secret id=pulse_update_signing_key,env=PULSE_UPDATE_SIGNING_KEY", content)- self.assertIn('--build-arg PULSE_LICENSE_PUBLIC_KEY_SHA256="${PULSE_LICENSE_PUBLIC_KEY_SHA256}"', content)+ self.assertIn("./scripts/prepare-release-container-context.sh", docker_build)+ self.assertIn('test "${actual_server}" = "${expected_server}"', docker_build)+ self.assertIn('test "${actual_agent}" = "${expected_agent}"', docker_build)+ self.assertNotIn("secrets.", docker_build)self.assertNotIn("provenance: false", content)self.assertIn("Derived rollback command:", helper)self.assertIn("./scripts/install.sh --version", helper)@@ -1789,11 +1787,12 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn("previous stable tag", artifact_validator)self.assertIn("stable_patch", artifact_validator)self.assertIn("Refusing {purpose}", artifact_validator)- self.assertIn("Build local Pulse runtime image for Helm smoke", release_workflow)+ self.assertIn("Assemble exact-candidate runtime and agent images", release_workflow)self.assertIn('kind load docker-image "${SMOKE_IMAGE_REPOSITORY}:${SMOKE_IMAGE_TAG}" --name pulse-test', release_workflow)self.assertIn('--set image.repository="${SMOKE_IMAGE_REPOSITORY}"', release_workflow)self.assertIn('--set image.pullPolicy=Never', release_workflow)- self.assertIn("needs.helm_smoke.result == 'success'", release_workflow)+ self.assertIn("needs.docker_build.result == 'success'", release_workflow)+ self.assertNotIn("needs.helm_smoke.result", release_workflow)self.assertIn('--github-output "$GITHUB_OUTPUT"', helm_pages)self.assertIn("workflow_call:", helm_pages)self.assertNotIn("workflow_run:", helm_pages)