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.

Expose complete stable release continuity failures

pulse-triage[bot]168f52972a55
diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index a1719d5057..a8259d1498 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -69,7 +69,11 @@ evidence packet, including partial outcomes when a check fails; GitHub applies
the repository's configured retention maximum and reports any clamp in the
workflow warning. Six-hour lock-watch evidence explicitly records its narrower
`release_lock` mode and skipped full-surface checks. The job is read-only and
-requires the public `PULSE_UPDATE_SIGNING_PUBLIC_KEY` repository variable.
+requires the public `PULSE_UPDATE_SIGNING_PUBLIC_KEY` repository variable. A
+failed release-trust check still permits activation-marker inspection when the
+tag, numeric release ID, and exact source SHA are structurally valid. This
+exposes independent marker damage in the same evidence packet; it never admits
+the release or enables later delivery checks unless both trust checks pass.
Future release candidates also carry
`release-build-provenance.sigstore.json`, produced by the hosted
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
index 91ce8646a8..b63805ed72 100644
--- a/.github/workflows/security-scan.yml
+++ b/.github/workflows/security-scan.yml
@@ -80,7 +80,11 @@ jobs:
- name: Bind the release activation marker
id: activation
- if: ${{ steps.release.outcome == 'success' }}
+ # A structurally valid tag/id/SHA remains safe lookup data even when
+ # release trust fails. Inspect its marker so one defect cannot hide a
+ # second; all public-surface verification below still requires both
+ # release and activation admission to succeed.
+ if: ${{ !cancelled() && steps.release.outputs.referenceable == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index e4d96bf501..5650c10bde 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -162,6 +162,8 @@ func TestSecurityScanRevalidatesLatestStableDelivery(t *testing.T) {
`scripts/release_control/release_continuity.py release`,
"release-diagnostic.json",
"Bind the release activation marker",
+ `!cancelled()`,
+ `steps.release.outputs.referenceable == 'true'`,
`scripts/release_control/release_continuity.py activation`,
"activation-diagnostic.json",
`steps.activation.outcome == 'success'`,
@@ -217,6 +219,23 @@ func TestSecurityScanRevalidatesLatestStableDelivery(t *testing.T) {
t.Fatalf("%s must not run for the six-hour release-lock trigger", stepName)
}
}
+ for _, stepName := range []string{
+ "Verify immutable release and build provenance",
+ "Authenticate every published release asset",
+ "Verify exact-version container identities",
+ "Verify stable container discovery aliases",
+ "Verify exact-version Helm identity",
+ } {
+ step := workflowStepBlock(t, workflowJobBlock(t, workflow, "release-continuity"), stepName)
+ for _, admission := range []string{
+ `steps.release.outcome == 'success'`,
+ `steps.activation.outcome == 'success'`,
+ } {
+ if !strings.Contains(step, admission) {
+ t.Fatalf("%s must remain behind continuity admission: %s", stepName, admission)
+ }
+ }
+ }
}
func TestProPackagingBuildsFrontendEmbedWithoutTransferringBundle(t *testing.T) {
@@ -905,6 +924,7 @@ func TestCreateReleaseUploadsPowerShellInstaller(t *testing.T) {
`ACTUAL_TARGET_COMMITISH=$(jq -r '.target_commitish // empty' "$RELEASE_JSON_FILE")`,
`Draft release ${RELEASE_ID} is bound to tag ${ACTUAL_RELEASE_TAG}, expected ${TAG}.`,
`Draft release ${RELEASE_ID} target_commitish is ${ACTUAL_TARGET_COMMITISH}, expected ${HEAD_SHA}.`,
+ `WORKFLOW_OUTPUT_1: ${{ needs.prepare.outputs.tag }}`,
`./scripts/backfill-release-assets.sh --tag "${WORKFLOW_OUTPUT_1}" --repo "${{ github.repository }}"`,
`./scripts/validate-published-release.sh "${WORKFLOW_OUTPUT_1}" "${{ github.repository }}"`,
// End-to-end install.sh smoke must run downstream of
@@ -1000,6 +1020,8 @@ func TestCreateReleaseUploadsPowerShellInstaller(t *testing.T) {
`statuses: write`,
`curl --fail-with-body --silent --show-error -X POST`,
`"context": "Release Asset Validation"`,
+ `WORKFLOW_OUTPUT_4: ${{ steps.context.outputs.tag }}`,
+ `WORKFLOW_OUTPUT_5: ${{ steps.context.outputs.target_commitish }}`,
`--arg tag "${WORKFLOW_OUTPUT_4}"`,
`--arg target_commitish "${WORKFLOW_OUTPUT_5}"`,
`{body: $body, tag_name: $tag, target_commitish: $target_commitish}`,
@@ -2262,6 +2284,9 @@ func TestUpdateDemoWorkflowUsesGovernedNetworkPath(t *testing.T) {
`release-activation.json`,
`.convergence_run_id == $convergence_run_id`,
`gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${TAG}"`,
+ `.immutable // false`,
+ `https://raw.githubusercontent.com/${{ github.repository }}/${LEASE_SHA}/${OWNER_ASSET_NAME}`,
+ `.schema_version == 2`,
`Stable demo mutation refuses mutable, inactive, or prerelease tag`,
`Verify public browser smoke`,
`PULSE_DEMO_AUTH_USER`,
diff --git a/scripts/release_control/release_continuity.py b/scripts/release_control/release_continuity.py
index 00ce397e6b..4c0bf16222 100644
--- a/scripts/release_control/release_continuity.py
+++ b/scripts/release_control/release_continuity.py
@@ -17,6 +17,14 @@ STABLE_TAG = re.compile(r"^v[0-9]+\.[0-9]+\.[0-9]+$")
SOURCE_SHA = re.compile(r"^[0-9a-f]{40}$")
RUN_ID = re.compile(r"^[0-9]+$")
SHA256 = re.compile(r"^sha256:[0-9a-f]{64}$")
+RELEASE_REFERENCE_VIOLATIONS = frozenset(
+ {
+ "release_payload_invalid",
+ "release_id_invalid",
+ "stable_tag_invalid",
+ "source_identity_invalid",
+ }
+)
IMMUTABLE_REPLACEMENT_ACTION = (
"Do not edit the immutable release; restore the last known-good stable target if "
"needed, then publish a corrected replacement through convergence."
@@ -228,6 +236,21 @@ def release_identity(payload: dict[str, Any]) -> dict[str, Any]:
}
+def release_is_referenceable(payload: Any, failures: list[Violation]) -> bool:
+ """Return whether the release can be looked up without trusting it.
+
+ A mutable, draft, prerelease, or incompletely published release must still
+ fail continuity admission. Its validated tag, numeric release ID, and exact
+ source SHA are nevertheless safe lookup data for collecting independent
+ activation diagnostics. Keeping this distinction explicit prevents a
+ first failure from hiding additional damage while preserving fail-closed
+ delivery gates.
+ """
+ return isinstance(payload, dict) and not any(
+ item.code in RELEASE_REFERENCE_VIOLATIONS for item in failures
+ )
+
+
def activation_violations(
payload: Any, expected_release: dict[str, Any]
) -> list[Violation]:
@@ -364,18 +387,20 @@ def validate_release(args: argparse.Namespace) -> int:
)
}
write_diagnostic(args.diagnostic, "stable_release_identity", identity, failures)
+
+ if release_is_referenceable(payload, failures):
+ append_outputs(
+ args.github_output,
+ {
+ "referenceable": "true",
+ "tag": payload["tag_name"],
+ "release_id": str(payload["id"]),
+ "source_sha": payload["target_commitish"],
+ },
+ )
if failures:
report_failures(failures, RELEASE_RULES)
return 1
-
- append_outputs(
- args.github_output,
- {
- "tag": payload["tag_name"],
- "release_id": str(payload["id"]),
- "source_sha": payload["target_commitish"],
- },
- )
return 0
@@ -383,8 +408,8 @@ def validate_activation(args: argparse.Namespace) -> int:
try:
release = read_json(args.release_json)
release_failures = release_violations(release)
- if release_failures or not isinstance(release, dict):
- raise ValueError("release identity did not pass validation")
+ if not release_is_referenceable(release, release_failures):
+ raise ValueError("release identity is not safe to reference")
activation = read_json(args.activation_json)
except ValueError as exc:
activation = None
diff --git a/scripts/release_control/release_continuity_test.py b/scripts/release_control/release_continuity_test.py
index d6e2ad309e..90a868047a 100644
--- a/scripts/release_control/release_continuity_test.py
+++ b/scripts/release_control/release_continuity_test.py
@@ -90,6 +90,7 @@ class ReleaseContinuityTest(unittest.TestCase):
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual(diagnostic["status"], "success")
self.assertEqual(diagnostic["violations"], [])
+ self.assertIn("referenceable=true\n", output)
self.assertIn("tag=v6.4.2\n", output)
self.assertIn("release_id=12345\n", output)
self.assertIn(f"source_sha={SOURCE_SHA}\n", output)
@@ -99,7 +100,10 @@ class ReleaseContinuityTest(unittest.TestCase):
release["immutable"] = False
result, diagnostic, output = self.run_command("release", release)
self.assertEqual(result.returncode, 1)
- self.assertEqual(output, "")
+ self.assertIn("referenceable=true\n", output)
+ self.assertIn("tag=v6.4.2\n", output)
+ self.assertIn("release_id=12345\n", output)
+ self.assertIn(f"source_sha={SOURCE_SHA}\n", output)
self.assertEqual(diagnostic["status"], "failure")
self.assertEqual(
[item["code"] for item in diagnostic["violations"]],
@@ -191,6 +195,29 @@ class ReleaseContinuityTest(unittest.TestCase):
)
)
+ def test_mutable_release_does_not_hide_activation_damage(self) -> None:
+ release = valid_release()
+ release["immutable"] = False
+ activation = valid_activation()
+ del activation["server_image_digest"]
+ del activation["control_plane_image_digest"]
+ del activation["helm_chart_digest"]
+
+ result, diagnostic, output = self.run_command(
+ "activation", release, activation
+ )
+
+ self.assertEqual(result.returncode, 1)
+ self.assertEqual(output, "")
+ self.assertEqual(
+ [item["code"] for item in diagnostic["violations"]],
+ [
+ "server_digest_invalid",
+ "control_plane_digest_invalid",
+ "helm_digest_invalid",
+ ],
+ )
+
if __name__ == "__main__":
unittest.main()