mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
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 <kvapss@gmail.com>
This commit is contained in:
2 files changed
+12
-1
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user