Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Build release payloads on ephemeral runners

pulse-triage[bot]e1bce8b77f3f
diff --git a/.github/workflows/build-release-candidate.yml b/.github/workflows/build-release-candidate.yml
index 0142604cbe..b58f1da884 100644
--- a/.github/workflows/build-release-candidate.yml
+++ b/.github/workflows/build-release-candidate.yml
@@ -75,10 +75,10 @@ permissions:
jobs:
obtain-release-payload:
- name: Obtain Isolated PC Release Payload
- # The self-hosted compiler runs in a separate workflow run. This release
- # and SignPath workflow therefore contains only GitHub-hosted jobs, while
- # the expensive payload still compiles once on the trusted PC.
+ name: Obtain Isolated Hosted Release Payload
+ # Compilation runs in a separate GitHub-hosted workflow so the expensive
+ # payload is built once on a fresh VM, then consumed by artifact id and
+ # digest without joining signing credentials to the compilation job.
runs-on: ubuntu-24.04
timeout-minutes: 40
permissions:
@@ -829,7 +829,7 @@ jobs:
--argjson release_workflow_run_id "${GITHUB_RUN_ID}" \
--arg version "${VERSION}" \
--arg source_sha "${GITHUB_SHA}" \
- '{schema_version: 2, trust_boundary: "separate-trusted-self-hosted-compiler-workflow", verified_on: "github-hosted", artifact_id: $artifact_id, artifact_name: $artifact_name, artifact_sha256: $artifact_sha256, payload_manifest_sha256: $payload_manifest_sha256, compiler_workflow_run_id: $compiler_workflow_run_id, release_workflow_run_id: $release_workflow_run_id, version: $version, source_sha: $source_sha}' \
+ '{schema_version: 2, trust_boundary: "separate-ephemeral-github-hosted-compiler-workflow", verified_on: "github-hosted", artifact_id: $artifact_id, artifact_name: $artifact_name, artifact_sha256: $artifact_sha256, payload_manifest_sha256: $payload_manifest_sha256, compiler_workflow_run_id: $compiler_workflow_run_id, release_workflow_run_id: $release_workflow_run_id, version: $version, source_sha: $source_sha}' \
> release-candidate-manifest/compiled-payload-verification.json
- name: Download signed macOS binaries
diff --git a/.github/workflows/compile-release-payload.yml b/.github/workflows/compile-release-payload.yml
index e21ada5202..977141d81c 100644
--- a/.github/workflows/compile-release-payload.yml
+++ b/.github/workflows/compile-release-payload.yml
@@ -1,4 +1,4 @@
-name: Compile Release Payload on Trusted PC
+name: Compile Release Payload on Hosted Runner
run-name: Compile v${{ inputs.version }} payload for request ${{ inputs.request_id }}
on:
@@ -22,8 +22,11 @@ permissions:
jobs:
compile-release-payload:
- name: Compile Exact-SHA Release Payload
- runs-on: ${{ fromJSON('["self-hosted","Linux","X64","pulse-pve-compile"]') }}
+ name: Compile Exact-SHA Release Payload on Ephemeral VM
+ # Release binaries are a production trust boundary. Keep this job on a
+ # fresh GitHub-hosted VM rather than a persistent public-repository runner,
+ # whose state can survive earlier jobs and influence later compilation.
+ runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Validate isolated compiler request
diff --git a/docs/CODE_SIGNING_POLICY.md b/docs/CODE_SIGNING_POLICY.md
index d4718aa892..8b69673962 100644
--- a/docs/CODE_SIGNING_POLICY.md
+++ b/docs/CODE_SIGNING_POLICY.md
@@ -60,6 +60,9 @@ Normal stable publication and stable dry runs select `signpath` directly.
- Release artifacts are built by GitHub Actions from an exact commit on the
`main` branch.
+- The credential-free cross-platform payload is compiled on a fresh
+ GitHub-hosted VM. Persistent self-hosted runners are not permitted in the
+ production payload compilation job.
- The release workflow records artifact digests and promotes the same immutable
candidate without rebuilding it.
- Only binaries built from the public repository's source and build scripts may
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index 6fa3a6438b..b198b68148 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -3169,7 +3169,8 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
}
for _, needle := range []string{
- `fromJSON('["self-hosted","Linux","X64","pulse-pve-compile"]')`,
+ `runs-on: ubuntu-24.04`,
+ `Compile Exact-SHA Release Payload on Ephemeral VM`,
`GITHUB_WORKFLOW_SHA`,
`ref: ${{ inputs.source_sha }}`,
`PULSE_RELEASE_BUILD_JOBS: "2"`,
@@ -3181,6 +3182,9 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
t.Fatalf("compiled release payload job missing exact-SHA contract: %s", needle)
}
}
+ if strings.Contains(compileJob, "self-hosted") || strings.Contains(compileJob, "pulse-pve-") {
+ t.Fatal("release payload compilation must stay on an ephemeral GitHub-hosted runner")
+ }
if strings.Contains(compileJob, "PULSE_UPDATE_SIGNING_KEY") {
t.Fatal("release compilation job must not receive private update-signing material")
}
@@ -3217,7 +3221,7 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
}
}
if !strings.Contains(compileJob, "cache: false") || strings.Contains(compileJob, "cache: 'npm'") {
- t.Fatal("release compilation must avoid Actions cache archival on both hosted and PVE runners")
+ t.Fatal("release compilation must avoid Actions cache archival")
}
if strings.Contains(frontendBundleJob, "cache: 'npm'") {
t.Fatal("PVE frontend bundle must use its persistent runner-local npm cache")
@@ -3245,7 +3249,7 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
`sha256sum --check --`,
`scripts/release_candidate_manifest.py verify-local`,
`compiled-payload-verification.json`,
- `separate-trusted-self-hosted-compiler-workflow`,
+ `separate-ephemeral-github-hosted-compiler-workflow`,
`PULSE_RELEASE_COMPILED_PAYLOAD_DIR`,
} {
if !strings.Contains(candidateBuildJob, needle) {
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index a4212e3548..2ab603e767 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -1626,10 +1626,10 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertIn("Validate installer signing key pins", candidate_workflow)
self.assertIn("timeout-minutes: 60", candidate_workflow)
self.assertNotRegex(candidate_workflow, r"(?m)^\s+runs-on:.*self-hosted")
- self.assertIn(
- 'runs-on: ${{ fromJSON(\'["self-hosted","Linux","X64","pulse-pve-compile"]\') }}',
- compiler_workflow,
- )
+ self.assertIn("Compile Exact-SHA Release Payload on Ephemeral VM", compiler_workflow)
+ self.assertIn("runs-on: ubuntu-24.04", compiler_workflow)
+ self.assertNotRegex(compiler_workflow, r"(?m)^\s+runs-on:.*self-hosted")
+ self.assertNotIn("pulse-pve-", compiler_workflow)
self.assertIn("GITHUB_WORKFLOW_SHA", compiler_workflow)
self.assertIn("ref: ${{ inputs.source_sha }}", compiler_workflow)
self.assertIn("PULSE_RELEASE_BUILD_JOBS: \"2\"", compiler_workflow)
@@ -1652,7 +1652,7 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertIn(".workflow_run.head_sha == $source_sha", candidate_workflow)
self.assertIn("sha256sum --check --", candidate_workflow)
self.assertIn("compiled-payload-verification.json", candidate_workflow)
- self.assertIn("separate-trusted-self-hosted-compiler-workflow", candidate_workflow)
+ self.assertIn("separate-ephemeral-github-hosted-compiler-workflow", candidate_workflow)
self.assertIn("Verify Native Signing Configuration", candidate_workflow)
self.assertEqual(candidate_workflow.count("needs: signing-configuration"), 2)
self.assertIn("require_windows_signing: ${{ needs.prepare.outputs.require_windows_signing == 'true' }}", content)