From b62e07dffcf5bf55a82aee4c200b126b0405940c Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Fri, 27 Nov 2026 05:46:02 +0100 Subject: [PATCH] security(monitoring): pin the Alerta image by digest The entrypoint and nginx template mounted over the image are copies of alerta-web 9.1.0 at this digest. A retagged image could carry different files, and the mounted copies would then no longer match it. Assisted-by: LLM Signed-off-by: Andrei Kvapil --- packages/system/monitoring/templates/alerta/alerta.yaml | 4 +++- .../monitoring/tests/alerta_log_redaction_test.yaml | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/system/monitoring/templates/alerta/alerta.yaml b/packages/system/monitoring/templates/alerta/alerta.yaml index e14bf9f64..5f0eb4739 100644 --- a/packages/system/monitoring/templates/alerta/alerta.yaml +++ b/packages/system/monitoring/templates/alerta/alerta.yaml @@ -240,7 +240,9 @@ spec: spec: containers: - name: alerta - image: "alerta/alerta-web:9.1.0" + {{- /* Pinned by digest: the entrypoint and nginx template mounted + from alerta-entrypoint are copies of this exact image's. */}} + image: "docker.io/alerta/alerta-web:9.1.0@sha256:693845fb8a95a483c8c9d560786f661f5b6198e5ea0baa6ddf368a7e53c94f39" imagePullPolicy: IfNotPresent resources: {{- toYaml .Values.alerta.resources | nindent 12 }} env: diff --git a/packages/system/monitoring/tests/alerta_log_redaction_test.yaml b/packages/system/monitoring/tests/alerta_log_redaction_test.yaml index fa2a3740b..7c92212ca 100644 --- a/packages/system/monitoring/tests/alerta_log_redaction_test.yaml +++ b/packages/system/monitoring/tests/alerta_log_redaction_test.yaml @@ -90,3 +90,12 @@ tests: configMap: name: alerta-entrypoint defaultMode: 0755 + + - it: runs the exact image the mounted files were copied from + documentSelector: + path: kind + value: Deployment + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: docker.io/alerta/alerta-web:9.1.0@sha256:693845fb8a95a483c8c9d560786f661f5b6198e5ea0baa6ddf368a7e53c94f39