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.

Bind Helm delivery to release provenance

pulse-triage[bot]f70da0546748
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
index 2766dc5299..38ee3b84af 100644
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/create-release.yml
@@ -1330,6 +1330,8 @@ jobs:
permissions:
contents: write
packages: write
+ id-token: write
+ attestations: write
uses: ./.github/workflows/publish-helm-chart.yml
secrets: inherit
with:
@@ -1569,6 +1571,7 @@ jobs:
- prepare
- create_release
- publish_docker
+ - publish_helm_chart
- release_readiness
- dispatch_release_convergence
- stage_private_pro_runtime
@@ -1597,6 +1600,7 @@ jobs:
R2_PREFIX: ${{ needs.stage_private_pro_runtime.outputs.r2_prefix }}
SERVER_IMAGE_DIGEST: ${{ needs.publish_docker.outputs.server_digest }}
CONTROL_PLANE_IMAGE_DIGEST: ${{ needs.publish_docker.outputs.control_plane_digest }}
+ HELM_CHART_DIGEST: ${{ needs.publish_helm_chart.outputs.chart_digest }}
run: |
set -euo pipefail
release_json=$(mktemp)
@@ -1623,12 +1627,14 @@ jobs:
--arg r2_prefix "${R2_PREFIX}" \
--arg server_image_digest "${SERVER_IMAGE_DIGEST}" \
--arg control_plane_image_digest "${CONTROL_PLANE_IMAGE_DIGEST}" \
+ --arg helm_chart_digest "${HELM_CHART_DIGEST}" \
'.schema_version == 1 and .tag == $tag and
.target_commitish == $target_commitish and .release_id == $release_id and
.source_release_run_id == $source_release_run_id and
(.convergence_run_id | test("^[0-9]+$")) and .r2_prefix == $r2_prefix and
.server_image_digest == $server_image_digest and
- .control_plane_image_digest == $control_plane_image_digest' \
+ .control_plane_image_digest == $control_plane_image_digest and
+ .helm_chart_digest == $helm_chart_digest' \
"${verified_marker}" >/dev/null
marker_convergence_run_id="$(jq -r '.convergence_run_id' "${verified_marker}")"
@@ -1775,8 +1781,9 @@ jobs:
# Close the dispatch-to-commit race before staging the exact marker.
require_viable_convergence_owner
if [[ ! "${SERVER_IMAGE_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]] || \
- [[ ! "${CONTROL_PLANE_IMAGE_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]]; then
- echo "::error::Verified public container digests are required before release activation."
+ [[ ! "${CONTROL_PLANE_IMAGE_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]] || \
+ [[ ! "${HELM_CHART_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]]; then
+ echo "::error::Verified public container and Helm chart digests are required before release activation."
exit 1
fi
jq -n \
@@ -1788,6 +1795,7 @@ jobs:
--arg r2_prefix "${R2_PREFIX}" \
--arg server_image_digest "${SERVER_IMAGE_DIGEST}" \
--arg control_plane_image_digest "${CONTROL_PLANE_IMAGE_DIGEST}" \
+ --arg helm_chart_digest "${HELM_CHART_DIGEST}" \
'{
schema_version: 1,
tag: $tag,
@@ -1797,7 +1805,8 @@ jobs:
convergence_run_id: $convergence_run_id,
r2_prefix: $r2_prefix,
server_image_digest: $server_image_digest,
- control_plane_image_digest: $control_plane_image_digest
+ control_plane_image_digest: $control_plane_image_digest,
+ helm_chart_digest: $helm_chart_digest
}' > "${activation_marker}"
gh release upload "${TAG}" \
"${activation_marker}" --clobber \
@@ -1880,7 +1889,8 @@ jobs:
--arg r2_prefix "${R2_PREFIX}" \
--arg server_image_digest "${SERVER_IMAGE_DIGEST}" \
--arg control_plane_image_digest "${CONTROL_PLANE_IMAGE_DIGEST}" \
- '.schema_version == 1 and .tag == $tag and .target_commitish == $target_commitish and .release_id == $release_id and .source_release_run_id == $source_release_run_id and .convergence_run_id == $convergence_run_id and .r2_prefix == $r2_prefix and .server_image_digest == $server_image_digest and .control_plane_image_digest == $control_plane_image_digest' \
+ --arg helm_chart_digest "${HELM_CHART_DIGEST}" \
+ '.schema_version == 1 and .tag == $tag and .target_commitish == $target_commitish and .release_id == $release_id and .source_release_run_id == $source_release_run_id and .convergence_run_id == $convergence_run_id and .r2_prefix == $r2_prefix and .server_image_digest == $server_image_digest and .control_plane_image_digest == $control_plane_image_digest and .helm_chart_digest == $helm_chart_digest' \
"${verified_marker}" >/dev/null
trap - ERR
rm -f "$release_json" "$publish_payload" "$quarantine_payload" \
@@ -1934,6 +1944,7 @@ jobs:
R2_PREFIX: ${{ needs.stage_private_pro_runtime.outputs.r2_prefix }}
SERVER_IMAGE_DIGEST: ${{ needs.publish_docker.outputs.server_digest }}
CONTROL_PLANE_IMAGE_DIGEST: ${{ needs.publish_docker.outputs.control_plane_digest }}
+ HELM_CHART_DIGEST: ${{ needs.publish_helm_chart.outputs.chart_digest }}
run: |
set -euo pipefail
require_result() {
@@ -1976,12 +1987,14 @@ jobs:
--arg r2_prefix "${R2_PREFIX}" \
--arg server_image_digest "${SERVER_IMAGE_DIGEST}" \
--arg control_plane_image_digest "${CONTROL_PLANE_IMAGE_DIGEST}" \
+ --arg helm_chart_digest "${HELM_CHART_DIGEST}" \
'.schema_version == 1 and .tag == $tag and
.target_commitish == $target_commitish and .release_id == $release_id and
.source_release_run_id == $source_release_run_id and
(.convergence_run_id | test("^[0-9]+$")) and .r2_prefix == $r2_prefix and
.server_image_digest == $server_image_digest and
- .control_plane_image_digest == $control_plane_image_digest' \
+ .control_plane_image_digest == $control_plane_image_digest and
+ .helm_chart_digest == $helm_chart_digest' \
"${marker}" >/dev/null
marker_convergence_run_id="$(jq -r '.convergence_run_id' "${marker}")"
recovery_run_id="$(jq -r '.activation_recovery_run_id // ""' "${marker}")"
diff --git a/.github/workflows/helm-pages.yml b/.github/workflows/helm-pages.yml
index c090402753..bf20358d0b 100644
--- a/.github/workflows/helm-pages.yml
+++ b/.github/workflows/helm-pages.yml
@@ -20,15 +20,25 @@ on:
description: "Exact activated release source commit."
required: true
type: string
+ chart_digest:
+ description: "OCI chart digest committed by release activation."
+ required: true
+ type: string
permissions:
actions: read
contents: write
+ packages: read
jobs:
release:
runs-on: ubuntu-24.04
steps:
+ - name: Checkout release verification control
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+ with:
+ persist-credentials: false
+
- name: Require activated GitHub release and source run
id: identity
env:
@@ -36,12 +46,14 @@ jobs:
VERSION: ${{ inputs.chart_version }}
SOURCE_RELEASE_RUN_ID: ${{ inputs.source_release_run_id }}
TARGET_COMMITISH: ${{ inputs.target_commitish }}
+ CHART_DIGEST: ${{ inputs.chart_digest }}
run: |
set -euo pipefail
if [[ -z "${VERSION}" ]] || \
[[ ! "${SOURCE_RELEASE_RUN_ID}" =~ ^[0-9]+$ ]] || \
- [[ ! "${TARGET_COMMITISH}" =~ ^[0-9a-f]{40}$ ]]; then
- echo "::error::Helm Pages requires an exact version, source run ID, and commit SHA."
+ [[ ! "${TARGET_COMMITISH}" =~ ^[0-9a-f]{40}$ ]] || \
+ [[ ! "${CHART_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]]; then
+ echo "::error::Helm Pages requires an exact version, source run ID, commit SHA, and chart digest."
exit 1
fi
@@ -70,7 +82,8 @@ jobs:
--arg tag "${release_tag}" \
--arg target_commitish "${TARGET_COMMITISH}" \
--arg source_release_run_id "${SOURCE_RELEASE_RUN_ID}" \
- '.schema_version == 1 and .tag == $tag and .target_commitish == $target_commitish and .source_release_run_id == $source_release_run_id' \
+ --arg helm_chart_digest "${CHART_DIGEST}" \
+ '.schema_version == 1 and .tag == $tag and .target_commitish == $target_commitish and .source_release_run_id == $source_release_run_id and .helm_chart_digest == $helm_chart_digest' \
"${marker}" >/dev/null
rm -f "${marker}"
@@ -111,10 +124,21 @@ jobs:
- name: Verify immutable chart identity
env:
+ GH_TOKEN: ${{ github.token }}
VERSION: ${{ steps.identity.outputs.version }}
CHART_PATH: dist/pulse-${{ steps.identity.outputs.version }}.tgz
+ RELEASE_TAG: ${{ steps.identity.outputs.release_tag }}
+ TARGET_COMMITISH: ${{ inputs.target_commitish }}
+ CHART_DIGEST: ${{ inputs.chart_digest }}
run: |
set -euo pipefail
+ proof="$(./scripts/verify-release-helm-chart.sh \
+ "${RELEASE_TAG}" "${TARGET_COMMITISH}" \
+ "${GITHUB_REPOSITORY}" "${CHART_DIGEST}")"
+ if [ "${proof}" != "chart_digest=${CHART_DIGEST}" ]; then
+ echo "::error::Activated Helm OCI provenance did not produce the committed digest."
+ exit 1
+ fi
python3 - <<'PY'
import os
import pathlib
diff --git a/.github/workflows/publish-helm-chart.yml b/.github/workflows/publish-helm-chart.yml
index 9cb8f762d0..79334b4874 100644
--- a/.github/workflows/publish-helm-chart.yml
+++ b/.github/workflows/publish-helm-chart.yml
@@ -26,6 +26,10 @@ on:
required: false
type: string
default: ""
+ outputs:
+ chart_digest:
+ description: "Verified OCI manifest digest for the exact-version chart."
+ value: ${{ jobs.publish.outputs.chart_digest }}
workflow_dispatch:
inputs:
chart_version:
@@ -42,9 +46,13 @@ jobs:
publish:
name: Package and Push Helm Chart
runs-on: ubuntu-24.04
+ outputs:
+ chart_digest: ${{ steps.proof.outputs.chart_digest }}
permissions:
contents: write # Required for gh release upload
packages: write
+ id-token: write
+ attestations: write
steps:
- name: Determine chart version
id: versions
@@ -112,6 +120,11 @@ jobs:
RELEASE_TAG: ${{ steps.versions.outputs.release_tag }}
run: |
set -euo pipefail
+ release_sha="$(git rev-parse "refs/tags/${RELEASE_TAG}^{commit}")"
+ if [ "${release_sha}" != "${GITHUB_SHA}" ]; then
+ echo "::error::Helm provenance source ${GITHUB_SHA} does not match ${RELEASE_TAG} at ${release_sha}. Dispatch manual backfills from the exact tag ref."
+ exit 1
+ fi
git checkout --detach "refs/tags/${RELEASE_TAG}"
- name: Align chart metadata links
@@ -145,18 +158,47 @@ jobs:
run: |
echo "${GHCR_TOKEN}" | helm registry login ghcr.io --username "${GHCR_USERNAME}" --password-stdin
- - name: Push chart to GHCR
+ - name: Push exact-version chart to GHCR
+ id: push
+ env:
+ CHART_PATH: dist/pulse-${{ steps.versions.outputs.chart_version }}.tgz
run: |
- helm push dist/pulse-${{ steps.versions.outputs.chart_version }}.tgz \
- oci://ghcr.io/${{ github.repository_owner }}/pulse-chart
+ set -euo pipefail
+ output="$(
+ helm push "${CHART_PATH}" \
+ oci://ghcr.io/${{ github.repository_owner }}/pulse-chart 2>&1
+ )"
+ printf '%s\n' "${output}"
+ mapfile -t digests < <(
+ sed -nE 's/^Digest:[[:space:]]*(sha256:[0-9a-f]{64})\r?$/\1/p' \
+ <<<"${output}" | sort -u
+ )
+ if [ "${#digests[@]}" -ne 1 ]; then
+ echo "::error::Helm push did not report one exact OCI chart digest."
+ exit 1
+ fi
+ echo "chart_digest=${digests[0]}" >> "$GITHUB_OUTPUT"
- - name: Verify public GHCR chart read
+ - name: Attest exact-version OCI chart
+ uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
+ with:
+ subject-name: ghcr.io/${{ github.repository_owner }}/pulse-chart/pulse
+ subject-digest: ${{ steps.push.outputs.chart_digest }}
+ push-to-registry: true
+ create-storage-record: false
+
+ - name: Verify public GHCR chart identity and provenance
+ id: proof
+ env:
+ GH_TOKEN: ${{ github.token }}
+ RELEASE_TAG: ${{ steps.versions.outputs.release_tag }}
+ EXPECTED_DIGEST: ${{ steps.push.outputs.chart_digest }}
run: |
set -euo pipefail
helm registry logout ghcr.io || true
- helm show chart \
- oci://ghcr.io/${{ github.repository_owner }}/pulse-chart/pulse \
- --version "${{ steps.versions.outputs.chart_version }}"
+ ./scripts/verify-release-helm-chart.sh \
+ "${RELEASE_TAG}" "${GITHUB_SHA}" \
+ "${GITHUB_REPOSITORY}" "${EXPECTED_DIGEST}" >> "$GITHUB_OUTPUT"
- name: Attach chart to release
if: github.event_name == 'release'
diff --git a/.github/workflows/recover-release-activation.yml b/.github/workflows/recover-release-activation.yml
index 17aa9f2b25..1e97acde24 100644
--- a/.github/workflows/recover-release-activation.yml
+++ b/.github/workflows/recover-release-activation.yml
@@ -178,6 +178,22 @@ jobs:
--validate-body-file "${release_body}"
echo "[OK] GitHub's stored RC packet still matches the immutable source-run manifest."
+ - name: Set up Helm
+ uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
+ with:
+ version: v3.15.2
+
+ - name: Revalidate exact Helm chart identity and provenance
+ id: chart_proof
+ env:
+ GH_TOKEN: ${{ github.token }}
+ TAG: ${{ inputs.tag }}
+ run: |
+ set -euo pipefail
+ ./scripts/verify-release-helm-chart.sh \
+ "${TAG}" "${{ steps.qualify.outputs.source_sha }}" \
+ "${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
+
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
@@ -270,6 +286,7 @@ jobs:
CONVERGENCE_RUN_ID: ${{ steps.dispatch.outputs.run_id }}
SERVER_IMAGE_DIGEST: ${{ steps.container_proof.outputs.server_digest }}
CONTROL_PLANE_IMAGE_DIGEST: ${{ steps.container_proof.outputs.control_plane_digest }}
+ HELM_CHART_DIGEST: ${{ steps.chart_proof.outputs.chart_digest }}
run: |
set -euo pipefail
release_json=$(mktemp)
@@ -367,8 +384,9 @@ jobs:
require_viable_convergence_owner
if [[ ! "${SERVER_IMAGE_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]] || \
- [[ ! "${CONTROL_PLANE_IMAGE_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]]; then
- echo "::error::Verified public container digests are required before recovered activation."
+ [[ ! "${CONTROL_PLANE_IMAGE_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]] || \
+ [[ ! "${HELM_CHART_DIGEST}" =~ ^sha256:[0-9a-f]{64}$ ]]; then
+ echo "::error::Verified public container and Helm chart digests are required before recovered activation."
exit 1
fi
jq -n \
@@ -381,6 +399,7 @@ jobs:
--arg activation_recovery_run_id "${GITHUB_RUN_ID}" \
--arg server_image_digest "${SERVER_IMAGE_DIGEST}" \
--arg control_plane_image_digest "${CONTROL_PLANE_IMAGE_DIGEST}" \
+ --arg helm_chart_digest "${HELM_CHART_DIGEST}" \
'{
schema_version: 1,
tag: $tag,
@@ -391,7 +410,8 @@ jobs:
r2_prefix: $r2_prefix,
activation_recovery_run_id: $activation_recovery_run_id,
server_image_digest: $server_image_digest,
- control_plane_image_digest: $control_plane_image_digest
+ control_plane_image_digest: $control_plane_image_digest,
+ helm_chart_digest: $helm_chart_digest
}' > "${activation_marker}"
gh release upload "${TAG}" \
"${activation_marker}" --clobber \
@@ -455,13 +475,15 @@ jobs:
--arg activation_recovery_run_id "${GITHUB_RUN_ID}" \
--arg server_image_digest "${SERVER_IMAGE_DIGEST}" \
--arg control_plane_image_digest "${CONTROL_PLANE_IMAGE_DIGEST}" \
+ --arg helm_chart_digest "${HELM_CHART_DIGEST}" \
'.schema_version == 1 and .tag == $tag and
.target_commitish == $target_commitish and .release_id == $release_id and
.source_release_run_id == $source_release_run_id and
.convergence_run_id == $convergence_run_id and .r2_prefix == $r2_prefix and
.activation_recovery_run_id == $activation_recovery_run_id and
.server_image_digest == $server_image_digest and
- .control_plane_image_digest == $control_plane_image_digest' \
+ .control_plane_image_digest == $control_plane_image_digest and
+ .helm_chart_digest == $helm_chart_digest' \
"${verified_marker}" >/dev/null
trap - ERR
echo "[OK] Recovered, immutably committed, and attested ${TAG}; convergence run ${CONVERGENCE_RUN_ID} owns customer rollout."
diff --git a/.github/workflows/release-convergence.yml b/.github/workflows/release-convergence.yml
index b7b55f9635..36a321858c 100644
--- a/.github/workflows/release-convergence.yml
+++ b/.github/workflows/release-convergence.yml
@@ -55,6 +55,7 @@ jobs:
activation_marker_sha256: ${{ steps.marker.outputs.activation_marker_sha256 }}
server_image_digest: ${{ steps.marker.outputs.server_image_digest }}
control_plane_image_digest: ${{ steps.marker.outputs.control_plane_image_digest }}
+ helm_chart_digest: ${{ steps.marker.outputs.helm_chart_digest }}
steps:
- name: Checkout release integrity control
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -111,7 +112,7 @@ jobs:
--arg release_id "${EXPECTED_RELEASE_ID}" \
--arg source_run_id "${EXPECTED_SOURCE_RUN_ID}" \
--arg r2_prefix "${EXPECTED_R2_PREFIX}" \
- '.schema_version == 1 and .tag == $tag and .target_commitish == $commit and .release_id == $release_id and .source_release_run_id == $source_run_id and (.convergence_run_id | test("^[0-9]+$")) and .r2_prefix == $r2_prefix and (.server_image_digest | test("^sha256:[0-9a-f]{64}$")) and (.control_plane_image_digest | test("^sha256:[0-9a-f]{64}$"))' \
+ '.schema_version == 1 and .tag == $tag and .target_commitish == $commit and .release_id == $release_id and .source_release_run_id == $source_run_id and (.convergence_run_id | test("^[0-9]+$")) and .r2_prefix == $r2_prefix and (.server_image_digest | test("^sha256:[0-9a-f]{64}$")) and (.control_plane_image_digest | test("^sha256:[0-9a-f]{64}$")) and (.helm_chart_digest | test("^sha256:[0-9a-f]{64}$"))' \
"${marker}" >/dev/null; then
rm -f "${marker}"
echo "::error::Public activation marker for ${TAG} does not match the expected immutable release identity."
@@ -142,10 +143,12 @@ jobs:
activation_marker_sha256="$(sha256sum "${marker}" | awk '{print $1}')"
server_image_digest="$(jq -r '.server_image_digest' "${marker}")"
control_plane_image_digest="$(jq -r '.control_plane_image_digest' "${marker}")"
+ helm_chart_digest="$(jq -r '.helm_chart_digest' "${marker}")"
echo "activation_owner_run_id=${activation_owner_run_id}" >> "$GITHUB_OUTPUT"
echo "activation_marker_sha256=${activation_marker_sha256}" >> "$GITHUB_OUTPUT"
echo "server_image_digest=${server_image_digest}" >> "$GITHUB_OUTPUT"
echo "control_plane_image_digest=${control_plane_image_digest}" >> "$GITHUB_OUTPUT"
+ echo "helm_chart_digest=${helm_chart_digest}" >> "$GITHUB_OUTPUT"
rm -f "${marker}"
echo "[OK] ${TAG} crossed the immutable, attested activation commit point."
exit 0
@@ -208,6 +211,7 @@ jobs:
owner_asset_sha256: ${{ steps.owner.outputs.owner_asset_sha256 }}
server_image_digest: ${{ needs.await_activation_commit.outputs.server_image_digest }}
control_plane_image_digest: ${{ needs.await_activation_commit.outputs.control_plane_image_digest }}
+ helm_chart_digest: ${{ needs.await_activation_commit.outputs.helm_chart_digest }}
steps:
- name: Checkout release control
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -357,12 +361,14 @@ jobs:
permissions:
actions: read
contents: write
+ packages: read
uses: ./.github/workflows/helm-pages.yml
secrets: inherit
with:
chart_version: ${{ inputs.version }}
source_release_run_id: ${{ inputs.source_release_run_id }}
target_commitish: ${{ inputs.target_commitish }}
+ chart_digest: ${{ needs.acquire_customer_promotion_lease.outputs.helm_chart_digest }}
promote_private_pro_runtime:
name: Converge paid-runtime broker
diff --git a/docs/CODE_SIGNING_POLICY.md b/docs/CODE_SIGNING_POLICY.md
index 5a9e922ea9..37af8aeb0c 100644
--- a/docs/CODE_SIGNING_POLICY.md
+++ b/docs/CODE_SIGNING_POLICY.md
@@ -73,6 +73,13 @@ Normal stable publication and stable dry runs select `signpath` directly.
policy is invalid.
- Release checksums and detached signatures are published alongside artifacts
and verified independently after publication.
+- The exact-version OCI Helm chart is published only by the hosted
+ `publish-helm-chart.yml` workflow. Its SHA-256 manifest digest and GitHub
+ build-provenance attestation must bind to the release source commit before
+ the digest enters `release-activation.json`. Activation recovery repeats
+ that verification, and Helm Pages refuses to advertise a chart whose OCI
+ tag, signer workflow, source commit, or digest has drifted from the immutable
+ activation packet.
- Release activation requires GitHub CLI 2.97.0 or newer, which includes the
literal signer-identity matcher fix. The shared
`scripts/require-safe-gh-attestation.sh` guard enforces this floor. The
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index 4144de9cfb..463654944f 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -2687,11 +2687,13 @@ func TestPublishHelmChartReachableViaWorkflowCall(t *testing.T) {
// Chart-version resolver prefers inputs over release-event tag.
`if [ -n "${INPUT_CHART_VERSION}" ]; then`,
`RELEASE_TAG="${RELEASE_TAG_NAME}"`,
- `name: Verify public GHCR chart read`,
+ `name: Verify public GHCR chart identity and provenance`,
`helm registry logout ghcr.io || true`,
- `helm show chart`,
- `oci://ghcr.io/${{ github.repository_owner }}/pulse-chart/pulse`,
- `--version "${{ steps.versions.outputs.chart_version }}"`,
+ `uses: actions/attest@`,
+ `subject-digest: ${{ steps.push.outputs.chart_digest }}`,
+ `./scripts/verify-release-helm-chart.sh`,
+ `value: ${{ jobs.publish.outputs.chart_digest }}`,
+ `chart_digest: ${{ steps.proof.outputs.chart_digest }}`,
)
content, err := os.ReadFile(workflowPath)
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index 807511fc67..3ccf65bb06 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -397,9 +397,15 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertIn("r2_prefix: $r2_prefix", activation)
self.assertIn(".r2_prefix == $r2_prefix", activation)
self.assertIn(".r2_prefix == $r2_prefix", convergence)
- for digest_field in ("server_image_digest", "control_plane_image_digest"):
+ for digest_field in (
+ "server_image_digest",
+ "control_plane_image_digest",
+ "helm_chart_digest",
+ ):
self.assertIn(digest_field, activation)
self.assertIn(digest_field, convergence)
+ self.assertIn(digest_field, recovery_activation)
+ self.assertIn(digest_field, commit_verdict)
self.assertIn("committed=true", activation)
self.assertIn("Immutably committed, attested, and publicly verified ${TAG}", activation)
self.assertIn("Draft activation marker digest does not match", activation)
@@ -1951,6 +1957,7 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
dry_run_workflow = read(".github/workflows/release-dry-run.yml")
helm = read(".github/workflows/publish-helm-chart.yml")
helm_pages = read(".github/workflows/helm-pages.yml")
+ convergence = read(".github/workflows/release-convergence.yml")
artifact_validator = read("scripts/release_control/validate_artifact_release_line.py")
chart = read("deploy/helm/pulse/Chart.yaml")
chart_sync = read("scripts/sync_chart_release_metadata.py")
@@ -2125,11 +2132,23 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertNotIn("sync_chart_release_metadata.py", helm_pages)
self.assertIn("--chart deploy/helm/pulse/Chart.yaml", helm)
self.assertIn('git checkout --detach "refs/tags/${RELEASE_TAG}"', helm)
- self.assertIn("Verify public GHCR chart read", helm)
+ self.assertIn("Verify public GHCR chart identity and provenance", helm)
self.assertIn("helm registry logout ghcr.io || true", helm)
- self.assertIn("helm show chart", helm)
- self.assertIn("oci://ghcr.io/${{ github.repository_owner }}/pulse-chart/pulse", helm)
- self.assertIn('--version "${{ steps.versions.outputs.chart_version }}"', helm)
+ self.assertIn("actions/attest@", helm)
+ self.assertIn("verify-release-helm-chart.sh", helm)
+ self.assertIn("subject-digest: ${{ steps.push.outputs.chart_digest }}", helm)
+ self.assertIn("value: ${{ jobs.publish.outputs.chart_digest }}", helm)
+ self.assertIn("chart_digest: ${{ steps.proof.outputs.chart_digest }}", helm)
+ self.assertIn("${GITHUB_SHA} does not match ${RELEASE_TAG}", helm)
+ self.assertIn("verify-release-helm-chart.sh", helm_pages)
+ self.assertRegex(
+ helm_pages,
+ r"(?s)- name: Verify immutable chart identity\n\s+env:\n\s+GH_TOKEN: \$\{\{ github\.token \}\}",
+ )
+ self.assertIn(
+ "chart_digest: ${{ needs.acquire_customer_promotion_lease.outputs.helm_chart_digest }}",
+ convergence,
+ )
self.assertNotIn("versions/latest/restore", helm)
self.assertNotIn("-f visibility=public", helm)
self.assertNotIn("Package visibility configuration attempted", helm)
diff --git a/scripts/release_control/verify_release_helm_chart_test.py b/scripts/release_control/verify_release_helm_chart_test.py
new file mode 100644
index 0000000000..3a260e1d82
--- /dev/null
+++ b/scripts/release_control/verify_release_helm_chart_test.py
@@ -0,0 +1,132 @@
+#!/usr/bin/env python3
+
+from __future__ import annotations
+
+import os
+from pathlib import Path
+import subprocess
+import tempfile
+import textwrap
+import unittest
+
+
+ROOT = Path(__file__).resolve().parents[2]
+SCRIPT = ROOT / "scripts" / "verify-release-helm-chart.sh"
+SOURCE_SHA = "a" * 40
+DIGEST = "sha256:" + "b" * 64
+
+
+class VerifyReleaseHelmChartTests(unittest.TestCase):
+ def run_verifier(
+ self,
+ *,
+ digest: str = DIGEST,
+ expected_digest: str = "",
+ gh_exit: int = 0,
+ gh_version: str = "2.97.0",
+ source_sha: str = SOURCE_SHA,
+ ) -> tuple[subprocess.CompletedProcess[str], str]:
+ with tempfile.TemporaryDirectory() as temp:
+ temp_path = Path(temp)
+ bin_path = temp_path / "bin"
+ bin_path.mkdir()
+ gh_log = temp_path / "gh.log"
+ (bin_path / "helm").write_text(
+ textwrap.dedent(
+ """\
+ #!/bin/sh
+ printf 'Pulled: ghcr.io/rcourtman/pulse-chart/pulse:6.4.1\n'
+ printf 'Digest: %s\n' "$CHART_DIGEST"
+ : > "$6/pulse-6.4.1.tgz"
+ """
+ ),
+ encoding="utf-8",
+ )
+ (bin_path / "gh").write_text(
+ textwrap.dedent(
+ """\
+ #!/bin/sh
+ if [ "$1" = version ]; then
+ printf 'gh version %s (test)\n' "$GH_VERSION"
+ exit 0
+ fi
+ printf '%s\n' "$*" >> "$GH_LOG"
+ exit "$GH_EXIT"
+ """
+ ),
+ encoding="utf-8",
+ )
+ for command in (bin_path / "helm", bin_path / "gh"):
+ command.chmod(0o755)
+
+ env = os.environ.copy()
+ env.update(
+ {
+ "PATH": f"{bin_path}:{env['PATH']}",
+ "CHART_DIGEST": digest,
+ "GH_LOG": str(gh_log),
+ "GH_EXIT": str(gh_exit),
+ "GH_VERSION": gh_version,
+ }
+ )
+ args = [str(SCRIPT), "v6.4.1", source_sha, "rcourtman/Pulse"]
+ if expected_digest:
+ args.append(expected_digest)
+ result = subprocess.run(
+ args,
+ cwd=ROOT,
+ env=env,
+ text=True,
+ capture_output=True,
+ check=False,
+ )
+ return result, gh_log.read_text(encoding="utf-8") if gh_log.exists() else ""
+
+ def test_emits_digest_after_exact_hosted_provenance_verification(self) -> None:
+ result, calls = self.run_verifier()
+
+ self.assertEqual(result.returncode, 0, result.stderr)
+ self.assertEqual(result.stdout.strip(), f"chart_digest={DIGEST}")
+ self.assertIn(f"oci://ghcr.io/rcourtman/pulse-chart/pulse@{DIGEST}", calls)
+ self.assertIn("--repo rcourtman/Pulse", calls)
+ self.assertIn("--bundle-from-oci", calls)
+ self.assertIn(
+ "--signer-workflow github.com/rcourtman/Pulse/.github/workflows/publish-helm-chart.yml",
+ calls,
+ )
+ self.assertIn(f"--source-digest {SOURCE_SHA}", calls)
+ self.assertIn("--deny-self-hosted-runners", calls)
+ self.assertIn("--predicate-type https://slsa.dev/provenance/v1", calls)
+
+ def test_rejects_a_chart_that_moved_after_activation(self) -> None:
+ expected = "sha256:" + "c" * 64
+ result, calls = self.run_verifier(expected_digest=expected)
+
+ self.assertNotEqual(result.returncode, 0)
+ self.assertIn("Exact-version Helm chart moved", result.stderr)
+ self.assertEqual(calls, "")
+
+ def test_rejects_missing_or_malformed_registry_digest(self) -> None:
+ result, calls = self.run_verifier(digest="unknown")
+
+ self.assertNotEqual(result.returncode, 0)
+ self.assertIn("did not report one exact OCI digest", result.stderr)
+ self.assertEqual(calls, "")
+
+ def test_rejects_unsafe_github_cli_before_registry_resolution(self) -> None:
+ result, calls = self.run_verifier(gh_version="2.96.1")
+
+ self.assertNotEqual(result.returncode, 0)
+ self.assertIn("too old for release attestation policy enforcement", result.stderr)
+ self.assertEqual(calls, "")
+
+ def test_rejects_invalid_source_identity(self) -> None:
+ result, calls = self.run_verifier(source_sha="main")
+
+ self.assertNotEqual(result.returncode, 0)
+ self.assertIn("Invalid release source SHA", result.stderr)
+ self.assertEqual(calls, "")
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/scripts/verify-release-helm-chart.sh b/scripts/verify-release-helm-chart.sh
new file mode 100755
index 0000000000..635eec158e
--- /dev/null
+++ b/scripts/verify-release-helm-chart.sh
@@ -0,0 +1,90 @@
+#!/usr/bin/env bash
+
+# Resolve the exact-version OCI Helm chart to its registry digest and verify
+# that GitHub's signed build provenance binds it to the release source and the
+# canonical hosted chart publisher.
+
+set -euo pipefail
+
+if [ "$#" -lt 2 ] || [ "$#" -gt 4 ]; then
+ echo "Usage: $0 <tag> <source-sha> [owner/repo] [expected-digest]" >&2
+ exit 2
+fi
+
+TAG="$1"
+SOURCE_SHA="$2"
+REPOSITORY="${3:-${GITHUB_REPOSITORY:-rcourtman/Pulse}}"
+EXPECTED_DIGEST="${4:-}"
+OWNER="${REPOSITORY%%/*}"
+VERSION="${TAG#v}"
+SUBJECT="ghcr.io/${OWNER}/pulse-chart/pulse"
+SIGNER_WORKFLOW="github.com/${REPOSITORY}/.github/workflows/publish-helm-chart.yml"
+
+if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-((rc|alpha|beta)\.[0-9]+))?$ ]]; then
+ echo "Invalid release tag: ${TAG}" >&2
+ exit 1
+fi
+if [[ ! "$SOURCE_SHA" =~ ^[0-9a-f]{40}$ ]]; then
+ echo "Invalid release source SHA: ${SOURCE_SHA}" >&2
+ exit 1
+fi
+if [[ ! "$REPOSITORY" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]; then
+ echo "Invalid GitHub repository: ${REPOSITORY}" >&2
+ exit 1
+fi
+if [ -n "$EXPECTED_DIGEST" ] && \
+ [[ ! "$EXPECTED_DIGEST" =~ ^sha256:[0-9a-f]{64}$ ]]; then
+ echo "Invalid expected Helm chart digest: ${EXPECTED_DIGEST}" >&2
+ exit 1
+fi
+
+for command in gh helm; do
+ if ! command -v "$command" >/dev/null 2>&1; then
+ echo "${command} is required to verify the release Helm chart." >&2
+ exit 1
+ fi
+done
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+"${SCRIPT_DIR}/require-safe-gh-attestation.sh"
+
+pull_dir="$(mktemp -d)"
+cleanup() { rm -rf "$pull_dir"; }
+trap cleanup EXIT
+
+pull_output="$(
+ helm pull "oci://${SUBJECT}" \
+ --version "$VERSION" \
+ --destination "$pull_dir" 2>&1
+)" || {
+ echo "$pull_output" >&2
+ echo "Unable to resolve the exact-version Helm chart ${SUBJECT}:${VERSION}." >&2
+ exit 1
+}
+printf '%s\n' "$pull_output" >&2
+
+mapfile -t resolved_digests < <(
+ sed -nE 's/^Digest:[[:space:]]*(sha256:[0-9a-f]{64})\r?$/\1/p' \
+ <<<"$pull_output" | sort -u
+)
+if [ "${#resolved_digests[@]}" -ne 1 ]; then
+ echo "Helm did not report one exact OCI digest for ${SUBJECT}:${VERSION}." >&2
+ exit 1
+fi
+chart_digest="${resolved_digests[0]}"
+if [ -n "$EXPECTED_DIGEST" ] && [ "$chart_digest" != "$EXPECTED_DIGEST" ]; then
+ echo "Exact-version Helm chart moved: expected ${EXPECTED_DIGEST}, observed ${chart_digest}." >&2
+ exit 1
+fi
+
+gh attestation verify "oci://${SUBJECT}@${chart_digest}" \
+ --repo "$REPOSITORY" \
+ --bundle-from-oci \
+ --signer-workflow "$SIGNER_WORKFLOW" \
+ --source-digest "$SOURCE_SHA" \
+ --deny-self-hosted-runners \
+ --predicate-type https://slsa.dev/provenance/v1 \
+ >/dev/null
+
+printf 'chart_digest=%s\n' "$chart_digest"
+echo "[OK] Helm chart ${VERSION} and hosted build provenance resolve to ${chart_digest}." >&2