diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index 2525d5bdaf..3afca0f735 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -167,13 +167,19 @@ own stack, `+tor` on a variant that pins `services.tor.enabled` false, `+multi`
on a role with `reachability.single_mode: true`, or any axis that fights the
run's own `mode`, `network`, `distros`, `filesystem` or `architectures` input,
or `:arm64` on a role whose `meta/services.yml` declares
-`architectures: [amd64]`.
+`architectures: [amd64]`, or `%centos:arm64` on a row installing a package whose
+`meta/packages.yml` centos entry declares `architectures: [amd64]`. Such a
+package entry narrows only its own distro and architecture pair: an unpinned
+row that draws it moves to another architecture of the same distro, so the
+role keeps every other pair.
That is also what a retrigger replays: `--failed` reads the glyphs off the failed
job's title and writes them back as a token, so the row comes back in the mode,
network mode, distribution and architecture it died on rather than on whatever
the rotation would pick next. The architecture is replayed because it is the
-machine the job ran on, not a preference it could fall back from. The
+machine the job ran on, not a preference it could fall back from, unless a
+package entry no longer publishes that pair: the replay then keeps the distro,
+drops the architecture and warns. The
filesystem is deliberately left out. A title states the
kind the matrix *assigned*, which a deploy is allowed to fall back from, so
pinning it would both misstate what the job ran on and turn the kind into a
@@ -281,6 +287,7 @@ reproduces by re-running the same sweep:
| distro | `(position + sweep) % len(distro pool)` |
| filesystem | `(position // len(distro pool) + sweep) % len(filesystem pool)` |
| architecture | `(position + sweep) % len(architecture pool)` |
+| 🔬 vulnerability engine | `(position // (len(distro pool) * len(filesystem pool)) + sweep) % 3` over 🔺 trivy, 🍇 grype, 🐙 osv |
A role offers at most two modes in practice — swarm needs its own stack, host
needs the absence of one — so a row flips between its two modes on consecutive
@@ -309,6 +316,12 @@ conflict, not an overwrite. The distro, filesystem and architecture glyphs
follow it in the label (`🐳🧅🌀🦓🦾`), so a title says which combination died
without opening the job.
+The vulnerability engine is the odometer digit above distro and filesystem, and its glyph follows the architecture glyph in the label (`🐳🧅🌀🦓🦾🔺`).
+The deploy-time scan of `sys-ctl-hlth-runtime` then runs Syft and that engine only, plus Grype over the source-built runtimes Syft finds.
+The `vulnerability-db` job of [call-test-deploy.yml](call-test-deploy.yml) downloads the Trivy, Grype and OSV databases once per day into the Actions cache; each deploy job restores the Grype database and the drawn engine's into `build/vulnerability-db`, which the stack and every swarm node mount read-only, and fails when one is missing, so no deploy job downloads a database itself.
+Under act these steps are skipped: the deploy draws its engine and refreshes the shared host directory `INFINITO_VULNERABILITY_DB_HOST_PATH`, which [workflow.sh](../../scripts/tests/deploy/act/workflow.sh) binds into the job container at the same path.
+`cron-images-mirror-all.yml` writes the findings of its `scan` job per image and per CVE into the job summary and the `vulnerability-findings` artifact; dispatched with `issues: false` it is a dry run that leaves the issues untouched.
+
### Stopping on failure
`chunk_gate` (default `true`) decides whether the chain stops at its first
diff --git a/.github/workflows/call-test-deploy.yml b/.github/workflows/call-test-deploy.yml
index 94c0484bcd..2d8ff9a3fa 100644
--- a/.github/workflows/call-test-deploy.yml
+++ b/.github/workflows/call-test-deploy.yml
@@ -261,12 +261,75 @@ jobs:
--offset "${PLAN_OFFSET}" \
>> "$GITHUB_STEP_SUMMARY"
+ vulnerability-db:
+ name: 🔬 Vulnerability databases
+ runs-on: ubuntu-26.04
+ timeout-minutes: 60
+ outputs:
+ day: ${{ steps.day.outputs.day }}
+
+ steps:
+ - uses: actions/checkout@v7.0.0
+
+ - name: 📅 Resolve the database day
+ id: day
+ shell: bash
+ run: echo "day=$(date -u +%F)" >> "$GITHUB_OUTPUT"
+
+ - name: 🔺 Trivy database
+ id: trivy
+ if: ${{ !env.ACT }}
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: build/vulnerability-db/trivy
+ key: vulnerability-db-trivy-${{ steps.day.outputs.day }}
+
+ - name: 🍇 Grype database
+ id: grype
+ if: ${{ !env.ACT }}
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: build/vulnerability-db/grype
+ key: vulnerability-db-grype-${{ steps.day.outputs.day }}
+
+ - name: 🐙 OSV database
+ id: osv
+ if: ${{ !env.ACT }}
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: build/vulnerability-db/osv
+ key: vulnerability-db-osv-${{ steps.day.outputs.day }}
+
+ - name: 🔧 Set up Python
+ if: ${{ !env.ACT && (steps.trivy.outputs.cache-hit != 'true' || steps.grype.outputs.cache-hit != 'true' || steps.osv.outputs.cache-hit != 'true') }}
+ uses: actions/setup-python@v6
+ with:
+ python-version: "3.12"
+ cache: pip
+ cache-dependency-path: pyproject.toml
+
+ - name: 📥 Download the missing databases
+ if: ${{ !env.ACT && (steps.trivy.outputs.cache-hit != 'true' || steps.grype.outputs.cache-hit != 'true' || steps.osv.outputs.cache-hit != 'true') }}
+ shell: bash
+ env:
+ MISSING: >-
+ ${{ steps.trivy.outputs.cache-hit != 'true' && 'trivy' || '' }}
+ ${{ steps.grype.outputs.cache-hit != 'true' && 'grype' || '' }}
+ ${{ steps.osv.outputs.cache-hit != 'true' && 'osv' || '' }}
+ run: |
+ set -euo pipefail
+ PYTHON=python bash scripts/install/python.sh
+ # shellcheck disable=SC2086
+ python -m cli.contributing.security.database --dir build/vulnerability-db --engines ${MISSING}
+
deploy:
name: "${{ matrix.label }}"
if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]'
runs-on: ${{ matrix.runner }}
timeout-minutes: 355
- needs: discover
+ needs:
+ - discover
+ - vulnerability-db
# TODO: verify in a CI deploy that a cancel drops queued jobs from this
# group and that an identical row of a second run queues behind it.
@@ -321,6 +384,34 @@ jobs:
shell: bash
run: nohup ./scripts/tests/deploy/ci/host-metrics-sampler.sh "${INFINITO_RESCUE_DIAGNOSTICS_BASE}/host-metrics.log" >/dev/null 2>&1 &
+ - name: "🍇 Restore the Grype database"
+ if: ${{ !env.ACT && matrix.engine != '' }}
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: build/vulnerability-db/grype
+ key: vulnerability-db-grype-${{ needs.vulnerability-db.outputs.day }}
+ fail-on-cache-miss: true
+
+ - name: "🔬 Restore the ${{ matrix.engine }} database"
+ if: ${{ !env.ACT && matrix.engine != '' && matrix.engine != 'grype' }}
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: build/vulnerability-db/${{ matrix.engine }}
+ key: vulnerability-db-${{ matrix.engine }}-${{ needs.vulnerability-db.outputs.day }}
+ fail-on-cache-miss: true
+
+ - name: "🔬 Pin the deploy to the restored databases"
+ if: ${{ !env.ACT }}
+ shell: bash
+ env:
+ ENGINE: ${{ matrix.engine }}
+ run: |
+ set -euo pipefail
+ {
+ echo "INFINITO_VULNERABILITY_ENGINE=${ENGINE}"
+ echo "INFINITO_VULNERABILITY_DB_HOST_PATH=${GITHUB_WORKSPACE}/build/vulnerability-db"
+ } >> "${GITHUB_ENV}"
+
- name: 💽 Mount the empty spare disk at /mnt
if: ${{ !env.ACT }}
shell: bash
diff --git a/.github/workflows/call-test-workspace.yml b/.github/workflows/call-test-workspace.yml
index 64753dff93..4aac8113e7 100644
--- a/.github/workflows/call-test-workspace.yml
+++ b/.github/workflows/call-test-workspace.yml
@@ -126,6 +126,12 @@ jobs:
run: |
set -euo pipefail
HOST_WORKDIR="$(pwd -P)"
+ if [[ "${ACT:-}" == "true" ]]; then
+ db_host_path="${INFINITO_VULNERABILITY_DB_HOST_PATH:?scripts/tests/deploy/act/workflow.sh passes the shared host directory}"
+ else
+ db_host_path="${RUNNER_TEMP:?GitHub sets RUNNER_TEMP for every job}/vulnerability-db"
+ fi
+ mkdir -p "${db_host_path}"
docker run --rm \
-e GITHUB_ACTIONS=true \
@@ -148,8 +154,10 @@ jobs:
-e INFINITO_CACHE_PACKAGE_HOST_PATH \
-e INFINITO_GHCR_MIRROR \
-e INFINITO_GHCR_MIRROR_PREFIX \
+ -e INFINITO_VULNERABILITY_DB_HOST_PATH="${db_host_path}" \
--network host \
-v "${HOST_WORKDIR}:${HOST_WORKDIR}" \
+ -v "${db_host_path}:${db_host_path}" \
-v "/mnt/docker:/var/lib/docker" \
-v "/var/run/docker.sock:/var/run/docker.sock" \
-w "${HOST_WORKDIR}" \
diff --git a/.github/workflows/cron-images-mirror-all.yml b/.github/workflows/cron-images-mirror-all.yml
index 3f1619f873..a09a4ed028 100644
--- a/.github/workflows/cron-images-mirror-all.yml
+++ b/.github/workflows/cron-images-mirror-all.yml
@@ -22,9 +22,14 @@ on:
default: "."
type: string
images_per_hour:
- description: "⏱️ Optional throttle: max images mirrored per hour"
+ description: "⏱️ Optional throttle: max Docker Hub copies per hour (default 150)"
required: false
type: string
+ issues:
+ description: "🛡️ Sync the vulnerability issues; off is a dry run"
+ required: false
+ default: true
+ type: boolean
workflow_call:
inputs:
@@ -43,9 +48,14 @@ on:
type: string
default: "."
images_per_hour:
- description: "Optional throttle: max images mirrored per hour"
+ description: "Optional throttle: max Docker Hub copies per hour (default 150)"
required: false
type: string
+ issues:
+ description: "Open, update and close the vulnerability issues; false is a dry run"
+ required: false
+ default: true
+ type: boolean
secrets:
DOCKERHUB_USERNAME:
required: false
@@ -69,7 +79,7 @@ jobs:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
- IMAGES_PER_HOUR: ${{ github.event.inputs.images_per_hour || inputs.images_per_hour || '50' }}
+ IMAGES_PER_HOUR: ${{ github.event.inputs.images_per_hour || inputs.images_per_hour || '150' }}
steps:
- name: ⬇️ Checkout
@@ -117,3 +127,70 @@ jobs:
GHCR_PREFIX: ${{ inputs.ghcr_prefix || 'mirror' }}
REPO_ROOT: ${{ inputs.repo_root || '.' }}
run: bash scripts/meta/mirror/sync/all.sh
+
+ scan:
+ name: 🔬 Scan the mirror
+ needs: sync
+ runs-on: ubuntu-26.04
+ timeout-minutes: 355
+ permissions:
+ contents: read
+ issues: write
+
+ env:
+ INFINITO_GHCR_MIRROR_PREFIX: ${{ inputs.ghcr_prefix || 'mirror' }}
+
+ steps:
+ - name: 🧹 Free disk space
+ uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
+ with:
+ tool-cache: true
+ android: true
+ dotnet: true
+ haskell: true
+ large-packages: true
+ docker-images: true
+ swap-storage: true
+
+ - name: ⬇️ Checkout
+ uses: actions/checkout@v7.0.0
+
+ - name: 🔧 Setup Python
+ uses: actions/setup-python@v6
+ with:
+ python-version: "3.12"
+ cache: pip
+ cache-dependency-path: pyproject.toml
+
+ - name: 📦 Install Python deps
+ run: PYTHON=python bash scripts/install/python.sh
+
+ - name: 🗂️ SBOM tree by digest
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: build/security/sbom
+ key: security-sbom-${{ github.run_id }}
+ restore-keys: security-sbom-
+
+ - name: 🔬 Scan every pinned image
+ run: make test-security
+
+ - name: 📊 Count the findings per image and per CVE
+ if: ${{ !cancelled() }}
+ run: python -m cli.contributing.security.summary --report build/test-reports/security.json --counts build/test-reports/security-counts.json --summary "$GITHUB_STEP_SUMMARY"
+
+ - name: ⬆️ Upload the findings
+ if: ${{ !cancelled() }}
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4.6.1
+ with:
+ name: vulnerability-findings
+ path: |
+ build/test-reports/security.json
+ build/test-reports/security-counts.json
+ if-no-files-found: error
+
+ - name: 🛡️ Open, update and close the vulnerability issues
+ if: ${{ !cancelled() && (github.event_name == 'schedule' || inputs.issues) }}
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: python -m cli.contributing.security.issues --report build/test-reports/security.json --repo "${{ github.repository }}"
diff --git a/Dockerfile b/Dockerfile
index 2daf00a14b..3f5b0010a5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -31,8 +31,10 @@ COPY scripts/install ${INFINITO_SRC_DIR}/scripts/install
# hadolint ignore=SC1090
RUN set -euo pipefail; \
- source <(grep -hE '^INFINITO_(FILESYSTEM_INSTALL_SCRIPT|APT_UBUNTU_MIRRORS)=' "${INFINITO_SRC_DIR}/default.env"); \
- INFINITO_APT_UBUNTU_MIRRORS="${INFINITO_APT_UBUNTU_MIRRORS:?}" /bin/bash "${INFINITO_SRC_DIR}/scripts/install/apt-mirrors.sh"; \
+ source <(grep -hE '^INFINITO_(FILESYSTEM_INSTALL_SCRIPT|APT_UBUNTU_MIRRORS|APT_UBUNTU_PORTS_MIRRORS)=' "${INFINITO_SRC_DIR}/default.env"); \
+ INFINITO_APT_UBUNTU_MIRRORS="${INFINITO_APT_UBUNTU_MIRRORS:?}" \
+ INFINITO_APT_UBUNTU_PORTS_MIRRORS="${INFINITO_APT_UBUNTU_PORTS_MIRRORS:?}" \
+ /bin/bash "${INFINITO_SRC_DIR}/scripts/install/apt-mirrors.sh"; \
/bin/bash "${INFINITO_SRC_DIR}/scripts/install/dnf-mirrors.sh"; \
/bin/bash "${INFINITO_SRC_DIR}/${INFINITO_FILESYSTEM_INSTALL_SCRIPT:?}"
diff --git a/Makefile b/Makefile
index 844a84b0af..b0e4424ab0 100644
--- a/Makefile
+++ b/Makefile
@@ -790,11 +790,6 @@ security-apparmor-teardown:
echo "[apparmor] AppArmor module is not loaded — skipping teardown"; \
fi
-.PHONY: security-runtimes
-# List the PHP runtime of every pinned role image from registry metadata, without pulling, and fail on one below its security floor.
-security-runtimes:
- @"$${PYTHON}" -m cli.contributing.security.runtimes
-
.PHONY: setup
# Run the setup step after generating .dockerignore.
setup: fix-dockerignore dotenv
@@ -981,6 +976,14 @@ test-performance: install
INFINITO_COMPILE=0 \
bash scripts/tests/code/wrapper.sh scripts/tests/code/run.sh
+.PHONY: test-security
+# Scan every pinned role image of the GHCR mirror with Trivy, Grype and OSV over Syft SBOMs cached by digest (not part of `test`).
+test-security:
+ @"$${PYTHON}" -m cli.contributing.security.scan \
+ --cache-dir build/security \
+ --report build/test-reports/security.json \
+ --workers 4
+
.PHONY: test-signed
# Verify HEAD is signed.
# Note: `git log %G?` returns N for unsigned; gates the pre-push hook against unsigned tips.
diff --git a/aliases b/aliases
index 3615cc2536..eafd50f609 100644
--- a/aliases
+++ b/aliases
@@ -154,7 +154,7 @@ alias i8se2='m setup'
alias i8sece='m setup-clean'
alias i8sepa='m security-apparmor-teardown'
alias i8sepu='m system-purge'
-alias i8seru='m security-runtimes'
+alias i8seru='m test-security'
alias i8source='source scripts/meta/env/load.sh' # load the project .env + venv python into the current shell
alias i8ta='m autoformat'
alias i8tare='m autoformat-restage'
diff --git a/cli/administration/deploy/ci/selections.py b/cli/administration/deploy/ci/selections.py
index d7c43a83c5..783cd6fbe7 100644
--- a/cli/administration/deploy/ci/selections.py
+++ b/cli/administration/deploy/ci/selections.py
@@ -28,10 +28,14 @@ stopped, instead of aggregating to role ids and guessing the rest.
from __future__ import annotations
+import sys
from typing import TYPE_CHECKING
-from utils.github.variant import axes, selection
+from cli.meta.ci import matrix
+from utils.cache import PROJECT_ROOT
+from utils.github.variant import axes, pools, selection
from utils.github.variant.vpn import VPN_DEPLOY_MODES
+from utils.packages.registry import published_architectures
if TYPE_CHECKING:
from collections.abc import Iterable, Mapping
@@ -73,15 +77,18 @@ def failed_selections(jobs: list[dict], *, strict: bool = False) -> list[str]:
if state == "success" or (strict and state != "failure"):
continue
label = axes.parse_label(str(job.get("name", "")))
+ variants = tuple(int(part) for part in label.variant.split(",") if part)
tokens.add(
selection.describe(
selection.Pin(
app,
- tuple(int(part) for part in label.variant.split(",") if part),
+ variants,
label.mode,
label.network,
label.distro or None,
- architecture=label.architecture or None,
+ architecture=_replayable_architecture(
+ app, variants, label.distro, label.architecture
+ ),
vpn=label.vpn if label.mode in VPN_DEPLOY_MODES else None,
)
)
@@ -89,6 +96,51 @@ def failed_selections(jobs: list[dict], *, strict: bool = False) -> list[str]:
return sorted(tokens)
+def _replayable_architecture(
+ app: str, variants: tuple[int, ...], distro: str, architecture: str
+) -> str | None:
+ """The architecture pin a replay may carry.
+
+ A job the matrix planned before a package narrowed its pair would come
+ back as a token the pin check refuses, and one refused token aborts the
+ whole dispatch. The architecture is dropped instead, with a warning, and
+ the rotation picks one the row's packages are published for.
+
+ Args:
+ app: role id of the failed job.
+ variants: the variant shards its title names.
+ distro: the distro its title names, ``""`` when none.
+ architecture: the architecture its title names, ``""`` when none.
+ """
+ if not architecture or not distro:
+ return architecture or None
+ if not any(
+ architecture not in narrowed.get(distro, pools.ARCHITECTURES)
+ for narrowed in published_architectures(PROJECT_ROOT).values()
+ ):
+ return architecture
+ rounds = matrix.deployed_rounds(app)
+ services = tuple(
+ dict.fromkeys(
+ role
+ for index in variants or (0,)
+ if index < len(rounds)
+ for role in rounds[index]
+ )
+ )
+ if (distro, architecture) in axes.row_pairs(
+ app, (distro,), pools.ARCHITECTURES, services
+ ):
+ return architecture
+ print(
+ f"warning: {app}: replaying the failed {distro}:{architecture} job "
+ f"without its :{architecture} pin; a package the row installs is not "
+ f"published for that pair (meta/packages.yml architectures)",
+ file=sys.stderr,
+ )
+ return None
+
+
def collapse_to_roles(tokens: Iterable[str]) -> list[str]:
"""The same selections with every axis dropped, one entry per role.
diff --git a/cli/administration/deploy/development/compose.py b/cli/administration/deploy/development/compose.py
index bcfbfb8d6f..21aac747d7 100644
--- a/cli/administration/deploy/development/compose.py
+++ b/cli/administration/deploy/development/compose.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+import contextlib
import os
import subprocess
import time
@@ -25,6 +26,16 @@ PACMAN_CACHE_SCRIPT = "/usr/local/bin/pacman-cache.sh"
PACMAN_CONF = "/etc/pacman.conf"
+def prepare_vulnerability_db(path: Path) -> None:
+ """Create the shared vulnerability database directory as the calling user.
+
+ Args:
+ path: ``INFINITO_VULNERABILITY_DB_HOST_PATH``.
+ """
+ with contextlib.suppress(PermissionError):
+ path.mkdir(parents=True, exist_ok=True)
+
+
class Compose:
"""Wrapper around `docker compose` for the dev/CI stack."""
@@ -215,6 +226,15 @@ class Compose:
f"size={out.stat().st_size if out.exists() else 'n/a'}"
)
+ def _prepare_vulnerability_db(self, env: dict[str, str]) -> None:
+ path = env.get("INFINITO_VULNERABILITY_DB_HOST_PATH")
+ if not path:
+ raise SystemExit(
+ "INFINITO_VULNERABILITY_DB_HOST_PATH is not set; "
+ "run 'make dotenv' to generate the .env single source of truth"
+ )
+ prepare_vulnerability_db(Path(path))
+
def _render_cache_artifacts(self) -> None:
"""Render the generated cache files the overrides mount.
@@ -236,6 +256,7 @@ class Compose:
print(">>> Starting compose stack (coredns + infinito)")
env = self._base_env()
+ self._prepare_vulnerability_db(env)
keys = [
"INFINITO_BUILD",
"INFINITO_DISTRO",
diff --git a/cli/administration/deploy/development/init.py b/cli/administration/deploy/development/init.py
index 52784c5949..1dd04803cd 100644
--- a/cli/administration/deploy/development/init.py
+++ b/cli/administration/deploy/development/init.py
@@ -9,6 +9,8 @@ from cli.administration.inventory.provision.services.disabler import (
parse_services_disabled,
)
from cli.meta.runtime import detect_runtime
+from plugins.filter.merge.with_defaults import merge_with_defaults
+from utils.security.deploy import deploy_inventory_overrides
from .common import make_compose
from .inventory import (
@@ -110,6 +112,11 @@ def handler(args: argparse.Namespace) -> int:
raise SystemExit("--vars must be a JSON object")
extra_vars = parsed
+ extra_vars = dict(extra_vars or {})
+ extra_vars["applications"] = merge_with_defaults(
+ extra_vars.get("applications") or {}, deploy_inventory_overrides()
+ )
+
forced_storage_constrained = (
None
if args.force_storage_constrained is None
diff --git a/cli/contributing/mirror/sync/__main__.py b/cli/contributing/mirror/sync/__main__.py
index 538d834e6a..e352a15538 100644
--- a/cli/contributing/mirror/sync/__main__.py
+++ b/cli/contributing/mirror/sync/__main__.py
@@ -70,7 +70,7 @@ def main() -> int:
"--images-per-hour",
type=_validate_positive_int,
default=None,
- help="Optional throttle: max images to mirror per hour (best-effort).",
+ help="Optional throttle: max Docker Hub copies per hour (best-effort); other registries are not throttled.",
)
args = parser.parse_args()
@@ -83,11 +83,6 @@ def main() -> int:
last_start_ts: float | None = None
for img in chain(iter_role_images(repo_root), iter_runner_images(repo_root)):
- last_start_ts = _throttle_before_next_copy(
- images_per_hour=args.images_per_hour,
- last_start_ts=last_start_ts,
- )
-
total += 1
src = f"docker://{img.source}"
dest = f"docker://{provider.image_base(img)}:{img.version}"
@@ -117,6 +112,11 @@ def main() -> int:
)
continue
+ if img.registry == "docker.io":
+ last_start_ts = _throttle_before_next_copy(
+ images_per_hour=args.images_per_hour,
+ last_start_ts=last_start_ts,
+ )
print(f"[mirror] {label}: {src} -> {dest}", flush=True)
provider.mirror(img)
diff --git a/cli/contributing/security/README.md b/cli/contributing/security/README.md
index 8c43a9dbaf..2c8d2da849 100644
--- a/cli/contributing/security/README.md
+++ b/cli/contributing/security/README.md
@@ -1,3 +1,10 @@
# Security 🛡️
-Repository-side security reports over the declared role artefacts, such as the language runtimes the pinned images ship, read from registry metadata without pulling.
+Repository-side vulnerability tooling over the pinned role images, built on the engine pipeline of [sys-ctl-hlth-runtime](../../../roles/sys-ctl-hlth-runtime/README.md).
+
+| Command | What it does |
+|---|---|
+| `make test-security` | Runs `scan`: Syft builds an SBOM of every pinned image straight from the GHCR mirror, cached by digest under `build/security/sbom`, and Trivy, Grype and OSV scan that SBOM tree with the role's threshold and suppressions. Every finding at the threshold goes to `build/test-reports/security.json`, a suppressed one with its `suppressed_until` day; the scan fails only on the unsuppressed ones. |
+| `python -m cli.contributing.security.database --dir
--engines ...` | Downloads the Trivy, Grype and OSV databases a CI deploy reads. |
+| `python -m cli.contributing.security.summary --report --counts --summary ` | Counts the failing findings of the report per image and per CVE, plus the suppressed total, into a JSON file and appends the tables to a Markdown summary. |
+| `python -m cli.contributing.security.issues --report --repo ` | Opens one `vulnerability` issue per image of the report that lists its CVEs, suppressed ones with their `suppressed_until` day, updates it while it stays, and closes it once no engine reports a CVE for the image. |
diff --git a/cli/contributing/security/database/__init__.py b/cli/contributing/security/database/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cli/contributing/security/database/__main__.py b/cli/contributing/security/database/__main__.py
new file mode 100755
index 0000000000..7f8a01367f
--- /dev/null
+++ b/cli/contributing/security/database/__main__.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+from pathlib import Path
+
+from utils.security.database import fetch_databases, fetch_url
+from utils.security.engine import SCANNERS
+from utils.security.pipeline import pipeline
+
+
+def main(argv=None) -> int:
+ parser = argparse.ArgumentParser(
+ description="Download the vulnerability databases a CI deploy reads."
+ )
+ parser.add_argument(
+ "--dir", required=True, help="Database root, one directory per engine"
+ )
+ parser.add_argument(
+ "--engines",
+ required=True,
+ nargs="+",
+ choices=SCANNERS,
+ help="Databases to download",
+ )
+ args = parser.parse_args(argv)
+ p = pipeline()
+ errors = fetch_databases(
+ p, Path(args.dir).resolve(), args.engines, p.default_runner, fetch_url
+ )
+ for error in errors:
+ print(f"❌ {error}")
+ return 1 if errors else 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/cli/contributing/security/issues/__init__.py b/cli/contributing/security/issues/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cli/contributing/security/issues/__main__.py b/cli/contributing/security/issues/__main__.py
new file mode 100755
index 0000000000..56f6b52c5a
--- /dev/null
+++ b/cli/contributing/security/issues/__main__.py
@@ -0,0 +1,264 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import json
+import subprocess
+from typing import TYPE_CHECKING, Any
+
+from utils.cache.files import read_text
+
+if TYPE_CHECKING:
+ from collections.abc import Callable, Iterable, Mapping, Sequence
+
+LABEL = "vulnerability"
+LABEL_COLOR = "B60205"
+LABEL_DESCRIPTION = "A pinned image carries a CVE at the scan threshold"
+ISSUE_LIMIT = "1000"
+GH_TIMEOUT_SECONDS = 120
+GH_FAILURES = (subprocess.CalledProcessError, subprocess.TimeoutExpired)
+COLUMNS = (
+ "id",
+ "severity",
+ "engine",
+ "role",
+ "service",
+ "package",
+ "installed",
+ "fixed",
+ "suppressed_until",
+)
+BODY_LIMIT = 60000
+
+
+def title(row: Mapping[str, Any]) -> str:
+ """Return the stable issue title of one image."""
+ return f"🛡️ {row['image']}"
+
+
+def grouped(rows: Iterable[Mapping[str, Any]]) -> dict[str, list[Mapping[str, Any]]]:
+ """Group the report rows by issue title."""
+ groups: dict[str, list[Mapping[str, Any]]] = {}
+ for row in rows:
+ groups.setdefault(title(row), []).append(row)
+ return groups
+
+
+def body(rows: Sequence[Mapping[str, Any]]) -> str:
+ """Render the issue body of one image, unsuppressed and CRITICAL rows first.
+
+ A suppressed CVE stays listed with its ``suppressed_until`` day, so the
+ issue remains open while the suppression runs. The table stops before
+ the body would exceed ``BODY_LIMIT`` and names how many rows it left out.
+ """
+ first = rows[0]
+ cves = {row["id"] for row in rows}
+ suppressed = {row["id"] for row in rows if row["suppressed_until"]}
+ head = [
+ (
+ f"`{first['image']}` carries {len(cves)} CVE(s) at the scan threshold, "
+ f"{len(suppressed)} of them suppressed."
+ ),
+ "",
+ f"Mirror: `{first['mirror']}@{first['digest']}`",
+ "",
+ "| " + " | ".join(COLUMNS) + " |",
+ "|" + "---|" * len(COLUMNS),
+ ]
+ tail = [
+ "",
+ (
+ "Suppress a CVE in the owning role's `meta/services.yml` under "
+ "`.security.suppressions`, see "
+ "`docs/contributing/actions/testing/suppression.md`."
+ ),
+ ]
+ table = [
+ "| " + " | ".join(str(row[column] or "-") for column in COLUMNS) + " |"
+ for row in sorted(
+ rows,
+ key=lambda r: (
+ r["suppressed_until"] is not None,
+ r["severity"] != "CRITICAL",
+ *(str(r[c]) for c in COLUMNS),
+ ),
+ )
+ ]
+ budget = BODY_LIMIT - len("\n".join(head + tail)) - 200
+ shown = []
+ for line in table:
+ budget -= len(line) + 1
+ if budget < 0:
+ break
+ shown.append(line)
+ hidden = len(table) - len(shown)
+ if hidden:
+ shown += [
+ "",
+ f"{hidden} more row(s) are in the `vulnerability-findings` artifact of the scan run.",
+ ]
+ return "\n".join(head + shown + tail)
+
+
+def sync(
+ report: Mapping[str, Any], repo: str, gh: Callable[[Sequence[str]], str]
+) -> list[str]:
+ """Open, update and close one issue per image.
+
+ Args:
+ report: the ``make test-security`` report.
+ repo: ``owner/name``.
+ gh: runs ``gh`` with the given arguments and returns its stdout.
+
+ Returns:
+ What was done, one line per issue action; a ``failed`` line for a
+ ``gh`` call that failed, while the other issues still run. At most
+ one open issue per image survives, the others close as duplicates.
+ An image whose CVE table changed gets a comment listing its
+ unresolved CVEs and an updated body; an unchanged table leaves the
+ issue alone. An issue is only closed when the scan reported no
+ error, so an image that failed to scan keeps its issue open.
+ """
+ gh(
+ [
+ "label",
+ "create",
+ LABEL,
+ "--repo",
+ repo,
+ "--color",
+ LABEL_COLOR,
+ "--description",
+ LABEL_DESCRIPTION,
+ "--force",
+ ]
+ )
+ issues = json.loads(
+ gh(
+ [
+ "issue",
+ "list",
+ "--repo",
+ repo,
+ "--label",
+ LABEL,
+ "--state",
+ "open",
+ "--json",
+ "number,title,body",
+ "--limit",
+ ISSUE_LIMIT,
+ ]
+ )
+ )
+ actions = []
+ existing: dict[str, Mapping[str, Any]] = {}
+ for issue in sorted(issues, key=lambda issue: issue["number"]):
+ kept = existing.setdefault(issue["title"], issue)
+ if kept is not issue:
+ args = [
+ "issue",
+ "close",
+ str(issue["number"]),
+ "--repo",
+ repo,
+ "--comment",
+ f"Duplicate of #{kept['number']}: one issue per image.",
+ ]
+ actions.append(
+ attempt(
+ gh, args, f"closed duplicate #{issue['number']} {issue['title']}"
+ )
+ )
+ groups = grouped(report["findings"])
+ for name, rows in sorted(groups.items()):
+ text = body(rows)
+ issue = existing.get(name)
+ if issue is None:
+ args = [
+ "issue",
+ "create",
+ "--repo",
+ repo,
+ "--title",
+ name,
+ "--label",
+ LABEL,
+ "--body",
+ text,
+ ]
+ actions.append(attempt(gh, args, f"opened {name}"))
+ continue
+ number = str(issue["number"])
+ if normalized(issue.get("body") or "") == normalized(text):
+ actions.append(f"unchanged #{number} {name}")
+ continue
+ comment = [
+ "issue",
+ "comment",
+ number,
+ "--repo",
+ repo,
+ "--body",
+ f"Still unresolved:\n\n{text}",
+ ]
+ actions.append(attempt(gh, comment, f"commented #{number} {name}"))
+ edit = ["issue", "edit", number, "--repo", repo, "--body", text]
+ actions.append(attempt(gh, edit, f"updated #{number} {name}"))
+ if report["errors"]:
+ return actions
+ for name, issue in sorted(existing.items()):
+ if name not in groups:
+ args = [
+ "issue",
+ "close",
+ str(issue["number"]),
+ "--repo",
+ repo,
+ "--comment",
+ "No engine reports a CVE at the threshold for this image any more.",
+ ]
+ actions.append(attempt(gh, args, f"closed #{issue['number']} {name}"))
+ return actions
+
+
+def normalized(text: str) -> str:
+ return "\n".join(
+ line.rstrip() for line in text.replace("\r\n", "\n").strip().splitlines()
+ )
+
+
+def attempt(gh: Callable[[Sequence[str]], str], args: Sequence[str], done: str) -> str:
+ try:
+ gh(args)
+ except GH_FAILURES as exc:
+ return f"failed {done}: {exc}"
+ return done
+
+
+def run_gh(args: Sequence[str]) -> str:
+ return subprocess.run(
+ ["gh", *args],
+ capture_output=True,
+ text=True,
+ check=True,
+ timeout=GH_TIMEOUT_SECONDS,
+ ).stdout
+
+
+def main(argv=None) -> int:
+ parser = argparse.ArgumentParser(
+ description="Mirror the make test-security report into GitHub issues."
+ )
+ parser.add_argument("--report", required=True, help="The make test-security report")
+ parser.add_argument("--repo", required=True, help="owner/name")
+ args = parser.parse_args(argv)
+ report = json.loads(read_text(args.report))
+ lines = sync(report, args.repo, run_gh)
+ for line in lines:
+ print(line)
+ return 1 if any(line.startswith("failed ") for line in lines) else 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/cli/contributing/security/runtimes/__init__.py b/cli/contributing/security/runtimes/__init__.py
deleted file mode 100644
index eec6d4835a..0000000000
--- a/cli/contributing/security/runtimes/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from pathlib import Path
-
-PROJECT_ROOT: Path = Path(__file__).resolve().parents[4]
-
-__all__ = ["PROJECT_ROOT"]
diff --git a/cli/contributing/security/runtimes/__main__.py b/cli/contributing/security/runtimes/__main__.py
deleted file mode 100755
index 7495c6b12d..0000000000
--- a/cli/contributing/security/runtimes/__main__.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python3
-from __future__ import annotations
-
-import argparse
-from concurrent.futures import ThreadPoolExecutor
-
-from utils.docker.image.discovery import ImageRef, iter_role_images
-from utils.docker.image.runtime import (
- build_instructions,
- load_php_floors,
- php_finding,
- php_runtime,
-)
-
-from . import PROJECT_ROOT
-
-WORKERS = 4
-OS_NAME = "linux"
-ARCHITECTURE = "amd64"
-
-
-def _instructions(ref: ImageRef) -> list[str] | None:
- return build_instructions(
- f"{ref.registry}/{ref.name}",
- ref.version,
- os_name=OS_NAME,
- architecture=ARCHITECTURE,
- )
-
-
-def report(refs: list[ImageRef], probed: list, floors: dict[str, str]) -> int:
- """Print one line per image that ships PHP and return the exit code.
-
- Args:
- refs: the pinned role images.
- probed: :func:`build_instructions` result per ref, in the same order.
- floors: see :func:`load_php_floors`.
-
- Returns:
- ``1`` when an image is below its floor or the registry gave no answer
- for one, ``0`` otherwise.
- """
- findings = 0
- unknown = []
- with_php = 0
- for ref, instructions in zip(refs, probed, strict=True):
- if instructions is None:
- unknown.append(f"{ref.role}:{ref.service} ({ref.source})")
- continue
- runtime = php_runtime(instructions)
- if runtime is None:
- continue
- with_php += 1
- if runtime.version:
- php = runtime.version
- elif runtime.lines:
- php = f"line {', '.join(runtime.lines)}"
- else:
- php = f"package {', '.join(runtime.packages)}"
- finding = php_finding(runtime, floors)
- if finding:
- findings += 1
- print(f"❌ {ref.role}:{ref.service} {ref.source} PHP {php}: {finding}")
- elif runtime.version:
- print(f"✅ {ref.role}:{ref.service} {ref.source} PHP {php}")
- else:
- print(
- f"❔ {ref.role}:{ref.service} {ref.source} PHP {php}: "
- "patch level not in the registry metadata"
- )
- for entry in unknown:
- print(f"⚠️ {entry}: the registry gave no answer")
- print(
- f"\n{len(refs)} image(s): {with_php} ship PHP, {findings} below the "
- f"floor, {len(unknown)} unanswered"
- )
- return 1 if findings or unknown else 0
-
-
-def main(argv=None) -> int:
- argparse.ArgumentParser(
- description=(
- "List the PHP runtime of every pinned role image from registry "
- "metadata, without pulling, and fail on one below its security floor."
- )
- ).parse_args(argv)
- floors = load_php_floors()
- refs = sorted(iter_role_images(PROJECT_ROOT), key=lambda r: (r.role, r.service))
- with ThreadPoolExecutor(max_workers=WORKERS) as pool:
- probed = list(pool.map(_instructions, refs))
- return report(refs, probed, floors)
-
-
-if __name__ == "__main__":
- raise SystemExit(main())
diff --git a/cli/contributing/security/scan/__init__.py b/cli/contributing/security/scan/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cli/contributing/security/scan/__main__.py b/cli/contributing/security/scan/__main__.py
new file mode 100755
index 0000000000..51359d1d6a
--- /dev/null
+++ b/cli/contributing/security/scan/__main__.py
@@ -0,0 +1,390 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import datetime as dt
+import json
+import shutil
+import tempfile
+from concurrent.futures import ThreadPoolExecutor
+from pathlib import Path
+from typing import TYPE_CHECKING, Any
+
+from utils import PROJECT_ROOT
+from utils.cache.files import read_text
+from utils.docker.image.discovery import ImageRef, iter_role_images
+from utils.docker.mirror import mirror_image
+from utils.docker.registry import image_platform_digest
+from utils.security.engine import ROLE, SBOM_BUILDER, SCANNERS
+from utils.security.pipeline import engine_image, pipeline, role_services, user_runtime
+from utils.security.suppressions import role_suppressions
+
+if TYPE_CHECKING:
+ from collections.abc import Callable, Mapping, Sequence
+ from types import ModuleType
+
+OS_NAME = "linux"
+ARCHITECTURE = "amd64"
+
+
+def mirror_ref(ref: ImageRef) -> str:
+ """Return the GHCR mirror repository of a pinned image.
+
+ Raises:
+ SystemExit: the mirror namespace cannot be resolved.
+ """
+ mirrored = mirror_image(f"{ref.registry}/{ref.name}")
+ if mirrored is None:
+ raise SystemExit(
+ "the GHCR mirror is not resolvable: set INFINITO_GHCR_MIRROR_PREFIX "
+ "and a GitHub remote or GITHUB_REPOSITORY"
+ )
+ return mirrored
+
+
+def resolve_digests(
+ refs: Sequence[ImageRef],
+ digest_of: Callable[[str, str], str | None],
+ workers: int,
+) -> tuple[dict[str, list[ImageRef]], dict[str, str], list[str]]:
+ """Group the pinned images by the digest their mirror copy serves.
+
+ Args:
+ refs: the pinned images.
+ digest_of: ``(mirror repository, tag) -> digest``.
+ workers: parallel registry requests.
+
+ Returns:
+ ``(refs by digest, mirror repository by digest, errors)``.
+ """
+ mirrors = [mirror_ref(ref) for ref in refs]
+ with ThreadPoolExecutor(max_workers=workers) as pool:
+ digests = list(
+ pool.map(
+ lambda pair: digest_of(pair[0], pair[1].version),
+ zip(mirrors, refs, strict=True),
+ )
+ )
+ grouped: dict[str, list[ImageRef]] = {}
+ sources: dict[str, str] = {}
+ errors = []
+ for ref, mirror, digest in zip(refs, mirrors, digests, strict=True):
+ if digest is None:
+ errors.append(
+ f"{ref.role}:{ref.service} {mirror}:{ref.version}: the mirror served no digest"
+ )
+ continue
+ grouped.setdefault(digest, []).append(ref)
+ sources.setdefault(digest, mirror)
+ return grouped, sources, errors
+
+
+def targets_of(p: ModuleType, grouped: Mapping[str, Sequence[ImageRef]]) -> list:
+ """Return one pipeline target per digest, owned by every role service pinning it."""
+ return [
+ p.Target(
+ key=digest.removeprefix("sha256:"),
+ kind="container",
+ ref=digest,
+ label=refs[0].source,
+ owners=tuple(sorted({(ref.role, ref.service) for ref in refs})),
+ owner_tags=tuple(
+ sorted({((ref.role, ref.service), ref.version) for ref in refs})
+ ),
+ )
+ for digest, refs in sorted(grouped.items())
+ ]
+
+
+def sbom_step(p: ModuleType, layout, target, source: str):
+ args = [
+ "scan",
+ f"registry:{source}@{target.ref}",
+ "-o",
+ f"syft-json={p.SBOM}/{target.key}.syft.json",
+ "-o",
+ f"cyclonedx-json={p.SBOM}/{target.key}.cdx.json",
+ "-q",
+ ]
+ return p.Step(
+ f"syft {target.label}",
+ p.run_argv(
+ layout,
+ SBOM_BUILDER,
+ engine_image(SBOM_BUILDER),
+ args,
+ target=None,
+ extra_env={},
+ ),
+ p.SUCCESS,
+ )
+
+
+def trivy_step(p: ModuleType, layout, target):
+ args = [
+ "sbom",
+ *p.TRIVY_COMMON,
+ "--skip-db-update",
+ "--skip-java-db-update",
+ "--cache-backend",
+ "memory",
+ "--scanners",
+ "vuln",
+ "--format",
+ "json",
+ "--output",
+ f"{p.WORK}/{target.key}.trivy.json",
+ f"{p.SBOM}/{target.key}.cdx.json",
+ ]
+ return p.Step(
+ f"trivy {target.label}",
+ p.run_argv(
+ layout, "trivy", engine_image("trivy"), args, target=None, extra_env={}
+ ),
+ p.SUCCESS,
+ )
+
+
+def grype_step(p: ModuleType, layout, target):
+ args = [
+ f"sbom:{p.SBOM}/{target.key}.syft.json",
+ "-o",
+ "json",
+ "--file",
+ f"{p.WORK}/{target.key}.grype.json",
+ "-q",
+ ]
+ return p.Step(
+ f"grype {target.label}",
+ p.run_argv(
+ layout,
+ "grype",
+ engine_image("grype"),
+ args,
+ target=None,
+ extra_env={"GRYPE_DB_AUTO_UPDATE": "false"},
+ ),
+ p.SUCCESS,
+ )
+
+
+def scan_tree(
+ p: ModuleType,
+ targets: Sequence,
+ sources: Mapping[str, str],
+ config,
+ layout,
+ runner,
+) -> tuple[list, list[str]]:
+ """Build the missing SBOMs, then run every scanner over the SBOM tree.
+
+ Returns:
+ ``(findings, errors)``.
+ """
+ images = {engine: engine_image(engine) for engine in SCANNERS}
+ databases = p.prepare_databases(config, images, layout, runner)
+ errors = p._flat(databases.values())
+ scanners = [engine for engine, lines in databases.items() if not lines]
+
+ pending = [
+ target
+ for target in targets
+ if not all(path.is_file() for path in p.sbom_paths(layout, target))
+ ]
+ results = p.run_lanes(
+ [[sbom_step(p, layout, target, sources[target.ref])] for target in pending],
+ runner,
+ config.workers,
+ )
+ errors += p._flat(results)
+ failed = {
+ target.key for target, lines in zip(pending, results, strict=True) if lines
+ }
+ ready = [target for target in targets if target.key not in failed]
+
+ lanes = []
+ for target in ready:
+ if "trivy" in scanners:
+ lanes.append([trivy_step(p, layout, target)])
+ if "grype" in scanners:
+ lanes.append([grype_step(p, layout, target)])
+ if "osv" in scanners and ready:
+ for target in ready:
+ cdx = p.sbom_paths(layout, target)[1]
+ (layout.work / f"{target.key}.osv.cdx.json").write_text(
+ json.dumps(p.osv_sbom(json.loads(read_text(str(cdx))))),
+ encoding="utf-8",
+ )
+ lanes.append([p.osv_sbom_step(layout, images["osv"], ready, config)])
+ errors += p._flat(p.run_lanes(lanes, runner, config.workers))
+
+ findings = []
+ for target in ready:
+ for engine, parse in (("trivy", p.parse_trivy), ("grype", p.parse_grype)):
+ report = layout.work / f"{target.key}.{engine}.json"
+ if engine in scanners and report.is_file():
+ findings += parse(json.loads(read_text(str(report))), target.key)
+ batched = layout.work / "osv.json"
+ if batched.is_file():
+ by_file = {
+ f"{p.WORK}/{target.key}.osv.cdx.json": target.key for target in ready
+ }
+ findings += p.parse_osv(
+ json.loads(read_text(str(batched))), by_file.__getitem__
+ )
+ return findings, errors
+
+
+def suppressions_of(p: ModuleType, roles: Sequence[str]):
+ """Return the declared suppressions of *roles*, keyed by role and service."""
+ return p.Suppressions(
+ containers={
+ role: {
+ service: tuple(
+ p.Suppression(
+ id=entry.id, image_tag=entry.image_tag, until=entry.until
+ )
+ for entry in entries
+ )
+ for service, entries in role_suppressions(
+ PROJECT_ROOT / "roles", role
+ ).items()
+ }
+ for role in sorted(set(roles))
+ },
+ host={},
+ )
+
+
+def report_rows(verdicts: Sequence, sources: Mapping[str, str]) -> list[dict[str, Any]]:
+ """Return every verdict as a row for the issue tracker.
+
+ A suppressed row carries the suppression's last day in
+ ``suppressed_until``; a failing row carries ``None`` there.
+ """
+ rows = []
+ for verdict in verdicts:
+ finding = verdict.finding
+ role, service = verdict.owner
+ rows.append(
+ {
+ "engine": finding.engine,
+ "role": role,
+ "service": service,
+ "image": verdict.target.label,
+ "mirror": sources[verdict.target.ref],
+ "digest": verdict.target.ref,
+ "id": finding.id,
+ "ids": list(finding.ids),
+ "severity": finding.severity,
+ "package": finding.package,
+ "installed": finding.installed,
+ "fixed": finding.fixed,
+ "suppressed_until": (
+ verdict.rule.until.isoformat() if verdict.suppressed else None
+ ),
+ }
+ )
+ return rows
+
+
+def failing(rows: Sequence[Mapping[str, Any]]) -> list[Mapping[str, Any]]:
+ """Return the rows no suppression covers."""
+ return [row for row in rows if row["suppressed_until"] is None]
+
+
+def scan_config(p: ModuleType, workers: int):
+ runtime = role_services()["runtime"]
+ return p.scan_config(
+ {
+ "targets": ["container"],
+ "engines": [*SCANNERS, SBOM_BUILDER],
+ "severity": runtime["severity"],
+ "fixed_only": runtime["fixed_only"],
+ "workers": workers,
+ "db_update": True,
+ }
+ )
+
+
+def main(argv=None) -> int:
+ parser = argparse.ArgumentParser(
+ description=(
+ "Build a Syft SBOM of every pinned role image straight from the GHCR "
+ "mirror, cached by digest, and scan the SBOM tree with Trivy, Grype "
+ f"and OSV at the threshold and suppressions of {ROLE}."
+ )
+ )
+ parser.add_argument("--cache-dir", required=True, help="SBOM tree and databases")
+ parser.add_argument(
+ "--report", required=True, help="JSON file the failing findings go to"
+ )
+ parser.add_argument(
+ "--workers", required=True, type=int, help="Parallel engine runs"
+ )
+ args = parser.parse_args(argv)
+
+ p = pipeline()
+ config = scan_config(p, args.workers)
+ refs = sorted(
+ iter_role_images(PROJECT_ROOT), key=lambda ref: (ref.role, ref.service)
+ )
+ grouped, sources, errors = resolve_digests(
+ refs,
+ lambda image, tag: image_platform_digest(
+ image, tag, os_name=OS_NAME, architecture=ARCHITECTURE
+ ),
+ config.workers,
+ )
+ targets = targets_of(p, grouped)
+ cache = Path(args.cache_dir).resolve()
+ (cache / "sbom").mkdir(parents=True, exist_ok=True)
+ work = Path(tempfile.mkdtemp(prefix="run-", dir=cache))
+ try:
+ layout = p.Layout(
+ runtime=user_runtime(),
+ databases=cache / "db",
+ sbom=cache / "sbom",
+ work=work,
+ excludes=(),
+ )
+ findings, scan_errors = scan_tree(
+ p, targets, sources, config, layout, p.default_runner
+ )
+ p.prune_sboms(layout, targets)
+ finally:
+ shutil.rmtree(work)
+ errors += scan_errors
+ judged = p.verdicts(
+ findings,
+ {target.key: target for target in targets},
+ config,
+ suppressions_of(p, [ref.role for ref in refs]),
+ dt.datetime.now(tz=dt.UTC).date(),
+ )
+ rows = report_rows(judged, sources)
+ report = Path(args.report)
+ report.parent.mkdir(parents=True, exist_ok=True)
+ report.write_text(
+ json.dumps({"findings": rows, "errors": errors}, indent=2), encoding="utf-8"
+ )
+ for verdict in judged:
+ line = f"{verdict.where()}: {verdict.detail()}"
+ print(
+ f"ℹ️ {line} suppressed until {verdict.rule.until}"
+ if verdict.suppressed
+ else f"❌ {line}"
+ )
+ for error in errors:
+ print(f"❌ {error}")
+ failures = failing(rows)
+ print(
+ f"\n{len(refs)} pinned image(s), {len(targets)} digest(s), "
+ f"{len(failures)} failing and {len(rows) - len(failures)} suppressed "
+ f"finding(s), {len(errors)} error(s)"
+ )
+ return 1 if failures or errors else 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/cli/contributing/security/summary/__init__.py b/cli/contributing/security/summary/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/cli/contributing/security/summary/__main__.py b/cli/contributing/security/summary/__main__.py
new file mode 100755
index 0000000000..3bd7f1b223
--- /dev/null
+++ b/cli/contributing/security/summary/__main__.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import json
+from pathlib import Path
+from typing import TYPE_CHECKING, Any
+
+from utils.cache.files import read_text
+
+if TYPE_CHECKING:
+ from collections.abc import Iterable, Mapping
+
+TOP = 25
+
+
+def counts(report: Mapping[str, Any]) -> dict[str, Any]:
+ """Count the failing findings of a ``make test-security`` report.
+
+ Returns:
+ ``findings``, ``suppressed`` and ``errors`` totals, plus per image and
+ per CVE the distinct CVEs or images and the failing rows behind them.
+ """
+ images: dict[str, dict[str, set[str] | int]] = {}
+ cves: dict[str, dict[str, set[str] | int]] = {}
+ failing = [row for row in report["findings"] if row["suppressed_until"] is None]
+ for row in failing:
+ image = images.setdefault(row["image"], {"cves": set(), "findings": 0})
+ image["cves"].add(row["id"])
+ image["findings"] += 1
+ cve = cves.setdefault(row["id"], {"images": set(), "findings": 0})
+ cve["images"].add(row["image"])
+ cve["findings"] += 1
+ return {
+ "findings": len(failing),
+ "suppressed": len(report["findings"]) - len(failing),
+ "errors": len(report["errors"]),
+ "per_image": {
+ name: {"cves": len(entry["cves"]), "findings": entry["findings"]}
+ for name, entry in sorted(images.items())
+ },
+ "per_cve": {
+ name: {"images": len(entry["images"]), "findings": entry["findings"]}
+ for name, entry in sorted(cves.items())
+ },
+ }
+
+
+def _table(
+ title: str, rows: Iterable[tuple[str, int, int]], columns: tuple[str, str, str]
+) -> list[str]:
+ lines = [f"### {title}", "", f"| {' | '.join(columns)} |", "|---|---|---|"]
+ lines.extend(f"| `{name}` | {first} | {second} |" for name, first, second in rows)
+ return [*lines, ""]
+
+
+def markdown(summary: Mapping[str, Any]) -> str:
+ """Render :func:`counts` as a job summary, largest first."""
+ per_image = sorted(
+ summary["per_image"].items(), key=lambda item: (-item[1]["cves"], item[0])
+ )
+ per_cve = sorted(
+ summary["per_cve"].items(), key=lambda item: (-item[1]["images"], item[0])
+ )
+ lines = [
+ "## 🔬 Vulnerability scan of the mirror",
+ "",
+ (
+ f"{summary['findings']} failing finding(s) in {len(per_image)} image(s), "
+ f"{len(per_cve)} CVE(s), {summary['suppressed']} suppressed finding(s), "
+ f"{summary['errors']} scan error(s)."
+ ),
+ "",
+ ]
+ lines += _table(
+ f"Images (top {TOP})",
+ ((name, entry["cves"], entry["findings"]) for name, entry in per_image[:TOP]),
+ ("image", "CVEs", "findings"),
+ )
+ lines += _table(
+ f"CVEs (top {TOP})",
+ ((name, entry["images"], entry["findings"]) for name, entry in per_cve[:TOP]),
+ ("CVE", "images", "findings"),
+ )
+ return "\n".join(lines)
+
+
+def main(argv=None) -> int:
+ parser = argparse.ArgumentParser(
+ description="Count the findings of a make test-security report per image and per CVE."
+ )
+ parser.add_argument("--report", required=True, help="The make test-security report")
+ parser.add_argument("--counts", required=True, help="JSON file the counts go to")
+ parser.add_argument(
+ "--summary", required=True, help="Markdown file the summary is appended to"
+ )
+ args = parser.parse_args(argv)
+ summary = counts(json.loads(read_text(args.report)))
+ Path(args.counts).write_text(json.dumps(summary, indent=2), encoding="utf-8")
+ with Path(args.summary).open("a", encoding="utf-8") as handle:
+ handle.write(markdown(summary) + "\n")
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/cli/meta/ci/validate.py b/cli/meta/ci/validate.py
index 1bdbb60715..1c4a8ba51a 100644
--- a/cli/meta/ci/validate.py
+++ b/cli/meta/ci/validate.py
@@ -149,6 +149,9 @@ def problems(
continue
deployed = matrix.with_deployed_services(discovered[(pin.app, variant)])
try:
+ row_architectures = axes.row_architectures(
+ pin.app, architectures, deployed["services"]
+ )
axes.check_pins(
pin.app,
"" if variant is None else str(variant),
@@ -164,8 +167,9 @@ def problems(
vpn_mode=vpn_mode,
distros=distros,
filesystems=filesystems,
- architectures=axes.row_architectures(
- pin.app, architectures, deployed["services"]
+ architectures=row_architectures,
+ pairs=axes.row_pairs(
+ pin.app, distros, row_architectures, deployed["services"]
),
)
except SystemExit as refusal:
diff --git a/compose.yml b/compose.yml
index 1d15c923ae..51a4a3bd36 100644
--- a/compose.yml
+++ b/compose.yml
@@ -69,6 +69,12 @@ services:
single source of truth}
- infinito:${INFINITO_DIR_VAR_LIB:?Run 'make dotenv' to generate the .env single source of truth}/
- letsencrypt:/etc/letsencrypt/
+ - type: bind
+ source: ${INFINITO_VULNERABILITY_DB_HOST_PATH:?Run 'make dotenv' to generate the .env single source of truth}
+ target: ${INFINITO_VULNERABILITY_DB_DIR:?Run 'make dotenv' to generate the .env single source of truth}
+ read_only: true
+ bind:
+ create_host_path: true
environment:
INFINITO_API_ANTHROPIC_KEY: ${INFINITO_API_ANTHROPIC_KEY}
diff --git a/compose/swarm/compose.yml b/compose/swarm/compose.yml
index 86b26d8d76..805c8d44c1 100644
--- a/compose/swarm/compose.yml
+++ b/compose/swarm/compose.yml
@@ -20,6 +20,13 @@ x-node: &node
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /lib/modules:/lib/modules:ro
+ - &vulnerability-db
+ type: bind
+ source: ${INFINITO_VULNERABILITY_DB_HOST_PATH:?run make dotenv first}
+ target: ${INFINITO_VULNERABILITY_DB_DIR:?run make dotenv first}
+ read_only: true
+ bind:
+ create_host_path: true
extra_hosts:
- "${MGR:?run utils/topology/export.sh first}:${INFINITO_SWARM_MGR_IP:?run utils/topology/export.sh first}"
- "${WRK1:?run utils/topology/export.sh first}:${INFINITO_SWARM_WRK1_IP:?run utils/topology/export.sh first}"
@@ -35,6 +42,7 @@ services:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /lib/modules:/lib/modules:ro
+ - *vulnerability-db
- "nfs-export:${NFS_EXPORT_BASE:?run utils/topology/export.sh first}"
networks:
lab:
diff --git a/compose/swarm/playbook.yml b/compose/swarm/playbook.yml
index 7a6846194d..a05c625eaa 100644
--- a/compose/swarm/playbook.yml
+++ b/compose/swarm/playbook.yml
@@ -188,7 +188,7 @@
when: lab_dns_node
- name: pack the repo once on the controller
- command: tar -C {{ lab_repo_root }} -cf {{ lab_runner_temp }}/infinito-src.tar .
+ command: tar -C {{ lab_repo_root }} --exclude=./build/vulnerability-db -cf {{ lab_runner_temp }}/infinito-src.tar .
timeout: 300
delegate_to: localhost
run_once: true
diff --git a/default.env b/default.env
index e6b34c83b6..48ce2bb018 100644
--- a/default.env
+++ b/default.env
@@ -37,6 +37,9 @@ INFINITO_APP_VARIANTS=
# Ubuntu mirrors in failover order for image apt; the package-cache takes the first as primary, the second as fallback.
INFINITO_APT_UBUNTU_MIRRORS="http://de.archive.ubuntu.com/ubuntu/ http://ftp.halifax.rwth-aachen.de/ubuntu/ http://archive.ubuntu.com/ubuntu/"
+# Ubuntu ports mirrors (arm64) in failover order for image apt; ports.ubuntu.com is the only ports host the archive mirrors do not carry.
+INFINITO_APT_UBUNTU_PORTS_MIRRORS="http://ports.ubuntu.com/ubuntu-ports/ http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports/ http://mirrors.dotsrc.org/ubuntu-ports/"
+
# The CPU architecture the deploy matrix assigned one row; empty draws from INFINITO_ARCHITECTURES.
INFINITO_ARCHITECTURE=
@@ -449,6 +452,15 @@ INFINITO_VENV_DIR=/opt/venvs/infinito
# WireGuard axis of the CI deploy matrix: auto rotates the mesh over the swarm rows, enforced meshes all, disabled meshes none.
INFINITO_VPN=auto
+# Where the dev and CI stacks see the vulnerability databases, mounted read-only.
+INFINITO_VULNERABILITY_DB_DIR=/opt/vulnerability-db
+
+# Host directory every local stack shares for the vulnerability databases.
+INFINITO_VULNERABILITY_DB_HOST_PATH=/var/cache/infinito/core/cache/vulnerability-db
+
+# Engine (trivy, grype, osv) a CI row pins, with its databases provided; empty draws one and refreshes the shared databases.
+INFINITO_VULNERABILITY_ENGINE=
+
# Seconds 'make up' waits for the infinito container healthcheck before failing.
INFINITO_WAIT_HEALTH_TIMEOUT_S=600
diff --git a/docs/architecture/decisions/0002-ci-architecture-axis.md b/docs/architecture/decisions/0002-ci-architecture-axis.md
index 2ab4c8dba9..50a90c2381 100644
--- a/docs/architecture/decisions/0002-ci-architecture-axis.md
+++ b/docs/architecture/decisions/0002-ci-architecture-axis.md
@@ -61,6 +61,13 @@ machine, not just a value the job applies to itself.
role the deploy planner brings up for that variant, because the deploy pulls
those in too; an empty intersection aborts the matrix.
+- **A package may narrow one distro and architecture pair.** A distro entry in
+ `meta/packages.yml` may declare `architectures` when its source publishes
+ nothing elsewhere, such as a Flathub app shipped for x86_64 only. The row
+ keeps both architectures; a draw of the unpublished pair moves to another
+ architecture of the same distro, a pin naming it aborts the matrix, and
+ `package_install` refuses it by name on a host before any module runs.
+
- **CI images are built natively per architecture and published as one tag per
distro.** Each architecture builds on its own runner, and
[push.sh](../../../scripts/image/push.sh) pushes the result by digest only, so
diff --git a/docs/contributing/actions/testing.md b/docs/contributing/actions/testing.md
index 43ba22150d..cb9b8dc639 100644
--- a/docs/contributing/actions/testing.md
+++ b/docs/contributing/actions/testing.md
@@ -25,6 +25,7 @@ Use the following table to choose the right lint, syntax, unit, integration, or
| Unit tests | `make test-unit` | Runs the unit test suite. | Use this when you changed Python logic or other isolated code paths. |
| Integration tests | `make test-integration` | Runs the integration test suite. | Use this when your change affects behavior across modules or runtime boundaries. |
| External tests | `make test-external` | Runs opt-in tests that depend on live third-party systems such as public registries. | Use this when you need live external verification. It is intentionally excluded from `make test`. |
+| Security tests | `make test-security` | Builds a Syft SBOM of every pinned role image from the GHCR mirror and scans it with Trivy, Grype and OSV at the threshold of `sys-ctl-hlth-runtime`. | Use this when you bump or add an image pin. It is excluded from `make test` and runs daily in `cron-images-mirror-all.yml`. |
| Combined validation | `make test` | Runs the main combined validation flow without the opt-in external suite. | Use this whenever a change touches at least one file that is not `.md` or `.rst`, or before opening a Pull Request. |
## Local Deploy and End-to-End Checks 🚀
diff --git a/docs/contributing/actions/testing/suppression.md b/docs/contributing/actions/testing/suppression.md
index 5a46f36401..1263412f0a 100644
--- a/docs/contributing/actions/testing/suppression.md
+++ b/docs/contributing/actions/testing/suppression.md
@@ -51,6 +51,7 @@ The placement rule is per check. The catalog "Position" column uses these labels
| `docker-version` | same or above | [test_image_versions.py](../../../../tests/external/update/docker/test_image_versions.py), [test_semver_pinning.py](../../../../tests/lint/ansible/services/test_semver_pinning.py) | Skips both the live version-update warning and the non-semver-pin lint for that image's `version:` key. |
| `repository-version` | same or above | [test_repository_versions.py](../../../../tests/external/update/repository/test_repository_versions.py), [test_semver_pinning.py](../../../../tests/lint/ansible/services/test_semver_pinning.py) | Skips both the live ref-update warning and the non-semver-pin lint for that entity's `ref:` key. |
| `version-source` | same or above | [test_version_sources.py](../../../../tests/external/update/source/test_version_sources.py) | Skips the live update warning for a pin that declares its upstream in an `update:` block. |
+| `cve` | line above | [test_cve_suppressions.py](../../../../tests/lint/ansible/services/test_cve_suppressions.py), [script.py](../../../../roles/sys-ctl-hlth-runtime/files/python/script.py) | Accepts one `.security.suppressions` entry plus `until: YYYY-MM-DD` in the owning role's `meta/services.yml`: `id: CVE-YYYY-NNNN` accepts that CVE, `image_tag` every finding of the service's image while it runs that tag, and the tag MUST equal the service's `version`; the image updater drops it when it moves the service to another version. The marker MUST carry the reason, and the vulnerability scan of `sys-ctl-hlth-runtime` and `make test-security` skip the entry's findings for that role's service until the date passes. Host suppressions are the `id` entries under the engine entries of `sys-ctl-hlth-runtime`; an `image_tag` entry there covers the engine's own image. |
| `unwatched-version` | same or above | [test_version_pins_are_watched.py](../../../../tests/lint/repository/test_version_pins_are_watched.py) | Accepts a semver pin that no updater bumps. The marker MUST carry a reason naming why the version stays where it is. |
| `dockerfile-arg-default` | same or above | [test_arg_without_default.py](../../../../tests/lint/docker/dockerfile/test_arg_without_default.py) | Allows the marked `ARG` to carry a default. The caller normally supplies every build argument so a missing one fails the build instead of selecting a base image nobody chose. |
| `dockerfile-pip-pin` | same or above | [test_pip_no_version_pins.py](../../../../tests/lint/docker/dockerfile/test_pip_no_version_pins.py) | Allows a role Dockerfile to pin an exact version inside a `pip install`. The pin normally lives in a `requirements.txt` or `pyproject.toml` under the role's `files/` and is installed with `pip install -r`, so dependabot's `pip` ecosystem can raise it. |
diff --git a/docs/contributing/environment/cache.md b/docs/contributing/environment/cache.md
index d8bf013bb2..b7846ad5c8 100644
--- a/docs/contributing/environment/cache.md
+++ b/docs/contributing/environment/cache.md
@@ -162,6 +162,10 @@ The token lives in the untracked `custom.env` and `.env`. `docker compose config
Cache state persists under `/var/cache/infinito/core/cache/`. Paths are configurable via the env scripts above.
+## Vulnerability Databases 🔬
+
+Every development stack and every swarm lab node mounts `INFINITO_VULNERABILITY_DB_HOST_PATH` read-only at `INFINITO_VULNERABILITY_DB_DIR`. A local deploy draws one engine and refreshes that engine's and Grype's database there once a day, under a lock file inside that directory, before the deploy starts; the stacks never download one. An act run binds the directory into its job container at the same path, and a refresh as root hands its files to the directory's owner. A CI deploy job points the variable at the databases it restored from the Actions cache instead. See [sys-ctl-hlth-runtime](../../../roles/sys-ctl-hlth-runtime/README.md).
+
## Adding a New Upstream ➕
When a new package manager or upstream needs caching:
diff --git a/docs/requirements/070-hlth-runtime-vulnerability-engines.md b/docs/requirements/070-hlth-runtime-vulnerability-engines.md
new file mode 100644
index 0000000000..546bcf3b89
--- /dev/null
+++ b/docs/requirements/070-hlth-runtime-vulnerability-engines.md
@@ -0,0 +1,46 @@
+# 070 - sys-ctl-hlth-runtime: Vulnerability Engines Instead of Version Floors
+
+## User Story
+
+As an operator, I want every node to scan its host and its running container images with Trivy, Grype and OSV-Scanner over a Syft SBOM, so that a real, fixable vulnerability is reported, and the daily mirror scan fails on it, instead of a deploy failing on a distribution build whose upstream version number looks old.
+
+Issue: [#1324](https://github.com/infinito-nexus/core/issues/1324).
+
+## Acceptance Criteria
+
+- [ ] `HEALTH_RUNTIME_FLOORS`, `floor_violation`, `make security-runtimes`, `cli/contributing/security/runtimes` and `utils/docker/image/runtime.py` are gone, and the `php_hardening` check of `expose_php` and `session.upload_progress.enabled` still runs for every service that mounts `php_hardening`.
+- [ ] `roles/sys-ctl-hlth-runtime/meta/services.yml` pins Trivy, Grype, OSV-Scanner and Syft as services with `image` and a semver `version`, so the GHCR mirror copies them.
+- [ ] The same file holds the scan configuration: `targets` `[host, container]`, `engines` `[trivy, grype, osv, syft]`, the `severity` mapping `{CRITICAL: fail, HIGH: warn}`, `fixed_only: true`, `workers`, `db_update`, `cache_dir` and `database_dir`, with no default fallback in the role. The script rejects a `severity` list, an empty mapping, an unknown severity and any action other than `fail` or `warn`.
+- [ ] The `container` target is the image of every container running on the node, read through the read-only Docker socket; the `host` target is the host root filesystem mounted read-only, without `/proc`, `/sys`, `/dev`, `/run`, `/tmp`, the Docker root, the backups, the NFS export and the vulnerability cache.
+- [ ] In swarm every node scans its own containers and its own host.
+- [ ] Syft builds one SBOM per target; Grype and OSV-Scanner read that SBOM and Trivy reads the target itself; without `syft` in `engines`, Grype and OSV-Scanner read the target directly.
+- [ ] OSV-Scanner reads a CycloneDX copy whose `deb` and `apk` purls name the source package, so `libssl3` is matched as `openssl` and `php8.1-cli` as `php8.1`.
+- [ ] A configuration with `osv` and the `host` target but without `syft` is rejected, because OSV-Scanner reads no OS packages of a plain directory.
+- [ ] A runtime built from source, such as PHP 8.4.26 in an official `php` image, fails the scan with the CRITICAL CVE-2026-109618 and warns on the HIGH CVE-2026-109619, both fixed in 8.4.27: only Grype sees it, through the CPE of Syft's binary classifier, so with `syft` in `engines` and `grype` not, Grype still scans the binary-classified packages of every SBOM, and a configuration with neither `grype` nor `syft` is rejected.
+- [ ] Targets times engines run in parallel, bounded by `workers`; Trivy runs one target at a time and OSV-Scanner reads every SBOM in one run.
+- [ ] Each engine's JSON becomes findings of engine, target, image or host, package, installed version, fixed version, vulnerability ids and severity; OSV maps the group's CVSS score to a severity and takes the fixed version from the affected ranges of the same package.
+- [ ] An unsuppressed finding whose severity maps to `fail` is a `❌` line naming engine, target and CVE and fails `sys-ctl-hlth-runtime.service`, the deploy through `sys-service-terminator` and the OnFailure alert; one that maps to `warn` is a `⚠️` line and does not fail the service; a suppressed one is an `ℹ️` line. The mapping is the same in production and CI, and no deploy variant overrides it. An engine error, a missing database or a PHP hardening violation fails the service too. The daily `scan` job of `cron-images-mirror-all.yml` fails on every unsuppressed mapped finding, `fail` and `warn` alike.
+- [ ] Every finding at the threshold becomes one record per owner with `run_id`, `timestamp` (RFC 3339, UTC), `host`, `environment`, `target`, `kind`, `image` (`@` for a container, the host name for the host), `scanner`, `id`, `severity`, `package`, `installed_version`, `fixed_version`, `suppressed`, `suppressed_until` and `verdict` (`fail`, `warn` or `suppressed`), and the four outputs below are built from these records.
+- [ ] `report.json` in `DIR_HEALTH_RUNTIME_REPORT` (`/var/lib/infinito/hlth-runtime`) holds the summary and the records of the last run and is replaced atomically.
+- [ ] `findings.jsonl` in `DIR_HEALTH_RUNTIME_LOG` (`/var/log/infinito/hlth-runtime`) gets one JSON line per record on every run, appended; the role installs logrotate and a drop-in that rotates it weekly, keeps 12 compressed generations and skips a missing or empty file.
+- [ ] The journal gets one prefix-free JSON line per target, `{"event": "hlth_runtime.target", "run_id", "target", "kind", "image", "counts": {"fail", "warn", "suppressed"}, "verdict": "fail|warn|ok"}`, and last `{"event": "hlth_runtime.summary", "run_id", "counts", "errors", "verdict"}`, next to the human-readable lines.
+- [ ] While `web-app-prometheus` is deployed, the role passes `--metrics-file` and the check replaces `infinito_hlth_runtime.prom` in `DIR_METRICS_TEXTFILE` atomically with `infinito_hlth_runtime_findings{target,kind,image,severity,scanner,verdict}` (a count, no CVE label), `infinito_hlth_runtime_last_run_timestamp_seconds`, `infinito_hlth_runtime_last_run_success` (1 when the run did not fail) and `infinito_hlth_runtime_scanner_errors{scanner}`, each with `# HELP` and `# TYPE` and escaped label values; without the flag no textfile is written.
+- [ ] A database refresh or a provided database that is missing fails the service loudly, and OSV-Scanner reporting no database for an ecosystem is an error.
+- [ ] The timer runs daily at 00:00 UTC and the deploy-time run stays.
+- [ ] A suppression is `services..security.suppressions` of the owning role, each entry either `id: CVE-YYYY-NNNN` or a quoted `image_tag`, plus `until: YYYY-MM-DD`, with a `# nocheck: cve ` marker directly above it.
+- [ ] An `id` entry suppresses that CVE; an `image_tag` entry suppresses every finding of the service's container while the scanned image runs that tag, and a container running any other tag is judged unsuppressed. The Docker image updater removes a service's `image_tag` entries, with their markers, when it moves that service to another version.
+- [ ] A role's suppressions apply only to the containers of its own stack or compose project and service; host suppressions are the `id` entries under the engine entries of `sys-ctl-hlth-runtime` and apply to that engine's host findings, while an `image_tag` entry there covers the engine's own image.
+- [ ] `docs/contributing/actions/testing/suppression.md` lists the `cve` rule.
+- [ ] The lint under `tests/lint/` rejects a marker without a reason, a malformed id, an entry with both or neither of `id` and `image_tag`, an `image_tag` that differs from the service's `version`, a missing or past `until` and an entry without a marker.
+- [ ] Each CI deploy job draws one engine (trivy, grype or osv) by rotation; its job name carries 🔺, 🍇 or 🐙, the axis glyph is 🔬, and `utils/symbol_glossary.py` registers all four.
+- [ ] A CI deploy pins `engines` to `[syft, ]`, reads provided databases and never downloads one; the `vulnerability-db` job of `call-test-deploy.yml` downloads the Trivy, Grype and OSV databases once per day into the Actions cache, every deploy job restores the Grype database plus the drawn engine's, and a missing one fails the job.
+- [ ] A local development deploy (`make compose-deploy`, swarm through act or `make swarm-zombie`) draws one engine at random, runs it behind Syft plus the Grype runtime pass, refreshes the databases it reads once in the shared host directory `INFINITO_VULNERABILITY_DB_HOST_PATH`, and every stack and swarm node reads that directory read-only at `INFINITO_VULNERABILITY_DB_DIR`; no stack and no node downloads a database.
+- [ ] Production hosts run every engine of the list and refresh their databases daily in their own cache.
+- [ ] The deploy-time run fails on its first failure: `sys-service-terminator` does not retry a unit that sets `system_service_run_once`, and only the database refresh inside the scan is retried, three attempts 30 s apart.
+- [ ] The threshold is strict from the first run: a CRITICAL with a fix fails the check, a HIGH with a fix warns, and both fail the daily mirror scan.
+- [ ] `make test-security` builds a Syft SBOM of every pinned image of all roles straight from the GHCR mirror refs, cached by image digest, and scans that SBOM tree with Trivy, Grype and OSV at the same threshold and suppressions; it is not part of `make test`, and the alias `i8seru` runs it.
+- [ ] The `scan` job of `cron-images-mirror-all.yml` runs after `sync`, runs `make test-security`, keeps exactly one open `vulnerability` issue per image that lists its CVEs (unsuppressed first, then CRITICAL first, suppressed ones with their `suppressed_until` day so the issue stays open while a suppression runs, capped below GitHub's body limit with a pointer to the artifact) and closes any further open one as a duplicate, comments the still unresolved CVEs into it and updates its body whenever the image's CVE table changed, leaves it alone while the table is unchanged, closes it once no engine reports any CVE for it, holds `issues: write` only on that job and pins its actions like the existing jobs.
+- [ ] Every run of that job writes the failing findings per image and per CVE into the job summary and the `vulnerability-findings` artifact, and the `workflow_dispatch` input `issues: false` makes it a dry run without issue changes; the schedule keeps the issues on.
+- [ ] The measured database sizes are: Grype v6 3.2 GB unpacked, Trivy 1.6 GB without the Java database, OSV offline zips Ubuntu 806 MB, npm 220 MB, Debian 80 MB, PyPI 38 MB, and 1.24 GB for the ecosystem list in `meta/services.yml`.
+- [ ] Unit tests cover the parsers of all three engines with trimmed real output, the severity mapping and its validation, the fix-available switch, suppression scoping and expiry, the bounded parallel run with a fake runner, the CI engine pin, the exit code per verdict and each of the four outputs.
+- [ ] A negative control shows the removed floor flagging `8.1.2-1ubuntu2.28` while Trivy, Grype and OSV fixtures of that package pass, and a fixture with a fixable CRITICAL fails.
diff --git a/docs/requirements/README.md b/docs/requirements/README.md
index fac2b1bbc6..f8c5850c1a 100644
--- a/docs/requirements/README.md
+++ b/docs/requirements/README.md
@@ -3,6 +3,10 @@
This directory contains project requirements documents.
Its scope is user stories and acceptance criteria that define what the project must do and that guide agent-assisted implementation.
+## Open
+
+- [070 - sys-ctl-hlth-runtime: Vulnerability Engines Instead of Version Floors](070-hlth-runtime-vulnerability-engines.md)
+
## Archive
- 001 - Nextcloud Talk TURN relay
diff --git a/group_vars/all/05_paths.yml b/group_vars/all/05_paths.yml
index 5436be4f36..697b5770a7 100644
--- a/group_vars/all/05_paths.yml
+++ b/group_vars/all/05_paths.yml
@@ -30,6 +30,10 @@ FILE_TOKENS: "{{ [DIR_SECRETS, 'tokens.yml'] | path_join }}"
FILE_DATABASE_SECRETS: "{{ [DIR_SECRETS, 'databases.csv'] | path_join }}"
DIR_METRICS_TEXTFILE: "{{ [DIR_VAR_LIB, 'metrics'] | path_join }}"
+DIR_HEALTH_RUNTIME_REPORT: "{{ [DIR_VAR_LIB, 'hlth-runtime'] | path_join }}"
+
+DIR_LOG: "/var/log/infinito"
+DIR_HEALTH_RUNTIME_LOG: "{{ [DIR_LOG, 'hlth-runtime'] | path_join }}"
DIR_PHP_HARDENING: "/etc/{{ SOFTWARE_DOMAIN }}/php"
PHP_HARDENING_INI_DIGEST: "{{ (lookup('file', lookup('path_absolute', 'roles/sys-svc-compose-php/files/hardening.ini')) | hash('sha1'))[:8] }}"
diff --git a/group_vars/all/07_schedule.yml b/group_vars/all/07_schedule.yml
index 94f7d98759..1b7d0bcc9d 100644
--- a/group_vars/all/07_schedule.yml
+++ b/group_vars/all/07_schedule.yml
@@ -23,7 +23,7 @@ SYS_SCHEDULE_HEALTH_DOCKER_VOLUMES: "*-*-* {{ HOURS_SERVER_AWAKE }}:00:00" # Che
SYS_SCHEDULE_HEALTH_CSP_CRAWLER: "*-*-* {{ HOURS_SERVER_AWAKE }}:00:00" # Check once per hour if all CSP are fullfilled available
SYS_SCHEDULE_HEALTH_NGINX: "*-*-* {{ HOURS_SERVER_AWAKE }}:00:00" # Check once per hour if all webservices are available
SYS_SCHEDULE_HEALTH_MSMTP: "*-*-* 00:00:00" # Check once per day SMTP Server
-SYS_SCHEDULE_HEALTH_RUNTIME: "*-*-* 00:00:00" # Check once per day the PHP version and hardening of every running container
+SYS_SCHEDULE_HEALTH_RUNTIME: "*-*-* 00:00:00 UTC" # Scan the node and its containers for vulnerabilities and verify the PHP hardening once per day
SYS_SCHEDULE_CLEANUP_CERTS: "*-*-* 20:00" # Deletes and revokes unused certs once per day
SYS_SCHEDULE_CLEANUP_BACKUPS: "*-*-* 21:00" # Cleanup backups once per day, MUST be called before disc space cleanup
diff --git a/locale/aa/LC_MESSAGES/core.po b/locale/aa/LC_MESSAGES/core.po
index 30c3277e9d..34336cefb5 100644
--- a/locale/aa/LC_MESSAGES/core.po
+++ b/locale/aa/LC_MESSAGES/core.po
@@ -1940,15 +1940,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled-maintainans-rol fof full Docker Compose stack-restarts, wid har-dastar-restarts fof stack-silik Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed-monitor-for-detekti-onnu-lijene-ali-galu-konaineri-ali-raising-failure-alerts"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ab/LC_MESSAGES/core.po b/locale/ab/LC_MESSAGES/core.po
index 49548db6ff..c156f76c22 100644
--- a/locale/ab/LC_MESSAGES/core.po
+++ b/locale/ab/LC_MESSAGES/core.po
@@ -1964,16 +1964,16 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# qanakooyin Docker yihiin ugu tusheno leh ugu ilo leh waxa ka jawaabo fasiiso
# waxyarinta
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# operatoren når en monitert service enhet feiler
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/af/LC_MESSAGES/core.po b/locale/af/LC_MESSAGES/core.po
index fd36149624..044c74b9a4 100644
--- a/locale/af/LC_MESSAGES/core.po
+++ b/locale/af/LC_MESSAGES/core.po
@@ -1938,15 +1938,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-geplande onderhoudsrol vir volledige Docker Compose stap opnieuw-opstart, met hard opnieuw-opstarts vir stap-sette like Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed-monitoor vir die ontdekking van ongesonde of nul-exits-weer Dordocker-container en om fout-aanraaiwers te roep"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ak/LC_MESSAGES/core.po b/locale/ak/LC_MESSAGES/core.po
index d45e28359d..d09aa4e60e 100644
--- a/locale/ak/LC_MESSAGES/core.po
+++ b/locale/ak/LC_MESSAGES/core.po
@@ -1945,15 +1945,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled manteinace role fo full Docker Compose stack restarts, wiht hard restarts fo stacks like Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed monitor pour détecter les conteneurs Docker non sains ou ayant un état d'exécution non zéro et relayer des alertes de faillite"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# operators when a monitored service unit fails în akụkwa
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/am/LC_MESSAGES/core.po b/locale/am/LC_MESSAGES/core.po
index 0395ef1016..e57f83c6c6 100644
--- a/locale/am/LC_MESSAGES/core.po
+++ b/locale/am/LC_MESSAGES/core.po
@@ -1963,16 +1963,16 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# konteyneret ak-keşewet ʾilmi-ʾufiret ak tekkum ʾaqdam ʾuyadet
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "システmé-.timed Aleppo wal-hawskum aw ăli-zi-ştart konteyneret ak-keşewet ʾilmi-ʾufiret ak tekkum ʾaqdam ʾuyadet"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/an/LC_MESSAGES/core.po b/locale/an/LC_MESSAGES/core.po
index e6a9600615..1f75229c76 100644
--- a/locale/an/LC_MESSAGES/core.po
+++ b/locale/an/LC_MESSAGES/core.po
@@ -1874,15 +1874,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed monitor para detectar contenedores Docker inactives o con estado de salida no cero y levantar alertas de fallo"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ar/LC_MESSAGES/core.po b/locale/ar/LC_MESSAGES/core.po
index dfab0f020e..31122c05cf 100644
--- a/locale/ar/LC_MESSAGES/core.po
+++ b/locale/ar/LC_MESSAGES/core.po
@@ -2015,15 +2015,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "دور الصيانة المقرر على نطاق المنظومة Docker Compose حزمة من الراحة، مع البقايا الصلبة للوجبات الخفيفة مثل Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "رصد منتظم للكشف عن حاويات دوكر غير صحية أو غير مستخرجة من الصفر ورفع تنبيهات الفشل"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# تفشل وحدة خدمات مراقَبة
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
diff --git a/locale/as/LC_MESSAGES/core.po b/locale/as/LC_MESSAGES/core.po
index 258e11d38f..c4763777f0 100644
--- a/locale/as/LC_MESSAGES/core.po
+++ b/locale/as/LC_MESSAGES/core.po
@@ -2242,16 +2242,16 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
# ekseksjon-fel Docker container og heita feil-alertar
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
# operatorinna khi'a service unit fali
msgctxt "role:sys-ctl-alm-email:description"
diff --git a/locale/av/LC_MESSAGES/core.po b/locale/av/LC_MESSAGES/core.po
index b2a1183eef..64a5655198 100644
--- a/locale/av/LC_MESSAGES/core.po
+++ b/locale/av/LC_MESSAGES/core.po
@@ -2276,15 +2276,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
# fléppumflópurar sem flépparflópurun tekur bílum áður síðan sem
# flépparflópurun tekur bílum
diff --git a/locale/ay/LC_MESSAGES/core.po b/locale/ay/LC_MESSAGES/core.po
index efc19a1be3..d78262faaf 100644
--- a/locale/ay/LC_MESSAGES/core.po
+++ b/locale/ay/LC_MESSAGES/core.po
@@ -1892,15 +1892,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled-maintenance-rolu fo full Docker Compose stack re:startu, wi:h hard re:startu fo:stakz li:ghe Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed monitor para detectar contenedores Docker enfermos o con estado de salida no cero y levantar alertas de fallo"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# operators when a monitored service unit fails en ay
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/az/LC_MESSAGES/core.po b/locale/az/LC_MESSAGES/core.po
index 4434b5b3f7..54514f3644 100644
--- a/locale/az/LC_MESSAGES/core.po
+++ b/locale/az/LC_MESSAGES/core.po
@@ -1962,15 +1962,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Sistemləşdirilmiş təhlükəsizlik rolu Docker Compose yığını yenilənir, çərçivələr üçün sabit reaksiyalar ilə Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Xüsusi və qeyri-zero-exited Docker konteynerlərini algılamaq üçün sistemli monitor və çatışmazlığı səhifələri artırmaq"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ba/LC_MESSAGES/core.po b/locale/ba/LC_MESSAGES/core.po
index 10f3986d1f..5dd19ae582 100644
--- a/locale/ba/LC_MESSAGES/core.po
+++ b/locale/ba/LC_MESSAGES/core.po
@@ -2285,10 +2285,6 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
# Docker yang tidak sehat atau yang telah berhenti dengan kode keluaran tidak
# nol dan mengirim alert kegagalan
@@ -2296,6 +2292,10 @@ msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
# kepada pemilik operator apabila unit unit jasa yang dipantau gagal
msgctxt "role:sys-ctl-alm-email:description"
diff --git a/locale/be/LC_MESSAGES/core.po b/locale/be/LC_MESSAGES/core.po
index 4805167e97..d621385eb8 100644
--- a/locale/be/LC_MESSAGES/core.po
+++ b/locale/be/LC_MESSAGES/core.po
@@ -2039,16 +2039,16 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# zakończonych z kodem niezerowym kontenerów Docker i podnoszenie awarijnych
# powiadomień
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# wiadomości e-mail dla operatorem w przypadku uszkodzenia units monitowanych
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/bg/LC_MESSAGES/core.po b/locale/bg/LC_MESSAGES/core.po
index 25da6bed7d..66e077f5ad 100644
--- a/locale/bg/LC_MESSAGES/core.po
+++ b/locale/bg/LC_MESSAGES/core.po
@@ -1964,15 +1964,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Системно-планирана поддръжка роля за пълен Docker Compose стека рестартира, с твърди рестартира за стекове като Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Системен монитор за откриване на нездравословни или ненулеви контейнери Docker и повишаване на сигнали за неизправност"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/bh/LC_MESSAGES/core.po b/locale/bh/LC_MESSAGES/core.po
index dd9b9b1749..789fd59f02 100644
--- a/locale/bh/LC_MESSAGES/core.po
+++ b/locale/bh/LC_MESSAGES/core.po
@@ -1942,15 +1942,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-संचारित रिश्टैक्स डाल्टन फुल Docker Compose स्टै रिसत्री, हार्ड रिसत्री फॉर स्टै लिस्ट Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "सिस्टम्ड-टाइम मॉनिटर जो अजूबनीय या नैची-शेप्टिंग हॉडर कंटेंटर टाइकन को दिखावे और अवरुद्धता इलेक्टामेन्ट्स"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/bi/LC_MESSAGES/core.po b/locale/bi/LC_MESSAGES/core.po
index aa8a820bc6..54a2b87071 100644
--- a/locale/bi/LC_MESSAGES/core.po
+++ b/locale/bi/LC_MESSAGES/core.po
@@ -1922,15 +1922,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-tempsakage rol pa restart full Docker Compose stack, dengan restart susun seperti Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Système de supervision du temps pour détecter des conteneurs Docker non sains ou ayant un état d'arrêt non nul et reléguant des alertes de défaillance"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/bm/LC_MESSAGES/core.po b/locale/bm/LC_MESSAGES/core.po
index 69f946e604..fd9c82fdd7 100644
--- a/locale/bm/LC_MESSAGES/core.po
+++ b/locale/bm/LC_MESSAGES/core.po
@@ -1922,15 +1922,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled role untuk restart penuh tumpukan Docker Compose dengan restart yang keras untuk tumpukan seperti Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timded monitor untuk mendeteksi container Docker yang tidak sehat atau yang berhenti dengan kode keluaran yang tidak nol dan mengangkat alert kegagalan"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/bn/LC_MESSAGES/core.po b/locale/bn/LC_MESSAGES/core.po
index d73f39ca27..8a7b5335cb 100644
--- a/locale/bn/LC_MESSAGES/core.po
+++ b/locale/bn/LC_MESSAGES/core.po
@@ -1944,15 +1944,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "পুরো ব্যবস্থার জন্য সিস্টেমের নিরাপত্তামূলক ভূমিকা Docker Compose স্ট্যাক চিহ্নের মত কঠিন ভাবে পুনরায় আরম্ভ করা হবে Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "অটো-বিন্যস্ত ডকার ধারক সনাক্ত অথবা শূণ্য ব্যতীত সিস্টেমের সময় নিরীক্ষণ ব্যবস্থা"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/bo/LC_MESSAGES/core.po b/locale/bo/LC_MESSAGES/core.po
index f74aeef55a..6935a91a80 100644
--- a/locale/bo/LC_MESSAGES/core.po
+++ b/locale/bo/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/br/LC_MESSAGES/core.po b/locale/br/LC_MESSAGES/core.po
index f13f1ddfcb..976d8bd678 100644
--- a/locale/br/LC_MESSAGES/core.po
+++ b/locale/br/LC_MESSAGES/core.po
@@ -1937,15 +1937,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled manutenção de papel para reiniciações do Docker Compose stack completo, com reiniciações duras para stacks como Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitor do tempo de systemd para detectar contêineres Docker não saudáveis ou com saída não-zero e levantar alertas de falha"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/bs/LC_MESSAGES/core.po b/locale/bs/LC_MESSAGES/core.po
index 96ddc59767..61881e5f46 100644
--- a/locale/bs/LC_MESSAGES/core.po
+++ b/locale/bs/LC_MESSAGES/core.po
@@ -1940,15 +1940,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-organiziran posao za punjbe full Docker Compose sklop ponovnih restarta s trčnim restartima za sklope ljudi Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: ollama
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemski vremenski monitorn za otkrivanje nezdravih ili nepromirenih kontejnera Docker i površinje porazvoke upozorenja"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: ollama
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ca/LC_MESSAGES/core.po b/locale/ca/LC_MESSAGES/core.po
index a84e560c25..ba0152692d 100644
--- a/locale/ca/LC_MESSAGES/core.po
+++ b/locale/ca/LC_MESSAGES/core.po
@@ -1947,15 +1947,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Funció de manteniment equipada per al sistema Docker Compose la pila torna a iniciar, amb reiniciacions difícils com ara Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitor amb temps del sistema per detectar poc sans o no recipients a zero i alerta d' errors"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ce/LC_MESSAGES/core.po b/locale/ce/LC_MESSAGES/core.po
index 91d911f87c..6215e10db6 100644
--- a/locale/ce/LC_MESSAGES/core.po
+++ b/locale/ce/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ch/LC_MESSAGES/core.po b/locale/ch/LC_MESSAGES/core.po
index 50e2d01f70..a3fa9e6718 100644
--- a/locale/ch/LC_MESSAGES/core.po
+++ b/locale/ch/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/co/LC_MESSAGES/core.po b/locale/co/LC_MESSAGES/core.po
index 401e5b01da..851af277c4 100644
--- a/locale/co/LC_MESSAGES/core.po
+++ b/locale/co/LC_MESSAGES/core.po
@@ -1931,15 +1931,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled-maintenance-rol-la full Docker Compose-stack-restarts, con hard-restarts-la stacks con Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: ollama
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed monitor para detectar contenedores Docker que estén desfuncionales o que hayan salido con estado de salidad diferente a cero y levantar alertas de fallo"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: ollama
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/cr/LC_MESSAGES/core.po b/locale/cr/LC_MESSAGES/core.po
index 35b8f3af5b..17d7e7d8cb 100644
--- a/locale/cr/LC_MESSAGES/core.po
+++ b/locale/cr/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/cs/LC_MESSAGES/core.po b/locale/cs/LC_MESSAGES/core.po
index 3227c2c4d0..e6939e3293 100644
--- a/locale/cs/LC_MESSAGES/core.po
+++ b/locale/cs/LC_MESSAGES/core.po
@@ -1947,15 +1947,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd- plánované údržby role pro plné Docker Compose stack restartuje, s tvrdými restarty pro stohy, jako je Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd- timed monitor pro detekci nezdravých nebo ne--zero-excitovaných kontejnerů Docker a zvýšení upozornění na selhání"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/cu/LC_MESSAGES/core.po b/locale/cu/LC_MESSAGES/core.po
index fc634aa379..07f3785749 100644
--- a/locale/cu/LC_MESSAGES/core.po
+++ b/locale/cu/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/cv/LC_MESSAGES/core.po b/locale/cv/LC_MESSAGES/core.po
index a382bd9bf8..eae1e6ac53 100644
--- a/locale/cv/LC_MESSAGES/core.po
+++ b/locale/cv/LC_MESSAGES/core.po
@@ -1955,15 +1955,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: ollama
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Системный монітор systemd для підкрiзначення нездорових або з ненульним станом в Docker контейнери і викликування прозорих проблем"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: ollama
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/cy/LC_MESSAGES/core.po b/locale/cy/LC_MESSAGES/core.po
index 4fea138577..49f268f270 100644
--- a/locale/cy/LC_MESSAGES/core.po
+++ b/locale/cy/LC_MESSAGES/core.po
@@ -1898,15 +1898,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: ollama
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Sistem-timed monitor gynt gyfraithu ar etholiadau Docker yn ymdrech neu weddil-bach a chyflawn gwell a chyflawn alert o gwreiddiol"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# operators when a monitored service unit fails en cy
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/da/LC_MESSAGES/core.po b/locale/da/LC_MESSAGES/core.po
index 11da784f25..78fb7270df 100644
--- a/locale/da/LC_MESSAGES/core.po
+++ b/locale/da/LC_MESSAGES/core.po
@@ -1947,15 +1947,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "System- planlagt vedligeholdelse rolle for fuld Docker Compose stack genstarter, med hårde genstarter for stakke som Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "System- timet monitor til at opdage usunde eller non- zero-exited Docker containere og hæve fejl advarsler"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/de/LC_MESSAGES/core.po b/locale/de/LC_MESSAGES/core.po
index 50fbcbbf27..5574461fe4 100644
--- a/locale/de/LC_MESSAGES/core.po
+++ b/locale/de/LC_MESSAGES/core.po
@@ -1936,15 +1936,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled Maintenance Rolle für vollständige Docker Compose Stack Neustarts, mit harten Neustarts für Stacks wie Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed Monitor zum Erkennen ungesunder oder nicht-zero-exited Docker-Container und Auslösen von Fehlerwarnungen"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/dv/LC_MESSAGES/core.po b/locale/dv/LC_MESSAGES/core.po
index 16a8a6cbac..72ae2d0e1d 100644
--- a/locale/dv/LC_MESSAGES/core.po
+++ b/locale/dv/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/dz/LC_MESSAGES/core.po b/locale/dz/LC_MESSAGES/core.po
index 3dbfae4297..bd37bcda57 100644
--- a/locale/dz/LC_MESSAGES/core.po
+++ b/locale/dz/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ee/LC_MESSAGES/core.po b/locale/ee/LC_MESSAGES/core.po
index 861eddd100..340eb25aff 100644
--- a/locale/ee/LC_MESSAGES/core.po
+++ b/locale/ee/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/el/LC_MESSAGES/core.po b/locale/el/LC_MESSAGES/core.po
index 31072c646f..7471fe11f8 100644
--- a/locale/el/LC_MESSAGES/core.po
+++ b/locale/el/LC_MESSAGES/core.po
@@ -1954,15 +1954,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Συστηματοποιημένος προγραμματισμένος ρόλος συντήρησης για πλήρη Docker Compose επανεκκίνηση στοίβας, με σκληρή επανεκκίνηση για στοίβες όπως Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Συστημένη χρονομετρημένη οθόνη για την ανίχνευση ανθυγιεινών ή μη εξερχόμενων εμπορευματοκιβωτίων Docker και την αύξηση των σημάτων αστοχίας"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/eo/LC_MESSAGES/core.po b/locale/eo/LC_MESSAGES/core.po
index b1821e7103..b666dc5998 100644
--- a/locale/eo/LC_MESSAGES/core.po
+++ b/locale/eo/LC_MESSAGES/core.po
@@ -1948,15 +1948,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Sistem-planita funkciserva rolo por plena Docker Compose stako rekomencas, kun malmolaj rekomencoj por stakoj kiel Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Sistem-tempigita ekrano por detektado de nesana aŭ ne-nul-exited Docker-ujoj kaj kreskigado de fiasko alarmas"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/es/LC_MESSAGES/core.po b/locale/es/LC_MESSAGES/core.po
index b182a1ae6e..8101d4f64f 100644
--- a/locale/es/LC_MESSAGES/core.po
+++ b/locale/es/LC_MESSAGES/core.po
@@ -1940,15 +1940,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Función de mantenimiento programada con sistema para los reinicios completos de Docker Compose, con remanentes duros para pilas como Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitor sistematizado para detectar contenedores Docker insalubres o no extraídos y alertas de fallos"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/et/LC_MESSAGES/core.po b/locale/et/LC_MESSAGES/core.po
index f5e8cac715..0023c7d0e9 100644
--- a/locale/et/LC_MESSAGES/core.po
+++ b/locale/et/LC_MESSAGES/core.po
@@ -1947,15 +1947,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Süsteemne plaaniline hooldusfunktsioon täieliku Docker Compose virna taaskäivitamiseks koos kõva taaskäivitamisega virnadele nagu Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Süsteemne ajastatud monitor ebatervislike või nullrežiimiga Dockeri konteinerite avastamiseks ja rikkehoiatuste tõstmiseks"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/eu/LC_MESSAGES/core.po b/locale/eu/LC_MESSAGES/core.po
index a6ef0467ac..2e5b3ba63e 100644
--- a/locale/eu/LC_MESSAGES/core.po
+++ b/locale/eu/LC_MESSAGES/core.po
@@ -1947,15 +1947,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Docker Compose pilak mantentzeko sistematutako papera berrabiarazi egiten da, Mailu bezalako pilak berrabiatzeko."
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Sistematizatutako monitorea Docker-en edukiontzi ez-osasuntsuak edo ez-gehigarriak detektatzeko eta hutsegiteen abisuak jasotzeko"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/fa/LC_MESSAGES/core.po b/locale/fa/LC_MESSAGES/core.po
index d93070872a..ebe764c2b2 100644
--- a/locale/fa/LC_MESSAGES/core.po
+++ b/locale/fa/LC_MESSAGES/core.po
@@ -1944,15 +1944,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "نقش تعمیر و نگهداری سیستم شده برای پشته کامل Docker Compose دوباره شروع می شود، با شروع مجدد سخت برای پشته هایی مانند Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "نظارت بر زمان سیستم برای شناسایی ظروف Docker ناسالم یا غیر صفر و افزایش هشدار های شکست"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ff/LC_MESSAGES/core.po b/locale/ff/LC_MESSAGES/core.po
index c8e53c788a..bfdf9209b4 100644
--- a/locale/ff/LC_MESSAGES/core.po
+++ b/locale/ff/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/fi/LC_MESSAGES/core.po b/locale/fi/LC_MESSAGES/core.po
index 39e813bf04..1538ab0b67 100644
--- a/locale/fi/LC_MESSAGES/core.po
+++ b/locale/fi/LC_MESSAGES/core.po
@@ -1955,15 +1955,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systeemisesti suunniteltu huolto rooli täysi Docker Compose pino käynnistää uudelleen, kova uudelleenkäynnistys pinot kuten Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Järjestelmäaikainen valvonta epäterveellisten tai ei-poistettavien Docker-säiliöiden havaitsemiseksi ja virhehälytysten nostamiseksi"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/fj/LC_MESSAGES/core.po b/locale/fj/LC_MESSAGES/core.po
index 0921b138b4..fb727d6dd1 100644
--- a/locale/fj/LC_MESSAGES/core.po
+++ b/locale/fj/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/fo/LC_MESSAGES/core.po b/locale/fo/LC_MESSAGES/core.po
index f7c7e75746..28621bc1e4 100644
--- a/locale/fo/LC_MESSAGES/core.po
+++ b/locale/fo/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/fr/LC_MESSAGES/core.po b/locale/fr/LC_MESSAGES/core.po
index 11ffc90cfb..cd2083daa9 100644
--- a/locale/fr/LC_MESSAGES/core.po
+++ b/locale/fr/LC_MESSAGES/core.po
@@ -1936,15 +1936,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Fonction de maintenance programmée pour les redémarrages complets de la pile Docker Compose, avec des redémarrages durs pour les piles comme Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Surveillance à l'heure systémique pour détecter les contenants Docker malsains ou non périmés et pour signaler les défaillances"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/fy/LC_MESSAGES/core.po b/locale/fy/LC_MESSAGES/core.po
index 3f84240fed..6379314941 100644
--- a/locale/fy/LC_MESSAGES/core.po
+++ b/locale/fy/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ga/LC_MESSAGES/core.po b/locale/ga/LC_MESSAGES/core.po
index 6b54e24eb7..1720211877 100644
--- a/locale/ga/LC_MESSAGES/core.po
+++ b/locale/ga/LC_MESSAGES/core.po
@@ -1960,15 +1960,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Ról cothabhála córasaithe le haghaidh lán Docker Compose Atosú Stack, le atosú crua do chairn mhaith Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monatóireacht a dhéanamh ar chóras ama chun coimeádáin Docker neamhshláinte nó neamh-zero-exited bhrath agus foláirimh teip a ardú"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/gd/LC_MESSAGES/core.po b/locale/gd/LC_MESSAGES/core.po
index ed30b960c6..4fc8cda3c0 100644
--- a/locale/gd/LC_MESSAGES/core.po
+++ b/locale/gd/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/gl/LC_MESSAGES/core.po b/locale/gl/LC_MESSAGES/core.po
index 0a1db1ce1e..4784d5cd5b 100644
--- a/locale/gl/LC_MESSAGES/core.po
+++ b/locale/gl/LC_MESSAGES/core.po
@@ -1949,15 +1949,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Función de mantemento programada para reiniciar a pila completa de Docker Compose, con reinicios duros para pilas como Mailu."
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitor de tempo sistematizado para detectar recipientes Docker insalubres ou non activados de cero e aumentar as alertas de fallo."
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/gn/LC_MESSAGES/core.po b/locale/gn/LC_MESSAGES/core.po
index 199e8cb593..69e4009e83 100644
--- a/locale/gn/LC_MESSAGES/core.po
+++ b/locale/gn/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/gu/LC_MESSAGES/core.po b/locale/gu/LC_MESSAGES/core.po
index 766f0c385b..c1a4243299 100644
--- a/locale/gu/LC_MESSAGES/core.po
+++ b/locale/gu/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/gv/LC_MESSAGES/core.po b/locale/gv/LC_MESSAGES/core.po
index fd083acf35..49617bcc70 100644
--- a/locale/gv/LC_MESSAGES/core.po
+++ b/locale/gv/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ha/LC_MESSAGES/core.po b/locale/ha/LC_MESSAGES/core.po
index 64515a561b..0bd6cfabb5 100644
--- a/locale/ha/LC_MESSAGES/core.po
+++ b/locale/ha/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/he/LC_MESSAGES/core.po b/locale/he/LC_MESSAGES/core.po
index 934ca6c551..fd5353a0e9 100644
--- a/locale/he/LC_MESSAGES/core.po
+++ b/locale/he/LC_MESSAGES/core.po
@@ -1957,15 +1957,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "תפקידם של תחזוקה מלאה Docker Compose ערימה מחדש, עם חידושים קשים לערימות כמו Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "לפקח מערכתי על זיהוי של מיכלי Docker לא בריאים או לא אפסיים והעלאת התראות כישלונות"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/hi/LC_MESSAGES/core.po b/locale/hi/LC_MESSAGES/core.po
index 51b7fbc187..b94fd73611 100644
--- a/locale/hi/LC_MESSAGES/core.po
+++ b/locale/hi/LC_MESSAGES/core.po
@@ -1937,15 +1937,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "पूर्ण के लिए व्यवस्थित-scheduled रखरखाव भूमिका Docker Compose स्टैक रिस्टार्ट, जैसे स्टैक के लिए हार्ड रिस्टार्ट के साथ Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "अस्वास्थ्यकर या गैर-zero-exited डोकर कंटेनरों का पता लगाने और विफलता चेतावनी बढ़ाने के लिए व्यवस्थित समय पर निगरानी"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ho/LC_MESSAGES/core.po b/locale/ho/LC_MESSAGES/core.po
index d594cd1444..f44d4169c2 100644
--- a/locale/ho/LC_MESSAGES/core.po
+++ b/locale/ho/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/hr/LC_MESSAGES/core.po b/locale/hr/LC_MESSAGES/core.po
index 1b158c2bbb..7cf0f0b1e6 100644
--- a/locale/hr/LC_MESSAGES/core.po
+++ b/locale/hr/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ht/LC_MESSAGES/core.po b/locale/ht/LC_MESSAGES/core.po
index 0e77bdea9b..409c3be112 100644
--- a/locale/ht/LC_MESSAGES/core.po
+++ b/locale/ht/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/hu/LC_MESSAGES/core.po b/locale/hu/LC_MESSAGES/core.po
index c690dc264c..9a438b40e1 100644
--- a/locale/hu/LC_MESSAGES/core.po
+++ b/locale/hu/LC_MESSAGES/core.po
@@ -1950,15 +1950,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd- ütemezett karbantartási szerepe a teljes Docker Compose stack újraindítása, a kemény újraindítások stack, mint Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Rendszeresen időzített monitor az egészségtelen vagy nem-nulla-kilépő dokkoló konténerek észlelésére és a hibajelzések jelzésére"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/hy/LC_MESSAGES/core.po b/locale/hy/LC_MESSAGES/core.po
index f3fa272b67..8bf5ffdc85 100644
--- a/locale/hy/LC_MESSAGES/core.po
+++ b/locale/hy/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/hz/LC_MESSAGES/core.po b/locale/hz/LC_MESSAGES/core.po
index 0b56e70031..3846aca15b 100644
--- a/locale/hz/LC_MESSAGES/core.po
+++ b/locale/hz/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ia/LC_MESSAGES/core.po b/locale/ia/LC_MESSAGES/core.po
index abdd588001..2c1b158495 100644
--- a/locale/ia/LC_MESSAGES/core.po
+++ b/locale/ia/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/id/LC_MESSAGES/core.po b/locale/id/LC_MESSAGES/core.po
index 56127b633d..308d95693c 100644
--- a/locale/id/LC_MESSAGES/core.po
+++ b/locale/id/LC_MESSAGES/core.po
@@ -1937,15 +1937,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Sistemd- dijadwalkan peran pemeliharaan untuk penuh Docker Compose stack restarts, with hard restarts for stacks like Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitor Systemd- timetime untuk mendeteksi tidak sehat atau tidak-zero- keluar kontainer Docker dan meningkatkan peringatan kegagalan"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ie/LC_MESSAGES/core.po b/locale/ie/LC_MESSAGES/core.po
index 1c98ec0ad8..568c971bed 100644
--- a/locale/ie/LC_MESSAGES/core.po
+++ b/locale/ie/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ig/LC_MESSAGES/core.po b/locale/ig/LC_MESSAGES/core.po
index f1122d2a03..26e1899170 100644
--- a/locale/ig/LC_MESSAGES/core.po
+++ b/locale/ig/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ii/LC_MESSAGES/core.po b/locale/ii/LC_MESSAGES/core.po
index 10be56222d..97001220ed 100644
--- a/locale/ii/LC_MESSAGES/core.po
+++ b/locale/ii/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ik/LC_MESSAGES/core.po b/locale/ik/LC_MESSAGES/core.po
index 105f0fcb42..9b86d7738e 100644
--- a/locale/ik/LC_MESSAGES/core.po
+++ b/locale/ik/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/io/LC_MESSAGES/core.po b/locale/io/LC_MESSAGES/core.po
index b3885013a9..1b4d682c28 100644
--- a/locale/io/LC_MESSAGES/core.po
+++ b/locale/io/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/is/LC_MESSAGES/core.po b/locale/is/LC_MESSAGES/core.po
index 6eb987864f..56495b9d79 100644
--- a/locale/is/LC_MESSAGES/core.po
+++ b/locale/is/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/it/LC_MESSAGES/core.po b/locale/it/LC_MESSAGES/core.po
index 3576cefd75..5d4e92aa83 100644
--- a/locale/it/LC_MESSAGES/core.po
+++ b/locale/it/LC_MESSAGES/core.po
@@ -1937,15 +1937,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Funzione di manutenzione programmata a sistema per riavviamento completo dello stack Docker Compose, con riavvio duro per pile come Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitoraggio systemd-timed per il rilevamento di contenitori Docker non sani o non-zero-exited e avvisi di guasto"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/iu/LC_MESSAGES/core.po b/locale/iu/LC_MESSAGES/core.po
index dc79a763df..fbc7695451 100644
--- a/locale/iu/LC_MESSAGES/core.po
+++ b/locale/iu/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ja/LC_MESSAGES/core.po b/locale/ja/LC_MESSAGES/core.po
index f20337f74e..98bbb27e5a 100644
--- a/locale/ja/LC_MESSAGES/core.po
+++ b/locale/ja/LC_MESSAGES/core.po
@@ -1952,15 +1952,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "完全な Docker Compose スタックを再起動するためのシステム化されたメンテナンスロール、Mailu のようなスタックのハード 再起動"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "不健康なか、または非ゼロ出口のドッカー容器を検出し、失敗の警告を上げるためのシステム化されたモニター"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/jv/LC_MESSAGES/core.po b/locale/jv/LC_MESSAGES/core.po
index fcd204d98b..fefd64c301 100644
--- a/locale/jv/LC_MESSAGES/core.po
+++ b/locale/jv/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ka/LC_MESSAGES/core.po b/locale/ka/LC_MESSAGES/core.po
index 977f7d4324..2cdf0627af 100644
--- a/locale/ka/LC_MESSAGES/core.po
+++ b/locale/ka/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/kg/LC_MESSAGES/core.po b/locale/kg/LC_MESSAGES/core.po
index f4a20dcdd5..89d8767823 100644
--- a/locale/kg/LC_MESSAGES/core.po
+++ b/locale/kg/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ki/LC_MESSAGES/core.po b/locale/ki/LC_MESSAGES/core.po
index c0754fecfc..5b8d590e70 100644
--- a/locale/ki/LC_MESSAGES/core.po
+++ b/locale/ki/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/kj/LC_MESSAGES/core.po b/locale/kj/LC_MESSAGES/core.po
index 8a76803e47..e71b139700 100644
--- a/locale/kj/LC_MESSAGES/core.po
+++ b/locale/kj/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/kk/LC_MESSAGES/core.po b/locale/kk/LC_MESSAGES/core.po
index e9ac05e7e4..bc21ef1ef2 100644
--- a/locale/kk/LC_MESSAGES/core.po
+++ b/locale/kk/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/kl/LC_MESSAGES/core.po b/locale/kl/LC_MESSAGES/core.po
index 01dcbfcadb..2116c86be9 100644
--- a/locale/kl/LC_MESSAGES/core.po
+++ b/locale/kl/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/km/LC_MESSAGES/core.po b/locale/km/LC_MESSAGES/core.po
index eb1fc43d22..a2752ec878 100644
--- a/locale/km/LC_MESSAGES/core.po
+++ b/locale/km/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/kn/LC_MESSAGES/core.po b/locale/kn/LC_MESSAGES/core.po
index a62b1ccd6c..9241d3d623 100644
--- a/locale/kn/LC_MESSAGES/core.po
+++ b/locale/kn/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ko/LC_MESSAGES/core.po b/locale/ko/LC_MESSAGES/core.po
index 016b8c378c..6715ca83e1 100644
--- a/locale/ko/LC_MESSAGES/core.po
+++ b/locale/ko/LC_MESSAGES/core.po
@@ -1961,15 +1961,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "전체 Docker Compose 스택 재시작을 위한 Systemd-scheduled Maintenance role, Mailu와 같은 스택에 대한 하드 재시작"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "비 건강 또는 비 zero-exited Docker 컨테이너를 감지하고 실패 경고를 올리는 시스템화 된 모니터"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/kr/LC_MESSAGES/core.po b/locale/kr/LC_MESSAGES/core.po
index d3e118f2c2..50104a2e2f 100644
--- a/locale/kr/LC_MESSAGES/core.po
+++ b/locale/kr/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ks/LC_MESSAGES/core.po b/locale/ks/LC_MESSAGES/core.po
index 8524faf0de..c99fb095eb 100644
--- a/locale/ks/LC_MESSAGES/core.po
+++ b/locale/ks/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ku/LC_MESSAGES/core.po b/locale/ku/LC_MESSAGES/core.po
index 53da1098ef..9884b3c645 100644
--- a/locale/ku/LC_MESSAGES/core.po
+++ b/locale/ku/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/kv/LC_MESSAGES/core.po b/locale/kv/LC_MESSAGES/core.po
index fc3277e72a..1360146dcd 100644
--- a/locale/kv/LC_MESSAGES/core.po
+++ b/locale/kv/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/kw/LC_MESSAGES/core.po b/locale/kw/LC_MESSAGES/core.po
index 8c82d1a944..da857b8067 100644
--- a/locale/kw/LC_MESSAGES/core.po
+++ b/locale/kw/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ky/LC_MESSAGES/core.po b/locale/ky/LC_MESSAGES/core.po
index 1677cf7d2d..0c789103da 100644
--- a/locale/ky/LC_MESSAGES/core.po
+++ b/locale/ky/LC_MESSAGES/core.po
@@ -1968,15 +1968,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Docker Compose стектерин кайра баштоо үчүн системалык пландаштырылган тейлөө ролу, Mailu сыяктуу стектер үчүн катуу кайра баштоо менен"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Ден соолукка зыяндуу же нөлдөн чыкпаган Docker контейнерлерин аныктоо жана бузулуу эскертүүлөрүн жогорулатуу үчүн системалык убакыт режиминде монитор"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/la/LC_MESSAGES/core.po b/locale/la/LC_MESSAGES/core.po
index 7b921ec2c5..9d7945d1a1 100644
--- a/locale/la/LC_MESSAGES/core.po
+++ b/locale/la/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/lb/LC_MESSAGES/core.po b/locale/lb/LC_MESSAGES/core.po
index 1445884704..e04a6c849a 100644
--- a/locale/lb/LC_MESSAGES/core.po
+++ b/locale/lb/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/lg/LC_MESSAGES/core.po b/locale/lg/LC_MESSAGES/core.po
index b2658e20d3..485a8daa08 100644
--- a/locale/lg/LC_MESSAGES/core.po
+++ b/locale/lg/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/li/LC_MESSAGES/core.po b/locale/li/LC_MESSAGES/core.po
index 30f655e6f1..fa4fb6b388 100644
--- a/locale/li/LC_MESSAGES/core.po
+++ b/locale/li/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ln/LC_MESSAGES/core.po b/locale/ln/LC_MESSAGES/core.po
index e1a1ebdcc3..8e9a88d7ad 100644
--- a/locale/ln/LC_MESSAGES/core.po
+++ b/locale/ln/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/lo/LC_MESSAGES/core.po b/locale/lo/LC_MESSAGES/core.po
index 5c672bba94..035f8e47fc 100644
--- a/locale/lo/LC_MESSAGES/core.po
+++ b/locale/lo/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/lt/LC_MESSAGES/core.po b/locale/lt/LC_MESSAGES/core.po
index a4867ca0dc..f8afc3a8ff 100644
--- a/locale/lt/LC_MESSAGES/core.po
+++ b/locale/lt/LC_MESSAGES/core.po
@@ -1960,15 +1960,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Sistemų - planinės techninės priežiūros funkcija visiškai Docker Compose kamino restarts, su sunku restarts už kaminai kaip Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Sistemingas laikmatis monitorius, skirtas aptikti nesveikus arba non- zero-exited Docker konteinerius ir padidinti gedimų perspėjimus"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/lu/LC_MESSAGES/core.po b/locale/lu/LC_MESSAGES/core.po
index 5ab9641fbb..3b9c226b96 100644
--- a/locale/lu/LC_MESSAGES/core.po
+++ b/locale/lu/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/lv/LC_MESSAGES/core.po b/locale/lv/LC_MESSAGES/core.po
index c63ae317e0..5dfbc23a88 100644
--- a/locale/lv/LC_MESSAGES/core.po
+++ b/locale/lv/LC_MESSAGES/core.po
@@ -1963,15 +1963,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Sistemātiski plānotas tehniskās apkopes funkcijas pilnībā Docker Compose steka pārstartēšana, ar cieto pārstartēšanu tādiem stekiem kā Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Sistemātisks laika monitors, lai atklātu neveselīgus vai nenulles izejošus dokeru konteinerus un palielinātu brīdinājumus par atteici"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/mg/LC_MESSAGES/core.po b/locale/mg/LC_MESSAGES/core.po
index e6e648394d..cffce8a414 100644
--- a/locale/mg/LC_MESSAGES/core.po
+++ b/locale/mg/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/mh/LC_MESSAGES/core.po b/locale/mh/LC_MESSAGES/core.po
index e824089d28..0f14e0095b 100644
--- a/locale/mh/LC_MESSAGES/core.po
+++ b/locale/mh/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/mi/LC_MESSAGES/core.po b/locale/mi/LC_MESSAGES/core.po
index 1ce5011d0e..df15f22602 100644
--- a/locale/mi/LC_MESSAGES/core.po
+++ b/locale/mi/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/mk/LC_MESSAGES/core.po b/locale/mk/LC_MESSAGES/core.po
index 1c6d9075ea..3d2ed43b51 100644
--- a/locale/mk/LC_MESSAGES/core.po
+++ b/locale/mk/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ml/LC_MESSAGES/core.po b/locale/ml/LC_MESSAGES/core.po
index 1f147272da..3f1c5eff1f 100644
--- a/locale/ml/LC_MESSAGES/core.po
+++ b/locale/ml/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/mn/LC_MESSAGES/core.po b/locale/mn/LC_MESSAGES/core.po
index 2d18003d87..10c5f78952 100644
--- a/locale/mn/LC_MESSAGES/core.po
+++ b/locale/mn/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/mr/LC_MESSAGES/core.po b/locale/mr/LC_MESSAGES/core.po
index 270c1c1694..5a760df4c6 100644
--- a/locale/mr/LC_MESSAGES/core.po
+++ b/locale/mr/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ms/LC_MESSAGES/core.po b/locale/ms/LC_MESSAGES/core.po
index f066a3f06e..68db583427 100644
--- a/locale/ms/LC_MESSAGES/core.po
+++ b/locale/ms/LC_MESSAGES/core.po
@@ -1948,15 +1948,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Peran pemeliharaan terjadwal-kejadwalan untuk penuh Docker Compose Stack stack restart, dengan hard restart untuk stack seperti Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Pemantau sistem-waktu untuk mendeteksi kontainer Docker yang tidak sehat atau tidak-sifar-keluar dan meningkatkan peringatan kegagalan"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/mt/LC_MESSAGES/core.po b/locale/mt/LC_MESSAGES/core.po
index e3140df0ff..d7733e234d 100644
--- a/locale/mt/LC_MESSAGES/core.po
+++ b/locale/mt/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/my/LC_MESSAGES/core.po b/locale/my/LC_MESSAGES/core.po
index 7014c5bb0e..9f4250d6b5 100644
--- a/locale/my/LC_MESSAGES/core.po
+++ b/locale/my/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/na/LC_MESSAGES/core.po b/locale/na/LC_MESSAGES/core.po
index 1652d04ce6..9857595317 100644
--- a/locale/na/LC_MESSAGES/core.po
+++ b/locale/na/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/nb/LC_MESSAGES/core.po b/locale/nb/LC_MESSAGES/core.po
index 83032d86c6..c5360a2c63 100644
--- a/locale/nb/LC_MESSAGES/core.po
+++ b/locale/nb/LC_MESSAGES/core.po
@@ -1947,15 +1947,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemstyrt vedlikeholdsrolle for full Docker Compose stabler starter på nytt, med harde omstarter for stabler som Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemstyrt skjerm for å detektere usunne eller ikke-null-eksiterte Docker-beholdere og heve feilvarsler"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/nd/LC_MESSAGES/core.po b/locale/nd/LC_MESSAGES/core.po
index ae773788b3..8339efcd5a 100644
--- a/locale/nd/LC_MESSAGES/core.po
+++ b/locale/nd/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ne/LC_MESSAGES/core.po b/locale/ne/LC_MESSAGES/core.po
index fc3856751f..82636c5a24 100644
--- a/locale/ne/LC_MESSAGES/core.po
+++ b/locale/ne/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ng/LC_MESSAGES/core.po b/locale/ng/LC_MESSAGES/core.po
index 72f0c82e97..df428fd479 100644
--- a/locale/ng/LC_MESSAGES/core.po
+++ b/locale/ng/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/nl/LC_MESSAGES/core.po b/locale/nl/LC_MESSAGES/core.po
index 1c06b02bb6..4a7b559b81 100644
--- a/locale/nl/LC_MESSAGES/core.po
+++ b/locale/nl/LC_MESSAGES/core.po
@@ -1939,15 +1939,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Gesysteemde onderhoudsrol voor volledig Docker Compose stack herstarten, met harde herstarten voor stacks zoals Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemed-timed monitor voor het detecteren van ongezonde of niet-nul-uitgeschakelde Docker containers en het verhogen van storing waarschuwingen"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/nn/LC_MESSAGES/core.po b/locale/nn/LC_MESSAGES/core.po
index eff50875b2..681eeed1c8 100644
--- a/locale/nn/LC_MESSAGES/core.po
+++ b/locale/nn/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/no/LC_MESSAGES/core.po b/locale/no/LC_MESSAGES/core.po
index 7bbfde540a..c17af53063 100644
--- a/locale/no/LC_MESSAGES/core.po
+++ b/locale/no/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/nr/LC_MESSAGES/core.po b/locale/nr/LC_MESSAGES/core.po
index b67d3fd152..ec8e1a8d46 100644
--- a/locale/nr/LC_MESSAGES/core.po
+++ b/locale/nr/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/nv/LC_MESSAGES/core.po b/locale/nv/LC_MESSAGES/core.po
index b5c8a2f675..a1ddd3ff78 100644
--- a/locale/nv/LC_MESSAGES/core.po
+++ b/locale/nv/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ny/LC_MESSAGES/core.po b/locale/ny/LC_MESSAGES/core.po
index 0fa73b4fa4..dbd41abd5d 100644
--- a/locale/ny/LC_MESSAGES/core.po
+++ b/locale/ny/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/oc/LC_MESSAGES/core.po b/locale/oc/LC_MESSAGES/core.po
index fb3bdc6046..1a98d52d4b 100644
--- a/locale/oc/LC_MESSAGES/core.po
+++ b/locale/oc/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/oj/LC_MESSAGES/core.po b/locale/oj/LC_MESSAGES/core.po
index 0286742a04..aeca8c7e62 100644
--- a/locale/oj/LC_MESSAGES/core.po
+++ b/locale/oj/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/om/LC_MESSAGES/core.po b/locale/om/LC_MESSAGES/core.po
index 894a4c6d6a..7eb3fc1ae6 100644
--- a/locale/om/LC_MESSAGES/core.po
+++ b/locale/om/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/or/LC_MESSAGES/core.po b/locale/or/LC_MESSAGES/core.po
index d9d4e3689c..9960fb5052 100644
--- a/locale/or/LC_MESSAGES/core.po
+++ b/locale/or/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/os/LC_MESSAGES/core.po b/locale/os/LC_MESSAGES/core.po
index b4ef0cc518..a4af073632 100644
--- a/locale/os/LC_MESSAGES/core.po
+++ b/locale/os/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/pa/LC_MESSAGES/core.po b/locale/pa/LC_MESSAGES/core.po
index 1cab06b8db..ac727d1b3d 100644
--- a/locale/pa/LC_MESSAGES/core.po
+++ b/locale/pa/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/pi/LC_MESSAGES/core.po b/locale/pi/LC_MESSAGES/core.po
index b99f955c9c..14c1c14329 100644
--- a/locale/pi/LC_MESSAGES/core.po
+++ b/locale/pi/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/pl/LC_MESSAGES/core.po b/locale/pl/LC_MESSAGES/core.po
index 14b7128827..f19b34f4ee 100644
--- a/locale/pl/LC_MESSAGES/core.po
+++ b/locale/pl/LC_MESSAGES/core.po
@@ -1936,15 +1936,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "System- planowa rola utrzymania dla pełnego Docker Compose stos restarts, z twarde restarts dla stosów takich jak Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systematyczny monitor czasowy do wykrywania niezdrowych lub niezerowyjściowych pojemników Dockera i podnoszenia alarmów awarii"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ps/LC_MESSAGES/core.po b/locale/ps/LC_MESSAGES/core.po
index cae0042ed4..7825b9ca52 100644
--- a/locale/ps/LC_MESSAGES/core.po
+++ b/locale/ps/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/pt/LC_MESSAGES/core.po b/locale/pt/LC_MESSAGES/core.po
index 61cc61cbd4..4345746873 100644
--- a/locale/pt/LC_MESSAGES/core.po
+++ b/locale/pt/LC_MESSAGES/core.po
@@ -1936,15 +1936,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Função de manutenção programada pelo sistema para reinicialização completa da pilha Docker Compose, com reinicialização dura para pilhas como Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitor programado para detectar recipientes Docker não saudáveis ou não-zero-exitados e levantar alertas de falha"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/qu/LC_MESSAGES/core.po b/locale/qu/LC_MESSAGES/core.po
index 3b8d27f8fe..2f8c763d7d 100644
--- a/locale/qu/LC_MESSAGES/core.po
+++ b/locale/qu/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/rm/LC_MESSAGES/core.po b/locale/rm/LC_MESSAGES/core.po
index 2e5a059c1f..3cf376d511 100644
--- a/locale/rm/LC_MESSAGES/core.po
+++ b/locale/rm/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/rn/LC_MESSAGES/core.po b/locale/rn/LC_MESSAGES/core.po
index cd8dc5d2e3..7b52860e75 100644
--- a/locale/rn/LC_MESSAGES/core.po
+++ b/locale/rn/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ro/LC_MESSAGES/core.po b/locale/ro/LC_MESSAGES/core.po
index 4f01bb3d64..f75c54e508 100644
--- a/locale/ro/LC_MESSAGES/core.po
+++ b/locale/ro/LC_MESSAGES/core.po
@@ -1952,15 +1952,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Rolul de întreținere programat pentru reporniri complete Docker Compose stiva, cu reporniri dure pentru stive cum ar fi Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed monitor pentru detectarea containerelor Docker nesigure sau cu excludere de zero și ridicarea alertelor de eșec"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ru/LC_MESSAGES/core.po b/locale/ru/LC_MESSAGES/core.po
index 6133b923d4..ace8d03b33 100644
--- a/locale/ru/LC_MESSAGES/core.po
+++ b/locale/ru/LC_MESSAGES/core.po
@@ -1938,15 +1938,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Функция системного планирования для полного перезапуска стека Docker Compose с жестким перезапуском для стеков, таких как Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Системно-временный монитор для обнаружения нездоровых или ненулевых контейнеров Docker и повышения оповещений о сбоях"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/rw/LC_MESSAGES/core.po b/locale/rw/LC_MESSAGES/core.po
index a3e57a7d49..912554202f 100644
--- a/locale/rw/LC_MESSAGES/core.po
+++ b/locale/rw/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sa/LC_MESSAGES/core.po b/locale/sa/LC_MESSAGES/core.po
index ec4ac34c25..1d626eaa89 100644
--- a/locale/sa/LC_MESSAGES/core.po
+++ b/locale/sa/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sc/LC_MESSAGES/core.po b/locale/sc/LC_MESSAGES/core.po
index 331bf3c495..da208be57b 100644
--- a/locale/sc/LC_MESSAGES/core.po
+++ b/locale/sc/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sd/LC_MESSAGES/core.po b/locale/sd/LC_MESSAGES/core.po
index 3dde3a1b46..39f220c13f 100644
--- a/locale/sd/LC_MESSAGES/core.po
+++ b/locale/sd/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/se/LC_MESSAGES/core.po b/locale/se/LC_MESSAGES/core.po
index 2de41b1d1f..9e344acf9a 100644
--- a/locale/se/LC_MESSAGES/core.po
+++ b/locale/se/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sg/LC_MESSAGES/core.po b/locale/sg/LC_MESSAGES/core.po
index fc3919fd52..76d6eaf26e 100644
--- a/locale/sg/LC_MESSAGES/core.po
+++ b/locale/sg/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/si/LC_MESSAGES/core.po b/locale/si/LC_MESSAGES/core.po
index 8f931c3dd2..74853efb4f 100644
--- a/locale/si/LC_MESSAGES/core.po
+++ b/locale/si/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sk/LC_MESSAGES/core.po b/locale/sk/LC_MESSAGES/core.po
index b1d2271f29..b91f93187a 100644
--- a/locale/sk/LC_MESSAGES/core.po
+++ b/locale/sk/LC_MESSAGES/core.po
@@ -1948,15 +1948,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systémovo plánovaná údržbová rola pre plné Docker Compose stack reštarty, s tvrdými reštartmi pre zásobníky ako Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systémovo načasovaný monitor na odhaľovanie nezdravých alebo nenulových kontajnerov s dockermi a zvyšovanie upozornení na poruchy"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/sl/LC_MESSAGES/core.po b/locale/sl/LC_MESSAGES/core.po
index 33bd0a6bc7..7288f6c2cf 100644
--- a/locale/sl/LC_MESSAGES/core.po
+++ b/locale/sl/LC_MESSAGES/core.po
@@ -1948,15 +1948,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Sistemsko načrtovana vzdrževalna vloga Docker Compose Ponovno zaženi sklad, s trdimi ponovnimi zagoni za kupe kot Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Sistemsko časovno določen monitor za odkrivanje nezdravih ali zunajizstopnih zabojnikov Docker in dvigovanje opozoril o napakah"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/sm/LC_MESSAGES/core.po b/locale/sm/LC_MESSAGES/core.po
index c01fd6bd46..05d41623e6 100644
--- a/locale/sm/LC_MESSAGES/core.po
+++ b/locale/sm/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sn/LC_MESSAGES/core.po b/locale/sn/LC_MESSAGES/core.po
index b65d49ce3d..b1d71b5fb3 100644
--- a/locale/sn/LC_MESSAGES/core.po
+++ b/locale/sn/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/so/LC_MESSAGES/core.po b/locale/so/LC_MESSAGES/core.po
index 9f3159831c..5e21507f09 100644
--- a/locale/so/LC_MESSAGES/core.po
+++ b/locale/so/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sq/LC_MESSAGES/core.po b/locale/sq/LC_MESSAGES/core.po
index 6ecac89911..d861b0e2c0 100644
--- a/locale/sq/LC_MESSAGES/core.po
+++ b/locale/sq/LC_MESSAGES/core.po
@@ -1947,15 +1947,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Roli i mirëmbajtjes i përcaktuar sistem për t'u plotësuar Docker Compose Stivni rinisjet, me rinisje të vështira për t'u hequr si Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Monitorim me kohë të sistemit për zbulimin e kontejnerëve të pashëndetshëm apo jo-zero-eksitueshëm Docker dhe ngritjen e alarmeve të dështimit"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# operators when a monitored service unit fails -Systemd-triggered
# -mpsmtp-notifier -for -emailing -operators -when -a -monitored -service
# -unit -fails
diff --git a/locale/sr/LC_MESSAGES/core.po b/locale/sr/LC_MESSAGES/core.po
index cdd5e2199c..da254170ec 100644
--- a/locale/sr/LC_MESSAGES/core.po
+++ b/locale/sr/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ss/LC_MESSAGES/core.po b/locale/ss/LC_MESSAGES/core.po
index 42a9f19318..22ef3a450a 100644
--- a/locale/ss/LC_MESSAGES/core.po
+++ b/locale/ss/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/st/LC_MESSAGES/core.po b/locale/st/LC_MESSAGES/core.po
index 51753ad1a5..119b3ce7fe 100644
--- a/locale/st/LC_MESSAGES/core.po
+++ b/locale/st/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/su/LC_MESSAGES/core.po b/locale/su/LC_MESSAGES/core.po
index 8b4f95ca09..7d1800f971 100644
--- a/locale/su/LC_MESSAGES/core.po
+++ b/locale/su/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/sv/LC_MESSAGES/core.po b/locale/sv/LC_MESSAGES/core.po
index 1293583f64..7ea211ef19 100644
--- a/locale/sv/LC_MESSAGES/core.po
+++ b/locale/sv/LC_MESSAGES/core.po
@@ -1948,15 +1948,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd schemalagd underhållsroll för full Docker Compose stack omstarter, med hårda omstarter för staplar som Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed bildskärm för att upptäcka ohälsosamma eller icke-noll-exiterade Docker behållare och höja misslyckande varningar"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/sw/LC_MESSAGES/core.po b/locale/sw/LC_MESSAGES/core.po
index fac193a03b..d76549fc1c 100644
--- a/locale/sw/LC_MESSAGES/core.po
+++ b/locale/sw/LC_MESSAGES/core.po
@@ -1956,15 +1956,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Kazi ya matengenezo ya utaratibu kwa stack kamili ya Docker Compose huanza upya, na kuanza upya kwa stacks kama Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Ufuatiliaji wa wakati wa utaratibu wa kuchunguza vyombo vya Docker visivyo na afya au visivyo na sifuri na kuongeza tahadhari za kushindwa"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ta/LC_MESSAGES/core.po b/locale/ta/LC_MESSAGES/core.po
index ec27aa8bc7..d5e0ec15af 100644
--- a/locale/ta/LC_MESSAGES/core.po
+++ b/locale/ta/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/te/LC_MESSAGES/core.po b/locale/te/LC_MESSAGES/core.po
index 9e8698cb31..7051ab1670 100644
--- a/locale/te/LC_MESSAGES/core.po
+++ b/locale/te/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/tg/LC_MESSAGES/core.po b/locale/tg/LC_MESSAGES/core.po
index 3775c4941b..fc140d7308 100644
--- a/locale/tg/LC_MESSAGES/core.po
+++ b/locale/tg/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/th/LC_MESSAGES/core.po b/locale/th/LC_MESSAGES/core.po
index b23efc8a21..b2dc500b45 100644
--- a/locale/th/LC_MESSAGES/core.po
+++ b/locale/th/LC_MESSAGES/core.po
@@ -1951,15 +1951,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "บทบาทการบํารุงรักษาของระบบเต็มรูปแบบ Docker Compose สแต็กเริ่มต้นด้วยฮาร์ดรีเซ็ตสําหรับกองเช่น Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "จอภาพที่ระบบระบุเวลาสําหรับการตรวจสอบสุขภาพไม่แข็งแรงหรือไม่เพิ่มรุ่น Doger และเพิ่มการแจ้งเตือนความล้มเหลว"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ti/LC_MESSAGES/core.po b/locale/ti/LC_MESSAGES/core.po
index 205ae5ebd1..c2d48ec612 100644
--- a/locale/ti/LC_MESSAGES/core.po
+++ b/locale/ti/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/tk/LC_MESSAGES/core.po b/locale/tk/LC_MESSAGES/core.po
index e63639d3ec..fe5af941ea 100644
--- a/locale/tk/LC_MESSAGES/core.po
+++ b/locale/tk/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/tl/LC_MESSAGES/core.po b/locale/tl/LC_MESSAGES/core.po
index ac4a68ebec..e3ba79487c 100644
--- a/locale/tl/LC_MESSAGES/core.po
+++ b/locale/tl/LC_MESSAGES/core.po
@@ -1949,15 +1949,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Systemd-scheduled maintenance papel para sa full Docker Compose stack restarts, na may hard restarts para sa mga salansan tulad ng Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Systemd-timed monitor para sa pagpansin ng hindi malusog o non-zero-exited Docker containers at pagpapalaki ng mga babala ng pagkabigo"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/tn/LC_MESSAGES/core.po b/locale/tn/LC_MESSAGES/core.po
index 5bbbcac80e..e50ccb9ceb 100644
--- a/locale/tn/LC_MESSAGES/core.po
+++ b/locale/tn/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/to/LC_MESSAGES/core.po b/locale/to/LC_MESSAGES/core.po
index b669674be3..6088d28141 100644
--- a/locale/to/LC_MESSAGES/core.po
+++ b/locale/to/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/tr/LC_MESSAGES/core.po b/locale/tr/LC_MESSAGES/core.po
index b6258e0fbd..d6e4a8a1d7 100644
--- a/locale/tr/LC_MESSAGES/core.po
+++ b/locale/tr/LC_MESSAGES/core.po
@@ -1950,15 +1950,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Tüm Docker Compose yığını için sistemli bakım rolü yeniden başlar, Mailu gibi yığınlar için sert yeniden başlar."
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "sağlıksız veya non-zero-exited Docker konteynerlerini tespit etmek ve başarısızlık uyarılarını yükseltmek için sistemli bir monitör"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ts/LC_MESSAGES/core.po b/locale/ts/LC_MESSAGES/core.po
index a2ea78eff1..7160969c68 100644
--- a/locale/ts/LC_MESSAGES/core.po
+++ b/locale/ts/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/tt/LC_MESSAGES/core.po b/locale/tt/LC_MESSAGES/core.po
index 1d6208c03e..1444f6fef3 100644
--- a/locale/tt/LC_MESSAGES/core.po
+++ b/locale/tt/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/tw/LC_MESSAGES/core.po b/locale/tw/LC_MESSAGES/core.po
index 4e00b39e5c..d89ae038d1 100644
--- a/locale/tw/LC_MESSAGES/core.po
+++ b/locale/tw/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ty/LC_MESSAGES/core.po b/locale/ty/LC_MESSAGES/core.po
index b0d71c1570..d67797aba4 100644
--- a/locale/ty/LC_MESSAGES/core.po
+++ b/locale/ty/LC_MESSAGES/core.po
@@ -1563,14 +1563,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ug/LC_MESSAGES/core.po b/locale/ug/LC_MESSAGES/core.po
index 04fa996ed7..c1d1c65777 100644
--- a/locale/ug/LC_MESSAGES/core.po
+++ b/locale/ug/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/uk/LC_MESSAGES/core.po b/locale/uk/LC_MESSAGES/core.po
index b7c9de9c11..abdab89f93 100644
--- a/locale/uk/LC_MESSAGES/core.po
+++ b/locale/uk/LC_MESSAGES/core.po
@@ -1945,15 +1945,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Систематизована роль технічного обслуговування для повного циклу Docker Compose стека, з твердими рештками для стеків, таких як Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Систематизований монітор для виявлення нездорових або ненульованих контейнерів Docker та підвищення аварійних повідомлень"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/ur/LC_MESSAGES/core.po b/locale/ur/LC_MESSAGES/core.po
index 713b4020c7..79358512f3 100644
--- a/locale/ur/LC_MESSAGES/core.po
+++ b/locale/ur/LC_MESSAGES/core.po
@@ -1969,15 +1969,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "مکمل طور پر سنبھالنے والے کردار Docker Compose اسٹاک دوبارہ شروع، اسٹاک کے لئے سخت دوبارہ شروع کرنے کے ساتھ Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "بے روزگاری یا غیر ضروری ڈرگ کی جانچ کے لیے نظام وقتی نگرانی اور ناکامی کے شعور کو بیدار کرنا"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/uz/LC_MESSAGES/core.po b/locale/uz/LC_MESSAGES/core.po
index 1b79f5ccb8..a36c259578 100644
--- a/locale/uz/LC_MESSAGES/core.po
+++ b/locale/uz/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/ve/LC_MESSAGES/core.po b/locale/ve/LC_MESSAGES/core.po
index 9915884b36..59a39d3b76 100644
--- a/locale/ve/LC_MESSAGES/core.po
+++ b/locale/ve/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/vi/LC_MESSAGES/core.po b/locale/vi/LC_MESSAGES/core.po
index 89b5a4b6e8..cf22dd9577 100644
--- a/locale/vi/LC_MESSAGES/core.po
+++ b/locale/vi/LC_MESSAGES/core.po
@@ -1941,15 +1941,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "Vai trò bảo trì có sẵn hệ thống cho đầy đủ Docker Compose chồng khởi chạy lại, với khởi chạy lại khó cho chồng như Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "Trình theo dõi thời gian hệ thống để phát hiện các hộp Docker không lành mạnh hoặc không được cung cấp và tăng cảnh báo thất bại"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/vo/LC_MESSAGES/core.po b/locale/vo/LC_MESSAGES/core.po
index bf45560358..bce45f8948 100644
--- a/locale/vo/LC_MESSAGES/core.po
+++ b/locale/vo/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/wa/LC_MESSAGES/core.po b/locale/wa/LC_MESSAGES/core.po
index 8d749949eb..b6d5a4a2e3 100644
--- a/locale/wa/LC_MESSAGES/core.po
+++ b/locale/wa/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/wo/LC_MESSAGES/core.po b/locale/wo/LC_MESSAGES/core.po
index 7ffa793595..dcbf40d40a 100644
--- a/locale/wo/LC_MESSAGES/core.po
+++ b/locale/wo/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/xh/LC_MESSAGES/core.po b/locale/xh/LC_MESSAGES/core.po
index c5cb333152..72131e9c58 100644
--- a/locale/xh/LC_MESSAGES/core.po
+++ b/locale/xh/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/yi/LC_MESSAGES/core.po b/locale/yi/LC_MESSAGES/core.po
index 25a625a5e3..efb6c1af46 100644
--- a/locale/yi/LC_MESSAGES/core.po
+++ b/locale/yi/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/yo/LC_MESSAGES/core.po b/locale/yo/LC_MESSAGES/core.po
index deb7c6ff0b..22a53d85f7 100644
--- a/locale/yo/LC_MESSAGES/core.po
+++ b/locale/yo/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/za/LC_MESSAGES/core.po b/locale/za/LC_MESSAGES/core.po
index 2d6e4887ad..fd45a3698f 100644
--- a/locale/za/LC_MESSAGES/core.po
+++ b/locale/za/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/locale/zh/LC_MESSAGES/core.po b/locale/zh/LC_MESSAGES/core.po
index 6cb8d0aff1..a03d510e88 100644
--- a/locale/zh/LC_MESSAGES/core.po
+++ b/locale/zh/LC_MESSAGES/core.po
@@ -1952,15 +1952,15 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr "系统安排的维护作用 Docker Compose 堆栈重新启动,对堆栈进行硬重启 Mailu"
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
# translated-by: libretranslate
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr "系统定时监测器,用于检测不健康或非零放行的Docker容器并提高故障警报"
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
# translated-by: libretranslate
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
diff --git a/locale/zu/LC_MESSAGES/core.po b/locale/zu/LC_MESSAGES/core.po
index 949859d41a..cf763d075c 100644
--- a/locale/zu/LC_MESSAGES/core.po
+++ b/locale/zu/LC_MESSAGES/core.po
@@ -1564,14 +1564,14 @@ msgctxt "role:sys-ctl-rpr-container-hard:description"
msgid "Systemd-scheduled maintenance role for full Docker Compose stack restarts, with hard restarts for stacks like Mailu"
msgstr ""
-msgctxt "role:sys-ctl-hlth-runtime:description"
-msgid "Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening"
-msgstr ""
-
msgctxt "role:sys-ctl-hlth-container:description"
msgid "Systemd-timed monitor for detecting unhealthy or non-zero-exited Docker containers and raising failure alerts"
msgstr ""
+msgctxt "role:sys-ctl-hlth-runtime:description"
+msgid "Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check"
+msgstr ""
+
msgctxt "role:sys-ctl-alm-email:description"
msgid "Systemd-triggered msmtp notifier for emailing operators when a monitored service unit fails"
msgstr ""
diff --git a/meta/packages.yml b/meta/packages.yml
index 8f265adfe8..9b41831722 100644
--- a/meta/packages.yml
+++ b/meta/packages.yml
@@ -37,6 +37,8 @@ blender:
- org.blender.Blender
flatpak:
command: blender
+ architectures:
+ - amd64
fedora:
- blender
diff --git a/plugins/action/cloudflare_records_converged.py b/plugins/action/cloudflare_records_converged.py
index dbd661085d..3514078b8e 100644
--- a/plugins/action/cloudflare_records_converged.py
+++ b/plugins/action/cloudflare_records_converged.py
@@ -14,7 +14,7 @@ from ansible.module_utils.urls import open_url
from ansible.plugins.action import ActionBase
ZONES = "https://api.cloudflare.com/client/v4/zones"
-REVIEWED_COMMUNITY_GENERAL = "14.0.0"
+REVIEWED_COMMUNITY_GENERAL = "14.0.1"
PAGE_SIZE = 5000
ARGUMENTS = frozenset({"api_token", "records", "timeout"})
JUDGED_TYPES = ("A", "AAAA", "CNAME", "MX", "TXT", "SRV")
diff --git a/plugins/action/package_install.py b/plugins/action/package_install.py
index 7d8c410076..a1ffbfbe1f 100755
--- a/plugins/action/package_install.py
+++ b/plugins/action/package_install.py
@@ -56,7 +56,12 @@ from utils.packages.installed import (
state_holds,
)
from utils.packages.outcome import aggregate
-from utils.packages.plan import build_plan, merge_plans
+from utils.packages.plan import (
+ HOST_ARCHITECTURE_VAR,
+ build_plan,
+ ensure_published,
+ merge_plans,
+)
from utils.packages.registry import build_registry, project_root_from_env, resolve
from utils.packages.schema import ROLE_FILE_META_PACKAGES, PackagesShapeError
@@ -80,12 +85,19 @@ class ActionModule(ActionBase):
package_ids = self._package_ids()
registry = self._registry()
role = self._role()
+ kernel = read_fact(facts, "architecture")
+ by_kernel = dict(task_vars.get(HOST_ARCHITECTURE_VAR) or {})
plans: list[list[ModuleCall]] = []
skipped: list[str] = []
for package_id in package_ids:
spec = self._spec_for(registry, package_id, distribution, os_family, role)
+ if state == STATE_PRESENT:
+ try:
+ ensure_published(package_id, distribution, kernel, by_kernel, spec)
+ except ValueError as exc:
+ raise AnsibleActionFail(str(exc)) from exc
plan = self._plan_for(spec, state)
if not plan:
skipped.append(package_id)
@@ -242,7 +254,9 @@ class ActionModule(ActionBase):
result = self._execute_module(
module_name="ansible.builtin.setup",
- module_args={"gather_subset": ["!all", "!min", "distribution", "pkg_mgr"]},
+ module_args={
+ "gather_subset": ["!all", "!min", "distribution", "pkg_mgr", "platform"]
+ },
task_vars=task_vars,
)
if result.get("failed"):
diff --git a/plugins/lookup/proxy_pass.py b/plugins/lookup/proxy_pass.py
index e828864413..96edc67444 100644
--- a/plugins/lookup/proxy_pass.py
+++ b/plugins/lookup/proxy_pass.py
@@ -47,7 +47,6 @@ class LookupModule(LookupBase):
if not port_kind:
port_kind = "http"
tail = _as_str(kwargs.get("tail")) or "request"
- location = _as_str(kwargs.get("location")) or "/"
vars_ = variables or getattr(self._templar, "available_variables", {}) or {}
templar = getattr(self, "_templar", None)
@@ -110,7 +109,6 @@ class LookupModule(LookupBase):
authority,
deployment_mode,
tail=tail,
- location=location,
host_gateway=host_gateway,
)
]
diff --git a/plugins/lookup/requires_python.py b/plugins/lookup/requires_python.py
new file mode 100644
index 0000000000..2700034c47
--- /dev/null
+++ b/plugins/lookup/requires_python.py
@@ -0,0 +1,24 @@
+"""
+Ansible lookup plugin: requires_python
+
+Args:
+ terms: none.
+
+Returns:
+ The ``requires-python`` spec of pyproject.toml at the repository root.
+"""
+
+from __future__ import annotations
+
+from ansible.errors import AnsibleError
+from ansible.plugins.lookup import LookupBase
+
+from plugins.lookup import PROJECT_ROOT
+from utils.requires_python import requires_python
+
+
+class LookupModule(LookupBase):
+ def run(self, terms, variables=None, **kwargs):
+ if terms:
+ raise AnsibleError("requires_python lookup takes no terms")
+ return [requires_python(PROJECT_ROOT)]
diff --git a/roles/dev-python/tasks/00_core.yml b/roles/dev-python/tasks/00_core.yml
index 248682831b..3d18f01d77 100644
--- a/roles/dev-python/tasks/00_core.yml
+++ b/roles/dev-python/tasks/00_core.yml
@@ -8,10 +8,7 @@
ansible.builtin.script: "{{ role_path }}/files/shell/install.sh"
environment:
SKIP_DOCKER_APT_SANITIZER: "1"
- DEV_PYTHON_REQUIRES: >-
- {{ lookup('file', lookup('path_absolute', 'pyproject.toml'))
- | regex_search('(?m)^requires-python\\s*=\\s*"([^"]+)"', '\\1')
- | first }}
+ DEV_PYTHON_REQUIRES: "{{ lookup('requires_python') }}"
become: true
- include_tasks: utils/once/flag.yml
diff --git a/roles/dsk-gnt-codex/meta/services.yml b/roles/dsk-gnt-codex/meta/services.yml
index 879ee7856b..068ed00b7a 100644
--- a/roles/dsk-gnt-codex/meta/services.yml
+++ b/roles/dsk-gnt-codex/meta/services.yml
@@ -9,7 +9,7 @@ codex:
host:
enabled: true
lifecycle: alpha
- npm_version: 0.167.1
+ npm_version: 0.167.2
update:
key: npm_version
type: npm
diff --git a/roles/svc-ai-litellm/meta/services.yml b/roles/svc-ai-litellm/meta/services.yml
index 6a5f84657a..693005ea4d 100644
--- a/roles/svc-ai-litellm/meta/services.yml
+++ b/roles/svc-ai-litellm/meta/services.yml
@@ -64,6 +64,11 @@ litellm:
run_after:
- svc-db-postgres
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "main-v1.77.7-stable"
+ until: 2026-12-03
postgres:
bond: 1
diff --git a/roles/svc-ai-mcp-adapter/meta/services.yml b/roles/svc-ai-mcp-adapter/meta/services.yml
index 507d538d7e..5c5f09fe5c 100644
--- a/roles/svc-ai-mcp-adapter/meta/services.yml
+++ b/roles/svc-ai-mcp-adapter/meta/services.yml
@@ -25,6 +25,11 @@ mcp-adapter:
internal:
http: 8080
lifecycle: alpha
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: variants-coverage the role has a single variant, and the guide edge is not a dimension of it: a second round would differ only by the README replay
docs:
diff --git a/roles/svc-db-mariadb/meta/services.yml b/roles/svc-db-mariadb/meta/services.yml
index 9f6fbd00ac..722e8b1b22 100644
--- a/roles/svc-db-mariadb/meta/services.yml
+++ b/roles/svc-db-mariadb/meta/services.yml
@@ -32,6 +32,11 @@ mariadb:
internal:
mariadb: 3306
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "13.0"
+ until: 2026-12-03
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
tor:
bond: 0.5
diff --git a/roles/svc-db-postgres/meta/services.yml b/roles/svc-db-postgres/meta/services.yml
index a33b872823..c82dd0c5ba 100644
--- a/roles/svc-db-postgres/meta/services.yml
+++ b/roles/svc-db-postgres/meta/services.yml
@@ -33,6 +33,11 @@ postgres:
internal:
postgres: 5432
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "18"
+ until: 2026-12-03
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
tor:
bond: 0.5
diff --git a/roles/svc-db-qdrant/meta/services.yml b/roles/svc-db-qdrant/meta/services.yml
index 6a659e7b08..e4de4c89fd 100644
--- a/roles/svc-db-qdrant/meta/services.yml
+++ b/roles/svc-db-qdrant/meta/services.yml
@@ -51,6 +51,11 @@ qdrantmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
tor:
bond: 0.5
diff --git a/roles/svc-db-typesense/meta/services.yml b/roles/svc-db-typesense/meta/services.yml
index 49d8afe417..5dc12e3aaf 100644
--- a/roles/svc-db-typesense/meta/services.yml
+++ b/roles/svc-db-typesense/meta/services.yml
@@ -33,6 +33,11 @@ typesense:
# nocheck: onion-flag the search index is queried by the app containers holding its API key, and the apps themselves are served through the onion's port 80
typesense: false
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "0.25.2"
+ until: 2026-12-03
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
tor:
bond: 0.5
diff --git a/roles/svc-dns-unbound/meta/services.yml b/roles/svc-dns-unbound/meta/services.yml
index 5dfbad4637..3393f8bc59 100644
--- a/roles/svc-dns-unbound/meta/services.yml
+++ b/roles/svc-dns-unbound/meta/services.yml
@@ -29,6 +29,11 @@ unbound:
# nocheck: onion-flag a recursive resolver published on the onion is an open resolver, and the containers it serves reach it on the role network
unbound: false
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2024.06"
+ until: 2026-12-03
# nocheck: dynamic-flag - the resolver state volume is backup-disabled rebuildable cache, the backup consumer stays permanently off
container_backup:
diff --git a/roles/svc-registry-cache/meta/services.yml b/roles/svc-registry-cache/meta/services.yml
index 743e59d0a9..8fa58af73b 100644
--- a/roles/svc-registry-cache/meta/services.yml
+++ b/roles/svc-registry-cache/meta/services.yml
@@ -40,6 +40,11 @@ cache:
proxy:
remote_url: "https://registry-1.docker.io" # nocheck: url
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3"
+ until: 2026-12-03
# nocheck: dynamic-flag - pull-through cache content is re-fetchable, the backup consumer stays permanently off
container_backup:
enabled: false
diff --git a/roles/svc-registry-docker/meta/services.yml b/roles/svc-registry-docker/meta/services.yml
index 30607620d3..97dc6330f4 100644
--- a/roles/svc-registry-docker/meta/services.yml
+++ b/roles/svc-registry-docker/meta/services.yml
@@ -38,6 +38,11 @@ docker:
# nocheck: onion-flag the registry accepts unauthenticated pushes from the node that builds into it, so its reach must stay the node
registry: false
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3"
+ until: 2026-12-03
# nocheck: dynamic-flag - locally built images are rebuildable, the backup consumer stays permanently off
container_backup:
enabled: false
diff --git a/roles/svc-runner/meta/services.yml b/roles/svc-runner/meta/services.yml
index 8046378a44..67a978e6d3 100644
--- a/roles/svc-runner/meta/services.yml
+++ b/roles/svc-runner/meta/services.yml
@@ -29,7 +29,7 @@ buildkit:
enabled: false
shared: false
image: moby/buildkit
- version: "v0.34.2"
+ version: "v0.35.0"
# nocheck: dynamic-flag
act-runner:
enabled: false
@@ -37,6 +37,11 @@ act-runner:
image: catthehacker/ubuntu
# nocheck: docker-version
version: "act-latest"
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "act-latest"
+ until: 2026-12-03
# nocheck: variants-coverage the role has a single variant, and the guide edge is not a dimension of it: a second round would differ only by the README replay
docs:
diff --git a/roles/sys-ctl-hlth-runtime/README.md b/roles/sys-ctl-hlth-runtime/README.md
index 5f2a093198..ceef0f9e4c 100644
--- a/roles/sys-ctl-hlth-runtime/README.md
+++ b/roles/sys-ctl-hlth-runtime/README.md
@@ -2,11 +2,11 @@
## Description
-This role checks the language runtime inside every running Docker container. It reads the PHP version of each container that ships a `php` binary and the effective PHP hardening of each service that mounts the shared hardening ini from [`sys-svc-compose-php`](../sys-svc-compose-php/README.md).
+This role scans the node it runs on for known vulnerabilities with [Trivy](https://trivy.dev/), [Grype](https://github.com/anchore/grype) and [OSV-Scanner](https://google.github.io/osv-scanner/) over a [Syft](https://github.com/anchore/syft) SBOM, and checks the effective PHP hardening of each service that mounts the shared hardening ini from [`sys-svc-compose-php`](../sys-svc-compose-php/README.md).
## Overview
-The role installs a check script with a `systemd` service and timer. The check fails, and the failure notifier from [`sys-ctl-alm-compose`](../sys-ctl-alm-compose/README.md) alerts, when a container runs PHP below the security floor of its release line or on an end-of-life line, or when a service that declares `php_hardening` in its `meta/volumes.yml` still reports `expose_php` or `session.upload_progress.enabled` as on. The floors, the lowest patched release of each `major.minor` line, live in `HEALTH_RUNTIME_FLOORS` in [main.yml](./vars/main.yml).
+The role installs a check script with a `systemd` service and a timer at 00:00 UTC, and the deploy runs it once at its end. `severity` maps each reported severity to `fail` or `warn`: an unsuppressed finding mapped to `fail` fails the check, one mapped to `warn` is a `⚠️` line, a suppressed one an `ℹ️` line. The check also fails, and the failure notifier from [`sys-ctl-alm-compose`](../sys-ctl-alm-compose/README.md) alerts, when an engine or its database fails, or when a service that declares `php_hardening` in its `meta/volumes.yml` still reports `expose_php` or `session.upload_progress.enabled` as on. The daily mirror scan of `cron-images-mirror-all.yml` fails on every mapped finding, `fail` and `warn` alike, and tracks them as issues. The scan configuration and the engine pins live in [services.yml](./meta/services.yml).
## Cosmos
@@ -16,6 +16,10 @@ The diagram places Container Runtime Health Check in the Infinito.Nexus cosmos:
flowchart LR
subgraph role [sys-ctl-hlth-runtime 💻]
svc_runtime["runtime"]
+ svc_trivy["trivy"]
+ svc_grype["grype"]
+ svc_osv["osv"]
+ svc_syft["syft"]
end
```
@@ -23,7 +27,18 @@ Solid `1:1` edges are fixed relationships; dashed `0..1` edges are conditional (
## Features
-- **Runtime floor:** Fails for every running container whose PHP is below the floor of its `major.minor` line, or on a line older than every listed floor (end of life). A line newer than every floor passes.
-- **Hardening verification:** Runs `php` inside every service that mounts `php_hardening` and fails while `expose_php` or `session.upload_progress.enabled` is on, which catches a wrong scan dir, a later ini that overrides the hardening, and an image change.
-- **Sidecar report:** Lists other PHP containers of a hardened stack, such as cron or worker sidecars, as info without failing.
-- **Registry report:** `make security-runtimes` lists the PHP runtime of every pinned image from registry metadata, without pulling, against the same floors.
+- **Targets:** `container` scans the image of every running container through the read-only Docker socket, `host` scans the host root filesystem mounted read-only. In swarm every node scans itself.
+- **Engines:** Syft builds one SBOM per target, Grype and OSV-Scanner read it, Trivy reads the target itself. Without `syft` in `engines`, Grype and OSV-Scanner read the target directly; `osv` then scans containers only.
+- **Source-built runtimes:** A runtime compiled into the image, such as the PHP of the official `php` images, is matched by Grype only. With `syft` but without `grype` in `engines`, Grype still scans the binary-classified packages of every SBOM.
+- **Threshold:** `severity` maps each reported severity to `fail` or `warn`, `{CRITICAL: fail, HIGH: warn}` on every host and in CI; a severity it does not name is not reported, and `fixed_only` limits the report to findings with a fixed version. The list form of `severity` is rejected.
+- **Finding records:** Every output is built from the same records, one per finding and owner: `run_id`, `timestamp` (RFC 3339, UTC), `host`, `environment`, `target` (`/` or the host name), `kind`, `image` (`@` or the host name), `scanner`, `id`, `severity`, `package`, `installed_version`, `fixed_version`, `suppressed`, `suppressed_until` and `verdict` (`fail`, `warn` or `suppressed`).
+- **Report:** `report.json` in `DIR_HEALTH_RUNTIME_REPORT` holds the last run: its verdict, the counts per verdict, the engine errors, the counts per target and every record. It is replaced atomically.
+- **Findings log:** `findings.jsonl` in `DIR_HEALTH_RUNTIME_LOG` gets one JSON line per record and run, for Wazuh. A logrotate drop-in rotates it weekly and keeps 12 compressed generations.
+- **Journal:** Besides the `ℹ️`, `⚠️` and `❌` lines, the check prints one JSON line per target, `{"event": "hlth_runtime.target", "run_id", "target", "kind", "image", "counts", "verdict"}` with `verdict` `fail`, `warn` or `ok`, and last `{"event": "hlth_runtime.summary", "run_id", "counts", "errors", "verdict"}`, for Loki.
+- **Metrics:** While `web-app-prometheus` is deployed, the check replaces `infinito_hlth_runtime.prom` in `DIR_METRICS_TEXTFILE` atomically with the gauges `infinito_hlth_runtime_findings{target,kind,image,severity,scanner,verdict}`, `infinito_hlth_runtime_last_run_timestamp_seconds`, `infinito_hlth_runtime_last_run_success` and `infinito_hlth_runtime_scanner_errors{scanner}`. No series carries a CVE id.
+- **Suppressions:** A role accepts findings for its own containers under `.security.suppressions` of its `meta/services.yml`, each entry `id` (one CVE) or `image_tag` (every finding of the image while it runs that tag, which MUST equal the service's `version`) plus `until` below a `# nocheck: cve ` marker, see [suppression.md](../../docs/contributing/actions/testing/suppression.md). Host suppressions are the `id` entries under the engine entries of this role and cover that engine's host findings; an `image_tag` entry there covers the engine's own image.
+- **Databases:** With `db_update` the engines refresh their databases under `database_dir` before each run, three attempts 30 s apart; without it the databases MUST already be there, and a missing one fails the run. SBOMs of running images are cached under `cache_dir` by image id.
+- **Deploy-time run:** The deploy runs the check once at its end and fails on its first failure, without the retries `sys-service-terminator` gives other units.
+- **Development and CI deploys:** A CI row pins one engine and restores its databases; a local deploy draws one engine and refreshes the shared host directory `INFINITO_VULNERABILITY_DB_HOST_PATH`. Both run it behind Syft plus the Grype runtime pass and read the databases read-only at `INFINITO_VULNERABILITY_DB_DIR`. Production hosts run every engine.
+- **Hardening verification:** Runs `php` inside every service that mounts `php_hardening` and fails while `expose_php` or `session.upload_progress.enabled` is on, and lists other PHP containers of a hardened stack as info.
+- **Registry scan:** `make test-security` scans every pinned role image of the GHCR mirror with the same pipeline, see [README.md](../../cli/contributing/security/README.md).
diff --git a/roles/sys-ctl-hlth-runtime/TODO.md b/roles/sys-ctl-hlth-runtime/TODO.md
index 52d1d825ad..847d2d526f 100644
--- a/roles/sys-ctl-hlth-runtime/TODO.md
+++ b/roles/sys-ctl-hlth-runtime/TODO.md
@@ -1,6 +1,4 @@
# To-dos
-- Extend `HEALTH_RUNTIME_FLOORS`, the container probe and `make security-runtimes` to `node`, `python`, `ruby` and `java`.
- Verify the web SAPI where an image splits it from the CLI. `web-app-lam` mounts the hardening ini into both `/etc/php/8.4/apache2/conf.d` and `/etc/php/8.4/cli/conf.d`, and the probe reads only the CLI copy, so a wrong Apache target would still pass.
-- Run `make security-runtimes` in a scheduled CI workflow.
-- Scan the pinned images for CVEs (Trivy or Grype) in the scheduled CI and report new criticals as issues.
+- Restore the workspace drills' databases in `call-test-workspace.yml` from the Actions cache of the `vulnerability-db` job instead of refreshing them in the job.
diff --git a/roles/sys-ctl-hlth-runtime/files/python/script.py b/roles/sys-ctl-hlth-runtime/files/python/script.py
index 0e94150a13..252b4e8a96 100755
--- a/roles/sys-ctl-hlth-runtime/files/python/script.py
+++ b/roles/sys-ctl-hlth-runtime/files/python/script.py
@@ -1,24 +1,73 @@
#!/usr/bin/env python3
+# nocheck: file-size - sys-service installs this one file on every node, which runs it without the repository, so the engine pipeline cannot move into importable modules
from __future__ import annotations
import argparse
+import datetime as dt
import json
+import os
import re
+import shutil
+import socket
import subprocess
import sys
+import tempfile
+import time
+import urllib.parse
+import uuid
+from collections import Counter
+from collections.abc import Callable, Iterable, Mapping, Sequence
+from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
+from pathlib import Path
PROBE_MARKER = "INFINITO-RUNTIME-PROBE"
HARDENED_SETTINGS = ("expose_php", "session.upload_progress.enabled")
PHP_PROBE = (
- f'echo "\\n{PROBE_MARKER}|", PHP_VERSION, "|", ini_get("expose_php"), "|", '
+ f'echo "\\n{PROBE_MARKER}|", ini_get("expose_php"), "|", '
'ini_get("session.upload_progress.enabled"), "\\n";'
)
NO_BINARY_EXIT_CODES = frozenset({126, 127})
EXEC_TIMEOUT_SECONDS = 60
-VERSION_PATTERN = re.compile(r"^(\d+)\.(\d+)\.(\d+)")
ENABLED_VALUES = frozenset({"1", "on", "yes", "true"})
+SCANNERS = ("trivy", "grype", "osv")
+SBOM_BUILDER = "syft"
+ENGINES = (*SCANNERS, SBOM_BUILDER)
+SBOM_READERS = frozenset({"grype", "osv"})
+RUNTIME_ENGINE = "grype"
+RUNTIME_ARTIFACT_TYPE = "binary"
+TARGET_KINDS = ("host", "container")
+SEVERITIES = ("CRITICAL", "HIGH", "MEDIUM", "LOW", "NEGLIGIBLE", "NONE", "UNKNOWN")
+ACTIONS = ("fail", "warn")
+SUPPRESSED = "suppressed"
+VERDICTS = (*ACTIONS, SUPPRESSED)
+CLEAN = "ok"
+METRIC = "infinito_hlth_runtime"
+METRIC_LABELS = ("target", "kind", "image", "severity", "scanner", "verdict")
+FINDINGS_LOG = "findings.jsonl"
+REPORT = "report.json"
+CVE_PATTERN = re.compile(r"^CVE-\d{4}-\d{4,}$")
+OSV_DB_LAYOUT = "osv-scalibr"
+OSV_MISSING_DB = re.compile(r"could not load db for (.+?) ecosystem")
+SUCCESS = frozenset({0})
+OSV_ACCEPTED_EXIT_CODES = frozenset({0, 1, 128})
+OSV_SOURCE_PURL_TYPES = ("deb", "apk")
+UPSTREAM_QUALIFIER = re.compile(r"([?&])upstream=([^]+)")
+HOST_ROOT = "/host"
+WORK = "/work"
+SBOM = "/sbom"
+CACHE = "/cache"
+DOCKER_SOCKET = "/var/run/docker.sock"
+JOB_TIMEOUT_SECONDS = 4 * 3600
+DB_ATTEMPTS = 3
+DB_RETRY_SECONDS = 30
+DB_MARKERS = {
+ "trivy": ("db/trivy.db", "java-db/trivy-java.db"),
+ "grype": ("6/vulnerability.db",),
+ "osv": (OSV_DB_LAYOUT,),
+}
+
@dataclass(frozen=True)
class Container:
@@ -26,11 +75,12 @@ class Container:
name: str
stack: str | None
service: str | None
+ image: str
+ image_name: str
@dataclass(frozen=True)
class PhpProbe:
- version: str
settings: dict
@@ -38,20 +88,221 @@ class ProbeError(RuntimeError):
pass
+class ConfigError(ValueError):
+ pass
+
+
+@dataclass(frozen=True)
+class ScanConfig:
+ """What the vulnerability scan covers and when it fails.
+
+ Args:
+ targets: subset of :data:`TARGET_KINDS`.
+ engines: subset of :data:`ENGINES` holding at least one scanner.
+ severity: ``{severity: action}`` with each action in :data:`ACTIONS`;
+ a severity it does not name is below the threshold.
+ fixed_only: report only findings with a fixed version.
+ workers: parallel engine runs.
+ db_update: download and refresh the databases; ``False`` reads
+ databases that were provided and fails when one is missing.
+ """
+
+ targets: tuple[str, ...]
+ engines: tuple[str, ...]
+ severity: Mapping[str, str]
+ fixed_only: bool
+ workers: int
+ db_update: bool
+
+ def scanners(self) -> tuple[str, ...]:
+ return tuple(engine for engine in SCANNERS if engine in self.engines)
+
+ def reads_sbom(self, engine: str) -> bool:
+ return engine in SBOM_READERS and SBOM_BUILDER in self.engines
+
+ def runtime_pass(self) -> bool:
+ """Whether Grype scans the source-built runtimes Syft found.
+
+ Only Grype matches a runtime compiled from source, such as the PHP
+ of the official ``php`` images, through its CPE; Trivy and OSV do
+ not see it. Without Grype in the list, Grype still scans the
+ binary-classified packages of every SBOM.
+ """
+ return RUNTIME_ENGINE not in self.engines and SBOM_BUILDER in self.engines
+
+ def databases(self) -> tuple[str, ...]:
+ """The scanners whose database the scan needs."""
+ needed = set(self.scanners()) | (
+ {RUNTIME_ENGINE} if self.runtime_pass() else set()
+ )
+ return tuple(engine for engine in SCANNERS if engine in needed)
+
+
+@dataclass(frozen=True)
+class Target:
+ """One thing a scanner reads.
+
+ Args:
+ key: file-name-safe identity.
+ kind: ``host`` or ``container``.
+ ref: the image id, or :data:`HOST_ROOT`.
+ label: the image name or the host name.
+ owners: ``(stack, service)`` of every container running the image.
+ owner_tags: ``((stack, service), tag)`` pairs, the image tag each
+ owner runs the image under; empty for the host.
+ """
+
+ key: str
+ kind: str
+ ref: str
+ label: str
+ owners: tuple[tuple[str | None, str | None], ...]
+ owner_tags: tuple[tuple[tuple[str | None, str | None], str], ...]
+
+ def tag_of(self, owner: tuple[str | None, str | None]) -> str | None:
+ return dict(self.owner_tags).get(owner)
+
+
+@dataclass(frozen=True)
+class Finding:
+ """One vulnerable package as one engine reports it.
+
+ Args:
+ engine: the scanner.
+ target: :attr:`Target.key`.
+ package: package name.
+ installed: installed version.
+ fixed: fixed version(s), empty when there is none.
+ ids: vulnerability ids, CVE ids first.
+ severity: one of :data:`SEVERITIES`.
+ """
+
+ engine: str
+ target: str
+ package: str
+ installed: str
+ fixed: str
+ ids: tuple[str, ...]
+ severity: str
+
+ @property
+ def id(self) -> str:
+ return self.ids[0]
+
+
+@dataclass(frozen=True)
+class Suppression:
+ """One accepted CVE, or every finding of one image tag.
+
+ Args:
+ id: the CVE id, ``None`` for an image tag entry.
+ image_tag: the image tag, ``None`` for a CVE entry.
+ until: the last day the suppression applies.
+ """
+
+ id: str | None
+ image_tag: str | None
+ until: dt.date
+
+ @property
+ def subject(self) -> str:
+ return self.id or f"image tag {self.image_tag}"
+
+
+@dataclass(frozen=True)
+class Suppressions:
+ """Accepted CVEs.
+
+ Args:
+ containers: ``{stack: {service: [Suppression]}}``.
+ host: ``{engine: [Suppression]}`` for host findings.
+ """
+
+ containers: Mapping[str, Mapping[str, Sequence[Suppression]]]
+ host: Mapping[str, Sequence[Suppression]]
+
+
+@dataclass(frozen=True)
+class Step:
+ """One engine run.
+
+ Args:
+ label: what the run is, for error lines; its first word is the engine.
+ argv: the command.
+ accept: exit codes that mean success.
+ """
+
+ label: str
+ argv: tuple[str, ...]
+ accept: frozenset[int]
+
+
+@dataclass(frozen=True)
+class Run:
+ """One run of the check, as every output names it.
+
+ Args:
+ id: unique id of the run.
+ started: when the run started, timezone-aware UTC.
+ host: the node's host name.
+ environment: the deployment environment, e.g. ``production``.
+ """
+
+ id: str
+ started: dt.datetime
+ host: str
+ environment: str
+
+ def timestamp(self) -> str:
+ return self.started.strftime("%Y-%m-%dT%H:%M:%SZ")
+
+
def parse_args(argv=None):
parser = argparse.ArgumentParser(
- description="Check PHP versions and hardening of running containers."
- )
- parser.add_argument(
- "--floors",
- required=True,
- help='JSON: {"php": {".": ""}}',
+ description="Check the PHP hardening and the vulnerabilities of this node."
)
parser.add_argument(
"--hardened",
required=True,
help='JSON: {"": ["", ...]}',
)
+ parser.add_argument(
+ "--scan",
+ required=True,
+ help="JSON: targets, engines, severity, fixed_only, workers, db_update",
+ )
+ parser.add_argument(
+ "--images",
+ required=True,
+ help='JSON: {"": ":"}',
+ )
+ parser.add_argument(
+ "--suppressions",
+ required=True,
+ help='JSON: {"containers": {stack: {service: [..]}}, "host": {engine: [..]}}',
+ )
+ parser.add_argument("--cache-dir", required=True, help="SBOM cache and scratch")
+ parser.add_argument(
+ "--database-dir", required=True, help="Vulnerability databases, one per scanner"
+ )
+ parser.add_argument(
+ "--host-excludes",
+ required=True,
+ help="JSON: absolute host paths the host scan skips",
+ )
+ parser.add_argument(
+ "--environment", required=True, help="Deployment environment of the node"
+ )
+ parser.add_argument(
+ "--report-dir", required=True, help=f"Directory of {REPORT}, the last run"
+ )
+ parser.add_argument(
+ "--log-dir", required=True, help=f"Directory of {FINDINGS_LOG}, every run"
+ )
+ parser.add_argument(
+ "--metrics-file",
+ help="Prometheus textfile to write; omitted or empty writes none",
+ )
return parser.parse_args(argv)
@@ -105,6 +356,8 @@ def running_containers() -> list[Container]:
name=entry["Name"].lstrip("/"),
stack=stack,
service=service,
+ image=entry["Image"],
+ image_name=entry["Config"]["Image"],
)
)
return containers
@@ -117,17 +370,15 @@ def parse_probe(stdout: str) -> PhpProbe:
stdout: everything php printed, startup warnings included.
Returns:
- The PHP version and whether each of HARDENED_SETTINGS is on.
+ Whether each of HARDENED_SETTINGS is on.
"""
for line in stdout.splitlines():
if not line.startswith(f"{PROBE_MARKER}|"):
continue
- fields = line.split("|")[1:]
- if len(fields) != 1 + len(HARDENED_SETTINGS):
+ values = line.split("|")[1:]
+ if len(values) != len(HARDENED_SETTINGS):
raise ProbeError(f"malformed probe line: {line!r}")
- version, *values = fields
return PhpProbe(
- version=version,
settings={
name: value.strip().lower() in ENABLED_VALUES
for name, value in zip(HARDENED_SETTINGS, values, strict=True)
@@ -163,56 +414,15 @@ def probe_php(container_id: str) -> PhpProbe | None:
return parse_probe(result.stdout)
-def _version_tuple(version: str) -> tuple[int, int, int] | None:
- match = VERSION_PATTERN.match(version)
- if match is None:
- return None
- major, minor, patch = (int(part) for part in match.groups())
- return major, minor, patch
-
-
-def _line_tuple(line: str) -> tuple[int, int]:
- major, minor = line.split(".")
- return int(major), int(minor)
-
-
-def floor_violation(version: str, floors: dict) -> str | None:
- """Judge a runtime version against the floors of its runtime.
-
- Args:
- version: the version the runtime reports, e.g. ``8.3.12`` or
- ``8.1.2-1ubuntu2.14``.
- floors: ``{".": ""}``.
-
- Returns:
- ``None`` when the version is at or above its line's floor or on a line
- newer than every floor, otherwise the reason it fails.
- """
- current = _version_tuple(version)
- if current is None:
- return f"unparsable version {version!r}"
- line = f"{current[0]}.{current[1]}"
- if line in floors:
- floor = floors[line]
- if current < _version_tuple(floor):
- return f"{version} is below the security floor {floor}"
- return None
- if current[:2] > max(_line_tuple(key) for key in floors):
- return None
- return f"{version} runs the end-of-life line {line}"
-
-
def check(
containers: list[Container],
- php_floors: dict,
hardened: dict,
probe,
) -> tuple[list[str], list[str]]:
- """Evaluate every container.
+ """Evaluate the PHP hardening of every container.
Args:
containers: the running containers.
- php_floors: the PHP floors, see :func:`floor_violation`.
hardened: ``{stack: [service, ...]}`` that must run hardened PHP.
probe: callable returning a :class:`PhpProbe` or ``None`` per id.
@@ -226,6 +436,8 @@ def check(
must_harden = (
in_hardened_stack and container.service in hardened[container.stack]
)
+ if not in_hardened_stack:
+ continue
try:
result = probe(container.id)
except ProbeError as exc:
@@ -237,39 +449,1316 @@ def check(
f"{container.name}: declares php_hardening but has no php to verify it"
)
continue
- violation = floor_violation(result.version, php_floors)
- if violation:
- failures.append(f"{container.name}: PHP {violation}")
enabled = [name for name, on in result.settings.items() if on]
if not enabled:
continue
message = f"{container.name}: {', '.join(enabled)} on"
if must_harden:
failures.append(f"{message}, the php_hardening ini is not in effect")
- elif in_hardened_stack:
+ else:
infos.append(f"{message} (sidecar without php_hardening)")
return failures, infos
+def severity_actions(raw) -> dict[str, str]:
+ """Validate the mapping of severity to action.
+
+ Args:
+ raw: ``{severity: action}``, e.g. ``{CRITICAL: fail, HIGH: warn}``.
+
+ Returns:
+ The mapping in :data:`SEVERITIES` order.
+
+ Raises:
+ ConfigError: *raw* is the retired list form, empty, names an unknown
+ severity or maps one to anything but an entry of :data:`ACTIONS`.
+ """
+ if isinstance(raw, list):
+ raise ConfigError(
+ "severity must map each severity to fail or warn, e.g. "
+ "{CRITICAL: fail, HIGH: warn}; the list form is no longer accepted"
+ )
+ if not isinstance(raw, Mapping) or not raw:
+ raise ConfigError(
+ "severity must be a non-empty mapping of severity to fail or warn"
+ )
+ unknown = sorted(str(key) for key in raw if key not in SEVERITIES)
+ if unknown:
+ raise ConfigError(
+ f"unknown severity: {', '.join(unknown)}; expected {', '.join(SEVERITIES)}"
+ )
+ invalid = sorted(
+ f"{key}: {value}" for key, value in raw.items() if value not in ACTIONS
+ )
+ if invalid:
+ raise ConfigError(
+ f"severity actions must be {' or '.join(ACTIONS)}; got {', '.join(invalid)}"
+ )
+ return {severity: raw[severity] for severity in SEVERITIES if severity in raw}
+
+
+def scan_config(raw: Mapping) -> ScanConfig:
+ """Validate the scan configuration.
+
+ Args:
+ raw: ``targets``, ``engines``, ``severity``, ``fixed_only``,
+ ``workers`` and ``db_update``.
+
+ Raises:
+ ConfigError: a value is missing, unknown or contradictory.
+ """
+ required = {"targets", "engines", "severity", "fixed_only", "workers", "db_update"}
+ missing = sorted(required - set(raw))
+ if missing:
+ raise ConfigError(f"scan config lacks {', '.join(missing)}")
+ for key, known in (
+ ("targets", TARGET_KINDS),
+ ("engines", ENGINES),
+ ):
+ values = raw[key]
+ if not isinstance(values, list) or not values:
+ raise ConfigError(f"{key} must be a non-empty list")
+ unknown = sorted(set(values) - set(known))
+ if unknown:
+ raise ConfigError(
+ f"unknown {key}: {', '.join(unknown)}; expected {', '.join(known)}"
+ )
+ for key in ("fixed_only", "db_update"):
+ if not isinstance(raw[key], bool):
+ raise ConfigError(f"{key} must be true or false")
+ workers = raw["workers"]
+ if isinstance(workers, bool) or not isinstance(workers, int) or workers < 1:
+ raise ConfigError("workers must be a positive integer")
+ config = ScanConfig(
+ targets=tuple(kind for kind in TARGET_KINDS if kind in raw["targets"]),
+ engines=tuple(engine for engine in ENGINES if engine in raw["engines"]),
+ severity=severity_actions(raw["severity"]),
+ fixed_only=raw["fixed_only"],
+ workers=workers,
+ db_update=raw["db_update"],
+ )
+ if not config.scanners():
+ raise ConfigError(
+ f"engines name no scanner; expected one of {', '.join(SCANNERS)}"
+ )
+ if RUNTIME_ENGINE not in config.engines and SBOM_BUILDER not in config.engines:
+ raise ConfigError(
+ f"source-built runtimes need {RUNTIME_ENGINE} or {SBOM_BUILDER} in engines"
+ )
+ if (
+ "osv" in config.engines
+ and "host" in config.targets
+ and not config.reads_sbom("osv")
+ ):
+ raise ConfigError("osv reads no OS packages of the host without syft")
+ return config
+
+
+def suppressions_from_json(raw: Mapping) -> Suppressions:
+ def entries(items: Iterable[Mapping]) -> tuple[Suppression, ...]:
+ return tuple(
+ Suppression(
+ id=item["id"],
+ image_tag=item["image_tag"],
+ until=dt.date.fromisoformat(item["until"]),
+ )
+ for item in items
+ )
+
+ return Suppressions(
+ containers={
+ stack: {service: entries(items) for service, items in services.items()}
+ for stack, services in raw["containers"].items()
+ },
+ host={engine: entries(items) for engine, items in raw["host"].items()},
+ )
+
+
+def vulnerability_ids(ids: Iterable[str]) -> tuple[str, ...]:
+ """Return the distinct ids, CVE ids first, each part sorted."""
+ unique = {item for item in ids if item}
+ cves = sorted(item for item in unique if CVE_PATTERN.match(item))
+ return (*cves, *sorted(unique - set(cves)))
+
+
+def cvss_severity(score: str) -> str:
+ """Map a CVSS base score to its qualitative rating."""
+ if not score:
+ return "UNKNOWN"
+ value = float(score)
+ if value >= 9.0:
+ return "CRITICAL"
+ if value >= 7.0:
+ return "HIGH"
+ if value >= 4.0:
+ return "MEDIUM"
+ if value > 0.0:
+ return "LOW"
+ return "NONE"
+
+
+def parse_trivy(report: Mapping, target: str) -> list[Finding]:
+ """Normalise a ``trivy --format json`` report."""
+ return [
+ Finding(
+ engine="trivy",
+ target=target,
+ package=vuln["PkgName"],
+ installed=vuln["InstalledVersion"],
+ fixed=vuln.get("FixedVersion") or "",
+ ids=vulnerability_ids(
+ [vuln["VulnerabilityID"], *(vuln.get("VendorIDs") or [])]
+ ),
+ severity=vuln["Severity"].upper(),
+ )
+ for result in report.get("Results") or []
+ for vuln in result.get("Vulnerabilities") or []
+ ]
+
+
+def parse_grype(report: Mapping, target: str) -> list[Finding]:
+ """Normalise a ``grype -o json`` report."""
+ findings = []
+ for match in report["matches"]:
+ vuln = match["vulnerability"]
+ artifact = match["artifact"]
+ fix = vuln["fix"]
+ related = [item["id"] for item in match.get("relatedVulnerabilities") or []]
+ findings.append(
+ Finding(
+ engine="grype",
+ target=target,
+ package=artifact["name"],
+ installed=artifact["version"],
+ fixed=", ".join(fix["versions"]) if fix["state"] == "fixed" else "",
+ ids=vulnerability_ids([vuln["id"], *related]),
+ severity=vuln["severity"].upper(),
+ )
+ )
+ return findings
+
+
+def _osv_fixed(vulns: Iterable[Mapping], package: Mapping) -> str:
+ fixed = {
+ event["fixed"]
+ for vuln in vulns
+ for affected in vuln.get("affected") or []
+ if affected["package"]["name"] == package["name"]
+ and affected["package"]["ecosystem"] == package["ecosystem"]
+ for version_range in affected.get("ranges") or []
+ for event in version_range.get("events") or []
+ if "fixed" in event
+ }
+ return ", ".join(sorted(fixed))
+
+
+def parse_osv(report: Mapping, target_of: Callable[[str], str]) -> list[Finding]:
+ """Normalise an ``osv-scanner --format json`` report.
+
+ Args:
+ report: the report.
+ target_of: maps a result's ``source.path`` to its target key.
+
+ Returns:
+ One finding per package and OSV group. The severity is the group's
+ highest CVSS score mapped by :func:`cvss_severity`; the fixed
+ versions are the ``fixed`` events of the group's ranges for that
+ package.
+ """
+ findings = []
+ for result in report.get("results") or []:
+ target = target_of(result["source"]["path"])
+ for entry in result["packages"]:
+ package = entry["package"]
+ by_id = {vuln["id"]: vuln for vuln in entry.get("vulnerabilities") or []}
+ for group in entry.get("groups") or []:
+ members = [by_id[item] for item in group["ids"] if item in by_id]
+ ids = [*group["ids"], *(group.get("aliases") or [])]
+ for vuln in members:
+ ids += [*(vuln.get("aliases") or []), *(vuln.get("upstream") or [])]
+ findings.append(
+ Finding(
+ engine="osv",
+ target=target,
+ package=package["name"],
+ installed=package["version"],
+ fixed=_osv_fixed(members, package),
+ ids=vulnerability_ids(ids),
+ severity=cvss_severity(group.get("max_severity") or ""),
+ )
+ )
+ return findings
+
+
+def osv_sbom(cyclonedx: Mapping) -> dict:
+ """Return a CycloneDX copy whose distro purls name the source package.
+
+ OSV keys Debian, Ubuntu and Alpine advisories by source package, while
+ Syft names the binary package and carries the source in the ``upstream``
+ qualifier (``libssl3`` from ``openssl``).
+
+ Args:
+ cyclonedx: a Syft ``cyclonedx-json`` document.
+ """
+ document = json.loads(json.dumps(cyclonedx))
+ for component in document.get("components") or []:
+ purl = component.get("purl") or ""
+ kind = purl.removeprefix("pkg:").partition("/")[0]
+ match = UPSTREAM_QUALIFIER.search(purl)
+ if kind not in OSV_SOURCE_PURL_TYPES or match is None:
+ continue
+ head, sep, qualifiers = purl.partition("?")
+ path, _, version = head.partition("@")
+ source, _, source_version = urllib.parse.unquote(match.group(2)).partition("@")
+ namespace = path.rpartition("/")[0]
+ component["purl"] = (
+ f"{namespace}/{source}@{source_version or version}{sep}{qualifiers}"
+ )
+ return document
+
+
+def runtime_sbom(syft: Mapping) -> dict | None:
+ """Return a Syft JSON copy that holds only the binary-classified packages.
+
+ Args:
+ syft: a Syft ``syft-json`` document.
+
+ Returns:
+ The reduced document, or ``None`` when Syft classified no binary.
+ """
+ binaries = [
+ artifact
+ for artifact in syft.get("artifacts") or []
+ if artifact.get("type") == RUNTIME_ARTIFACT_TYPE
+ ]
+ if not binaries:
+ return None
+ reduced = {key: value for key, value in syft.items() if key != "files"}
+ reduced["artifacts"] = binaries
+ reduced["artifactRelationships"] = []
+ return reduced
+
+
+def threshold(finding: Finding, config: ScanConfig) -> str | None:
+ """Map a finding to the action its severity carries.
+
+ Returns:
+ An entry of :data:`ACTIONS`, ``None`` below the threshold.
+ """
+ if config.fixed_only and not finding.fixed:
+ return None
+ return config.severity.get(finding.severity)
+
+
+def image_tag(name: str) -> str:
+ """Return the tag of an image reference, ``latest`` when it names none.
+
+ Args:
+ name: ``[registry/]repository[:tag][@digest]``.
+ """
+ repository = name.split("@", 1)[0].rsplit("/", 1)[-1]
+ _, separator, tag = repository.partition(":")
+ return tag if separator else "latest"
+
+
+def matching(
+ rules: Sequence[Suppression], finding: Finding, tag: str | None
+) -> Suppression | None:
+ """Return the suppression covering the finding, latest first.
+
+ Args:
+ rules: the suppressions of the finding's owner.
+ finding: the finding.
+ tag: the tag of the scanned image, ``None`` for the host, where no
+ image tag entry applies.
+ """
+ hits = [
+ rule
+ for rule in rules
+ if (
+ rule.id in finding.ids
+ if rule.id
+ else tag is not None and rule.image_tag == tag
+ )
+ ]
+ return max(hits, key=lambda rule: rule.until) if hits else None
+
+
+def _owner_label(owner: tuple[str | None, str | None]) -> str:
+ stack, service = owner
+ if stack is None:
+ return "unmanaged container"
+ return f"{stack}/{service}"
+
+
+@dataclass(frozen=True)
+class Verdict:
+ """One finding at the threshold, judged for one owner.
+
+ Args:
+ finding: the finding.
+ target: the target it was found in.
+ owner: the ``(stack, service)`` it is judged for, ``(None, None)``
+ for the host and for unmanaged containers.
+ rule: the suppression that names it, ``None`` when none does.
+ suppressed: whether that suppression is still in force.
+ action: what the finding's severity maps to, an entry of
+ :data:`ACTIONS`.
+ """
+
+ finding: Finding
+ target: Target
+ owner: tuple[str | None, str | None]
+ rule: Suppression | None
+ suppressed: bool
+ action: str
+
+ @property
+ def verdict(self) -> str:
+ return SUPPRESSED if self.suppressed else self.action
+
+ def where(self) -> str:
+ scope = self.target.label
+ if self.target.kind == "container":
+ scope = f"{_owner_label(self.owner)} {scope}"
+ return f"{self.finding.engine} {self.target.kind} {scope}"
+
+ def detail(self) -> str:
+ finding = self.finding
+ fixed = f"fixed in {finding.fixed}" if finding.fixed else "no fix"
+ return f"{finding.id} {finding.severity} {finding.package} {finding.installed} ({fixed})"
+
+
+def verdicts(
+ findings: Iterable[Finding],
+ targets: Mapping[str, Target],
+ config: ScanConfig,
+ suppressions: Suppressions,
+ today: dt.date,
+) -> list[Verdict]:
+ """Judge the findings against the threshold and the suppressions.
+
+ A role's suppressions cover only the containers of its own stack and
+ service; a host suppression covers only the engine it is declared
+ under.
+ """
+ judged = []
+ for finding in sorted(
+ set(findings),
+ key=lambda f: (f.target, f.engine, f.package, f.id, f.installed),
+ ):
+ action = threshold(finding, config)
+ if action is None:
+ continue
+ target = targets[finding.target]
+ for owner in owners_of(target):
+ if target.kind == "host":
+ rules = suppressions.host.get(finding.engine, ())
+ elif owner[0] is None:
+ rules = ()
+ else:
+ rules = suppressions.containers.get(owner[0], {}).get(owner[1], ())
+ rule = matching(rules, finding, target.tag_of(owner))
+ judged.append(
+ Verdict(
+ finding,
+ target,
+ owner,
+ rule,
+ rule is not None and rule.until >= today,
+ action,
+ )
+ )
+ return judged
+
+
+def owners_of(target: Target) -> list[tuple[str | None, str | None]]:
+ """Return the distinct owners a target's findings are judged for."""
+ if target.kind == "host":
+ return [(None, None)]
+ return sorted(set(target.owners), key=str)
+
+
+def report_lines(
+ judged: Iterable[Verdict],
+) -> tuple[list[str], list[str], list[str]]:
+ """Return verdicts as printable lines.
+
+ Returns:
+ ``(failures, warnings, infos)``: unsuppressed verdicts whose action is
+ ``fail``, those whose action is ``warn``, and suppressions.
+ """
+ failures: list[str] = []
+ warnings: list[str] = []
+ infos: list[str] = []
+ for verdict in judged:
+ line = f"{verdict.where()}: {verdict.detail()}"
+ if verdict.suppressed:
+ infos.append(f"{line} suppressed until {verdict.rule.until}")
+ continue
+ if verdict.rule is not None:
+ infos.append(
+ f"{verdict.where()}: suppression of {verdict.rule.subject} expired on {verdict.rule.until}"
+ )
+ (failures if verdict.action == "fail" else warnings).append(line)
+ return failures, warnings, infos
+
+
+def evaluate(
+ findings: Iterable[Finding],
+ targets: Mapping[str, Target],
+ config: ScanConfig,
+ suppressions: Suppressions,
+ today: dt.date,
+) -> tuple[list[str], list[str], list[str]]:
+ """Return :func:`verdicts` as :func:`report_lines`."""
+ return report_lines(verdicts(findings, targets, config, suppressions, today))
+
+
+def scope(target: Target, owner: tuple[str | None, str | None]) -> tuple[str, str]:
+ """Name one owner of a target for the outputs.
+
+ Returns:
+ ``(target, image)``: the owner and ``@`` for a
+ container, the host name twice for the host.
+ """
+ if target.kind == "host":
+ return target.label, target.label
+ return _owner_label(owner), f"{target.label}@{target.ref}"
+
+
+def record(verdict: Verdict, run: Run) -> dict:
+ """Return one judged finding as the record every output carries."""
+ finding = verdict.finding
+ target, image = scope(verdict.target, verdict.owner)
+ return {
+ "run_id": run.id,
+ "timestamp": run.timestamp(),
+ "host": run.host,
+ "environment": run.environment,
+ "target": target,
+ "kind": verdict.target.kind,
+ "image": image,
+ "scanner": finding.engine,
+ "id": finding.id,
+ "severity": finding.severity,
+ "package": finding.package,
+ "installed_version": finding.installed,
+ "fixed_version": finding.fixed or None,
+ "suppressed": verdict.suppressed,
+ "suppressed_until": (
+ verdict.rule.until.isoformat() if verdict.suppressed else None
+ ),
+ "verdict": verdict.verdict,
+ }
+
+
+def tally(verdicts_of: Iterable[str]) -> dict[str, int]:
+ """Return the count of each entry of :data:`VERDICTS`."""
+ counts = dict.fromkeys(VERDICTS, 0)
+ for verdict in verdicts_of:
+ counts[verdict] += 1
+ return counts
+
+
+def worst(counts: Mapping[str, int]) -> str:
+ """Return ``fail`` or ``warn`` while one is counted, else :data:`CLEAN`."""
+ return next((action for action in ACTIONS if counts[action]), CLEAN)
+
+
+def error_engine(line: str) -> str:
+ """Return the engine an error line starts with."""
+ return line.split(" ", 1)[0].removesuffix(":")
+
+
+@dataclass(frozen=True)
+class Outcome:
+ """Everything one run reports.
+
+ Args:
+ run: the run.
+ targets: the scanned targets.
+ records: :func:`record` of every verdict.
+ errors: engine runs that did not deliver.
+ engines: the configured engines.
+ failed: whether the run fails.
+ finished: when the scan finished, Unix seconds.
+ """
+
+ run: Run
+ targets: tuple[Target, ...]
+ records: tuple[dict, ...]
+ errors: tuple[str, ...]
+ engines: tuple[str, ...]
+ failed: bool
+ finished: float
+
+ def target_events(self) -> list[dict]:
+ events = []
+ for target in self.targets:
+ for owner in owners_of(target):
+ name, image = scope(target, owner)
+ counts = tally(
+ item["verdict"]
+ for item in self.records
+ if (item["target"], item["kind"], item["image"])
+ == (name, target.kind, image)
+ )
+ events.append(
+ {
+ "event": "hlth_runtime.target",
+ "run_id": self.run.id,
+ "target": name,
+ "kind": target.kind,
+ "image": image,
+ "counts": counts,
+ "verdict": worst(counts),
+ }
+ )
+ return events
+
+ def summary_event(self) -> dict:
+ counts = tally(item["verdict"] for item in self.records)
+ return {
+ "event": "hlth_runtime.summary",
+ "run_id": self.run.id,
+ "counts": counts,
+ "errors": len(self.errors),
+ "verdict": "fail" if self.failed else worst(counts),
+ }
+
+ def report(self) -> dict:
+ summary = self.summary_event()
+ return {
+ "run_id": self.run.id,
+ "timestamp": self.run.timestamp(),
+ "host": self.run.host,
+ "environment": self.run.environment,
+ "verdict": summary["verdict"],
+ "counts": summary["counts"],
+ "errors": list(self.errors),
+ "targets": [
+ {
+ key: value
+ for key, value in event.items()
+ if key not in ("event", "run_id")
+ }
+ for event in self.target_events()
+ ],
+ "findings": list(self.records),
+ }
+
+ def metrics(self) -> str:
+ lines = [
+ f"# HELP {METRIC}_findings Judged vulnerability findings of the last run.",
+ f"# TYPE {METRIC}_findings gauge",
+ ]
+ series = Counter(
+ tuple(item[label] for label in METRIC_LABELS) for item in self.records
+ )
+ for values, count in sorted(series.items()):
+ labels = ",".join(
+ f'{label}="{_label_value(value)}"'
+ for label, value in zip(METRIC_LABELS, values, strict=True)
+ )
+ lines.append(f"{METRIC}_findings{{{labels}}} {count}")
+ lines += [
+ f"# HELP {METRIC}_last_run_timestamp_seconds When the last run finished.",
+ f"# TYPE {METRIC}_last_run_timestamp_seconds gauge",
+ f"{METRIC}_last_run_timestamp_seconds {int(self.finished)}",
+ f"# HELP {METRIC}_last_run_success 1 when the last run did not fail, else 0.",
+ f"# TYPE {METRIC}_last_run_success gauge",
+ f"{METRIC}_last_run_success {0 if self.failed else 1}",
+ f"# HELP {METRIC}_scanner_errors Engine runs of the last run that did not deliver.",
+ f"# TYPE {METRIC}_scanner_errors gauge",
+ ]
+ errors = Counter(error_engine(line) for line in self.errors)
+ for engine in sorted({*self.engines, *errors}):
+ lines.append(
+ f'{METRIC}_scanner_errors{{scanner="{_label_value(engine)}"}} {errors[engine]}'
+ )
+ return "\n".join(lines) + "\n"
+
+
+def _label_value(value: str) -> str:
+ return value.replace("\\", "\\\\").replace("\n", "\\n").replace('"', '\\"')
+
+
+def write_atomic(path: Path, text: str) -> None:
+ staged = path.with_name(f".{path.name}.{os.getpid()}.tmp")
+ try:
+ staged.write_text(text, encoding="utf-8")
+ staged.replace(path)
+ finally:
+ staged.unlink(missing_ok=True)
+
+
+def publish(
+ outcome: Outcome, report_dir: Path, log_dir: Path, metrics_file: str | None
+) -> list[dict]:
+ """Write the outputs of one run.
+
+ Args:
+ outcome: the run's results.
+ report_dir: where :data:`REPORT` is replaced.
+ log_dir: where :data:`FINDINGS_LOG` grows by one line per record.
+ metrics_file: the Prometheus textfile; ``None`` or empty writes none.
+
+ Returns:
+ The journal events, one per target and the summary last.
+ """
+ write_atomic(report_dir / REPORT, json.dumps(outcome.report(), indent=2) + "\n")
+ if outcome.records:
+ with (log_dir / FINDINGS_LOG).open("a", encoding="utf-8") as handle:
+ handle.write("".join(json.dumps(item) + "\n" for item in outcome.records))
+ if metrics_file:
+ write_atomic(Path(metrics_file), outcome.metrics())
+ return [*outcome.target_events(), outcome.summary_event()]
+
+
+def container_targets(containers: Iterable[Container]) -> list[Target]:
+ """Group the running containers by image."""
+ grouped: dict[str, list[Container]] = {}
+ for container in containers:
+ grouped.setdefault(container.image, []).append(container)
+ targets = []
+ for image, members in sorted(grouped.items()):
+ members.sort(key=lambda c: c.name)
+ targets.append(
+ Target(
+ key=image.removeprefix("sha256:"),
+ kind="container",
+ ref=image,
+ label=members[0].image_name,
+ owners=tuple((member.stack, member.service) for member in members),
+ owner_tags=tuple(
+ ((member.stack, member.service), image_tag(member.image_name))
+ for member in members
+ ),
+ )
+ )
+ return targets
+
+
+def host_target(hostname: str) -> Target:
+ return Target(
+ key="host",
+ kind="host",
+ ref=HOST_ROOT,
+ label=hostname,
+ owners=(),
+ owner_tags=(),
+ )
+
+
+def _env(pairs: Mapping[str, str]) -> list[str]:
+ args = []
+ for key, value in sorted(pairs.items()):
+ args += ["-e", f"{key}={value}"]
+ return args
+
+
+ENGINE_ENV = {
+ "trivy": {},
+ "grype": {"GRYPE_DB_CACHE_DIR": CACHE, "GRYPE_CHECK_FOR_APP_UPDATE": "false"},
+ "osv": {"OSV_SCANNER_LOCAL_DB_CACHE_DIRECTORY": CACHE},
+ "syft": {"SYFT_CHECK_FOR_APP_UPDATE": "false"},
+}
+TRIVY_COMMON = (
+ "--cache-dir",
+ CACHE,
+ "--disable-telemetry",
+ "--skip-version-check",
+ "--quiet",
+)
+
+
+@dataclass(frozen=True)
+class Layout:
+ """Where one scan run keeps its files.
+
+ Args:
+ runtime: the command that starts a container, e.g. ``container run``.
+ databases: the database root, one directory per scanner.
+ sbom: the SBOM directory.
+ work: the per-run scratch directory.
+ excludes: absolute host paths the host scan skips.
+ """
+
+ runtime: tuple[str, ...]
+ databases: Path
+ sbom: Path
+ work: Path
+ excludes: tuple[str, ...]
+
+
+def run_argv(
+ layout: Layout,
+ engine: str,
+ image: str,
+ args: Sequence[str],
+ *,
+ target: Target | None,
+ extra_env: Mapping[str, str],
+) -> tuple[str, ...]:
+ """Build the command that runs one engine container.
+
+ Args:
+ layout: where the run keeps its files.
+ engine: the engine, which picks its database mount and environment.
+ image: the engine image.
+ args: the engine's arguments.
+ target: the target, which picks the host or Docker socket mount;
+ ``None`` for a run that reads neither.
+ extra_env: environment on top of the engine's own.
+ """
+ mounts = ["-v", f"{layout.sbom}:{SBOM}", "-v", f"{layout.work}:{WORK}"]
+ if engine in SCANNERS:
+ mounts += ["-v", f"{layout.databases / engine}:{CACHE}"]
+ if target is not None and target.kind == "host":
+ mounts += ["-v", f"/:{HOST_ROOT}:ro"]
+ if target is not None and target.kind == "container":
+ mounts += ["-v", f"{DOCKER_SOCKET}:{DOCKER_SOCKET}:ro"]
+ environment = {"TMPDIR": WORK, **ENGINE_ENV[engine], **extra_env}
+ return (*layout.runtime, "--rm", *mounts, *_env(environment), image, *args)
+
+
+def _relative_excludes(layout: Layout) -> list[str]:
+ return [f"./{path.strip('/')}" for path in layout.excludes]
+
+
+def db_steps(engine: str, layout: Layout, image: str) -> list[Step]:
+ """Download or refresh one engine's database."""
+ if engine == "trivy":
+ return [
+ Step(
+ f"trivy {name}",
+ run_argv(
+ layout,
+ engine,
+ image,
+ ["image", flag, *TRIVY_COMMON],
+ target=None,
+ extra_env={},
+ ),
+ SUCCESS,
+ )
+ for name, flag in (
+ ("database", "--download-db-only"),
+ ("java database", "--download-java-db-only"),
+ )
+ ]
+ if engine == "grype":
+ return [
+ Step(
+ "grype database",
+ run_argv(
+ layout, engine, image, ["db", "update"], target=None, extra_env={}
+ ),
+ SUCCESS,
+ )
+ ]
+ return []
+
+
+def sbom_paths(layout: Layout, target: Target) -> tuple[Path, Path]:
+ return (
+ layout.sbom / f"{target.key}.syft.json",
+ layout.sbom / f"{target.key}.cdx.json",
+ )
+
+
+def sbom_step(layout: Layout, image: str, target: Target) -> Step:
+ """Build one target's SBOM in Syft and CycloneDX JSON."""
+ if target.kind == "host":
+ source = [f"dir:{HOST_ROOT}", "--override-default-catalogers", "image"]
+ for path in _relative_excludes(layout):
+ source += ["--exclude", path]
+ else:
+ source = [f"docker:{target.ref}"]
+ args = [
+ "scan",
+ *source,
+ "-o",
+ f"syft-json={SBOM}/{target.key}.syft.json",
+ "-o",
+ f"cyclonedx-json={SBOM}/{target.key}.cdx.json",
+ "-q",
+ ]
+ return Step(
+ f"syft {target.kind} {target.label}",
+ run_argv(layout, "syft", image, args, target=target, extra_env={}),
+ SUCCESS,
+ )
+
+
+def trivy_step(layout: Layout, image: str, target: Target, config: ScanConfig) -> Step:
+ args = [
+ "rootfs" if target.kind == "host" else "image",
+ *TRIVY_COMMON,
+ "--skip-db-update",
+ "--skip-java-db-update",
+ "--scanners",
+ "vuln",
+ "--format",
+ "json",
+ "--output",
+ f"{WORK}/{target.key}.trivy.json",
+ ]
+ if not config.db_update:
+ args += ["--cache-backend", "memory"]
+ if target.kind == "host":
+ args += [
+ "--skip-dirs",
+ ",".join(f"{HOST_ROOT}{path}" for path in layout.excludes),
+ HOST_ROOT,
+ ]
+ else:
+ args += ["--image-src", "docker", target.ref]
+ return Step(
+ f"trivy {target.kind} {target.label}",
+ run_argv(layout, "trivy", image, args, target=target, extra_env={}),
+ SUCCESS,
+ )
+
+
+def grype_step(layout: Layout, image: str, target: Target, config: ScanConfig) -> Step:
+ if config.reads_sbom("grype"):
+ source = [f"sbom:{SBOM}/{target.key}.syft.json"]
+ elif target.kind == "host":
+ source = [f"dir:{HOST_ROOT}"]
+ for path in _relative_excludes(layout):
+ source += ["--exclude", path]
+ else:
+ source = [f"docker:{target.ref}"]
+ args = [*source, "-o", "json", "--file", f"{WORK}/{target.key}.grype.json", "-q"]
+ return Step(
+ f"grype {target.kind} {target.label}",
+ run_argv(
+ layout,
+ "grype",
+ image,
+ args,
+ target=target,
+ extra_env={"GRYPE_DB_AUTO_UPDATE": "false"},
+ ),
+ SUCCESS,
+ )
+
+
+def osv_args(config: ScanConfig, output: str) -> list[str]:
+ args = ["--offline-vulnerabilities", "--format", "json", "--output-file", output]
+ if config.db_update:
+ args.append("--download-offline-databases")
+ return args
+
+
+def osv_sbom_step(
+ layout: Layout, image: str, targets: Sequence[Target], config: ScanConfig
+) -> Step:
+ """Scan every target's rewritten CycloneDX in one OSV run."""
+ args = ["scan", "source", *osv_args(config, f"{WORK}/osv.json")]
+ for target in targets:
+ args += ["-L", f"{WORK}/{target.key}.osv.cdx.json"]
+ return Step(
+ "osv sbom",
+ run_argv(layout, "osv", image, args, target=None, extra_env={}),
+ OSV_ACCEPTED_EXIT_CODES,
+ )
+
+
+def osv_image_steps(
+ layout: Layout, image: str, target: Target, config: ScanConfig
+) -> list[Step]:
+ """Export one image and scan the archive; OSV reads no docker socket."""
+ archive = layout.work / "osv-image.tar"
+ return [
+ Step(
+ f"osv export {target.label}",
+ (layout.runtime[0], "save", "--output", str(archive), target.ref),
+ SUCCESS,
+ ),
+ Step(
+ f"osv container {target.label}",
+ run_argv(
+ layout,
+ "osv",
+ image,
+ [
+ "scan",
+ "image",
+ "--archive",
+ f"{WORK}/osv-image.tar",
+ *osv_args(config, f"{WORK}/{target.key}.osv.json"),
+ ],
+ target=None,
+ extra_env={},
+ ),
+ OSV_ACCEPTED_EXIT_CODES,
+ ),
+ ]
+
+
+Runner = Callable[[Sequence[str]], subprocess.CompletedProcess]
+
+
+def default_runner(argv: Sequence[str]) -> subprocess.CompletedProcess:
+ return subprocess.run(
+ list(argv),
+ capture_output=True,
+ text=True,
+ check=False,
+ timeout=JOB_TIMEOUT_SECONDS,
+ )
+
+
+def _tail(text: str) -> str:
+ lines = [line for line in text.strip().splitlines() if line.strip()]
+ return " | ".join(lines[-3:])
+
+
+def run_lane(lane: Sequence[Step], runner: Runner) -> list[str]:
+ """Run steps in order and stop at the first failing one.
+
+ Returns:
+ Error lines, empty when every step succeeded.
+ """
+ for step in lane:
+ try:
+ result = runner(step.argv)
+ except subprocess.TimeoutExpired as exc:
+ return [f"{step.label}: no result within {exc.timeout}s"]
+ missing = OSV_MISSING_DB.findall(f"{result.stdout}\n{result.stderr}")
+ if missing:
+ return [
+ f"{step.label}: no OSV database for {', '.join(sorted(set(missing)))}"
+ ]
+ if result.returncode not in step.accept:
+ output = _tail(result.stderr) or _tail(result.stdout)
+ return [f"{step.label}: exited {result.returncode}: {output}"]
+ return []
+
+
+def run_lanes(
+ lanes: Sequence[Sequence[Step]], runner: Runner, workers: int
+) -> list[list[str]]:
+ """Run lanes in parallel, at most *workers* at a time.
+
+ Returns:
+ The error lines of each lane, in lane order.
+ """
+ if not lanes:
+ return []
+ with ThreadPoolExecutor(max_workers=workers) as pool:
+ return list(pool.map(lambda lane: run_lane(lane, runner), lanes))
+
+
+def _flat(errors: Iterable[Sequence[str]]) -> list[str]:
+ return [line for lines in errors for line in lines]
+
+
+def _read_json(path: Path) -> dict:
+ return json.loads(path.read_text(encoding="utf-8"))
+
+
+def missing_databases(engine: str, databases: Path) -> list[str]:
+ """Name every file of a provided database that is not there."""
+ return [
+ f"{engine}: provided database {databases / engine / marker} is missing"
+ for marker in DB_MARKERS[engine]
+ if not (databases / engine / marker).exists()
+ ]
+
+
+def prepare_databases(
+ config: ScanConfig, images: Mapping[str, str], layout: Layout, runner: Runner
+) -> dict[str, list[str]]:
+ """Refresh or check each database the scan needs.
+
+ Returns:
+ ``{engine: error lines}``; an engine with errors does not scan.
+ """
+ needed = config.databases()
+ if not config.db_update:
+ return {
+ engine: missing_databases(engine, layout.databases) for engine in needed
+ }
+ for engine in needed:
+ (layout.databases / engine).mkdir(parents=True, exist_ok=True)
+ results: dict[str, list[str]] = {}
+ pending = list(needed)
+ for attempt in range(DB_ATTEMPTS):
+ if attempt:
+ pause(DB_RETRY_SECONDS)
+ lanes = [db_steps(engine, layout, images[engine]) for engine in pending]
+ results.update(
+ zip(pending, run_lanes(lanes, runner, config.workers), strict=True)
+ )
+ pending = [engine for engine in pending if results[engine]]
+ if not pending:
+ break
+ return {engine: results[engine] for engine in needed}
+
+
+def pause(seconds: float) -> None:
+ time.sleep(seconds)
+
+
+def runtime_step(layout: Layout, image: str, target: Target) -> Step:
+ """Scan the binary-classified packages of one SBOM with Grype."""
+ args = [
+ f"sbom:{WORK}/{target.key}.runtime.syft.json",
+ "-o",
+ "json",
+ "--file",
+ f"{WORK}/{target.key}.runtime.grype.json",
+ "-q",
+ ]
+ return Step(
+ f"grype runtime {target.kind} {target.label}",
+ run_argv(
+ layout,
+ RUNTIME_ENGINE,
+ image,
+ args,
+ target=None,
+ extra_env={"GRYPE_DB_AUTO_UPDATE": "false"},
+ ),
+ SUCCESS,
+ )
+
+
+def scan(
+ targets: Sequence[Target],
+ config: ScanConfig,
+ images: Mapping[str, str],
+ layout: Layout,
+ runner: Runner,
+) -> tuple[list[Finding], list[str]]:
+ """Run every engine over every target.
+
+ Returns:
+ ``(findings, errors)``; an error is an engine run that did not
+ deliver, which fails the scan.
+ """
+ databases = prepare_databases(config, images, layout, runner)
+ errors = _flat(databases.values())
+ usable = {engine for engine, lines in databases.items() if not lines}
+ scanners = [engine for engine in config.scanners() if engine in usable]
+ runtime = config.runtime_pass() and RUNTIME_ENGINE in usable
+
+ sbom_ready = list(targets)
+ if runtime or any(config.reads_sbom(engine) for engine in scanners):
+ pending = [
+ target
+ for target in targets
+ if target.kind == "host"
+ or not all(path.is_file() for path in sbom_paths(layout, target))
+ ]
+ results = run_lanes(
+ [[sbom_step(layout, images[SBOM_BUILDER], target)] for target in pending],
+ runner,
+ config.workers,
+ )
+ errors += _flat(results)
+ failed = {
+ target.key for target, lines in zip(pending, results, strict=True) if lines
+ }
+ sbom_ready = [target for target in targets if target.key not in failed]
+
+ lanes: list[list[Step]] = []
+ if "trivy" in scanners:
+ lanes.append(
+ [trivy_step(layout, images["trivy"], target, config) for target in targets]
+ )
+ if "grype" in scanners:
+ lanes.extend(
+ [grype_step(layout, images["grype"], target, config)]
+ for target in targets
+ if not config.reads_sbom("grype") or target in sbom_ready
+ )
+ for target in sbom_ready if runtime else ():
+ reduced = runtime_sbom(_read_json(sbom_paths(layout, target)[0]))
+ if reduced is None:
+ continue
+ (layout.work / f"{target.key}.runtime.syft.json").write_text(
+ json.dumps(reduced), encoding="utf-8"
+ )
+ lanes.append([runtime_step(layout, images[RUNTIME_ENGINE], target)])
+ if "osv" in scanners and config.reads_sbom("osv"):
+ for target in sbom_ready:
+ cdx = sbom_paths(layout, target)[1]
+ (layout.work / f"{target.key}.osv.cdx.json").write_text(
+ json.dumps(osv_sbom(_read_json(cdx))), encoding="utf-8"
+ )
+ if sbom_ready:
+ lanes.append([osv_sbom_step(layout, images["osv"], sbom_ready, config)])
+ elif "osv" in scanners:
+ lanes.append(
+ [
+ step
+ for target in targets
+ for step in osv_image_steps(layout, images["osv"], target, config)
+ ]
+ )
+ errors += _flat(run_lanes(lanes, runner, config.workers))
+
+ findings: list[Finding] = []
+ for target in targets:
+ for name, parse in (
+ ("trivy", parse_trivy),
+ ("grype", parse_grype),
+ ("runtime.grype", parse_grype),
+ ):
+ report = layout.work / f"{target.key}.{name}.json"
+ if report.is_file():
+ findings += parse(_read_json(report), target.key)
+ report = layout.work / f"{target.key}.osv.json"
+ if report.is_file():
+ findings += parse_osv(_read_json(report), lambda _path, key=target.key: key)
+ batched = layout.work / "osv.json"
+ if batched.is_file():
+ by_file = {
+ f"{WORK}/{target.key}.osv.cdx.json": target.key for target in sbom_ready
+ }
+ findings += parse_osv(_read_json(batched), by_file.__getitem__)
+ return findings, errors
+
+
+def prune_sboms(layout: Layout, targets: Iterable[Target]) -> None:
+ """Drop the cached SBOMs of images no container runs any more."""
+ keep = {path for target in targets for path in sbom_paths(layout, target)}
+ for path in layout.sbom.glob("*.json"):
+ if path not in keep:
+ path.unlink()
+
+
+def docker_root() -> str:
+ return subprocess.run(
+ ["container", "info", "--format", "{{.DockerRootDir}}"],
+ capture_output=True,
+ text=True,
+ check=True,
+ timeout=EXEC_TIMEOUT_SECONDS,
+ ).stdout.strip()
+
+
+def vulnerability_check(
+ containers: Sequence[Container],
+ config: ScanConfig,
+ images: Mapping[str, str],
+ suppressions: Suppressions,
+ cache: Path,
+ databases: Path,
+ excludes: Sequence[str],
+ runner: Runner,
+ run: Run,
+) -> tuple[list[Target], list[Verdict], list[str]]:
+ """Scan the running containers and the host.
+
+ Returns:
+ ``(targets, verdicts, errors)``: what was scanned, every finding at
+ the threshold judged per owner, and the engine runs that failed.
+ """
+ targets: list[Target] = []
+ if "container" in config.targets:
+ targets += container_targets(containers)
+ if "host" in config.targets:
+ targets.append(host_target(run.host))
+ sbom = cache / "sbom"
+ sbom.mkdir(parents=True, exist_ok=True)
+ work = Path(tempfile.mkdtemp(prefix="run-", dir=cache))
+ try:
+ layout = Layout(
+ runtime=("container", "run"),
+ databases=databases,
+ sbom=sbom,
+ work=work,
+ excludes=tuple(
+ sorted({*excludes, str(cache), str(databases), docker_root()})
+ ),
+ )
+ findings, errors = scan(targets, config, images, layout, runner)
+ prune_sboms(
+ layout, [target for target in targets if target.kind == "container"]
+ )
+ finally:
+ shutil.rmtree(work)
+ judged = verdicts(
+ findings,
+ {target.key: target for target in targets},
+ config,
+ suppressions,
+ run.started.date(),
+ )
+ return targets, judged, errors
+
+
def main(argv=None) -> int:
args = parse_args(argv)
- php_floors = json.loads(args.floors)["php"]
+ run = Run(
+ id=str(uuid.uuid4()),
+ started=dt.datetime.now(tz=dt.UTC),
+ host=socket.gethostname(),
+ environment=args.environment,
+ )
hardened = json.loads(args.hardened)
+ try:
+ config = scan_config(json.loads(args.scan))
+ except ConfigError as exc:
+ print(f"❌ {exc}")
+ return 1
try:
containers = running_containers()
except (subprocess.TimeoutExpired, subprocess.CalledProcessError) as exc:
print(f"❌ listing the running containers failed: {exc}")
return 1
- failures, infos = check(containers, php_floors, hardened, probe_php)
- for line in infos:
+ failures, infos = check(containers, hardened, probe_php)
+ targets, judged, errors = vulnerability_check(
+ containers,
+ config,
+ json.loads(args.images),
+ suppressions_from_json(json.loads(args.suppressions)),
+ Path(args.cache_dir),
+ Path(args.database_dir),
+ json.loads(args.host_excludes),
+ default_runner,
+ run,
+ )
+ found, warned, noted = report_lines(judged)
+ for line in infos + noted:
print(f"ℹ️ {line}")
- for line in failures:
+ for line in warned:
+ print(f"⚠️ {line}")
+ failed = failures + found + errors
+ for line in failed:
print(f"❌ {line}")
- if failures:
- print(f"🚨 {len(failures)} runtime finding(s).")
- return 1
- print("✅ Every PHP runtime is at or above its floor and hardened where declared.")
- return 0
+ if failed:
+ print(f"🚨 {len(failed)} runtime failure(s).")
+ elif warned:
+ print(
+ f"⚠️ {len(warned)} vulnerability finding(s) mapped to warn; "
+ "they do not fail this check."
+ )
+ else:
+ print(
+ "✅ PHP is hardened where declared and no engine reports a vulnerability at the threshold."
+ )
+ outcome = Outcome(
+ run=run,
+ targets=tuple(targets),
+ records=tuple(record(verdict, run) for verdict in judged),
+ errors=tuple(errors),
+ engines=config.engines,
+ failed=bool(failed),
+ finished=time.time(),
+ )
+ events = publish(
+ outcome, Path(args.report_dir), Path(args.log_dir), args.metrics_file
+ )
+ for event in events:
+ print(json.dumps(event))
+ return 1 if failed else 0
if __name__ == "__main__":
diff --git a/roles/sys-ctl-hlth-runtime/lookup_plugins/cve_suppressions.py b/roles/sys-ctl-hlth-runtime/lookup_plugins/cve_suppressions.py
new file mode 100644
index 0000000000..b2a894997f
--- /dev/null
+++ b/roles/sys-ctl-hlth-runtime/lookup_plugins/cve_suppressions.py
@@ -0,0 +1,65 @@
+from __future__ import annotations
+
+from typing import Any
+
+from ansible.errors import AnsibleError
+from ansible.plugins.lookup import LookupBase
+
+from utils import PROJECT_ROOT
+from utils.roles.entity.name import get_entity_name
+from utils.security.engine import ROLE, SCANNERS
+from utils.security.suppressions import SuppressionError, role_suppressions
+
+ROLES_DIR = PROJECT_ROOT / "roles"
+
+
+def collect(group_names: list[str]) -> dict[str, dict]:
+ """Return the suppressions the scan applies on this node.
+
+ Args:
+ group_names: the deployed role ids.
+
+ Returns:
+ ``{"containers": {entity: {service: [entry]}}, "host": {engine:
+ [entry]}}`` where an entry is ``{"id", "image_tag", "until"}``. The
+ entity is the compose project and swarm stack name, so a role's
+ suppressions reach only its own containers. The host takes the
+ ``id`` entries of the engine services only; their ``image_tag``
+ entries cover the engine's own image.
+ """
+ containers: dict[str, dict[str, list[dict[str, str]]]] = {}
+ for role in sorted(set(group_names)):
+ entity = get_entity_name(role)
+ declared = role_suppressions(ROLES_DIR, role)
+ if entity and declared:
+ containers[entity] = {
+ service: [entry.as_json() for entry in entries]
+ for service, entries in declared.items()
+ }
+ own = role_suppressions(ROLES_DIR, ROLE)
+ host = {
+ engine: [entry.as_json() for entry in entries if entry.id]
+ for engine, entries in own.items()
+ if engine in SCANNERS
+ }
+ return {"containers": containers, "host": host}
+
+
+class LookupModule(LookupBase):
+ """``lookup('cve_suppressions', group_names=)``, see :func:`collect`."""
+
+ def run(
+ self,
+ terms: list[Any] | None,
+ variables: dict[str, Any] | None = None,
+ **kwargs: Any,
+ ) -> list[dict[str, dict]]:
+ group_names = kwargs.get("group_names")
+ if not isinstance(group_names, (list, tuple)):
+ raise AnsibleError(
+ "cve_suppressions: group_names must be a list of role ids"
+ )
+ try:
+ return [collect([str(name) for name in group_names])]
+ except SuppressionError as exc:
+ raise AnsibleError(f"cve_suppressions: {exc}") from exc
diff --git a/roles/sys-ctl-hlth-runtime/meta/main.yml b/roles/sys-ctl-hlth-runtime/meta/main.yml
index a4656c3c54..08071f267a 100644
--- a/roles/sys-ctl-hlth-runtime/meta/main.yml
+++ b/roles/sys-ctl-hlth-runtime/meta/main.yml
@@ -1,7 +1,7 @@
---
galaxy_info:
author: Kevin Veen-Birkenbach
- description: Systemd-timed monitor for containers running PHP below its security floor or without the shared PHP hardening
+ description: Systemd-timed vulnerability scan of the node and its containers, plus the shared PHP hardening check
company: |
Kevin Veen-Birkenbach
https://www.veen.world
diff --git a/roles/sys-ctl-hlth-runtime/meta/packages.yml b/roles/sys-ctl-hlth-runtime/meta/packages.yml
new file mode 100644
index 0000000000..c6268d1531
--- /dev/null
+++ b/roles/sys-ctl-hlth-runtime/meta/packages.yml
@@ -0,0 +1,8 @@
+---
+logrotate:
+ Archlinux:
+ - logrotate
+ Debian:
+ - logrotate
+ RedHat:
+ - logrotate
diff --git a/roles/sys-ctl-hlth-runtime/meta/services.yml b/roles/sys-ctl-hlth-runtime/meta/services.yml
index 754ea0ad3a..f80bd06dff 100644
--- a/roles/sys-ctl-hlth-runtime/meta/services.yml
+++ b/roles/sys-ctl-hlth-runtime/meta/services.yml
@@ -6,3 +6,85 @@ runtime:
categories: [web]
swarm:
categories: [web]
+ targets: [host, container]
+ engines: [trivy, grype, osv, syft]
+ severity:
+ CRITICAL: fail
+ HIGH: warn
+ fixed_only: true
+ workers: 2
+ db_update: true
+ cache_dir: "/var/cache/{{ SOFTWARE_DOMAIN }}/vulnerability"
+ database_dir: "/var/cache/{{ SOFTWARE_DOMAIN }}/vulnerability/db"
+# nocheck: image-healthcheck scanner run as a one-shot, no long-running process
+trivy:
+ image: ghcr.io/aquasecurity/trivy
+ version: "0.76.1"
+ security:
+ suppressions:
+ # nocheck: cve golang.org/x/net below 0.60.0 sits in the newest docker-ce and containerd.io packages
+ - id: CVE-2026-78663
+ until: 2026-12-03
+ # nocheck: cve CentOS Stream 10 ships no ca-certificates build with the RHEL 100.3.el10_2 fix yet
+ - id: CVE-2026-114406
+ until: 2026-12-03
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "0.76.1"
+ until: 2026-12-03
+# nocheck: image-healthcheck scanner run as a one-shot, no long-running process
+grype:
+ image: ghcr.io/anchore/grype
+ version: v0.121.0
+ security:
+ suppressions:
+ # nocheck: cve golang.org/x/net below 0.60.0 sits in the newest docker-ce and containerd.io packages
+ - id: CVE-2026-78663
+ until: 2026-12-03
+ # nocheck: cve CentOS Stream 10 ships no ca-certificates build with the RHEL 100.3.el10_2 fix yet
+ - id: CVE-2026-114406
+ until: 2026-12-03
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v0.121.0"
+ until: 2026-12-03
+# nocheck: image-healthcheck scanner run as a one-shot, no long-running process
+osv:
+ image: ghcr.io/google/osv-scanner
+ version: v2.7.0
+ ecosystems:
+ - AlmaLinux
+ - Alpine
+ - Debian
+ - Go
+ - Hackage
+ - Hex
+ - Maven
+ - NuGet
+ - Packagist
+ - Pub
+ - PyPI
+ - Red Hat
+ - Rocky Linux
+ - RubyGems
+ - Ubuntu
+ - crates.io
+ - npm
+ security:
+ suppressions:
+ # nocheck: cve golang.org/x/net below 0.60.0 sits in the newest docker-ce and containerd.io packages
+ - id: CVE-2026-78663
+ until: 2026-12-03
+ # nocheck: cve CentOS Stream 10 ships no ca-certificates build with the RHEL 100.3.el10_2 fix yet
+ - id: CVE-2026-114406
+ until: 2026-12-03
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v2.7.0"
+ until: 2026-12-03
+# nocheck: image-healthcheck SBOM builder run as a one-shot, no long-running process
+syft:
+ image: ghcr.io/anchore/syft
+ version: v1.55.0
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v1.55.0"
+ until: 2026-12-03
diff --git a/roles/sys-ctl-hlth-runtime/tasks/00_core.yml b/roles/sys-ctl-hlth-runtime/tasks/00_core.yml
index 2ccbf971c7..41a2d5d593 100644
--- a/roles/sys-ctl-hlth-runtime/tasks/00_core.yml
+++ b/roles/sys-ctl-hlth-runtime/tasks/00_core.yml
@@ -1,9 +1,57 @@
---
+- name: "🧩 Load docker service required for the 'run' command"
+ include_role:
+ name: sys-svc-container
+ public: false
+ when: run_once_sys_svc_container is not defined
+
- name: 📂 Include dependency 'sys-ctl-alm-compose'
include_role:
name: sys-ctl-alm-compose
when: run_once_sys_ctl_alm_compose is not defined
+- name: 📁 Create the vulnerability cache
+ ansible.builtin.file:
+ path: "{{ HEALTH_RUNTIME_CACHE_DIR }}"
+ state: directory
+ mode: "0700"
+
+- name: 📁 Create the report and findings log directories
+ ansible.builtin.file:
+ path: "{{ item }}"
+ state: directory
+ mode: "0750"
+ loop:
+ - "{{ DIR_HEALTH_RUNTIME_REPORT }}"
+ - "{{ DIR_HEALTH_RUNTIME_LOG }}"
+
+- name: 📁 Create the node-exporter textfile directory
+ ansible.builtin.file:
+ path: "{{ DIR_METRICS_TEXTFILE }}"
+ state: directory
+ when: HEALTH_RUNTIME_METRICS_ENABLED | bool
+
+- name: 🔁 Rotate the findings log weekly
+ ansible.builtin.template: # nocheck: stack-host-template (per-node logrotate drop-in, every node scans itself)
+ src: logrotate.j2
+ dest: "{{ HEALTH_RUNTIME_LOGROTATE_FILE }}"
+ owner: root
+ group: root
+ mode: "0644"
+
+- name: ⬇️ Pull the vulnerability engine images (with retries)
+ ansible.builtin.command:
+ argv:
+ - container
+ - pull
+ - "{{ item }}"
+ loop: "{{ HEALTH_RUNTIME_IMAGES.values() | list }}"
+ register: health_runtime_pull
+ changed_when: false
+ retries: 6
+ delay: 20
+ until: health_runtime_pull.rc == 0
+
- include_role:
name: sys-service
vars:
@@ -12,8 +60,18 @@
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
system_service_tpl_exec_start: >-
{{ system_service_script_exec }}
- --floors '{{ HEALTH_RUNTIME_FLOORS | to_json }}'
--hardened '{{ HEALTH_RUNTIME_PHP_HARDENED | to_json }}'
+ --scan '{{ HEALTH_RUNTIME_SCAN | to_json }}'
+ --images '{{ HEALTH_RUNTIME_IMAGES | to_json }}'
+ --suppressions '{{ HEALTH_RUNTIME_SUPPRESSIONS | to_json }}'
+ --cache-dir '{{ HEALTH_RUNTIME_CACHE_DIR }}'
+ --database-dir '{{ HEALTH_RUNTIME_DATABASE_DIR }}'
+ --host-excludes '{{ HEALTH_RUNTIME_HOST_EXCLUDES | to_json }}'
+ --environment '{{ ENVIRONMENT }}'
+ --report-dir '{{ DIR_HEALTH_RUNTIME_REPORT }}'
+ --log-dir '{{ DIR_HEALTH_RUNTIME_LOG }}'
+ {{ ("--metrics-file '" ~ HEALTH_RUNTIME_METRICS_FILE ~ "'") if HEALTH_RUNTIME_METRICS_ENABLED | bool else '' }}
system_service_force_flush_final: true
+ system_service_run_once: true
- include_tasks: utils/once/flag.yml
diff --git a/roles/sys-ctl-hlth-runtime/templates/logrotate.j2 b/roles/sys-ctl-hlth-runtime/templates/logrotate.j2
new file mode 100644
index 0000000000..0bdb45ea4b
--- /dev/null
+++ b/roles/sys-ctl-hlth-runtime/templates/logrotate.j2
@@ -0,0 +1,7 @@
+{{ [ DIR_HEALTH_RUNTIME_LOG, '*.jsonl' ] | path_join }} {
+ weekly
+ rotate 12
+ compress
+ missingok
+ notifempty
+}
diff --git a/roles/sys-ctl-hlth-runtime/vars/main.yml b/roles/sys-ctl-hlth-runtime/vars/main.yml
index c0ca639b9c..0de209c490 100644
--- a/roles/sys-ctl-hlth-runtime/vars/main.yml
+++ b/roles/sys-ctl-hlth-runtime/vars/main.yml
@@ -1,9 +1,35 @@
---
system_service_id: sys-ctl-hlth-runtime
-HEALTH_RUNTIME_FLOORS:
- php:
- "8.2": "8.2.35"
- "8.3": "8.3.36"
- "8.4": "8.4.27"
- "8.5": "8.5.12"
HEALTH_RUNTIME_PHP_HARDENED: "{{ lookup('php_hardened_services', group_names=lookup('deployment').deployed) }}"
+HEALTH_RUNTIME_SUPPRESSIONS: "{{ lookup('cve_suppressions', group_names=lookup('deployment').deployed) }}"
+HEALTH_RUNTIME_ENGINES: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.engines') }}"
+HEALTH_RUNTIME_SCAN:
+ targets: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.targets') }}"
+ engines: "{{ HEALTH_RUNTIME_ENGINES }}"
+ severity: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.severity') }}"
+ fixed_only: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.fixed_only') | bool }}"
+ workers: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.workers') | int }}"
+ db_update: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.db_update') | bool }}"
+HEALTH_RUNTIME_IMAGES:
+ trivy: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.trivy.image') }}:{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.trivy.version') }}"
+ grype: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.grype.image') }}:{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.grype.version') }}"
+ osv: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.osv.image') }}:{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.osv.version') }}"
+ syft: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.syft.image') }}:{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.syft.version') }}"
+HEALTH_RUNTIME_CACHE_DIR: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.cache_dir') }}"
+HEALTH_RUNTIME_DATABASE_DIR: "{{ lookup('config', 'sys-ctl-hlth-runtime', 'services.runtime.database_dir') }}"
+HEALTH_RUNTIME_METRICS_ENABLED: "{{ 'web-app-prometheus' in lookup('deployment').deployed }}"
+HEALTH_RUNTIME_METRICS_FILE: "{{ [ DIR_METRICS_TEXTFILE, 'infinito_hlth_runtime.prom' ] | path_join }}"
+HEALTH_RUNTIME_LOGROTATE_FILE: "{{ [ '/etc/logrotate.d', system_service_id ] | path_join }}"
+HEALTH_RUNTIME_HOST_EXCLUDES:
+ - /proc
+ - /sys
+ - /dev
+ - /run
+ - /tmp
+ - /var/tmp
+ - /var/lib/docker
+ - /var/lib/containerd
+ - /mnt
+ - /media
+ - "{{ DIR_BACKUPS }}"
+ - "{{ lookup('nfs_export_base') }}"
diff --git a/roles/sys-service-terminator/README.md b/roles/sys-service-terminator/README.md
index cf315d834d..02edf6ef2e 100644
--- a/roles/sys-service-terminator/README.md
+++ b/roles/sys-service-terminator/README.md
@@ -23,6 +23,8 @@ This role runs a collected list of systemd services at the end of a play.
## Variables
- `system_service_run_list` (list): list of systemd unit names to run
+- `system_service_run_once_list` (list): units of that list that run once and fail on their first failure, set by `sys-service` for `system_service_run_once=true`
+- `SYS_SERVICE_RUNNER_RETRIES` (int): retries of every other unit
- `SYS_SERVICE_RUNNER_STATE` (string): desired state (`started`, `restarted`, ...)
## Further Resources
diff --git a/roles/sys-service-terminator/tasks/01_run_one.yml b/roles/sys-service-terminator/tasks/01_run_one.yml
index 8fc33f5eb0..5c1b7451d1 100644
--- a/roles/sys-service-terminator/tasks/01_run_one.yml
+++ b/roles/sys-service-terminator/tasks/01_run_one.yml
@@ -6,12 +6,14 @@
failed_when: false
when: IS_SWARM_MODE
-- name: "🔄 Apply state (retry up to {{ SYS_SERVICE_RUNNER_RETRIES }} times)"
+- name: "🔄 Apply state, retried unless the unit runs once"
ansible.builtin.systemd:
name: "{{ system_service_run_unit }}"
state: "{{ SYS_SERVICE_RUNNER_STATE }}"
+ vars:
+ system_service_run_retries: "{{ 0 if system_service_run_unit in (system_service_run_once_list | default([])) else SYS_SERVICE_RUNNER_RETRIES }}"
register: result
- retries: "{{ SYS_SERVICE_RUNNER_RETRIES }}"
+ retries: "{{ system_service_run_retries }}"
delay: "{{ SYS_SERVICE_RUNNER_DELAY }}"
until: result is not failed
when: >-
diff --git a/roles/sys-service/tasks/04_base.yml b/roles/sys-service/tasks/04_base.yml
index e0e504c0f9..51a6268afa 100644
--- a/roles/sys-service/tasks/04_base.yml
+++ b/roles/sys-service/tasks/04_base.yml
@@ -12,11 +12,22 @@
import_tasks: 07_timer.yml
when: system_service_timer_enabled | bool
-- name: "➕ sys-service | Add '{{ system_service_name }}' to final run list"
- ansible.builtin.set_fact:
- system_service_run_list: >-
- {{
- (system_service_run_list | default([]) + [system_service_name])
- | unique
- }}
+- name: "➕ sys-service | Queue '{{ system_service_name }}' for the end of the play"
when: system_service_force_flush_final | bool
+ block:
+ - name: "➕ sys-service | Add '{{ system_service_name }}' to final run list"
+ ansible.builtin.set_fact:
+ system_service_run_list: >-
+ {{
+ (system_service_run_list | default([]) + [system_service_name])
+ | unique
+ }}
+
+ - name: "➕ sys-service | Run '{{ system_service_name }}' once at the end of the play"
+ ansible.builtin.set_fact:
+ system_service_run_once_list: >-
+ {{
+ (system_service_run_once_list | default([]) + [system_service_name])
+ | unique
+ }}
+ when: system_service_run_once | bool
diff --git a/roles/sys-service/vars/main.yml b/roles/sys-service/vars/main.yml
index 75aff8f756..5392f9f1ac 100644
--- a/roles/sys-service/vars/main.yml
+++ b/roles/sys-service/vars/main.yml
@@ -46,6 +46,7 @@ system_service_template_src: >-
system_service_force_linear_sync: "{{ system_service_name in SYS_SERVICE_GROUP_MANIPULATION }}" # When set to true the enable and daemon-reload handler never runs async
system_service_force_flush_instant: "{{ (SYS_SERVICE_ALL_ENABLED | bool) and not system_service_force_flush_final }}" # When set to true it activates the flushing of services. defaults to SYS_SERVICE_ALL_ENABLED
system_service_force_flush_final: false # Force run at the end of the play
+system_service_run_once: false # The run at the end of the play fails on its first failure instead of being retried
system_service_suppress_flush: "{{ system_service_force_flush_final | bool }}" # When set to true it suppresses the flushing of services
system_service_copy_files: true # When set to false file copying will be skipped
system_service_timer_enabled: false # When set to true timer will be loaded
diff --git a/roles/sys-svc-proxy/templates/location/html.conf.j2 b/roles/sys-svc-proxy/templates/location/html.conf.j2
index b3fc4aec6a..1a1bb1a0c0 100644
--- a/roles/sys-svc-proxy/templates/location/html.conf.j2
+++ b/roles/sys-svc-proxy/templates/location/html.conf.j2
@@ -17,7 +17,11 @@ location {{location}}
client_max_body_size {{ webserver_client_max_body_size | default(lookup('config', application_id, 'server.client_max_body_size', '100m')) }};
- {{ lookup('proxy_pass', application_id, proxy_service_key | default(application_id | entity_name), 'http', tail='request', location=location, local_port=http_port, internal_port=proxy_internal_port | default('')) }}
+ if ($request_uri ~* "(^|/)(\.|%2e){2}(;|%3b)") {
+ return 400;
+ }
+
+ {{ lookup('proxy_pass', application_id, proxy_service_key | default(application_id | entity_name), 'http', tail='request', local_port=http_port, internal_port=proxy_internal_port | default('')) }}
proxy_set_header Authorization $http_authorization;
{% include 'roles/sys-svc-proxy/templates/headers/forwarded.conf.j2' %}
diff --git a/roles/web-app-baserow/meta/services.yml b/roles/web-app-baserow/meta/services.yml
index 287d272327..21f636d29a 100644
--- a/roles/web-app-baserow/meta/services.yml
+++ b/roles/web-app-baserow/meta/services.yml
@@ -66,7 +66,7 @@ baserow:
backup:
stop_required: false
image: baserow/baserow
- version: 2.4.1
+ version: 2.4.2
custom: true
name: baserow
min_storage: 785MB
@@ -111,6 +111,11 @@ baserowmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag — design consumer, no Playwright surface (provider: web-svc-design)
design:
bond: 1
diff --git a/roles/web-app-bigbluebutton/meta/services.yml b/roles/web-app-bigbluebutton/meta/services.yml
index e584271ccb..0ee491e8fa 100644
--- a/roles/web-app-bigbluebutton/meta/services.yml
+++ b/roles/web-app-bigbluebutton/meta/services.yml
@@ -122,6 +122,11 @@ bbb-web:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
freeswitch:
@@ -135,6 +140,11 @@ freeswitch:
pattern: "repos/bigbluebutton (?Pv[0-9.]+)\\nrepos/freeswitch (?Pv[0-9.]+)"
template: "{freeswitch}-{bbb}"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v1.11.3-v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
nginx:
@@ -150,6 +160,11 @@ nginx:
pattern: "repos/bbb-playback (?Pv[0-9.]+)\\n(?:.*\\n)*?repos/bigbluebutton (?Pv[0-9.]+)\\n(?:.*\\n)*?.*bbb-docker-nginx:.*-(?P[0-9.]+)\\n"
template: "{bbb}-{playback}-{base}"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39-v5.4.8-1.29"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
bbb-shared-notes-server:
@@ -160,6 +175,11 @@ bbb-shared-notes-server:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
bbb-export-annotations:
@@ -172,6 +192,11 @@ bbb-export-annotations:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
webrtc-sfu:
@@ -184,6 +209,11 @@ webrtc-sfu:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bbb-webrtc-sfu (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v2.24.0"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
fsesl-akka:
@@ -194,6 +224,11 @@ fsesl-akka:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
apps-akka:
@@ -206,6 +241,11 @@ apps-akka:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
bbb-graphql-server:
@@ -221,6 +261,11 @@ bbb-graphql-server:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
bbb-graphql-actions:
@@ -231,6 +276,11 @@ bbb-graphql-actions:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
bbb-graphql-middleware:
@@ -241,6 +291,11 @@ bbb-graphql-middleware:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
periodic:
@@ -253,6 +308,11 @@ periodic:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/docker-compose.tmpl.yml
pattern: "bbb-docker-periodic:(v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.0"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
recordings:
@@ -265,6 +325,11 @@ recordings:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bigbluebutton (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v3.0.39"
+ until: 2026-12-03
# nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated
bbb-webrtc-recorder:
@@ -275,6 +340,11 @@ bbb-webrtc-recorder:
url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags
pattern: "repos/bbb-webrtc-recorder (v[0-9.]+)"
enabled: false
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v0.14.0"
+ until: 2026-12-03
# nocheck: playwright-service-flag: script-time helper of upstream generate-compose, mirror pre-pull only
# nocheck: dynamic-flag: fixed upstream-compose helper, not group-gated
dockerize:
diff --git a/roles/web-app-bluesky/meta/services.yml b/roles/web-app-bluesky/meta/services.yml
index ba038c8feb..67e0ece5bb 100644
--- a/roles/web-app-bluesky/meta/services.yml
+++ b/roles/web-app-bluesky/meta/services.yml
@@ -86,6 +86,11 @@ pds:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "0.4.66"
+ until: 2026-12-03
broker:
backup:
stop_required: false
diff --git a/roles/web-app-checkmk/meta/services.yml b/roles/web-app-checkmk/meta/services.yml
index 204e902b27..7da4eb6d1f 100644
--- a/roles/web-app-checkmk/meta/services.yml
+++ b/roles/web-app-checkmk/meta/services.yml
@@ -129,6 +129,11 @@ checkmkmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-app-dashboard/meta/services.yml b/roles/web-app-dashboard/meta/services.yml
index 6ee144d2de..b710b70a81 100644
--- a/roles/web-app-dashboard/meta/services.yml
+++ b/roles/web-app-dashboard/meta/services.yml
@@ -40,6 +40,7 @@ dashboard:
name: dashboard
image: ghcr.io/kevinveenbirkenbach/port-ui
version: 2.3.0
+ custom: true
min_storage: 549MB
cpus: "0.3"
mem_reservation: 256m
diff --git a/roles/web-app-decidim/meta/services.yml b/roles/web-app-decidim/meta/services.yml
index 4b897c9dcf..dceb751491 100644
--- a/roles/web-app-decidim/meta/services.yml
+++ b/roles/web-app-decidim/meta/services.yml
@@ -58,6 +58,11 @@ decidim:
run_after:
- web-app-keycloak
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "0.31.6"
+ until: 2026-12-03
# nocheck: shared
# nocheck: dynamic-flag
# nocheck: playwright-service-flag — DB engine, covered by role-local integration tests
diff --git a/roles/web-app-docs/meta/services.yml b/roles/web-app-docs/meta/services.yml
index 66ca95bc4a..3d468dae1c 100644
--- a/roles/web-app-docs/meta/services.yml
+++ b/roles/web-app-docs/meta/services.yml
@@ -28,7 +28,8 @@ docs:
swarm:
enabled: true
image: python
- version: 3.15-slim
+ version: 3.14-slim
+ follow: requires-python
custom: true
source_repository: "{{ SOFTWARE_REPOSITORY }}"
mermaid_version: 12.3.0
diff --git a/roles/web-app-erpnext/meta/services.yml b/roles/web-app-erpnext/meta/services.yml
index 19c546a6a7..bed2ccd9c8 100644
--- a/roles/web-app-erpnext/meta/services.yml
+++ b/roles/web-app-erpnext/meta/services.yml
@@ -94,6 +94,11 @@ erpnext:
mem_reservation: 2g
mem_limit: 4g
pids_limit: 2048
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v16.54.0"
+ until: 2026-12-03
backend:
name: erpnext-backend
healthcheck:
diff --git a/roles/web-app-fediwall/meta/services.yml b/roles/web-app-fediwall/meta/services.yml
index ea6be1552f..4c403490f5 100644
--- a/roles/web-app-fediwall/meta/services.yml
+++ b/roles/web-app-fediwall/meta/services.yml
@@ -101,6 +101,11 @@ fediwall:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31.8-alpine"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
diff --git a/roles/web-app-fider/meta/services.yml b/roles/web-app-fider/meta/services.yml
index 9bdace2c8c..ba8d645a4e 100644
--- a/roles/web-app-fider/meta/services.yml
+++ b/roles/web-app-fider/meta/services.yml
@@ -105,6 +105,11 @@ fidermcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
diff --git a/roles/web-app-flowise/meta/services.yml b/roles/web-app-flowise/meta/services.yml
index e3a4243560..933cc82575 100644
--- a/roles/web-app-flowise/meta/services.yml
+++ b/roles/web-app-flowise/meta/services.yml
@@ -69,7 +69,7 @@ flowise:
- key: sqlite_version
type: npm
package: better-sqlite3
- sqlite_version: 13.0.3
+ sqlite_version: 13.1.1
custom: true
name: flowise
# nocheck: min-storage-headroom Reason: the deployed image is built here from node:24-slim and measures 4.8 GB, so the base image transfer is not its footprint
diff --git a/roles/web-app-friendica/meta/services.yml b/roles/web-app-friendica/meta/services.yml
index 08d51a72d6..e22c744f81 100644
--- a/roles/web-app-friendica/meta/services.yml
+++ b/roles/web-app-friendica/meta/services.yml
@@ -36,6 +36,11 @@ friendica:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2026.05"
+ until: 2026-12-03
logout:
bond: 1
enabled: "{{ 'web-svc-logout' in group_names }}"
diff --git a/roles/web-app-funkwhale/meta/services.yml b/roles/web-app-funkwhale/meta/services.yml
index 471ed48589..112e0e9b46 100644
--- a/roles/web-app-funkwhale/meta/services.yml
+++ b/roles/web-app-funkwhale/meta/services.yml
@@ -34,6 +34,11 @@ funkwhale:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2.0.13"
+ until: 2026-12-03
api:
backup:
stop_required: false
@@ -52,6 +57,11 @@ api:
mem_reservation: 256m
mem_limit: 1g
pids_limit: 512
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2.0.13"
+ until: 2026-12-03
migrate:
# nocheck: single-replica run-once schema bootstrap; concurrent `funkwhale-manage migrate` races the migration graph
replicas: 1
@@ -73,6 +83,11 @@ typesense:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "30.2"
+ until: 2026-12-03
logout:
bond: 1
enabled: "{{ 'web-svc-logout' in group_names }}"
diff --git a/roles/web-app-gitea/meta/services.yml b/roles/web-app-gitea/meta/services.yml
index 4a57e9cfb9..9d59031171 100644
--- a/roles/web-app-gitea/meta/services.yml
+++ b/roles/web-app-gitea/meta/services.yml
@@ -106,6 +106,11 @@ giteamcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: dynamic-flag the vendor server exists only behind the adapter, so it tracks this role's own mcp flag rather than another role's presence
giteamcpupstream:
diff --git a/roles/web-app-gitlab/meta/services.yml b/roles/web-app-gitlab/meta/services.yml
index 4d95e71c9f..d5e90525e6 100644
--- a/roles/web-app-gitlab/meta/services.yml
+++ b/roles/web-app-gitlab/meta/services.yml
@@ -217,6 +217,11 @@ gitlabmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-app-hermes/meta/services.yml b/roles/web-app-hermes/meta/services.yml
index 93319fc554..a42ec19733 100644
--- a/roles/web-app-hermes/meta/services.yml
+++ b/roles/web-app-hermes/meta/services.yml
@@ -38,6 +38,11 @@ hermes:
lifecycle: beta
proxy:
service_key: hermes
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v2026.9.24"
+ until: 2026-12-03
# nocheck: dynamic-flag - the web UI is a role-local off-switch; no provider role exists whose group membership could decide it
webui:
diff --git a/roles/web-app-homeassistant/meta/services.yml b/roles/web-app-homeassistant/meta/services.yml
index facc9aae4a..5a66c3ba59 100644
--- a/roles/web-app-homeassistant/meta/services.yml
+++ b/roles/web-app-homeassistant/meta/services.yml
@@ -32,6 +32,11 @@ homeassistant:
lifecycle: beta
proxy:
service_key: homeassistant
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2026.7"
+ until: 2026-12-03
# nocheck: sso, dynamic-flag, playwright-service-flag
sso:
diff --git a/roles/web-app-hugo/meta/services.yml b/roles/web-app-hugo/meta/services.yml
index 966441610f..65390fd024 100644
--- a/roles/web-app-hugo/meta/services.yml
+++ b/roles/web-app-hugo/meta/services.yml
@@ -77,6 +77,11 @@ hugo:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31-alpine"
+ until: 2026-12-03
# nocheck: email
# nocheck: dynamic-flag
email:
diff --git a/roles/web-app-jellyfin/meta/services.yml b/roles/web-app-jellyfin/meta/services.yml
index aa24e7346f..8502f52bba 100644
--- a/roles/web-app-jellyfin/meta/services.yml
+++ b/roles/web-app-jellyfin/meta/services.yml
@@ -71,6 +71,11 @@ jellyfin:
- web-app-keycloak
- svc-db-openldap
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "10.11.11"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
@@ -102,6 +107,11 @@ jellyfinmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-app-jenkins/meta/services.yml b/roles/web-app-jenkins/meta/services.yml
index 377c25fe1a..975a980680 100644
--- a/roles/web-app-jenkins/meta/services.yml
+++ b/roles/web-app-jenkins/meta/services.yml
@@ -80,6 +80,11 @@ jenkins:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2.580.2-lts"
+ until: 2026-12-03
# nocheck: playwright-service-flag internal adapter sidecar, covered by the role's MCP spec
# nocheck: dockerfile-custom the Dockerfile is owned by svc-ai-mcp-adapter and staged per instance, so every adapter-backed provider shares one audited build
# nocheck: dynamic-flag the sidecar tracks this role's own mcp flag, not another role's presence; a group_names expression would decide its exposure from an unrelated deployment
@@ -101,6 +106,11 @@ jenkinsmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag — design consumer, no Playwright surface (provider: web-svc-design)
design:
bond: 1
diff --git a/roles/web-app-jitsi/meta/services.yml b/roles/web-app-jitsi/meta/services.yml
index 5e70e74679..8b62168878 100644
--- a/roles/web-app-jitsi/meta/services.yml
+++ b/roles/web-app-jitsi/meta/services.yml
@@ -83,6 +83,11 @@ jitsi:
mem_reservation: 1g
mem_limit: 3g
pids_limit: 2048
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "stable-11031"
+ until: 2026-12-03
web:
name: jitsi-web
cpus: "0.5"
@@ -106,6 +111,11 @@ prosody:
mem_reservation: 512m
mem_limit: 1g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "stable-11031"
+ until: 2026-12-03
# nocheck: playwright-service-flag - internal sub-component (conference focus)
# nocheck: image-healthcheck XMPP component, no internal port declared
jicofo:
@@ -116,6 +126,11 @@ jicofo:
mem_reservation: 512m
mem_limit: 1g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "stable-11031"
+ until: 2026-12-03
# nocheck: playwright-service-flag - internal sub-component (video bridge, media plane)
# nocheck: image-healthcheck media bridge on UDP, no internal port declared
jvb:
@@ -126,6 +141,11 @@ jvb:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 2048
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "stable-11031"
+ until: 2026-12-03
# nocheck: playwright-service-flag
tor:
diff --git a/roles/web-app-lam/meta/services.yml b/roles/web-app-lam/meta/services.yml
index d565066a6c..f798ca284f 100644
--- a/roles/web-app-lam/meta/services.yml
+++ b/roles/web-app-lam/meta/services.yml
@@ -54,6 +54,11 @@ lam:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "9.7"
+ until: 2026-12-03
sso:
bond: 1
enabled: "{{ 'web-app-keycloak' in group_names }}"
diff --git a/roles/web-app-listmonk/meta/services.yml b/roles/web-app-listmonk/meta/services.yml
index 807d0ee054..04e265be54 100644
--- a/roles/web-app-listmonk/meta/services.yml
+++ b/roles/web-app-listmonk/meta/services.yml
@@ -66,6 +66,11 @@ listmonk:
- web-app-stalwart
- web-app-mailu
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v6.2.0"
+ until: 2026-12-03
# nocheck: playwright-service-flag — object store, no Playwright surface
minio:
enabled: false # nocheck: dynamic-flag
@@ -110,6 +115,11 @@ listmonkmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
diff --git a/roles/web-app-littlejs/meta/services.yml b/roles/web-app-littlejs/meta/services.yml
index b25dfbcfd1..8ddf4f41e2 100644
--- a/roles/web-app-littlejs/meta/services.yml
+++ b/roles/web-app-littlejs/meta/services.yml
@@ -62,6 +62,11 @@ littlejs:
mem_reservation: 256m
mem_limit: 1g
pids_limit: 512
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31.8-alpine"
+ until: 2026-12-03
# nocheck: email
# nocheck: dynamic-flag
email:
diff --git a/roles/web-app-magento/meta/services.yml b/roles/web-app-magento/meta/services.yml
index 956c252fff..e0fdbb181b 100644
--- a/roles/web-app-magento/meta/services.yml
+++ b/roles/web-app-magento/meta/services.yml
@@ -55,12 +55,22 @@ nginx:
mem_reservation: 256m
mem_limit: 1g
pids_limit: 512
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.28"
+ until: 2026-12-03
# nocheck: dynamic-flag
mariadb:
shared: false
enabled: true
image: mariadb
version: "11.4" # nocheck: docker-version — deliberate pin, predates this change; the bot must not move a database major under Magento without a compatibility check
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "11.4"
+ until: 2026-12-03
# nocheck: shared
# nocheck: dynamic-flag
redis:
diff --git a/roles/web-app-mastodon/meta/services.yml b/roles/web-app-mastodon/meta/services.yml
index 5630940582..0b4b221f32 100644
--- a/roles/web-app-mastodon/meta/services.yml
+++ b/roles/web-app-mastodon/meta/services.yml
@@ -72,6 +72,11 @@ mastodon:
run_after:
- web-app-keycloak
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v4.6.2"
+ until: 2026-12-03
# nocheck: container-healthcheck-unused rendered through the mastodon_service macro, whose service_name is a macro parameter
streaming:
image: ghcr.io/mastodon/mastodon-streaming
@@ -88,6 +93,11 @@ streaming:
healthcheck:
flavor: wget
path: api/v1/streaming/health
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v4.6.2"
+ until: 2026-12-03
# nocheck: container-healthcheck-unused rendered through the mastodon_service macro, whose service_name is a macro parameter
sidekiq:
name: mastodon-sidekiq
diff --git a/roles/web-app-matrix/meta/services.yml b/roles/web-app-matrix/meta/services.yml
index dafcba2680..0b4ddf5f9b 100644
--- a/roles/web-app-matrix/meta/services.yml
+++ b/roles/web-app-matrix/meta/services.yml
@@ -141,6 +141,11 @@ matrix-chatgpt-bot:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.1.5"
+ until: 2026-12-03
# nocheck: playwright-service-flag — object store, no Playwright surface (provider: web-svc-seaweedfs)
seaweedfs:
bond: 1
diff --git a/roles/web-app-mattermost/meta/services.yml b/roles/web-app-mattermost/meta/services.yml
index 96d54fda82..9d21ea21cd 100644
--- a/roles/web-app-mattermost/meta/services.yml
+++ b/roles/web-app-mattermost/meta/services.yml
@@ -152,6 +152,11 @@ mattermostmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-app-mini-qr/meta/services.yml b/roles/web-app-mini-qr/meta/services.yml
index 291b78fcd5..982aa0c41d 100644
--- a/roles/web-app-mini-qr/meta/services.yml
+++ b/roles/web-app-mini-qr/meta/services.yml
@@ -20,6 +20,11 @@ mini-qr:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v0.26.3"
+ until: 2026-12-03
# nocheck: dynamic-flag
# nocheck: logout
logout:
diff --git a/roles/web-app-mobilizon/meta/services.yml b/roles/web-app-mobilizon/meta/services.yml
index 7e573060a8..54152658f3 100644
--- a/roles/web-app-mobilizon/meta/services.yml
+++ b/roles/web-app-mobilizon/meta/services.yml
@@ -59,6 +59,11 @@ mobilizon:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "5.2.4"
+ until: 2026-12-03
# nocheck: dynamic-flag — seaweedfs intentionally disabled; Mobilizon has no S3 upload backend
seaweedfs:
enabled: false
diff --git a/roles/web-app-moodle/meta/services.yml b/roles/web-app-moodle/meta/services.yml
index 734e1fcca8..ebe36c57af 100644
--- a/roles/web-app-moodle/meta/services.yml
+++ b/roles/web-app-moodle/meta/services.yml
@@ -102,6 +102,11 @@ nginx:
ports:
internal:
http: 80
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31-alpine"
+ until: 2026-12-03
cron:
name: moodle-cron
min_storage: 1GB
diff --git a/roles/web-app-nextcloud/meta/services.yml b/roles/web-app-nextcloud/meta/services.yml
index 93d2fe17b6..7b407bc807 100644
--- a/roles/web-app-nextcloud/meta/services.yml
+++ b/roles/web-app-nextcloud/meta/services.yml
@@ -109,6 +109,11 @@ nextcloud:
- web-app-openproject
- web-app-zammad
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "34-fpm-alpine"
+ until: 2026-12-03
proxy:
name: nextcloud-proxy
healthcheck:
@@ -127,6 +132,11 @@ proxy:
ports:
internal:
http: 80
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31.8-alpine"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: dynamic-flag the container serves this role's MCP surface, so it tracks the role's own mcp flag rather than one client's presence
context_agent:
@@ -173,6 +183,11 @@ contextagentmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
cron:
# nocheck: single-replica singleton cron.sh; replicas double-run background jobs on the shared data volume
replicas: 1
@@ -252,7 +267,7 @@ talk_nats:
shared: false
name: nextcloud-talk-nats
image: nats
- version: 2.15.2-alpine
+ version: 2.15.3-alpine
# nocheck: single-replica an unclustered NATS server; the signaling server connects to exactly one
replicas: 1
cpus: "0.5"
@@ -286,6 +301,11 @@ whiteboard:
flavor: nc
# nocheck: healthcheck-timing-override a sidecar of a stack whose main service alone takes minutes; the value predates this default and has not been measured against it
start_period: 20m
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v1.5.9"
+ until: 2026-12-03
# nocheck: playwright-service-flag: infrastructural sub-component (collaborative editing)
onlyoffice:
bond: 0.5
diff --git a/roles/web-app-openclaw/meta/services.yml b/roles/web-app-openclaw/meta/services.yml
index 34d6c2fc40..fcaf75694b 100644
--- a/roles/web-app-openclaw/meta/services.yml
+++ b/roles/web-app-openclaw/meta/services.yml
@@ -31,6 +31,11 @@ openclaw:
lifecycle: beta
proxy:
service_key: openclaw
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2026.7.1"
+ until: 2026-12-03
# nocheck: playwright-service-flag, dynamic-flag
kata:
diff --git a/roles/web-app-opencloud/meta/services.yml b/roles/web-app-opencloud/meta/services.yml
index 019792e6ba..991d2e03a4 100644
--- a/roles/web-app-opencloud/meta/services.yml
+++ b/roles/web-app-opencloud/meta/services.yml
@@ -38,7 +38,7 @@ opencloud:
replicas: 1
name: opencloud
image: opencloudeu/opencloud
- version: 7.2.4
+ version: 7.2.5
min_storage: 276MB
# nocheck: default-placement-manager opencloud_data holds NFS-hostile engine state: NATS JetStream store (events, micro registry, posixfs id cache), bleve search index, idm.boltdb, posixfs xattr metadata; upstream says search cannot scale, so the volume must stay node-local
placement: manager
diff --git a/roles/web-app-openproject/meta/services.yml b/roles/web-app-openproject/meta/services.yml
index 4bb26e35dd..ba28eccfeb 100644
--- a/roles/web-app-openproject/meta/services.yml
+++ b/roles/web-app-openproject/meta/services.yml
@@ -53,6 +53,11 @@ web:
mem_limit: 6g
pids_limit: 2048
min_storage: 1076MB
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "17"
+ until: 2026-12-03
seeder:
name: openproject-seeder
cpus: "0.3"
diff --git a/roles/web-app-opentalk/meta/services.yml b/roles/web-app-opentalk/meta/services.yml
index 98b888d136..800281a643 100644
--- a/roles/web-app-opentalk/meta/services.yml
+++ b/roles/web-app-opentalk/meta/services.yml
@@ -85,6 +85,11 @@ opentalk:
run_after:
- web-app-keycloak
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v2.9.2"
+ until: 2026-12-03
controller:
name: opentalk-controller
image: registry.opencode.de/opentalk/controller
@@ -105,6 +110,11 @@ controller:
http: 8072
internal:
http: 11311
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v0.34.5"
+ until: 2026-12-03
livekit:
name: opentalk-livekit
image: livekit/livekit-server
@@ -123,6 +133,11 @@ livekit:
relay:
start: 60000
end: 60999
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v1.13.11"
+ until: 2026-12-03
# nocheck: playwright-service-flag — object store, no Playwright surface; the live S3 backend is the seaweedfs block below, web-app-minio is end of life and stays off
minio:
enabled: false # nocheck: dynamic-flag
@@ -154,6 +169,11 @@ rabbit:
mem_reservation: 256m
mem_limit: 1g
pids_limit: 512
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "4.4.0"
+ until: 2026-12-03
recorder:
name: opentalk-recorder
image: registry.opencode.de/opentalk/recorder
@@ -170,6 +190,11 @@ recorder:
mem_reservation: 512m
mem_limit: 2g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v0.17.5"
+ until: 2026-12-03
# nocheck: playwright-service-flag — verified by web-svc-design provider spec
design:
bond: 1
diff --git a/roles/web-app-openwebui/meta/services.yml b/roles/web-app-openwebui/meta/services.yml
index d218e30af0..d1ce125300 100644
--- a/roles/web-app-openwebui/meta/services.yml
+++ b/roles/web-app-openwebui/meta/services.yml
@@ -62,6 +62,11 @@ openwebui:
- web-app-keycloak
- web-app-matomo
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "0.11.0"
+ until: 2026-12-03
# nocheck: dynamic-flag
# nocheck: playwright-service-flag — DB engine, covered by role-local integration tests
redis:
diff --git a/roles/web-app-peertube/meta/services.yml b/roles/web-app-peertube/meta/services.yml
index ceb40155bb..fd3573a5a0 100644
--- a/roles/web-app-peertube/meta/services.yml
+++ b/roles/web-app-peertube/meta/services.yml
@@ -88,6 +88,11 @@ peertube:
run_after:
- web-app-keycloak
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v8.3.2"
+ until: 2026-12-03
# nocheck: playwright-service-flag — verified by web-svc-design provider spec
design:
bond: 1
diff --git a/roles/web-app-phpmyadmin/meta/services.yml b/roles/web-app-phpmyadmin/meta/services.yml
index c388d702dc..34bc53035e 100644
--- a/roles/web-app-phpmyadmin/meta/services.yml
+++ b/roles/web-app-phpmyadmin/meta/services.yml
@@ -59,6 +59,11 @@ phpmyadmin:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "5.2.3"
+ until: 2026-12-03
sso:
bond: 1
enabled: "{{ 'web-app-keycloak' in group_names }}"
diff --git a/roles/web-app-pretix/meta/services.yml b/roles/web-app-pretix/meta/services.yml
index 3ec7662b80..f678937b01 100644
--- a/roles/web-app-pretix/meta/services.yml
+++ b/roles/web-app-pretix/meta/services.yml
@@ -130,6 +130,11 @@ pretixmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-app-prometheus/meta/services.yml b/roles/web-app-prometheus/meta/services.yml
index d7faf4bf4a..0b26b450d6 100644
--- a/roles/web-app-prometheus/meta/services.yml
+++ b/roles/web-app-prometheus/meta/services.yml
@@ -117,11 +117,11 @@ blackbox-exporter:
internal:
http: 9115
cadvisor:
- image: gcr.io/cadvisor/cadvisor
- version: v0.55.1
+ image: ghcr.io/google/cadvisor
+ version: v0.60.6
update:
type: registry_tags
- image: gcr.io/cadvisor/cadvisor
+ image: ghcr.io/google/cadvisor
name: prometheus-cadvisor
cpus: "0.25"
mem_reservation: 128m
@@ -146,6 +146,11 @@ node-exporter:
ports:
internal:
http: 9100
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v1.12.1"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
@@ -177,6 +182,11 @@ prometheusmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-app-seaweedfs/meta/services.yml b/roles/web-app-seaweedfs/meta/services.yml
index 1a31606f58..7b7270cede 100644
--- a/roles/web-app-seaweedfs/meta/services.yml
+++ b/roles/web-app-seaweedfs/meta/services.yml
@@ -97,6 +97,11 @@ seaweedfs-console:
- web-svc-seaweedfs
- web-app-keycloak
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31-alpine"
+ until: 2026-12-03
docs:
bond: 0.5
diff --git a/roles/web-app-shopware/meta/services.yml b/roles/web-app-shopware/meta/services.yml
index 6d6304ce83..11274054dd 100644
--- a/roles/web-app-shopware/meta/services.yml
+++ b/roles/web-app-shopware/meta/services.yml
@@ -69,6 +69,11 @@ shopware:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "2.11"
+ until: 2026-12-03
php:
image: ghcr.io/shopware/docker-base
version: "8.3.36-caddy"
@@ -77,6 +82,11 @@ php:
mem_reservation: 256m
mem_limit: 1g
pids_limit: 512
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "8.3.36-caddy"
+ until: 2026-12-03
web:
name: shopware-web
cpus: 1.0
diff --git a/roles/web-app-snipe-it/meta/services.yml b/roles/web-app-snipe-it/meta/services.yml
index 9b43f9943e..8263664472 100644
--- a/roles/web-app-snipe-it/meta/services.yml
+++ b/roles/web-app-snipe-it/meta/services.yml
@@ -85,6 +85,11 @@ snipe-it:
- web-app-stalwart
- web-app-mailu
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v8.8.3-alpine"
+ until: 2026-12-03
sso:
bond: 1
enabled: "{{ 'web-app-keycloak' in group_names }}"
@@ -146,6 +151,11 @@ snipeitmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-app-stalwart/meta/services.yml b/roles/web-app-stalwart/meta/services.yml
index 1de6056026..c80db640af 100644
--- a/roles/web-app-stalwart/meta/services.yml
+++ b/roles/web-app-stalwart/meta/services.yml
@@ -106,6 +106,11 @@ postgres:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 512
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "18"
+ until: 2026-12-03
# nocheck: dynamic-flag — role-local sub-component, always deployed with the stack
# nocheck: playwright-service-flag — internal sub-component
webmail:
@@ -149,7 +154,7 @@ stalwart_migrate:
enabled: false
shared: false
image: stalwartlabs/stalwart-migrate
- version: "1.0.7"
+ version: "1.0.8"
design:
bond: 1
enabled: "{{ 'web-svc-design' in group_names }}"
diff --git a/roles/web-app-taiga/meta/services.yml b/roles/web-app-taiga/meta/services.yml
index b9407dfaf7..df96e49c18 100644
--- a/roles/web-app-taiga/meta/services.yml
+++ b/roles/web-app-taiga/meta/services.yml
@@ -103,6 +103,11 @@ gateway:
mem_reservation: 256m
mem_limit: 512m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31.8-alpine"
+ until: 2026-12-03
events:
healthcheck:
test: ["CMD-SHELL", "nc -z 127.0.0.1 8888"]
@@ -113,6 +118,11 @@ events:
mem_reservation: 256m
mem_limit: 512m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "6.10.0"
+ until: 2026-12-03
async-rabbitmq:
backup:
stop_required: true
@@ -155,6 +165,11 @@ protected:
mem_reservation: 128m
mem_limit: 256m
pids_limit: 128
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "6.10.1"
+ until: 2026-12-03
seaweedfs:
bond: 1
enabled: "{{ 'web-svc-seaweedfs' in group_names }}"
diff --git a/roles/web-app-wordpress/files/Dockerfile b/roles/web-app-wordpress/files/Dockerfile
index b55e866124..317f38a8f7 100644
--- a/roles/web-app-wordpress/files/Dockerfile
+++ b/roles/web-app-wordpress/files/Dockerfile
@@ -11,14 +11,14 @@ RUN curl --connect-timeout 5 --max-time 300 -O https://raw.githubusercontent.com
chmod +x wp-cli.phar && \
mv wp-cli.phar /usr/local/bin/wp
-ARG WORDPRESS_S3_UPLOADS_ARCHIVE
+COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
+
+ARG WORDPRESS_S3_UPLOADS_VERSION
ARG WORDPRESS_S3_UPLOADS_SRC
-RUN if [ -n "${WORDPRESS_S3_UPLOADS_ARCHIVE}" ]; then \
- curl -fsSL --connect-timeout 5 --max-time 300 -o /tmp/s3-uploads.zip \
- "${WORDPRESS_S3_UPLOADS_ARCHIVE}" && \
- mkdir -p "${WORDPRESS_S3_UPLOADS_SRC}" && \
- unzip -q /tmp/s3-uploads.zip -d "${WORDPRESS_S3_UPLOADS_SRC}" && \
- rm /tmp/s3-uploads.zip; \
+RUN if [ -n "${WORDPRESS_S3_UPLOADS_VERSION}" ]; then \
+ COMPOSER_ALLOW_SUPERUSER=1 composer create-project --no-dev --no-interaction \
+ --no-progress --prefer-dist humanmade/s3-uploads \
+ "${WORDPRESS_S3_UPLOADS_SRC}" "${WORDPRESS_S3_UPLOADS_VERSION}"; \
fi
ARG WORDPRESS_CONFIG_UPLD_REL
diff --git a/roles/web-app-wordpress/meta/addons/s3-uploads.yml b/roles/web-app-wordpress/meta/addons/s3-uploads.yml
index 87efa8c5e1..26e35590c2 100644
--- a/roles/web-app-wordpress/meta/addons/s3-uploads.yml
+++ b/roles/web-app-wordpress/meta/addons/s3-uploads.yml
@@ -3,10 +3,8 @@ enabled: "{{ lookup('config', 'web-app-wordpress', 'services.seaweedfs.enabled')
required: true
mechanism: plugin
source: upstream
-version: "3.0.13"
+version: "3.0.14"
update:
monitored: true
catalog: github-releases
upstream_id: humanmade/S3-Uploads
-config:
- archive: "https://github.com/humanmade/S3-Uploads/releases/download/3.0.13/manual-install.zip"
diff --git a/roles/web-app-wordpress/templates/compose.yml.j2 b/roles/web-app-wordpress/templates/compose.yml.j2
index 130092add8..8f5343fc7f 100644
--- a/roles/web-app-wordpress/templates/compose.yml.j2
+++ b/roles/web-app-wordpress/templates/compose.yml.j2
@@ -9,7 +9,7 @@
WORDPRESS_IMAGE: "{{ WORDPRESS_IMAGE }}"
WORDPRESS_VERSION: "{{ WORDPRESS_VERSION }}"
WORDPRESS_CONFIG_UPLD_REL: "{{ WORDPRESS_CONFIG_UPLD_REL }}"
- WORDPRESS_S3_UPLOADS_ARCHIVE: "{{ WORDPRESS_S3_UPLOADS_ARCHIVE }}"
+ WORDPRESS_S3_UPLOADS_VERSION: "{{ WORDPRESS_S3_UPLOADS_VERSION }}"
WORDPRESS_S3_UPLOADS_SRC: "{{ WORDPRESS_S3_UPLOADS_SRC }}"
{{ lookup('container_ports', ['wordpress', 'http', DOCKER_BIND_HOST]) | indent(4) }}
{{ lookup('container_volumes', service_name) | indent(4) }}
diff --git a/roles/web-app-wordpress/vars/main.yml b/roles/web-app-wordpress/vars/main.yml
index 36872353e8..a789047860 100644
--- a/roles/web-app-wordpress/vars/main.yml
+++ b/roles/web-app-wordpress/vars/main.yml
@@ -59,8 +59,8 @@ WORDPRESS_LISTMONK_API_URL: >-
WORDPRESS_PEERTUBE_INSTANCE_URL: >-
{{ lookup('config', application_id, 'addons.video-manager-for-peertube.config.peertube_settings.instance_url')
if (lookup('config', application_id, 'addons.video-manager-for-peertube.enabled') | bool) else '' }}
-WORDPRESS_S3_UPLOADS_ARCHIVE: >-
- {{ lookup('config', application_id, 'addons.s3-uploads.config.archive')
+WORDPRESS_S3_UPLOADS_VERSION: >-
+ {{ lookup('config', application_id, 'addons.s3-uploads.version')
if (lookup('config', application_id, 'addons.s3-uploads.enabled') | bool) else '' }}
WORDPRESS_TRANSLATE_ENABLED: "{{ lookup('config', application_id, 'addons.freedomtranslate-wp.enabled') | bool }}"
WORDPRESS_TRANSLATE_OPTIONS: >-
diff --git a/roles/web-app-xwiki/meta/services.yml b/roles/web-app-xwiki/meta/services.yml
index a237cc2d1c..776bf8ba8f 100644
--- a/roles/web-app-xwiki/meta/services.yml
+++ b/roles/web-app-xwiki/meta/services.yml
@@ -82,6 +82,11 @@ xwiki:
- web-app-stalwart
- web-app-mailu
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "18.9.0-postgres-tomcat"
+ until: 2026-12-03
# nocheck: playwright-service-flag — design consumer, no Playwright surface (provider: web-svc-design)
design:
bond: 1
diff --git a/roles/web-app-zammad/meta/services.yml b/roles/web-app-zammad/meta/services.yml
index 8359f6b697..87b61a884e 100644
--- a/roles/web-app-zammad/meta/services.yml
+++ b/roles/web-app-zammad/meta/services.yml
@@ -107,6 +107,11 @@ zammad:
mem_reservation: 1g
mem_limit: 2g
pids_limit: 1024
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "7.1.2"
+ until: 2026-12-03
railsserver:
healthcheck:
flavor: connect
@@ -215,6 +220,11 @@ zammadmcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag MCP pairing is proven by the role's own MCP spec, not by a per-consumer gate
openwebui:
bond: 0.5
diff --git a/roles/web-svc-collabora/meta/services.yml b/roles/web-svc-collabora/meta/services.yml
index c48ad06c82..18ca1069c5 100644
--- a/roles/web-svc-collabora/meta/services.yml
+++ b/roles/web-svc-collabora/meta/services.yml
@@ -40,6 +40,11 @@ collabora:
proxy:
service_key: collabora
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "26.04.6.1.1"
+ until: 2026-12-03
# nocheck: dynamic-flag
# nocheck: design-off Reason: '/' answers a plain OK, the admin console is off and the editor opens only as a POST from the WOPI host (Nextcloud)
design:
diff --git a/roles/web-svc-coturn/meta/services.yml b/roles/web-svc-coturn/meta/services.yml
index 9c8097e5b7..2d67c84291 100644
--- a/roles/web-svc-coturn/meta/services.yml
+++ b/roles/web-svc-coturn/meta/services.yml
@@ -32,6 +32,11 @@ coturn:
start: 20000
end: 39999
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "4.18.0"
+ until: 2026-12-03
gateway:
image: nginx
version: 1.31.8-alpine
@@ -39,6 +44,11 @@ gateway:
mem_reservation: 256m
mem_limit: 512m
pids_limit: 256
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "1.31.8-alpine"
+ until: 2026-12-03
# nocheck: dynamic-flag coturn runs with user_auth_enabled false, so it keeps no credential store to back; the entry stays literal until auth is switched on and no template references redis today.
redis:
backup:
diff --git a/roles/web-svc-libretranslate/meta/services.yml b/roles/web-svc-libretranslate/meta/services.yml
index ebbe509b84..69662f40e7 100644
--- a/roles/web-svc-libretranslate/meta/services.yml
+++ b/roles/web-svc-libretranslate/meta/services.yml
@@ -37,6 +37,11 @@ libretranslate:
mem_limit: 1g
pids_limit: 512
gpu: true
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "v1.9.6"
+ until: 2026-12-03
sso:
bond: 1
enabled: "{{ 'web-app-keycloak' in group_names }}"
@@ -115,6 +120,11 @@ libretranslatemcp:
ports:
internal:
http: 8080
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "3.13.15-slim"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
diff --git a/roles/web-svc-onlyoffice/meta/services.yml b/roles/web-svc-onlyoffice/meta/services.yml
index df441fef14..8859642b3b 100644
--- a/roles/web-svc-onlyoffice/meta/services.yml
+++ b/roles/web-svc-onlyoffice/meta/services.yml
@@ -50,6 +50,11 @@ onlyoffice:
proxy:
service_key: onlyoffice
lifecycle: beta
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "10.0.0"
+ until: 2026-12-03
# nocheck: dynamic-flag
# nocheck: design-off Reason: document server; standalone it serves only static notice pages, the editors render only inside a host app that signs their configuration with the JWT secret
design:
diff --git a/roles/web-svc-xmpp/meta/services.yml b/roles/web-svc-xmpp/meta/services.yml
index a19fa7f56a..03c2bd262f 100644
--- a/roles/web-svc-xmpp/meta/services.yml
+++ b/roles/web-svc-xmpp/meta/services.yml
@@ -67,6 +67,11 @@ xmpp:
mem_reservation: 256m
mem_limit: 1g
pids_limit: 512
+ security:
+ suppressions:
+ # nocheck: cve upstream tag ships fixable CRITICAL CVEs; lift it once a rebuilt tag lands
+ - image_tag: "26.09"
+ until: 2026-12-03
# nocheck: playwright-service-flag
# nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
diff --git a/scripts/install/README.md b/scripts/install/README.md
index db3e4501d6..951bb701a2 100644
--- a/scripts/install/README.md
+++ b/scripts/install/README.md
@@ -6,7 +6,7 @@ This directory contains scripts that install and bootstrap host-side tooling use
- 🐧 Install ad-hoc APT packages for CI and workflow jobs via `apt.sh`
- 📦 Build and install distro package metadata via `package.sh` (Arch/Debian/Ubuntu/Fedora)
- 🗂️ Copy the repository into a fresh package build workspace via `stage.sh`, a tar pipe instead of rsync, because rsync's local copy waits for an in-container signal that hosts stacking AppArmor onto containers refuse
-- 🪞 Point an Ubuntu image's apt sources at `INFINITO_APT_UBUNTU_MIRRORS` via `apt-mirrors.sh`, run first in the image build: apt tries the mirrors in list order and moves on when one fails or stays silent for 10 s; images of other distros are left untouched
+- 🪞 Point an Ubuntu image's apt sources at `INFINITO_APT_UBUNTU_MIRRORS` (amd64) and `INFINITO_APT_UBUNTU_PORTS_MIRRORS` (arm64, which the archive mirrors do not carry) via `apt-mirrors.sh`, run first in the image build: apt tries the mirrors in list order and moves on when one fails or stays silent for 10 s; images of other distros are left untouched
- 🏖️ Install OS-level Claude Code sandbox dependencies (`bubblewrap`, `socat`) via `sandbox.sh`, covering Debian, Ubuntu, Fedora, CentOS/RHEL/Rocky/Alma, and Arch; also exposed as `make install-agent`
- 🧊 Install the ext4, btrfs and zfs userlands via `filesystem.sh` (distro packages, EPEL for btrfs on CentOS, the AUR PKGBUILD for zfs on Arch, the zfsonlinux repository on Fedora/CentOS); the kernel side comes from the host
- 🐍 Bootstrap virtual environments and editable project dependencies
diff --git a/scripts/install/apt-mirrors.sh b/scripts/install/apt-mirrors.sh
index 53469552b7..e91a33a972 100755
--- a/scripts/install/apt-mirrors.sh
+++ b/scripts/install/apt-mirrors.sh
@@ -7,9 +7,16 @@ if [[ ! -f "${sources}" ]]; then
fi
: "${INFINITO_APT_UBUNTU_MIRRORS:?INFINITO_APT_UBUNTU_MIRRORS must be set}"
+: "${INFINITO_APT_UBUNTU_PORTS_MIRRORS:?INFINITO_APT_UBUNTU_PORTS_MIRRORS must be set}"
read -r -a mirrors <<<"${INFINITO_APT_UBUNTU_MIRRORS}"
+read -r -a ports_mirrors <<<"${INFINITO_APT_UBUNTU_PORTS_MIRRORS}"
mirrorlist="/etc/apt/ubuntu.mirrorlist"
+ports_mirrorlist="/etc/apt/ubuntu-ports.mirrorlist"
printf '%s\n' "${mirrors[@]}" | awk '{ printf "%s\tpriority:%d\n", $0, NR }' >"${mirrorlist}"
+printf '%s\n' "${ports_mirrors[@]}" | awk '{ printf "%s\tpriority:%d\n", $0, NR }' >"${ports_mirrorlist}"
printf 'Acquire::http::Timeout "10";\n' >/etc/apt/apt.conf.d/80infinito-mirrors
-sed -i -E "s#^URIs: http://(archive|security)\.ubuntu\.com/ubuntu/?\$#URIs: mirror+file:${mirrorlist}#" "${sources}"
+sed -i -E \
+ -e "s#^URIs: http://(archive|security)\.ubuntu\.com/ubuntu/?\$#URIs: mirror+file:${mirrorlist}#" \
+ -e "s#^URIs: http://ports\.ubuntu\.com/ubuntu-ports/?\$#URIs: mirror+file:${ports_mirrorlist}#" \
+ "${sources}"
diff --git a/scripts/tests/deploy/act/README.md b/scripts/tests/deploy/act/README.md
index 537daa51a1..ee3794a2ed 100644
--- a/scripts/tests/deploy/act/README.md
+++ b/scripts/tests/deploy/act/README.md
@@ -9,4 +9,4 @@ For the canonical Make target index that invokes these helpers, see [make.md](..
| Command | What it does | Notes |
|---|---|---|
-| `workflow.sh` | Runs any workflow file through `act`. | Supports custom job, matrix, container, network, and image settings. Invoked via `make act-workflow ACT_WORKFLOW=`. |
+| `workflow.sh` | Runs any workflow file through `act`. | Supports custom job, matrix, container, network, and image settings. Binds `INFINITO_VULNERABILITY_DB_HOST_PATH` into the job container at the same path. Invoked via `make act-workflow ACT_WORKFLOW=`. |
diff --git a/scripts/tests/deploy/act/workflow.sh b/scripts/tests/deploy/act/workflow.sh
index 3f6f9f8a61..93d09a2e33 100755
--- a/scripts/tests/deploy/act/workflow.sh
+++ b/scripts/tests/deploy/act/workflow.sh
@@ -14,6 +14,7 @@ set -euo pipefail
: "${ACT_BIND:=false}"
: "${ACT_INPUTS:=}"
: "${ACT_ENV:=}"
+: "${INFINITO_VULNERABILITY_DB_HOST_PATH:?INFINITO_VULNERABILITY_DB_HOST_PATH is not set; run 'make dotenv' to generate the .env single source of truth}"
if [[ "${ACT_PLATFORM_IMAGE}" == local/act-runner-fixed:latest ]] &&
! docker image inspect "${ACT_PLATFORM_IMAGE}" >/dev/null 2>&1; then
@@ -82,9 +83,9 @@ if [[ -n "${ACT_ENV}" ]]; then
fi
done
fi
-if [[ -n "${ACT_CONTAINER_OPTIONS}" ]]; then
- cmd+=(--container-options "${ACT_CONTAINER_OPTIONS}")
-fi
+mkdir -p "${INFINITO_VULNERABILITY_DB_HOST_PATH}"
+cmd+=(--container-options "${ACT_CONTAINER_OPTIONS} --volume ${INFINITO_VULNERABILITY_DB_HOST_PATH}:${INFINITO_VULNERABILITY_DB_HOST_PATH}")
+cmd+=(--env "INFINITO_VULNERABILITY_DB_HOST_PATH=${INFINITO_VULNERABILITY_DB_HOST_PATH}")
if [[ -n "${ACT_NETWORK}" ]]; then
cmd+=(--network "${ACT_NETWORK}")
fi
diff --git a/tests/external/repository/test_apt_ubuntu_mirrors.py b/tests/external/repository/test_apt_ubuntu_mirrors.py
index ce11b78673..5fbda6442b 100644
--- a/tests/external/repository/test_apt_ubuntu_mirrors.py
+++ b/tests/external/repository/test_apt_ubuntu_mirrors.py
@@ -1,15 +1,16 @@
-"""External: the Ubuntu mirror list stays fast, fresh and official.
+"""External: the Ubuntu mirror lists stay fast, fresh and official.
``INFINITO_APT_UBUNTU_MIRRORS`` orders the mirrors Ubuntu images fall back
-through and the package cache proxies. The order is kept by hand; this test
-says when it has to change:
+through and the package cache proxies; ``INFINITO_APT_UBUNTU_PORTS_MIRRORS``
+does the same for arm64 images, which the archive mirrors do not carry. Each
+order is kept by hand; this test says when one has to change:
* the first mirror answers ``InRelease`` within ``FIRST_MIRROR_MAX_SECONDS``
(median of ``PROBES``), or the test names a later mirror that does;
* no mirror's ``-updates`` pocket lags the freshest one in the list by more
than ``STALE_AFTER``;
-* every mirror is the primary archive, a Canonical country alias, or an
- enabled official mirror in Launchpad's registry.
+* every mirror is the list's primary host, a Canonical country alias of it,
+ or an enabled official mirror in Launchpad's registry.
A mirror this host pins in /etc/hosts goes through the local package cache
and is not measured. An unreachable mirror or registry is a warning; the test
@@ -35,12 +36,14 @@ from utils.env.parser import env_setting
from ._package_probes import UBUNTU_SUITE
-MIRRORS_KEY = "INFINITO_APT_UBUNTU_MIRRORS"
+MIRROR_LISTS = (
+ ("INFINITO_APT_UBUNTU_MIRRORS", "archive.ubuntu.com"),
+ ("INFINITO_APT_UBUNTU_PORTS_MIRRORS", "ports.ubuntu.com"),
+)
FIRST_MIRROR_MAX_SECONDS = 5.0
PROBES = 3
STALE_AFTER = timedelta(hours=24)
TIMEOUT_SECONDS = 20
-PRIMARY_ARCHIVE = "archive.ubuntu.com"
REGISTRY = "https://api.launchpad.net/devel/ubuntu/archive_mirrors?ws.size=75"
USER_AGENT = "infinito-nexus mirror check"
@@ -159,27 +162,32 @@ def _freshness_problems(answered: list[Measurement]) -> list[str]:
]
-def _registry_problems(mirrors: list[str]) -> list[str]:
+def _registry_problems(mirrors: list[str], primary: str) -> list[str]:
official = _official_hosts()
if official is None:
return []
return [
- f"{mirror}: not the primary archive, a Canonical country alias, or an "
+ f"{mirror}: not {primary}, a Canonical country alias, or an "
"enabled official mirror in Launchpad's registry"
for mirror in mirrors
if not (
- _host(mirror) == PRIMARY_ARCHIVE
- or _host(mirror).endswith(f".{PRIMARY_ARCHIVE}")
+ _host(mirror) == primary
+ or _host(mirror).endswith(f".{primary}")
or _host(mirror) in official
)
]
class TestAptUbuntuMirrors(unittest.TestCase):
- def test_mirror_list_is_fast_fresh_and_official(self) -> None:
- mirrors = env_setting(MIRRORS_KEY).split()
+ def test_mirror_lists_are_fast_fresh_and_official(self) -> None:
+ for key, primary in MIRROR_LISTS:
+ with self.subTest(key=key):
+ self._check(key, primary)
+
+ def _check(self, key: str, primary: str) -> None:
+ mirrors = env_setting(key).split()
self.assertGreaterEqual(
- len(mirrors), 2, f"{MIRRORS_KEY} needs a primary and a fallback mirror"
+ len(mirrors), 2, f"{key} needs a primary and a fallback mirror"
)
pinned = _pinned_hosts()
measurable = [m for m in mirrors if _host(m) not in pinned]
@@ -209,10 +217,10 @@ class TestAptUbuntuMirrors(unittest.TestCase):
first = next(m for m in results if m.mirror == mirrors[0])
problems.extend(_order_problems(first, answered))
problems.extend(_freshness_problems(answered))
- problems.extend(_registry_problems(mirrors))
+ problems.extend(_registry_problems(mirrors, primary))
if problems:
self.fail(
- f"{MIRRORS_KEY} needs an edit:\n"
+ f"{key} needs an edit:\n"
+ "\n".join(f" - {problem}" for problem in problems)
)
diff --git a/tests/external/update/pip/test_ansible_python_cap.py b/tests/external/update/pip/test_ansible_python_cap.py
index 4f8ba83861..25c7a17435 100644
--- a/tests/external/update/pip/test_ansible_python_cap.py
+++ b/tests/external/update/pip/test_ansible_python_cap.py
@@ -24,7 +24,6 @@ from __future__ import annotations
import http.client
import json
import re
-import tomllib
import unittest
import urllib.error
import urllib.request
@@ -33,7 +32,7 @@ from packaging.requirements import Requirement
from packaging.version import InvalidVersion, Version
from utils.annotations.message import warning
-from utils.cache.files import read_text
+from utils.requires_python import requires_python, supported_minors
from . import PROJECT_ROOT
@@ -41,8 +40,6 @@ PYPI_API = "https://pypi.org/pypi/{}"
TIMEOUT_SECONDS = 15
USER_AGENT = "infinito-nexus python cap check"
CLASSIFIER = re.compile(r"^Programming Language :: Python :: 3\.(\d+)$")
-REQUIRES_PYTHON = re.compile(r"^>=3\.(\d+),<3\.(\d+)$")
-PYPROJECT = PROJECT_ROOT / "pyproject.toml"
class PyPIUnavailableError(Exception):
@@ -75,13 +72,7 @@ def pypi_json(path: str) -> dict:
def declared_cap() -> int:
"""Return the highest Python 3 minor ``requires-python`` admits."""
- spec = tomllib.loads(read_text(str(PYPROJECT)))["project"]["requires-python"]
- match = REQUIRES_PYTHON.fullmatch(spec)
- if match is None:
- raise AssertionError(
- f"pyproject.toml requires-python {spec!r} must read >=3.X,<3.Y"
- )
- return int(match[2]) - 1
+ return max(supported_minors(requires_python(PROJECT_ROOT)))
def core_requirement(ansible: dict) -> Requirement:
diff --git a/tests/lint/ansible/services/test_cve_suppressions.py b/tests/lint/ansible/services/test_cve_suppressions.py
new file mode 100644
index 0000000000..e0d0927c31
--- /dev/null
+++ b/tests/lint/ansible/services/test_cve_suppressions.py
@@ -0,0 +1,221 @@
+"""Lint: every CVE suppression in a role's ``meta/services.yml`` is justified and dated.
+
+An entry under ``.security.suppressions`` needs ``id: CVE-YYYY-NNNN``
+or an ``image_tag`` equal to the service's ``version``, an ``until:
+YYYY-MM-DD`` that has not passed, and a ``# nocheck: cve `` marker on
+the line directly above it::
+
+ checkmk:
+ image: checkmk/check-mk-raw
+ version: "2.4.0p39"
+ security:
+ suppressions:
+ # nocheck: cve the vulnerable module is not loaded by the site
+ - id: CVE-2026-1234
+ until: 2026-12-31
+ # nocheck: cve upstream ships no rebuild with the fixed packages yet
+ - image_tag: "2.4.0p39"
+ until: 2026-12-31
+"""
+
+from __future__ import annotations
+
+import datetime as dt
+import re
+import unittest
+
+from utils.cache.files import read_text
+from utils.cache.yaml import load_yaml_str
+from utils.roles.mapping import ROLE_FILE_META_SERVICES
+from utils.security.suppressions import RULE, SuppressionError, parse_entries
+
+from . import PROJECT_ROOT
+
+MARKER = re.compile(rf"^\s*#\s*nocheck:\s*{RULE}\b(?P.*)$", re.IGNORECASE)
+BLOCK = re.compile(r"^(?P\s*)suppressions:\s*$")
+ENTRY = re.compile(r"^(?P\s*)-\s+\S")
+REASON_SEPARATORS = " \t-:"
+
+
+def _entry_lines(lines: list[str]) -> list[int]:
+ """Return the index of every list item inside a ``suppressions:`` block."""
+ found = []
+ block_indent = None
+ for index, line in enumerate(lines):
+ if not line.strip():
+ continue
+ indent = len(line) - len(line.lstrip())
+ if (
+ block_indent is not None
+ and indent <= block_indent
+ and not line.lstrip().startswith(("-", "#"))
+ ):
+ block_indent = None
+ match = BLOCK.match(line)
+ if match:
+ block_indent = len(match.group("indent"))
+ continue
+ if block_indent is not None and ENTRY.match(line):
+ found.append(index)
+ return found
+
+
+def _marker_problem(lines: list[str], index: int) -> str | None:
+ match = MARKER.match(lines[index - 1]) if index > 0 else None
+ if match is None:
+ return "has no # nocheck: cve marker directly above it"
+ if not match.group("reason").strip(REASON_SEPARATORS):
+ return "its # nocheck: cve marker gives no reason"
+ return None
+
+
+def problems(text: str, where: str, today: dt.date) -> list[str]:
+ """Return every rule one ``meta/services.yml`` breaks.
+
+ Args:
+ text: the file content.
+ where: the file name for the messages.
+ today: the day an ``until`` must not lie before.
+ """
+ found = []
+ lines = text.splitlines()
+ for index in _entry_lines(lines):
+ problem = _marker_problem(lines, index)
+ if problem:
+ found.append(f"{where}:{index + 1}: suppression {problem}")
+ services = load_yaml_str(text) or {}
+ if not isinstance(services, dict):
+ return found
+ for service, spec in services.items():
+ if not isinstance(spec, dict) or "security" not in spec:
+ continue
+ security = spec["security"]
+ entries = security.get("suppressions") if isinstance(security, dict) else None
+ if not isinstance(entries, list):
+ found.append(f"{where}: {service}.security must hold a suppressions list")
+ continue
+ for entry in entries:
+ try:
+ parsed = parse_entries([entry], f"{where}: {service}")[0]
+ except SuppressionError as exc:
+ found.append(str(exc))
+ continue
+ if parsed.until < today:
+ found.append(
+ f"{where}: {service} suppression of {parsed.subject} expired on {parsed.until}"
+ )
+ version = spec.get("version")
+ if parsed.image_tag is not None and parsed.image_tag != str(version):
+ found.append(
+ f"{where}: {service} suppression of {parsed.subject} does not "
+ f"match its version {version!r}"
+ )
+ return found
+
+
+class TestCveSuppressions(unittest.TestCase):
+ def test_every_suppression_is_justified_and_dated(self) -> None:
+ today = dt.datetime.now(tz=dt.UTC).date()
+ found = []
+ for path in sorted(
+ (PROJECT_ROOT / "roles").glob(f"*/{ROLE_FILE_META_SERVICES}")
+ ):
+ text = read_text(str(path))
+ if "suppressions:" in text:
+ found += problems(text, str(path.relative_to(PROJECT_ROOT)), today)
+ self.assertEqual(found, [], "\n".join(found))
+
+
+TODAY = dt.date(2026, 10, 31)
+VALID = """\
+app:
+ image: app
+ security:
+ suppressions:
+ # nocheck: cve the module is not built into the image
+ - id: CVE-2026-1234
+ until: 2026-12-31
+"""
+
+
+class TestCheckerCases(unittest.TestCase):
+ def _problems(self, text: str) -> list[str]:
+ return problems(text, f"roles/r/{ROLE_FILE_META_SERVICES}", TODAY)
+
+ def test_a_justified_dated_entry_passes(self) -> None:
+ self.assertEqual(self._problems(VALID), [])
+
+ def test_an_entry_without_a_marker_fails(self) -> None:
+ text = VALID.replace(
+ " # nocheck: cve the module is not built into the image\n", ""
+ )
+ self.assertIn("has no # nocheck: cve marker", self._problems(text)[0])
+
+ def test_a_marker_without_a_reason_fails(self) -> None:
+ text = VALID.replace("cve the module is not built into the image", "cve")
+ self.assertIn("gives no reason", self._problems(text)[0])
+
+ def test_a_malformed_id_fails(self) -> None:
+ text = VALID.replace("CVE-2026-1234", "CVE-26-1")
+ self.assertIn("is no CVE-YYYY-NNNN id", self._problems(text)[0])
+
+ def test_a_missing_until_fails(self) -> None:
+ text = VALID.replace(" until: 2026-12-31\n", "")
+ self.assertIn("until is required", self._problems(text)[0])
+
+ def test_a_past_until_fails(self) -> None:
+ text = VALID.replace("2026-12-31", "2026-10-30")
+ self.assertIn("expired on 2026-10-30", self._problems(text)[0])
+
+ def test_an_unmarked_entry_that_starts_with_until_fails(self) -> None:
+ text = VALID.replace(
+ " # nocheck: cve the module is not built into the image\n"
+ " - id: CVE-2026-1234\n"
+ " until: 2026-12-31\n",
+ " - until: 2026-12-31\n id: CVE-2026-1234\n",
+ )
+ self.assertIn("has no # nocheck: cve marker", self._problems(text)[0])
+
+ def test_a_marker_for_another_rule_does_not_count(self) -> None:
+ text = VALID.replace("nocheck: cve", "nocheck: url")
+ self.assertIn("has no # nocheck: cve marker", self._problems(text)[0])
+
+ def test_an_image_tag_of_the_current_version_passes(self) -> None:
+ self.assertEqual(self._problems(TAGGED), [])
+
+ def test_an_image_tag_of_an_older_version_fails(self) -> None:
+ text = TAGGED.replace('version: "2.18.6"', 'version: "2.18.7"')
+ self.assertIn(
+ "image tag 2.18.6 does not match its version '2.18.7'",
+ self._problems(text)[0],
+ )
+
+ def test_an_image_tag_without_a_version_fails(self) -> None:
+ text = TAGGED.replace(' version: "2.18.6"\n', "")
+ self.assertIn("does not match its version None", self._problems(text)[0])
+
+ def test_an_unmarked_image_tag_entry_fails(self) -> None:
+ text = TAGGED.replace(
+ " # nocheck: cve upstream ships no rebuild yet\n", ""
+ )
+ self.assertIn("has no # nocheck: cve marker", self._problems(text)[0])
+
+ def test_an_expired_image_tag_entry_fails(self) -> None:
+ text = TAGGED.replace("2026-12-31", "2026-10-30")
+ self.assertIn("image tag 2.18.6 expired on 2026-10-30", self._problems(text)[0])
+
+
+TAGGED = """\
+app:
+ image: app
+ version: "2.18.6"
+ security:
+ suppressions:
+ # nocheck: cve upstream ships no rebuild yet
+ - image_tag: "2.18.6"
+ until: 2026-12-31
+"""
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tests/lint/repository/dependencies/test_requires_python_followers.py b/tests/lint/repository/dependencies/test_requires_python_followers.py
new file mode 100644
index 0000000000..b6c1f60ecd
--- /dev/null
+++ b/tests/lint/repository/dependencies/test_requires_python_followers.py
@@ -0,0 +1,89 @@
+"""Lint guard: a role image that pip-installs core runs a Python core supports.
+
+pip refuses ``infinito-nexus`` on a base outside ``requires-python`` of
+pyproject.toml. The image updater bumped ``web-app-docs`` to
+``python:3.15-slim`` that way (PR 1448) and broke every deploy with docs.
+``follow: requires-python`` holds the updater inside the range; this guard
+makes every such role declare it and pin a base inside the range.
+"""
+
+from __future__ import annotations
+
+import re
+import unittest
+
+from utils.cache.files import read_text
+from utils.cache.yaml import load_yaml_any
+from utils.requires_python import FOLLOW, requires_python, supported_minors
+from utils.roles.mapping import ROLE_FILE_META_SERVICES
+from utils.update.base import version_key
+
+from . import PROJECT_ROOT
+
+_INSTALLS_CORE = re.compile(r"infinito-nexus(\[[^\]]*\])? @ git\+")
+
+
+def _entities(role):
+ data = load_yaml_any(str(role / ROLE_FILE_META_SERVICES), default_if_missing={})
+ return {
+ name: entity
+ for name, entity in (data or {}).items()
+ if isinstance(entity, dict)
+ }
+
+
+def _roles_installing_core():
+ return sorted(
+ {
+ path.relative_to(PROJECT_ROOT / "roles").parts[0]
+ for path in (PROJECT_ROOT / "roles").glob("*/*/Dockerfile*")
+ if path.is_file() and _INSTALLS_CORE.search(read_text(str(path)))
+ }
+ )
+
+
+class TestRequiresPythonFollowers(unittest.TestCase):
+ def test_every_role_installing_core_follows_requires_python(self) -> None:
+ roles = _roles_installing_core()
+ self.assertIn("web-app-docs", roles)
+ missing = [
+ role
+ for role in roles
+ if not any(
+ entity.get("follow") == FOLLOW
+ for entity in _entities(PROJECT_ROOT / "roles" / role).values()
+ )
+ ]
+ self.assertEqual(
+ missing,
+ [],
+ f"these roles pip-install infinito-nexus into their image but no "
+ f"entity of meta/services.yml sets 'follow: {FOLLOW}', so the image "
+ f"updater may move the base past requires-python",
+ )
+
+ def test_every_follower_pins_a_supported_python(self) -> None:
+ minors = supported_minors(requires_python(PROJECT_ROOT))
+ followers = {
+ f"{role.name}/{name}": str(entity.get("version"))
+ for role in sorted((PROJECT_ROOT / "roles").iterdir())
+ for name, entity in _entities(role).items()
+ if entity.get("follow") == FOLLOW
+ }
+ self.assertIn("web-app-docs/docs", followers)
+ outside = {
+ key: version
+ for key, version in followers.items()
+ if version_key(version)[0] != 3 or version_key(version)[1] not in minors
+ }
+ self.assertEqual(
+ outside,
+ {},
+ f"these pins lie outside requires-python of pyproject.toml "
+ f"(Python 3.{minors.start} to 3.{minors.stop - 1}); pip refuses to "
+ f"install infinito-nexus there",
+ )
+
+
+if __name__ == "__main__": # pragma: no cover
+ unittest.main()
diff --git a/tests/lint/repository/test_deploy_vulnerability_databases.py b/tests/lint/repository/test_deploy_vulnerability_databases.py
new file mode 100644
index 0000000000..49b9900199
--- /dev/null
+++ b/tests/lint/repository/test_deploy_vulnerability_databases.py
@@ -0,0 +1,129 @@
+from __future__ import annotations
+
+import os
+import subprocess
+import tempfile
+import unittest
+from pathlib import Path
+
+from tests.utils import PROJECT_ROOT
+from utils.cache.files import read_text
+from utils.cache.yaml import load_yaml_any
+
+WORKFLOWS = PROJECT_ROOT / ".github" / "workflows"
+ENGINE = "INFINITO_VULNERABILITY_ENGINE"
+DB_HOST_PATH = "INFINITO_VULNERABILITY_DB_HOST_PATH"
+GITHUB_ONLY = "${{ !env.ACT }}"
+
+
+def steps(workflow: str, job: str) -> list[dict]:
+ return load_yaml_any(str(WORKFLOWS / workflow))["jobs"][job]["steps"]
+
+
+def bash(script: str, env: dict[str, str], cwd: str) -> subprocess.CompletedProcess:
+ clean = {
+ k: v
+ for k, v in os.environ.items()
+ if k not in ("BASH_ENV", "ACT", "RUNNER_TEMP", DB_HOST_PATH)
+ }
+ return subprocess.run(
+ ["bash", "-c", script],
+ env={**clean, **env},
+ cwd=cwd,
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+
+
+class TestDeployJob(unittest.TestCase):
+ def setUp(self) -> None:
+ self.job = load_yaml_any(str(WORKFLOWS / "call-test-deploy.yml"))["jobs"][
+ "deploy"
+ ]
+ self.pins = [
+ step for step in self.job["steps"] if f"{ENGINE}=" in step.get("run", "")
+ ]
+
+ def test_no_env_block_pins_the_engine_or_the_path(self) -> None:
+ blocks = [self.job["env"], *(step.get("env", {}) for step in self.job["steps"])]
+ self.assertEqual(
+ [block for block in blocks if {ENGINE, DB_HOST_PATH} & set(block)], []
+ )
+
+ def test_only_a_github_run_pins_the_restored_databases(self) -> None:
+ self.assertEqual([step["if"] for step in self.pins], [GITHUB_ONLY])
+
+ def test_the_pin_comes_before_every_deploy(self) -> None:
+ names = [step["name"] for step in self.job["steps"]]
+ deploys = [index for index, name in enumerate(names) if name.startswith("🚀")]
+ self.assertTrue(deploys)
+ self.assertLess(names.index(self.pins[0]["name"]), min(deploys))
+
+ def test_a_github_run_pins_the_row_engine_and_the_restored_path(self) -> None:
+ with tempfile.TemporaryDirectory() as tmp:
+ github_env = Path(tmp) / "github_env"
+ done = bash(
+ self.pins[0]["run"],
+ {
+ "ENGINE": "osv",
+ "GITHUB_WORKSPACE": "/ws",
+ "GITHUB_ENV": str(github_env),
+ },
+ tmp,
+ )
+ self.assertEqual(done.returncode, 0, done.stderr)
+ lines = read_text(str(github_env)).splitlines()
+ self.assertEqual(
+ lines, [f"{ENGINE}=osv", f"{DB_HOST_PATH}=/ws/build/vulnerability-db"]
+ )
+
+
+class TestWorkspaceJob(unittest.TestCase):
+ def setUp(self) -> None:
+ script = next(
+ step["run"]
+ for step in steps("call-test-workspace.yml", "test-workspace")
+ if "00_orchestrator.sh" in step.get("run", "")
+ )
+ self.script = script
+ self.prelude = (
+ script[: script.index("docker run")] + 'printf "%s" "${db_host_path}"\n'
+ )
+
+ def _db_host_path(
+ self, env: dict[str, str]
+ ) -> tuple[subprocess.CompletedProcess, str]:
+ with tempfile.TemporaryDirectory() as tmp:
+ workdir = Path(tmp).resolve()
+ env = {
+ key: value.replace("{tmp}", str(workdir)) for key, value in env.items()
+ }
+ done = bash(self.prelude, env, str(workdir))
+ return done, done.stdout.replace(str(workdir), "{tmp}")
+
+ def test_an_act_run_shares_the_host_directory_of_the_wrapper(self) -> None:
+ done, path = self._db_host_path({"ACT": "true", DB_HOST_PATH: "{tmp}/shared"})
+ self.assertEqual((done.returncode, path), (0, "{tmp}/shared"))
+
+ def test_a_github_run_keeps_the_databases_outside_its_checkout(self) -> None:
+ done, path = self._db_host_path({"RUNNER_TEMP": "{tmp}/runner-temp"})
+ self.assertEqual(
+ (done.returncode, path), (0, "{tmp}/runner-temp/vulnerability-db")
+ )
+
+ def test_a_github_run_without_runner_temp_fails(self) -> None:
+ done, _path = self._db_host_path({})
+ self.assertNotEqual(done.returncode, 0)
+
+ def test_an_act_run_without_the_wrapper_path_fails(self) -> None:
+ done, _path = self._db_host_path({"ACT": "true"})
+ self.assertNotEqual(done.returncode, 0)
+
+ def test_the_container_sees_the_databases_at_the_host_path(self) -> None:
+ self.assertIn('-v "${db_host_path}:${db_host_path}"', self.script)
+ self.assertIn(f'-e {DB_HOST_PATH}="${{db_host_path}}"', self.script)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tests/unit/python/cli/administration/deploy/ci/test_selections.py b/tests/unit/python/cli/administration/deploy/ci/test_selections.py
index ac76959125..2e6848eaa5 100644
--- a/tests/unit/python/cli/administration/deploy/ci/test_selections.py
+++ b/tests/unit/python/cli/administration/deploy/ci/test_selections.py
@@ -1,5 +1,7 @@
from __future__ import annotations
+import contextlib
+import io
import unittest
from typing import ClassVar
@@ -303,3 +305,25 @@ class TestCollapseFailures(unittest.TestCase):
selections.collapse_failures(hard, hard),
selections.collapse_to_roles(hard),
)
+
+
+class TestFailedSelectionsOnUnpublishedPairs(unittest.TestCase):
+ """A replayed pin the check refuses would abort the whole dispatch."""
+
+ def _replay(self, distro: str, architecture: str) -> tuple[selection.Pin, str]:
+ name = deploy_job_name(
+ "host", "dsk-blender", "0", distro=distro, architecture=architecture
+ )
+ with contextlib.redirect_stderr(io.StringIO()) as stderr:
+ (token,) = selections.failed_selections([_job(name, "failure")])
+ return selection.parse(token), stderr.getvalue()
+
+ def test_an_unpublished_pair_drops_only_its_architecture_and_warns(self) -> None:
+ pin, warned = self._replay("centos", "arm64")
+ self.assertEqual((pin.distro, pin.architecture), ("centos", None))
+ self.assertIn("centos:arm64", warned)
+
+ def test_a_published_pair_is_replayed_as_it_ran(self) -> None:
+ pin, warned = self._replay("debian", "arm64")
+ self.assertEqual((pin.distro, pin.architecture), ("debian", "arm64"))
+ self.assertEqual(warned, "")
diff --git a/tests/unit/python/cli/administration/deploy/development/test_compose.py b/tests/unit/python/cli/administration/deploy/development/test_compose.py
index 1fe674f485..ad3ef7d75d 100644
--- a/tests/unit/python/cli/administration/deploy/development/test_compose.py
+++ b/tests/unit/python/cli/administration/deploy/development/test_compose.py
@@ -3,11 +3,15 @@ from __future__ import annotations
import os
import subprocess
+import tempfile
import unittest
from pathlib import Path
from unittest.mock import MagicMock, patch
-from cli.administration.deploy.development.compose import Compose
+from cli.administration.deploy.development.compose import (
+ Compose,
+ prepare_vulnerability_db,
+)
class TestComposeUpRetries(unittest.TestCase):
@@ -217,6 +221,7 @@ class TestComposeUpRetries(unittest.TestCase):
def test_up_builds_when_build_flag_is_enabled(self) -> None:
compose = self._compose()
compose._render_coredns_corefile = MagicMock()
+ compose._prepare_vulnerability_db = MagicMock()
compose._compose_up_with_retries = MagicMock()
compose.wait_for_healthy = MagicMock()
@@ -245,6 +250,7 @@ class TestComposeUpRetries(unittest.TestCase):
def test_up_skips_build_when_build_flag_is_disabled(self) -> None:
compose = self._compose()
compose._render_coredns_corefile = MagicMock()
+ compose._prepare_vulnerability_db = MagicMock()
compose._compose_up_with_retries = MagicMock()
compose.wait_for_healthy = MagicMock()
@@ -283,6 +289,7 @@ class TestComposeUpRetries(unittest.TestCase):
def test_up_includes_cache_services_when_local(self) -> None:
compose = self._compose()
compose._render_coredns_corefile = MagicMock()
+ compose._prepare_vulnerability_db = MagicMock()
compose._compose_up_with_retries = MagicMock()
compose.wait_for_healthy = MagicMock()
compose._bootstrap_package_cache = MagicMock()
@@ -330,6 +337,7 @@ class TestComposeUpRetries(unittest.TestCase):
def test_up_applies_the_declarations_to_a_cache_stack_it_shares(self) -> None:
compose = self._compose()
compose._render_coredns_corefile = MagicMock()
+ compose._prepare_vulnerability_db = MagicMock()
compose._compose_up_with_retries = MagicMock()
compose.wait_for_healthy = MagicMock()
compose._bootstrap_package_cache = MagicMock()
@@ -369,6 +377,7 @@ class TestComposeUpRetries(unittest.TestCase):
def test_up_skips_the_pacman_layering_without_a_shared_folder(self) -> None:
compose = self._compose()
compose._render_coredns_corefile = MagicMock()
+ compose._prepare_vulnerability_db = MagicMock()
compose._compose_up_with_retries = MagicMock()
compose.wait_for_healthy = MagicMock()
compose._bootstrap_package_cache = MagicMock()
@@ -406,5 +415,34 @@ class TestComposeUpRetries(unittest.TestCase):
)
+class TestPrepareVulnerabilityDb(unittest.TestCase):
+ def test_the_shared_directory_is_created_as_the_calling_user(self) -> None:
+ with tempfile.TemporaryDirectory() as tmp:
+ path = Path(tmp) / "cache" / "vulnerability-db"
+ prepare_vulnerability_db(path)
+ self.assertTrue(path.is_dir())
+
+ def test_a_directory_the_user_may_not_create_is_left_to_docker(self) -> None:
+ path = MagicMock()
+ path.mkdir.side_effect = PermissionError("read-only")
+ prepare_vulnerability_db(path)
+ path.mkdir.assert_called_once_with(parents=True, exist_ok=True)
+
+ def test_up_prepares_the_configured_directory(self) -> None:
+ compose = Compose(repo_root=Path("/tmp/infinito-nexus"), distro="arch")
+ with patch(
+ "cli.administration.deploy.development.compose.prepare_vulnerability_db"
+ ) as prepare:
+ compose._prepare_vulnerability_db(
+ {"INFINITO_VULNERABILITY_DB_HOST_PATH": "/srv/db"}
+ )
+ prepare.assert_called_once_with(Path("/srv/db"))
+
+ def test_a_stale_dotenv_fails_with_the_regeneration_hint(self) -> None:
+ compose = Compose(repo_root=Path("/tmp/infinito-nexus"), distro="arch")
+ with self.assertRaisesRegex(SystemExit, "make dotenv"):
+ compose._prepare_vulnerability_db({})
+
+
if __name__ == "__main__": # pragma: no cover
unittest.main()
diff --git a/tests/unit/python/cli/contributing/mirror/test_sync.py b/tests/unit/python/cli/contributing/mirror/test_sync.py
index f31552de61..f9ccd88da7 100644
--- a/tests/unit/python/cli/contributing/mirror/test_sync.py
+++ b/tests/unit/python/cli/contributing/mirror/test_sync.py
@@ -8,6 +8,57 @@ import cli.contributing.mirror.sync.__main__ as sync_main
from utils.docker.image.discovery import ImageRef
+class TestThrottle(unittest.TestCase):
+ def test_only_docker_hub_copies_wait_for_the_throttle(self) -> None:
+ def image(name: str, registry: str) -> ImageRef:
+ return ImageRef(
+ role="r",
+ service=name,
+ name=name,
+ version="1",
+ source=f"{registry}/{name}:1",
+ registry=registry,
+ )
+
+ images = [
+ image("a", "docker.io"),
+ image("b", "ghcr.io"),
+ image("c", "quay.io"),
+ image("d", "docker.io"),
+ ]
+ with (
+ patch(
+ "cli.contributing.mirror.sync.__main__.iter_role_images",
+ return_value=images,
+ ),
+ patch(
+ "cli.contributing.mirror.sync.__main__.iter_runner_images",
+ return_value=[],
+ ),
+ patch.object(sync_main.GHCRProvider, "image_base", return_value="g/x"),
+ patch.object(sync_main.GHCRProvider, "mirror") as mock_mirror,
+ patch.object(sync_main.time, "monotonic", return_value=0.0),
+ patch.object(sync_main.time, "sleep") as mock_sleep,
+ patch(
+ "sys.argv",
+ [
+ "mirror-sync",
+ "--ghcr-namespace",
+ "acme",
+ "--ghcr-repository",
+ "myrepo",
+ "--images-per-hour",
+ "150",
+ ],
+ ),
+ ):
+ result = sync_main.main()
+
+ self.assertEqual(result, 0)
+ self.assertEqual(mock_mirror.call_count, 4)
+ self.assertEqual([call.args for call in mock_sleep.call_args_list], [(24.0,)])
+
+
class TestMirrorSync(unittest.TestCase):
IMAGE = ImageRef(
role="web-app-nextcloud",
diff --git a/tests/unit/python/cli/contributing/security/test_database.py b/tests/unit/python/cli/contributing/security/test_database.py
new file mode 100644
index 0000000000..4c41b7d4bb
--- /dev/null
+++ b/tests/unit/python/cli/contributing/security/test_database.py
@@ -0,0 +1,32 @@
+from __future__ import annotations
+
+from pathlib import Path
+from unittest import TestCase, main, mock
+
+import cli.contributing.security.database.__main__ as database_main
+
+
+class TestMain(TestCase):
+ def _main(self, errors):
+ with mock.patch.object(
+ database_main, "fetch_databases", return_value=errors
+ ) as fetch:
+ code = database_main.main(["--dir", "/tmp/db", "--engines", "trivy", "osv"])
+ return code, fetch
+
+ def test_the_requested_engines_are_downloaded_into_the_directory(self):
+ _code, fetch = self._main([])
+ _p, root, engines, _runner, _fetch = fetch.call_args.args
+ self.assertEqual((root, engines), (Path("/tmp/db"), ["trivy", "osv"]))
+
+ def test_a_failed_download_fails_the_command(self):
+ code, _fetch = self._main(["trivy database: exited 1: no network"])
+ self.assertEqual(code, 1)
+
+ def test_an_unknown_engine_is_rejected(self):
+ with self.assertRaises(SystemExit):
+ database_main.main(["--dir", "/tmp/db", "--engines", "clair"])
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/cli/contributing/security/test_issues.py b/tests/unit/python/cli/contributing/security/test_issues.py
new file mode 100644
index 0000000000..e1b5661ee7
--- /dev/null
+++ b/tests/unit/python/cli/contributing/security/test_issues.py
@@ -0,0 +1,164 @@
+from __future__ import annotations
+
+import json
+import subprocess
+from unittest import TestCase, main
+
+import cli.contributing.security.issues.__main__ as issues_main
+
+ROW = {
+ "engine": "grype",
+ "role": "web-app-roundcube",
+ "service": "roundcube",
+ "image": "docker.io/roundcube/roundcubemail:1.7.5-apache",
+ "mirror": "ghcr.io/o/r/mirror/docker.io/roundcube/roundcubemail",
+ "digest": "sha256:abc",
+ "id": "CVE-2026-109618",
+ "ids": ["CVE-2026-109618"],
+ "severity": "CRITICAL",
+ "package": "php-cli",
+ "installed": "8.4.26",
+ "fixed": "8.4.27",
+ "suppressed_until": None,
+}
+SUPPRESSED = {**ROW, "id": "CVE-2026-109619", "suppressed_until": "2026-12-03"}
+TITLE = "🛡️ docker.io/roundcube/roundcubemail:1.7.5-apache"
+OTHER_IMAGE = "docker.io/library/nginx:1.31.8-alpine"
+
+
+class FakeGh:
+ def __init__(self, open_issues, hang=()):
+ self.open_issues = open_issues
+ self.hang = [list(verb) for verb in hang]
+ self.calls = []
+
+ def __call__(self, args):
+ if list(args[:2]) in self.hang:
+ raise subprocess.TimeoutExpired(["gh", *args], 120)
+ self.calls.append(list(args))
+ if args[:2] == ["issue", "list"]:
+ return json.dumps(self.open_issues)
+ return ""
+
+ def verbs(self):
+ return [
+ call[:2] for call in self.calls if call[0] == "issue" and call[1] != "list"
+ ]
+
+
+class TestSync(TestCase):
+ def test_a_new_finding_opens_one_issue(self):
+ gh = FakeGh([])
+ issues_main.sync(
+ {"findings": [ROW, {**ROW, "engine": "trivy"}], "errors": []}, "o/r", gh
+ )
+ self.assertEqual(gh.verbs(), [["issue", "create"]])
+
+ def test_a_changed_image_gets_a_comment_and_an_updated_body(self):
+ gh = FakeGh([{"number": 7, "title": TITLE, "body": "old table"}])
+ issues_main.sync({"findings": [ROW], "errors": []}, "o/r", gh)
+ self.assertEqual(gh.verbs(), [["issue", "comment"], ["issue", "edit"]])
+ comment = gh.calls[-2]
+ self.assertIn("Still unresolved:", comment[comment.index("--body") + 1])
+ self.assertIn(ROW["id"], comment[comment.index("--body") + 1])
+
+ def test_an_unchanged_image_leaves_its_issue_alone(self):
+ current = issues_main.body([ROW])
+ gh = FakeGh([{"number": 7, "title": TITLE, "body": current + "\r\n"}])
+ actions = issues_main.sync({"findings": [ROW], "errors": []}, "o/r", gh)
+ self.assertEqual((gh.verbs(), actions), ([], [f"unchanged #7 {TITLE}"]))
+
+ def test_a_second_open_issue_of_one_image_closes_as_duplicate(self):
+ current = issues_main.body([ROW])
+ gh = FakeGh(
+ [
+ {"number": 9, "title": TITLE, "body": current},
+ {"number": 7, "title": TITLE, "body": current},
+ ]
+ )
+ actions = issues_main.sync({"findings": [ROW], "errors": []}, "o/r", gh)
+ self.assertEqual(gh.verbs(), [["issue", "close"]])
+ self.assertEqual(gh.calls[-1][2], "9")
+ self.assertIn(f"unchanged #7 {TITLE}", actions)
+
+ def test_a_fixed_finding_closes_its_issue(self):
+ gh = FakeGh([{"number": 7, "title": TITLE}])
+ actions = issues_main.sync({"findings": [], "errors": []}, "o/r", gh)
+ self.assertEqual(actions, [f"closed #7 {TITLE}"])
+
+ def test_a_suppressed_finding_keeps_its_issue_open(self):
+ gh = FakeGh([{"number": 7, "title": TITLE, "body": "old table"}])
+ actions = issues_main.sync({"findings": [SUPPRESSED], "errors": []}, "o/r", gh)
+ self.assertEqual(gh.verbs(), [["issue", "comment"], ["issue", "edit"]])
+ self.assertNotIn(f"closed #7 {TITLE}", actions)
+
+ def test_a_scan_error_closes_nothing(self):
+ gh = FakeGh([{"number": 7, "title": TITLE}])
+ issues_main.sync(
+ {"findings": [], "errors": ["x: the mirror served no digest"]}, "o/r", gh
+ )
+ self.assertEqual(gh.verbs(), [])
+
+ def test_a_failed_issue_call_is_reported_and_the_others_still_run(self):
+ other = {**ROW, "image": OTHER_IMAGE}
+ gh = FakeGh([{"number": 7, "title": TITLE}], hang=[("issue", "edit")])
+ actions = issues_main.sync({"findings": [ROW, other], "errors": []}, "o/r", gh)
+ failed = [action for action in actions if action.startswith("failed ")]
+ self.assertEqual(len(failed), 1)
+ self.assertTrue(failed[0].startswith(f"failed updated #7 {TITLE}"))
+ self.assertEqual(gh.verbs(), [["issue", "create"], ["issue", "comment"]])
+
+ def test_every_cve_of_one_image_shares_one_issue(self):
+ gh = FakeGh([])
+ actions = issues_main.sync(
+ {
+ "findings": [ROW, {**ROW, "id": "CVE-2026-109619"}],
+ "errors": [],
+ },
+ "o/r",
+ gh,
+ )
+ self.assertEqual(actions, [f"opened {TITLE}"])
+
+ def test_the_issue_is_labelled(self):
+ gh = FakeGh([])
+ issues_main.sync({"findings": [ROW], "errors": []}, "o/r", gh)
+ create = gh.calls[-1]
+ self.assertEqual(create[create.index("--label") + 1], issues_main.LABEL)
+
+
+class TestBody(TestCase):
+ def _table(self, text):
+ return [line for line in text.splitlines() if line.startswith("| CVE-")]
+
+ def test_every_engine_gets_a_row(self):
+ text = issues_main.body([ROW, {**ROW, "engine": "trivy"}])
+ self.assertEqual(len(self._table(text)), 2)
+
+ def test_critical_rows_come_first(self):
+ high = {**ROW, "id": "CVE-2026-000001", "severity": "HIGH"}
+ table = self._table(issues_main.body([high, ROW]))
+ self.assertIn("| CRITICAL |", table[0])
+
+ def test_a_suppressed_cve_is_listed_after_the_failing_ones_with_its_until(self):
+ text = issues_main.body([SUPPRESSED, ROW])
+ table = self._table(text)
+ self.assertEqual(
+ (table[0].endswith("| - |"), table[1].endswith("| 2026-12-03 |")),
+ (True, True),
+ )
+ self.assertIn(
+ "carries 2 CVE(s) at the scan threshold, 1 of them suppressed.", text
+ )
+
+ def test_a_large_image_stays_under_the_body_limit(self):
+ rows = [{**ROW, "id": f"CVE-2026-{index:06d}"} for index in range(2000)]
+ text = issues_main.body(rows)
+ self.assertLessEqual(len(text), issues_main.BODY_LIMIT)
+ hidden = 2000 - len(self._table(text))
+ self.assertGreater(hidden, 0)
+ self.assertIn(f"{hidden} more row(s)", text)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/cli/contributing/security/test_runtimes.py b/tests/unit/python/cli/contributing/security/test_runtimes.py
deleted file mode 100644
index 8df5ed2f83..0000000000
--- a/tests/unit/python/cli/contributing/security/test_runtimes.py
+++ /dev/null
@@ -1,89 +0,0 @@
-from __future__ import annotations
-
-import contextlib
-import io
-import unittest
-
-import cli.contributing.security.runtimes.__main__ as runtimes_main
-from utils.docker.image.discovery import ImageRef
-
-FLOORS = {"8.2": "8.2.35", "8.3": "8.3.36", "8.4": "8.4.27", "8.5": "8.5.12"}
-
-
-def _ref(role, service):
- return ImageRef(
- role=role,
- service=service,
- name=f"acme/{service}",
- version="1.0",
- source=f"docker.io/acme/{service}:1.0",
- )
-
-
-class TestReport(unittest.TestCase):
- def _report(self, refs, probed):
- with contextlib.redirect_stdout(io.StringIO()) as out:
- code = runtimes_main.report(refs, probed, FLOORS)
- return code, out.getvalue()
-
- def test_an_eol_image_fails_the_report(self):
- code, output = self._report(
- [_ref("web-app-akaunting", "akaunting")], [["ENV PHP_VERSION=8.1.34"]]
- )
- self.assertEqual(code, 1)
- self.assertIn("runs the end-of-life line 8.1", output)
-
- def test_patched_images_and_images_without_php_pass(self):
- code, _output = self._report(
- [
- _ref("web-app-wordpress", "wordpress"),
- _ref("svc-db-postgres", "postgres"),
- ],
- [["ENV PHP_VERSION=8.4.27"], ["ENV PG_VERSION=17.2"]],
- )
- self.assertEqual(code, 0)
-
- def test_an_unanswered_image_fails_the_report(self):
- code, output = self._report([_ref("web-app-lam", "lam")], [None])
- self.assertEqual(code, 1)
- self.assertIn(
- "web-app-lam:lam (docker.io/acme/lam:1.0): the registry gave no answer",
- output,
- )
-
- def test_a_distro_line_without_patch_level_is_listed_but_passes(self):
- code, output = self._report(
- [_ref("web-app-lam", "lam")], [["RUN apt-get install -y php8.4-ldap"]]
- )
- self.assertEqual(code, 0)
- self.assertIn("PHP line 8.4: patch level not in the registry metadata", output)
-
- def test_an_unversioned_php_package_is_listed_with_unknown_patch_level(self):
- code, output = self._report(
- [_ref("web-app-lam", "lam")], [["RUN apt-get install -y php-cli"]]
- )
- self.assertEqual(code, 0)
- self.assertIn(
- "PHP package php-cli: patch level not in the registry metadata", output
- )
- self.assertIn("1 ship PHP", output)
-
- def test_an_eol_package_line_fails_next_to_a_patched_php_version(self):
- code, output = self._report(
- [_ref("web-app-lam", "lam")],
- [["ENV PHP_VERSION=8.4.27", "RUN apk add php7 php7-fpm"]],
- )
- self.assertEqual(code, 1)
- self.assertIn("PHP 8.4.27: line 7 is end of life", output)
-
- def test_an_eol_php_base_argument_fails_the_report(self):
- code, output = self._report(
- [_ref("web-app-fusiondirectory", "fusiondirectory")],
- [["ARG PHP_BASE=7.4", "RUN |1 PHP_BASE=7.4 /bin/bash -c install"]],
- )
- self.assertEqual(code, 1)
- self.assertIn("PHP line 7.4: line 7.4 is end of life", output)
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/tests/unit/python/cli/contributing/security/test_scan.py b/tests/unit/python/cli/contributing/security/test_scan.py
new file mode 100644
index 0000000000..7fa1f90edb
--- /dev/null
+++ b/tests/unit/python/cli/contributing/security/test_scan.py
@@ -0,0 +1,246 @@
+from __future__ import annotations
+
+import datetime as dt
+import json
+import tempfile
+from pathlib import Path
+from types import SimpleNamespace
+from unittest import TestCase, main, mock
+
+import cli.contributing.security.scan.__main__ as scan_main
+from utils.docker.image.discovery import ImageRef
+from utils.security.pipeline import pipeline
+
+P = pipeline()
+
+
+def _ref(role, service, name="library/php", version="8.4.26-cli"):
+ return ImageRef(
+ role=role,
+ service=service,
+ name=name,
+ version=version,
+ source=f"docker.io/{name}:{version}",
+ registry="docker.io",
+ )
+
+
+class TestResolveDigests(TestCase):
+ def _resolve(self, refs, digests):
+ with mock.patch.object(
+ scan_main,
+ "mirror_image",
+ side_effect=lambda image: f"ghcr.io/o/r/mirror/{image}",
+ ):
+ return scan_main.resolve_digests(
+ refs, lambda image, tag: digests.get(f"{image}:{tag}"), 2
+ )
+
+ def test_role_services_pinning_one_digest_share_a_target(self):
+ refs = [_ref("web-app-a", "a"), _ref("web-app-b", "b")]
+ grouped, sources, errors = self._resolve(
+ refs, {"ghcr.io/o/r/mirror/docker.io/library/php:8.4.26-cli": "sha256:abc"}
+ )
+ self.assertEqual(
+ (list(grouped), [len(v) for v in grouped.values()], errors),
+ (["sha256:abc"], [2], []),
+ )
+ self.assertEqual(
+ sources["sha256:abc"], "ghcr.io/o/r/mirror/docker.io/library/php"
+ )
+
+ def test_an_image_the_mirror_does_not_serve_is_an_error(self):
+ _grouped, _sources, errors = self._resolve([_ref("web-app-a", "a")], {})
+ self.assertIn("the mirror served no digest", errors[0])
+
+ def test_an_unresolvable_mirror_aborts(self):
+ with (
+ mock.patch.object(scan_main, "mirror_image", return_value=None),
+ self.assertRaises(SystemExit),
+ ):
+ scan_main.resolve_digests(
+ [_ref("web-app-a", "a")], lambda image, tag: None, 1
+ )
+
+
+class TestTargets(TestCase):
+ def test_every_owning_role_service_is_an_owner(self):
+ target = scan_main.targets_of(
+ P, {"sha256:abc": [_ref("web-app-b", "b"), _ref("web-app-a", "a")]}
+ )[0]
+ self.assertEqual(target.owners, (("web-app-a", "a"), ("web-app-b", "b")))
+ self.assertEqual(target.key, "abc")
+
+ def test_each_owner_keeps_its_own_pinned_tag(self):
+ target = scan_main.targets_of(
+ P,
+ {
+ "sha256:abc": [
+ _ref("web-app-moodle", "nginx", "library/nginx", "1.31.8-alpine"),
+ _ref("web-app-hugo", "nginx", "library/nginx", "1.31-alpine"),
+ ]
+ },
+ )[0]
+ self.assertEqual(
+ (
+ target.tag_of(("web-app-hugo", "nginx")),
+ target.tag_of(("web-app-moodle", "nginx")),
+ ),
+ ("1.31-alpine", "1.31.8-alpine"),
+ )
+
+
+class TestSteps(TestCase):
+ def setUp(self):
+ self.layout = P.Layout(
+ runtime=("docker", "run"),
+ databases=Path("/c/db"),
+ sbom=Path("/c/sbom"),
+ work=Path("/c/run"),
+ excludes=(),
+ )
+ self.target = P.Target(
+ "abc",
+ "container",
+ "sha256:abc",
+ "docker.io/library/php:8.4.26-cli",
+ (("r", "s"),),
+ ((("r", "s"), "8.4.26-cli"),),
+ )
+
+ def test_syft_reads_the_mirror_by_digest_without_a_daemon(self):
+ step = scan_main.sbom_step(
+ P, self.layout, self.target, "ghcr.io/o/r/mirror/docker.io/library/php"
+ )
+ self.assertIn(
+ "registry:ghcr.io/o/r/mirror/docker.io/library/php@sha256:abc", step.argv
+ )
+ self.assertNotIn("/var/run/docker.sock:/var/run/docker.sock:ro", step.argv)
+
+ def test_trivy_reads_the_sbom_tree(self):
+ step = scan_main.trivy_step(P, self.layout, self.target)
+ self.assertEqual(step.argv[step.argv.index("sbom") :][-1], "/sbom/abc.cdx.json")
+
+
+MIRROR_SOURCES = {"sha256:abc": "ghcr.io/o/r/mirror/docker.io/library/php"}
+
+
+class TestReport(TestCase):
+ target = P.Target(
+ "abc",
+ "container",
+ "sha256:abc",
+ "docker.io/library/php:8.4.26-cli",
+ (("r", "s"),),
+ ((("r", "s"), "8.4.26-cli"),),
+ )
+
+ def _finding(self, severity):
+ return P.Finding(
+ "grype",
+ "abc",
+ "php-cli",
+ "8.4.26",
+ "8.4.27",
+ ("CVE-2026-109618",),
+ severity,
+ )
+
+ def test_a_suppressed_verdict_is_reported_with_its_until_but_does_not_fail(self):
+ finding = self._finding("CRITICAL")
+ verdicts = [
+ P.Verdict(finding, self.target, ("r", "s"), None, False, "fail"),
+ P.Verdict(
+ finding,
+ self.target,
+ ("r", "t"),
+ P.Suppression(None, "8.4.26-cli", dt.date(2026, 12, 3)),
+ True,
+ "fail",
+ ),
+ ]
+ rows = scan_main.report_rows(verdicts, MIRROR_SOURCES)
+ self.assertEqual(
+ (
+ [(row["service"], row["suppressed_until"]) for row in rows],
+ [row["service"] for row in scan_main.failing(rows)],
+ ),
+ ([("s", None), ("t", "2026-12-03")], ["s"]),
+ )
+
+ def test_only_unsuppressed_verdicts_fail(self):
+ finding = self._finding("CRITICAL")
+ verdicts = [
+ P.Verdict(finding, self.target, ("r", "s"), None, False, "fail"),
+ P.Verdict(
+ finding,
+ self.target,
+ ("r", "t"),
+ P.Suppression("CVE-2026-109618", None, dt.date(2026, 12, 31)),
+ True,
+ "fail",
+ ),
+ ]
+ rows = scan_main.report_rows(verdicts, MIRROR_SOURCES)
+ self.assertEqual(
+ [
+ (row["role"], row["service"], row["id"])
+ for row in scan_main.failing(rows)
+ ],
+ [("r", "s", "CVE-2026-109618")],
+ )
+
+ def test_a_finding_the_role_only_warns_on_still_fails_the_mirror_scan(self):
+ verdict = P.Verdict(
+ self._finding("HIGH"), self.target, ("r", "s"), None, False, "warn"
+ )
+ rows = scan_main.report_rows([verdict], MIRROR_SOURCES)
+ self.assertEqual([row["severity"] for row in rows], ["HIGH"])
+
+ def test_the_role_mapping_is_a_valid_mirror_scan_config(self):
+ config = scan_main.scan_config(P, 1)
+ self.assertLessEqual(set(config.severity.values()), set(P.ACTIONS))
+
+
+class TestScanTree(TestCase):
+ def test_a_cached_sbom_is_not_rebuilt(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ root = Path(tmp)
+ for name in ("db", "sbom", "run"):
+ (root / name).mkdir()
+ layout = P.Layout(
+ runtime=("docker", "run"),
+ databases=root / "db",
+ sbom=root / "sbom",
+ work=root / "run",
+ excludes=(),
+ )
+ target = P.Target(
+ "abc",
+ "container",
+ "sha256:abc",
+ "img",
+ (("r", "s"),),
+ ((("r", "s"), "latest"),),
+ )
+ (root / "sbom" / "abc.syft.json").write_text("{}", encoding="utf-8")
+ (root / "sbom" / "abc.cdx.json").write_text(
+ json.dumps({"components": []}), encoding="utf-8"
+ )
+ calls = []
+
+ def runner(argv):
+ calls.append(list(argv))
+ return SimpleNamespace(returncode=0, stdout="", stderr="")
+
+ config = scan_main.scan_config(P, 1)
+ scan_main.scan_tree(
+ P, [target], {"sha256:abc": "m"}, config, layout, runner
+ )
+ self.assertFalse(
+ any(any(arg.startswith("registry:") for arg in call) for call in calls)
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/cli/contributing/security/test_summary.py b/tests/unit/python/cli/contributing/security/test_summary.py
new file mode 100644
index 0000000000..843549322a
--- /dev/null
+++ b/tests/unit/python/cli/contributing/security/test_summary.py
@@ -0,0 +1,93 @@
+from __future__ import annotations
+
+import json
+import tempfile
+from pathlib import Path
+from unittest import TestCase, main
+
+import cli.contributing.security.summary.__main__ as summary_main
+from utils.cache.files import read_text
+
+
+def _row(image, cve, engine="grype", suppressed_until=None):
+ return {
+ "image": image,
+ "id": cve,
+ "engine": engine,
+ "suppressed_until": suppressed_until,
+ }
+
+
+REPORT = {
+ "findings": [
+ _row("docker.io/a:1", "CVE-2026-1001"),
+ _row("docker.io/a:1", "CVE-2026-1001", engine="trivy"),
+ _row("docker.io/a:1", "CVE-2026-1002"),
+ _row("docker.io/b:2", "CVE-2026-1001"),
+ _row("docker.io/d:4", "CVE-2026-1003", suppressed_until="2026-12-03"),
+ ],
+ "errors": ["docker.io/c:3: the mirror served no digest"],
+}
+
+
+class TestCounts(TestCase):
+ def test_an_image_counts_its_distinct_cves(self):
+ self.assertEqual(
+ summary_main.counts(REPORT)["per_image"]["docker.io/a:1"],
+ {"cves": 2, "findings": 3},
+ )
+
+ def test_a_cve_counts_its_distinct_images(self):
+ self.assertEqual(
+ summary_main.counts(REPORT)["per_cve"]["CVE-2026-1001"],
+ {"images": 2, "findings": 3},
+ )
+
+ def test_totals_include_the_scan_errors(self):
+ counts = summary_main.counts(REPORT)
+ self.assertEqual((counts["findings"], counts["errors"]), (4, 1))
+
+ def test_a_suppressed_finding_is_counted_apart_from_the_failing_ones(self):
+ counts = summary_main.counts(REPORT)
+ self.assertEqual(
+ (counts["suppressed"], "docker.io/d:4" in counts["per_image"]), (1, False)
+ )
+
+
+class TestMarkdown(TestCase):
+ def test_the_most_affected_image_comes_first(self):
+ text = summary_main.markdown(summary_main.counts(REPORT))
+ self.assertLess(text.index("docker.io/a:1"), text.index("docker.io/b:2"))
+
+ def test_the_headline_names_the_totals(self):
+ text = summary_main.markdown(summary_main.counts(REPORT))
+ self.assertIn(
+ "4 failing finding(s) in 2 image(s), 2 CVE(s), 1 suppressed finding(s), "
+ "1 scan error(s).",
+ text,
+ )
+
+
+class TestMain(TestCase):
+ def test_the_counts_artifact_and_the_summary_are_written(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ root = Path(tmp)
+ (root / "report.json").write_text(json.dumps(REPORT), encoding="utf-8")
+ summary_main.main(
+ [
+ "--report",
+ str(root / "report.json"),
+ "--counts",
+ str(root / "counts.json"),
+ "--summary",
+ str(root / "summary.md"),
+ ]
+ )
+ counts = json.loads(read_text(str(root / "counts.json")))
+ text = read_text(str(root / "summary.md"))
+ self.assertEqual(counts["findings"], 4)
+ self.assertIn("Vulnerability scan of the mirror", text)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/group_vars/test_litellm_chat_model.py b/tests/unit/python/group_vars/test_litellm_chat_model.py
index f97a33d99c..a31bcb82fe 100644
--- a/tests/unit/python/group_vars/test_litellm_chat_model.py
+++ b/tests/unit/python/group_vars/test_litellm_chat_model.py
@@ -226,7 +226,10 @@ class TestAiRemoteAliases(unittest.TestCase):
return terms[0] in enabled
raise AssertionError(f"unexpected lookup({kind!r}, {terms!r})")
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders a Python list literal, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
return ast.literal_eval(
env.from_string(self.template).render(
lookup=lookup, AI_MOCK_PROVIDER="mock"
@@ -257,7 +260,10 @@ class TestAiAgentModel(unittest.TestCase):
cls.template = load_yaml(_AI_VARS)["AI_AGENT_MODEL"]
def _render(self, *, mock_aliases, chat_model):
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders a bare alias, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
return env.from_string(self.template).render(
AI_MOCK_ALIASES=list(mock_aliases), LITELLM_CHAT_MODEL=chat_model
)
diff --git a/tests/unit/python/plugins/action/test_package_install.py b/tests/unit/python/plugins/action/test_package_install.py
index 373dab2db6..5766c71ed4 100644
--- a/tests/unit/python/plugins/action/test_package_install.py
+++ b/tests/unit/python/plugins/action/test_package_install.py
@@ -7,6 +7,8 @@ from ansible.plugins.action import ActionBase
from ansible.plugins.loader import become_loader, shell_loader
from plugins.action.package_install import ActionModule
+from utils.cache.files import PROJECT_ROOT
+from utils.cache.yaml import load_yaml_any
from utils.packages.calls import (
GENERIC_PACKAGE,
STATE_ABSENT,
@@ -16,9 +18,13 @@ from utils.packages.calls import (
package_call,
)
from utils.packages.outcome import aggregate
+from utils.packages.plan import HOST_ARCHITECTURE_VAR
from utils.packages.schema import PackageSpec
QUERY = "ansible.builtin.command"
+_BY_KERNEL = load_yaml_any(str(PROJECT_ROOT / "group_vars" / "all" / "00_general.yml"))[
+ HOST_ARCHITECTURE_VAR
+]
def _modules(execute) -> list[str]:
@@ -262,8 +268,9 @@ class TestRunMergesPlainPlans(unittest.TestCase):
"pkg_mgr": "apt",
}
- def _run(self, package_ids, specs, query=None):
+ def _run(self, package_ids, specs, query=None, facts=None, by_kernel=None):
action = _action({"id": package_ids})
+ self.action = action
action._task._role = None
action._task.delegate_to = None
action._connection = mock.Mock(become=None, transport="local")
@@ -286,9 +293,47 @@ class TestRunMergesPlainPlans(unittest.TestCase):
side_effect=lambda declaration, *_: specs[declaration.package_id],
),
):
- result = action.run(task_vars={"ansible_facts": self.FACTS})
+ result = action.run(
+ task_vars={
+ "ansible_facts": facts or self.FACTS,
+ HOST_ARCHITECTURE_VAR: _BY_KERNEL
+ if by_kernel is None
+ else by_kernel,
+ }
+ )
return action._execute_module, result
+ def _centos(self, kernel, by_kernel=None):
+ flathub_only = PackageSpec(
+ ("org.blender.Blender",), source="flatpak", architectures=("amd64",)
+ )
+ facts = {
+ "distribution": "CentOS",
+ "os_family": "RedHat",
+ "pkg_mgr": "dnf",
+ "architecture": kernel,
+ }
+ with self.assertRaises(AnsibleActionFail) as caught:
+ self._run(
+ ["git", "blender"],
+ {"git": PackageSpec(("git",)), "blender": flathub_only},
+ facts=facts,
+ by_kernel=by_kernel,
+ )
+ self.assertEqual(self.action._execute_module.call_args_list, [])
+ return str(caught.exception)
+
+ def test_an_unpublished_architecture_fails_before_any_module_runs(self):
+ self.assertIn(
+ "'blender' cannot be installed on centos arm64", self._centos("aarch64")
+ )
+
+ def test_an_unmapped_kernel_architecture_fails_loud(self):
+ self.assertIn(HOST_ARCHITECTURE_VAR, self._centos("riscv64"))
+
+ def test_the_kernel_map_comes_from_the_inventory(self):
+ self.assertIn(HOST_ARCHITECTURE_VAR, self._centos("x86_64", by_kernel={}))
+
def test_two_repository_ids_cost_one_package_manager_call(self):
execute, _result = self._run(
["git", "curl"],
diff --git a/tests/unit/python/plugins/lookup/test_proxy_pass.py b/tests/unit/python/plugins/lookup/test_proxy_pass.py
index 0d6f30e8d3..c9a19880d1 100644
--- a/tests/unit/python/plugins/lookup/test_proxy_pass.py
+++ b/tests/unit/python/plugins/lookup/test_proxy_pass.py
@@ -58,7 +58,6 @@ class TestProxyPassLookup(unittest.TestCase):
["web-app-baserow"],
variables={"DEPLOYMENT_MODE": "swarm"},
tail="request",
- location="/",
)
self.assertEqual(
out[0],
@@ -71,9 +70,8 @@ class TestProxyPassLookup(unittest.TestCase):
["web-app-baserow", "application", "http"],
variables={"DEPLOYMENT_MODE": "compose"},
tail="request",
- location="/",
)
- self.assertEqual(out[0], "proxy_pass http://127.0.0.1:8017/;")
+ self.assertEqual(out[0], "proxy_pass http://127.0.0.1:8017;")
def test_oauth2_internal_port_override_swarm(self):
out = _run(
@@ -106,7 +104,7 @@ class TestProxyPassLookup(unittest.TestCase):
["web-app-matrix", "matrix", "http"],
variables={"DEPLOYMENT_MODE": "swarm"},
)
- self.assertEqual(out[0], "proxy_pass http://host.docker.internal:8021/;")
+ self.assertEqual(out[0], "proxy_pass http://host.docker.internal:8021;")
def test_swarm_force_bridge_template_string_is_resolved(self):
apps = {
@@ -129,7 +127,7 @@ class TestProxyPassLookup(unittest.TestCase):
["web-app-matrix", "matrix", "http"],
variables={"DEPLOYMENT_MODE": "swarm"},
)
- self.assertEqual(out[0], "proxy_pass http://host.docker.internal:8021/;")
+ self.assertEqual(out[0], "proxy_pass http://host.docker.internal:8021;")
def test_unresolved_force_bridge_template_hard_fails(self):
apps = {
@@ -174,7 +172,7 @@ class TestProxyPassLookup(unittest.TestCase):
"compose_mode_force": "compose",
},
)
- self.assertEqual(out[0], "proxy_pass http://host.docker.internal:8021/;")
+ self.assertEqual(out[0], "proxy_pass http://host.docker.internal:8021;")
def test_force_bridge_compose_real_mode_stays_loopback(self):
apps = {
@@ -199,7 +197,7 @@ class TestProxyPassLookup(unittest.TestCase):
"compose_mode_force": "compose",
},
)
- self.assertEqual(out[0], "proxy_pass http://127.0.0.1:8021/;")
+ self.assertEqual(out[0], "proxy_pass http://127.0.0.1:8021;")
def test_a_forced_scope_leaves_a_foreign_app_at_the_cluster_mode(self):
out = _run(
@@ -226,9 +224,8 @@ class TestProxyPassLookup(unittest.TestCase):
"application_id": "web-app-baserow",
},
tail="request",
- location="/",
)
- self.assertEqual(out[0], "proxy_pass http://127.0.0.1:8017/;")
+ self.assertEqual(out[0], "proxy_pass http://127.0.0.1:8017;")
def test_resolution_error_becomes_ansible_error(self):
lm = LookupModule()
diff --git a/tests/unit/python/plugins/lookup/test_requires_python.py b/tests/unit/python/plugins/lookup/test_requires_python.py
new file mode 100644
index 0000000000..478e8be4b7
--- /dev/null
+++ b/tests/unit/python/plugins/lookup/test_requires_python.py
@@ -0,0 +1,29 @@
+from __future__ import annotations
+
+import tempfile
+import unittest
+from pathlib import Path
+from unittest import mock
+
+from ansible.errors import AnsibleError
+
+from plugins.lookup import requires_python as plugin
+
+
+class TestRequiresPythonLookup(unittest.TestCase):
+ def test_the_lookup_returns_the_pyproject_spec(self) -> None:
+ with tempfile.TemporaryDirectory() as tmp:
+ Path(tmp, "pyproject.toml").write_text(
+ '[project]\nname = "demo"\nrequires-python = ">=3.12,<3.14"\n',
+ encoding="utf-8",
+ )
+ with mock.patch.object(plugin, "PROJECT_ROOT", Path(tmp)):
+ self.assertEqual(plugin.LookupModule().run([]), [">=3.12,<3.14"])
+
+ def test_the_lookup_takes_no_terms(self) -> None:
+ with self.assertRaises(AnsibleError):
+ plugin.LookupModule().run(["range"])
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tests/unit/python/roles/dev-python/files/test_install.py b/tests/unit/python/roles/dev-python/files/test_install.py
index 41c19b413e..d8c18e646b 100644
--- a/tests/unit/python/roles/dev-python/files/test_install.py
+++ b/tests/unit/python/roles/dev-python/files/test_install.py
@@ -7,8 +7,8 @@ import unittest
from pathlib import Path
import jinja2
-from ansible.plugins.filter.core import regex_search
+from plugins.lookup.requires_python import LookupModule as RequiresPythonLookup
from utils.cache.files import PROJECT_ROOT, read_text
from utils.cache.yaml import load_yaml_str
@@ -210,16 +210,12 @@ class TestBoundsFromRequiresPython(unittest.TestCase):
)
expression = task["environment"]["DEV_PYTHON_REQUIRES"]
- def lookup(name: str, term: str) -> str:
- return {
- "path_absolute": lambda: str(PROJECT_ROOT / term),
- "file": lambda: read_text(term),
- }[name]()
+ def lookup(name: str, *terms: str) -> str:
+ return {"requires_python": RequiresPythonLookup}[name]().run(list(terms))[0]
environment = jinja2.Environment(
autoescape=jinja2.select_autoescape(default_for_string=False)
)
- environment.filters["regex_search"] = regex_search
environment.globals["lookup"] = lookup
spec = tomllib.loads(read_text(str(PROJECT_ROOT / "pyproject.toml")))[
"project"
diff --git a/tests/unit/python/roles/dsk-blender/__init__.py b/tests/unit/python/roles/dsk-blender/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/unit/python/roles/dsk-blender/test_architectures.py b/tests/unit/python/roles/dsk-blender/test_architectures.py
new file mode 100644
index 0000000000..e616ebd78b
--- /dev/null
+++ b/tests/unit/python/roles/dsk-blender/test_architectures.py
@@ -0,0 +1,53 @@
+from __future__ import annotations
+
+import unittest
+
+from utils.github.variant.pins import draw_pair, row_architectures, row_pairs
+from utils.github.variant.pools import ARCHITECTURES, DISTROS
+
+ROLE = "dsk-blender"
+UNPUBLISHED = ("centos", "arm64")
+
+
+def _drawn() -> set[tuple[str, str]]:
+ architectures = row_architectures(ROLE, ARCHITECTURES)
+ pairs = row_pairs(ROLE, DISTROS, architectures)
+ return {
+ draw_pair(
+ pairs,
+ DISTROS,
+ architectures,
+ pin_distro=None,
+ pin_architecture=None,
+ index=index,
+ sweep=sweep,
+ )
+ for index in range(len(DISTROS) * len(ARCHITECTURES))
+ for sweep in range(len(ARCHITECTURES))
+ }
+
+
+class TestBlenderArchitectures(unittest.TestCase):
+ def test_the_role_keeps_every_architecture(self) -> None:
+ self.assertEqual(row_architectures(ROLE, ARCHITECTURES), ARCHITECTURES)
+
+ def test_the_matrix_never_plans_centos_on_arm64(self) -> None:
+ self.assertNotIn(
+ UNPUBLISHED,
+ _drawn(),
+ "centos installs org.blender.Blender from Flathub, which publishes "
+ "it for x86_64 only "
+ "(https://flathub.org/api/v2/summary/org.blender.Blender), "
+ "so the flatpak task aborts there with "
+ "'Nothing matches org.blender.Blender in remote flathub'",
+ )
+
+ def test_every_other_distro_still_runs_on_arm64(self) -> None:
+ self.assertEqual(
+ {distro for distro, architecture in _drawn() if architecture == "arm64"},
+ set(DISTROS) - {"centos"},
+ )
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tests/unit/python/roles/svc-ai-litellm/templates/test_router_hook.py b/tests/unit/python/roles/svc-ai-litellm/templates/test_router_hook.py
index cb8c8fa318..1c5577cfbe 100644
--- a/tests/unit/python/roles/svc-ai-litellm/templates/test_router_hook.py
+++ b/tests/unit/python/roles/svc-ai-litellm/templates/test_router_hook.py
@@ -21,7 +21,7 @@ import unittest.mock
from pathlib import Path
from typing import ClassVar
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from utils.cache.files import read_text
from utils.cache.yaml import load_yaml
@@ -112,7 +112,10 @@ def load(
):
"""The rendered hook, imported as the container would import it."""
_stub_litellm()
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - Python source, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.filters["to_json"] = json.dumps
env.filters["bool"] = bool
source = env.from_string(read_text(str(TEMPLATE))).render(
@@ -790,7 +793,10 @@ class TestShippedConfiguration(HookCase, unittest.TestCase):
)
def test_both_strategy_names_are_reachable_from_the_expression(self) -> None:
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - a config value, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.filters["bool"] = bool
template = env.from_string(SHIPPED_ROUTER["strategy"])
self.assertEqual(template.render(lookup=lambda *_args: True), "system_one")
diff --git a/tests/unit/python/roles/svc-ai-litellm/vars/test_keyed_providers.py b/tests/unit/python/roles/svc-ai-litellm/vars/test_keyed_providers.py
index 8fdcc1fadc..1d802a3852 100644
--- a/tests/unit/python/roles/svc-ai-litellm/vars/test_keyed_providers.py
+++ b/tests/unit/python/roles/svc-ai-litellm/vars/test_keyed_providers.py
@@ -12,7 +12,7 @@ import ast
import unittest
from typing import ClassVar
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from utils.cache.yaml import load_yaml
from utils.roles.mapping import ROLE_FILE_VARS_MAIN
@@ -33,7 +33,10 @@ class TestProviderLists(unittest.TestCase):
cls.source = load_yaml(str(_ROLE_VARS))
def _render(self, name, provider_keys, keyed=None):
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders a Python list literal, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.filters["dict2items"] = lambda mapping: [
{"key": key, "value": value} for key, value in mapping.items()
]
diff --git a/tests/unit/python/roles/svc-ai-ltengine/test_gpu_build.py b/tests/unit/python/roles/svc-ai-ltengine/test_gpu_build.py
index 42d47eff06..1d7bdb2926 100644
--- a/tests/unit/python/roles/svc-ai-ltengine/test_gpu_build.py
+++ b/tests/unit/python/roles/svc-ai-ltengine/test_gpu_build.py
@@ -13,7 +13,7 @@ import unittest
from pathlib import Path
from typing import ClassVar
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from utils import PROJECT_ROOT
from utils.cache.files import read_text
@@ -46,7 +46,10 @@ class TestGpuBuild(unittest.TestCase):
key: the variable name in ``vars/main.yml``.
gpu: what the ``gpu`` lookup answers.
"""
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders an ansible var expression, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.filters["bool"] = _ansible_bool
env.globals["lookup"] = lambda name, *terms, **_kw: (
gpu if name == "gpu" else BASE_VERSION
@@ -62,7 +65,10 @@ class TestGpuBuild(unittest.TestCase):
def test_the_gate_asks_the_gpu_lookup_for_this_service(self) -> None:
asked: list = []
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders an ansible var expression, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.globals["lookup"] = lambda name, *terms, **_kw: (
asked.append((name, terms)) or True
)
diff --git a/tests/unit/python/roles/sys-ctl-hlth-runtime/files/test_script.py b/tests/unit/python/roles/sys-ctl-hlth-runtime/files/test_script.py
index e6adc4671c..4c0f7d2e54 100644
--- a/tests/unit/python/roles/sys-ctl-hlth-runtime/files/test_script.py
+++ b/tests/unit/python/roles/sys-ctl-hlth-runtime/files/test_script.py
@@ -1,11 +1,16 @@
from __future__ import annotations
import contextlib
+import datetime as dt
import importlib.util
import io
import json
+import re
import subprocess
import sys
+import tempfile
+import threading
+from pathlib import Path
from types import SimpleNamespace
from unittest import TestCase, main, mock
@@ -30,64 +35,1290 @@ def _load_script():
SCRIPT = _load_script()
-FLOORS = {"8.2": "8.2.35", "8.3": "8.3.36", "8.4": "8.4.27", "8.5": "8.5.12"}
MARKER = SCRIPT.PROBE_MARKER
+TODAY = dt.date(2026, 10, 31)
+JAMMY_PHP = "8.1.2-1ubuntu2.28"
-
-def _container(name, stack=None, service=None):
- return SCRIPT.Container(id=f"id-{name}", name=name, stack=stack, service=service)
-
-
-def _probe(version, expose_php=False, upload_progress=False):
- return SCRIPT.PhpProbe(
- version=version,
- settings={
- "expose_php": expose_php,
- "session.upload_progress.enabled": upload_progress,
+TRIVY_HOST = {
+ "SchemaVersion": 2,
+ "ArtifactName": "/host",
+ "ArtifactType": "filesystem",
+ "Results": [
+ {
+ "Target": "/host (ubuntu 22.04)",
+ "Class": "os-pkgs",
+ "Type": "ubuntu",
+ "Vulnerabilities": [
+ {
+ "VulnerabilityID": "CVE-2022-3602",
+ "PkgName": "libssl3",
+ "InstalledVersion": "3.0.2-0ubuntu1",
+ "FixedVersion": "3.0.2-0ubuntu1.7",
+ "Status": "fixed",
+ "Severity": "HIGH",
+ },
+ {
+ "VulnerabilityID": "CVE-2017-7189",
+ "PkgName": "php8.1-cli",
+ "InstalledVersion": JAMMY_PHP,
+ "Status": "affected",
+ "Severity": "LOW",
+ },
+ ],
},
+ {
+ "Target": "Node.js",
+ "Class": "lang-pkgs",
+ "Type": "node-pkg",
+ "Vulnerabilities": [
+ {
+ "VulnerabilityID": "CVE-2021-44906",
+ "VendorIDs": ["GHSA-xvch-5gv4-984h"],
+ "PkgName": "minimist",
+ "InstalledVersion": "1.2.0",
+ "FixedVersion": "1.2.6, 0.2.4",
+ "Status": "fixed",
+ "Severity": "CRITICAL",
+ }
+ ],
+ },
+ ],
+}
+
+GRYPE_HOST = {
+ "matches": [
+ {
+ "vulnerability": {
+ "id": "CVE-2022-3602",
+ "namespace": "ubuntu:distro:ubuntu:22.04",
+ "severity": "High",
+ "fix": {"versions": ["3.0.2-0ubuntu1.7"], "state": "fixed"},
+ },
+ "relatedVulnerabilities": [{"id": "CVE-2022-3602", "namespace": "nvd:cpe"}],
+ "artifact": {"name": "libssl3", "version": "3.0.2-0ubuntu1", "type": "deb"},
+ },
+ {
+ "vulnerability": {
+ "id": "GHSA-p6mc-m468-83gw",
+ "namespace": "github:language:javascript",
+ "severity": "High",
+ "fix": {"versions": ["4.17.19"], "state": "fixed"},
+ },
+ "relatedVulnerabilities": [{"id": "CVE-2020-8203", "namespace": "nvd:cpe"}],
+ "artifact": {"name": "lodash", "version": "4.17.15", "type": "npm"},
+ },
+ {
+ "vulnerability": {
+ "id": "CVE-2017-7189",
+ "namespace": "ubuntu:distro:ubuntu:22.04",
+ "severity": "Low",
+ "fix": {"versions": [], "state": "not-fixed"},
+ },
+ "relatedVulnerabilities": [{"id": "CVE-2017-7189", "namespace": "nvd:cpe"}],
+ "artifact": {"name": "php8.1-cli", "version": JAMMY_PHP, "type": "deb"},
+ },
+ ],
+ "distro": {"name": "ubuntu", "version": "22.04", "idLike": ["debian"]},
+}
+
+OSV_SOURCE = "/work/host.osv.cdx.json"
+OSV_HOST = {
+ "results": [
+ {
+ "source": {"path": OSV_SOURCE, "type": "sbom"},
+ "packages": [
+ {
+ "package": {
+ "name": "lodash",
+ "version": "4.17.15",
+ "ecosystem": "npm",
+ },
+ "vulnerabilities": [
+ {
+ "id": "GHSA-p6mc-m468-83gw",
+ "aliases": ["CVE-2020-8203"],
+ "affected": [
+ {
+ "package": {"name": "lodash", "ecosystem": "npm"},
+ "ranges": [
+ {
+ "type": "SEMVER",
+ "events": [
+ {"introduced": "3.7.0"},
+ {"fixed": "4.17.19"},
+ ],
+ }
+ ],
+ },
+ {
+ "package": {
+ "name": "lodash-es",
+ "ecosystem": "npm",
+ },
+ "ranges": [
+ {
+ "type": "SEMVER",
+ "events": [
+ {"introduced": "0"},
+ {"fixed": "4.17.20"},
+ ],
+ }
+ ],
+ },
+ ],
+ }
+ ],
+ "groups": [
+ {
+ "ids": ["GHSA-p6mc-m468-83gw"],
+ "aliases": ["CVE-2020-8203", "GHSA-p6mc-m468-83gw"],
+ "max_severity": "7.4",
+ }
+ ],
+ },
+ {
+ "package": {
+ "name": "openssl",
+ "version": "3.0.2-0ubuntu1",
+ "ecosystem": "Ubuntu:22.04:LTS",
+ },
+ "vulnerabilities": [
+ {
+ "id": "UBUNTU-CVE-2022-1292",
+ "upstream": ["CVE-2022-1292"],
+ "affected": [
+ {
+ "package": {
+ "name": "openssl",
+ "ecosystem": "Ubuntu:22.04:LTS",
+ },
+ "ranges": [
+ {
+ "type": "ECOSYSTEM",
+ "events": [
+ {"introduced": "0"},
+ {"fixed": "3.0.2-0ubuntu1.1"},
+ ],
+ }
+ ],
+ }
+ ],
+ }
+ ],
+ "groups": [
+ {
+ "ids": ["USN-5402-1", "UBUNTU-CVE-2022-1292"],
+ "aliases": [
+ "CVE-2022-1292",
+ "UBUNTU-CVE-2022-1292",
+ "USN-5402-1",
+ ],
+ "max_severity": "9.8",
+ }
+ ],
+ },
+ {
+ "package": {
+ "name": "php8.1",
+ "version": JAMMY_PHP,
+ "ecosystem": "Ubuntu:22.04:LTS",
+ },
+ "vulnerabilities": [
+ {
+ "id": "UBUNTU-CVE-2017-7189",
+ "upstream": ["CVE-2017-7189"],
+ "affected": [
+ {
+ "package": {
+ "name": "php8.1",
+ "ecosystem": "Ubuntu:22.04:LTS",
+ },
+ "ranges": [
+ {
+ "type": "ECOSYSTEM",
+ "events": [{"introduced": "0"}],
+ }
+ ],
+ }
+ ],
+ }
+ ],
+ "groups": [
+ {
+ "ids": ["UBUNTU-CVE-2017-7189"],
+ "aliases": ["CVE-2017-7189", "UBUNTU-CVE-2017-7189"],
+ "max_severity": "7.5",
+ }
+ ],
+ },
+ ],
+ }
+ ]
+}
+
+SYFT_PHP_IMAGE = {
+ "artifacts": [
+ {
+ "id": "a1",
+ "name": "curl",
+ "version": "8.22.0-r0",
+ "type": "apk",
+ "purl": "pkg:apk/alpine/curl@8.22.0-r0",
+ },
+ {
+ "id": "a2",
+ "name": "php-cli",
+ "version": "8.4.26",
+ "type": "binary",
+ "foundBy": "php-interpreter-cataloger",
+ "purl": "pkg:generic/php-cli@8.4.26",
+ "cpes": [
+ {
+ "cpe": "cpe:2.3:a:php:php:8.4.26:*:*:*:*:*:*:*",
+ "source": "nvd-cpe-dictionary",
+ }
+ ],
+ "locations": [{"path": "/usr/local/bin/php"}],
+ },
+ ],
+ "artifactRelationships": [{"parent": "a1", "child": "f1", "type": "contains"}],
+ "files": [{"id": "f1", "location": {"path": "/usr/bin/curl"}}],
+ "source": {"type": "image", "metadata": {"userInput": "php:8.4.26-cli-alpine"}},
+ "distro": {"id": "alpine", "versionID": "3.24.2"},
+ "descriptor": {"name": "syft", "version": "1.55.0"},
+ "schema": {"version": "16.1.11"},
+}
+
+GRYPE_PHP_RUNTIME = {
+ "matches": [
+ {
+ "vulnerability": {
+ "id": "CVE-2026-109618",
+ "namespace": "nvd:cpe",
+ "severity": "Critical",
+ "fix": {
+ "versions": ["8.2.35", "8.3.36", "8.4.27", "8.5.12"],
+ "state": "fixed",
+ },
+ },
+ "relatedVulnerabilities": [],
+ "artifact": {"name": "php-cli", "version": "8.4.26", "type": "binary"},
+ },
+ {
+ "vulnerability": {
+ "id": "CVE-2026-109619",
+ "namespace": "nvd:cpe",
+ "severity": "High",
+ "fix": {
+ "versions": ["8.2.35", "8.3.36", "8.4.27", "8.5.12"],
+ "state": "fixed",
+ },
+ },
+ "relatedVulnerabilities": [],
+ "artifact": {"name": "php-cli", "version": "8.4.26", "type": "binary"},
+ },
+ ]
+}
+
+CYCLONEDX = {
+ "bomFormat": "CycloneDX",
+ "components": [
+ {
+ "type": "library",
+ "name": "lodash",
+ "version": "4.17.15",
+ "purl": "pkg:npm/lodash@4.17.15",
+ },
+ {
+ "type": "library",
+ "name": "libssl3",
+ "version": "3.0.2-0ubuntu1",
+ "purl": "pkg:deb/ubuntu/libssl3@3.0.2-0ubuntu1?arch=amd64&distro=ubuntu-22.04&upstream=openssl",
+ },
+ {
+ "type": "library",
+ "name": "libc6",
+ "version": "2.36-9+deb12u4",
+ "purl": "pkg:deb/debian/libc6@2.36-9+deb12u4?arch=amd64&upstream=glibc%402.36-9%2Bdeb12u4&distro=debian-12",
+ },
+ {
+ "type": "library",
+ "name": "zlib",
+ "version": "1.3.2-r0",
+ "purl": "pkg:apk/alpine/zlib@1.3.2-r0?arch=x86_64&distro=alpine-3.24.2",
+ },
+ {"type": "operating-system", "name": "ubuntu", "version": "22.04"},
+ ],
+}
+
+
+SEVERITY = {"CRITICAL": "fail", "HIGH": "warn"}
+STRICT = {"CRITICAL": "fail", "HIGH": "fail"}
+
+
+def _config(**overrides):
+ raw = {
+ "targets": ["host", "container"],
+ "engines": ["trivy", "grype", "osv", "syft"],
+ "severity": SEVERITY,
+ "fixed_only": True,
+ "workers": 2,
+ "db_update": True,
+ }
+ raw.update(overrides)
+ return SCRIPT.scan_config(raw)
+
+
+def _finding(**fields):
+ defaults = {
+ "engine": "trivy",
+ "target": "host",
+ "package": "openssl",
+ "installed": "1.0",
+ "fixed": "1.1",
+ "ids": ("CVE-2026-0001",),
+ "severity": "HIGH",
+ }
+ defaults.update(fields)
+ return SCRIPT.Finding(**defaults)
+
+
+def _suppressions(containers=None, host=None):
+ return SCRIPT.Suppressions(containers=containers or {}, host=host or {})
+
+
+def _rule(cve="CVE-2026-0001", until=TODAY):
+ return SCRIPT.Suppression(id=cve, image_tag=None, until=until)
+
+
+def _tag_rule(tag, until=TODAY):
+ return SCRIPT.Suppression(id=None, image_tag=tag, until=until)
+
+
+def _container(name, stack=None, service=None, image="sha256:img"):
+ return SCRIPT.Container(
+ id=f"id-{name}",
+ name=name,
+ stack=stack,
+ service=service,
+ image=image,
+ image_name=f"{name}:1",
)
-def _check(containers, probes, hardened=None):
- return SCRIPT.check(
- containers, FLOORS, hardened or {}, lambda container_id: probes[container_id]
+def _legacy_floor_violation(version, floors):
+ current = tuple(
+ int(part) for part in re.match(r"^(\d+)\.(\d+)\.(\d+)", version).groups()
+ )
+ line = f"{current[0]}.{current[1]}"
+ if line in floors:
+ floor = tuple(int(part) for part in floors[line].split("."))
+ return f"below {floors[line]}" if current < floor else None
+ newest = max(tuple(int(part) for part in key.split(".")) for key in floors)
+ return (
+ None if current[:2] > newest else f"{version} runs the end-of-life line {line}"
)
-class TestFloorViolation(TestCase):
- def test_a_version_at_its_floor_passes(self):
- self.assertIsNone(SCRIPT.floor_violation("8.3.36", FLOORS))
-
- def test_a_version_below_its_floor_fails(self):
- self.assertIn(
- "below the security floor 8.4.27", SCRIPT.floor_violation("8.4.26", FLOORS)
+class TestNegativeControl(TestCase):
+ def test_the_removed_floor_flagged_the_patched_jammy_build(self):
+ floors = {"8.2": "8.2.35", "8.3": "8.3.36", "8.4": "8.4.27", "8.5": "8.5.12"}
+ self.assertEqual(
+ _legacy_floor_violation(JAMMY_PHP, floors),
+ f"{JAMMY_PHP} runs the end-of-life line 8.1",
)
- def test_php_8_1_is_end_of_life(self):
- self.assertIn("end-of-life line 8.1", SCRIPT.floor_violation("8.1.34", FLOORS))
+ def test_every_engine_passes_the_patched_jammy_build(self):
+ findings = (
+ [
+ f
+ for f in SCRIPT.parse_trivy(TRIVY_HOST, "host")
+ if f.package.startswith("php")
+ ]
+ + [
+ f
+ for f in SCRIPT.parse_grype(GRYPE_HOST, "host")
+ if f.package.startswith("php")
+ ]
+ + [
+ f
+ for f in SCRIPT.parse_osv(OSV_HOST, lambda _path: "host")
+ if f.package.startswith("php")
+ ]
+ )
+ self.assertEqual(len(findings), 3)
+ failures, warnings, _infos = SCRIPT.evaluate(
+ findings,
+ {"host": SCRIPT.host_target("node")},
+ _config(),
+ _suppressions(),
+ TODAY,
+ )
+ self.assertEqual((failures, warnings), ([], []))
- def test_php_7_4_is_end_of_life(self):
- self.assertIn("end-of-life line 7.4", SCRIPT.floor_violation("7.4.33", FLOORS))
+ def test_a_fixable_critical_fails(self):
+ findings = [
+ f for f in SCRIPT.parse_trivy(TRIVY_HOST, "host") if f.package == "minimist"
+ ]
+ failures, _warnings, _infos = SCRIPT.evaluate(
+ findings,
+ {"host": SCRIPT.host_target("node")},
+ _config(),
+ _suppressions(),
+ TODAY,
+ )
+ self.assertEqual(
+ failures,
+ [
+ "trivy host node: CVE-2021-44906 CRITICAL minimist 1.2.0 (fixed in 1.2.6, 0.2.4)"
+ ],
+ )
- def test_a_line_newer_than_every_floor_passes(self):
- self.assertIsNone(SCRIPT.floor_violation("8.6.0", FLOORS))
- def test_a_distro_revision_suffix_is_ignored(self):
- self.assertIsNone(SCRIPT.floor_violation("8.4.27-1+deb13u1", FLOORS))
+class TestSourceBuiltRuntime(TestCase):
+ def test_runtime_sbom_keeps_only_binary_packages(self):
+ reduced = SCRIPT.runtime_sbom(SYFT_PHP_IMAGE)
+ self.assertEqual([a["name"] for a in reduced["artifacts"]], ["php-cli"])
- def test_an_unparsable_version_fails(self):
- self.assertIn("unparsable", SCRIPT.floor_violation("eight", FLOORS))
+ def test_runtime_sbom_drops_files_and_relationships(self):
+ reduced = SCRIPT.runtime_sbom(SYFT_PHP_IMAGE)
+ self.assertEqual(
+ (reduced["artifactRelationships"], "files" in reduced), ([], False)
+ )
+
+ def test_runtime_sbom_keeps_the_distro(self):
+ self.assertEqual(
+ SCRIPT.runtime_sbom(SYFT_PHP_IMAGE)["distro"], SYFT_PHP_IMAGE["distro"]
+ )
+
+ def test_an_sbom_without_binaries_needs_no_runtime_pass(self):
+ sbom = {**SYFT_PHP_IMAGE, "artifacts": SYFT_PHP_IMAGE["artifacts"][:1]}
+ self.assertIsNone(SCRIPT.runtime_sbom(sbom))
+
+ def _php_runtime(self):
+ target = SCRIPT.Target(
+ "img",
+ "container",
+ "sha256:img",
+ "roundcube:1.7.5-apache",
+ (("roundcube", "roundcube"),),
+ ((("roundcube", "roundcube"), "1.7.5-apache"),),
+ )
+ return SCRIPT.evaluate(
+ SCRIPT.parse_grype(GRYPE_PHP_RUNTIME, "img"),
+ {"img": target},
+ _config(),
+ _suppressions(),
+ TODAY,
+ )
+
+ def test_source_built_php_8_4_26_fails_on_its_critical(self):
+ failures, _warnings, _infos = self._php_runtime()
+ self.assertEqual(len(failures), 1)
+ self.assertIn("CVE-2026-109618 CRITICAL php-cli 8.4.26", failures[0])
+ self.assertIn("8.4.27", failures[0])
+
+ def test_source_built_php_8_4_26_warns_on_its_high(self):
+ _failures, warnings, _infos = self._php_runtime()
+ self.assertEqual(len(warnings), 1)
+ self.assertIn("CVE-2026-109619 HIGH php-cli 8.4.26", warnings[0])
+
+ def test_trivy_and_osv_without_grype_still_run_the_runtime_pass(self):
+ for engine in ("trivy", "osv"):
+ with self.subTest(engine=engine):
+ self.assertTrue(_config(engines=["syft", engine]).runtime_pass())
+
+ def test_a_pinned_engine_reads_the_grype_database_too(self):
+ self.assertEqual(
+ _config(engines=["syft", "trivy"]).databases(), ("trivy", "grype")
+ )
+
+ def test_grype_in_the_list_needs_no_extra_pass(self):
+ self.assertFalse(_config(engines=["syft", "grype"]).runtime_pass())
+
+
+class TestScanConfig(TestCase):
+ def test_the_role_default_is_valid(self):
+ config = _config()
+ self.assertEqual(config.scanners(), ("trivy", "grype", "osv"))
+
+ def test_an_unknown_engine_is_rejected(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "unknown engines: clair"):
+ _config(engines=["clair"])
+
+ def test_syft_alone_names_no_scanner(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "no scanner"):
+ _config(engines=["syft"])
+
+ def test_osv_without_syft_cannot_scan_the_host(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "osv reads no OS packages"):
+ _config(engines=["osv", "grype"])
+
+ def test_osv_without_syft_may_scan_containers(self):
+ self.assertFalse(
+ _config(engines=["osv", "grype"], targets=["container"]).reads_sbom("osv")
+ )
+
+ def test_trivy_without_syft_or_grype_misses_source_built_runtimes(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "source-built runtimes"):
+ _config(engines=["trivy"])
+
+ def test_a_missing_key_is_rejected(self):
+ raw = {
+ "targets": ["host"],
+ "engines": ["grype"],
+ "severity": {"HIGH": "fail"},
+ "fixed_only": True,
+ "workers": 1,
+ }
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "db_update"):
+ SCRIPT.scan_config(raw)
+
+ def test_the_severity_mapping_is_kept_in_severity_order(self):
+ config = _config(severity={"HIGH": "warn", "CRITICAL": "fail"})
+ self.assertEqual(
+ list(config.severity.items()), [("CRITICAL", "fail"), ("HIGH", "warn")]
+ )
+
+ def test_the_retired_list_form_is_rejected(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "list form"):
+ _config(severity=["CRITICAL", "HIGH"])
+
+ def test_an_unknown_action_is_rejected(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "HIGH: ignore"):
+ _config(severity={"CRITICAL": "fail", "HIGH": "ignore"})
+
+ def test_an_unknown_severity_is_rejected(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "unknown severity: SEVERE"):
+ _config(severity={"SEVERE": "fail"})
+
+ def test_an_empty_mapping_is_rejected(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "non-empty mapping"):
+ _config(severity={})
+
+ def test_a_string_bool_is_rejected(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "fixed_only"):
+ _config(fixed_only="True")
+
+ def test_zero_workers_are_rejected(self):
+ with self.assertRaisesRegex(SCRIPT.ConfigError, "workers"):
+ _config(workers=0)
+
+
+class TestParsers(TestCase):
+ def test_trivy_reads_package_versions_and_severity(self):
+ finding = SCRIPT.parse_trivy(TRIVY_HOST, "host")[0]
+ self.assertEqual(
+ (
+ finding.package,
+ finding.installed,
+ finding.fixed,
+ finding.severity,
+ finding.id,
+ ),
+ ("libssl3", "3.0.2-0ubuntu1", "3.0.2-0ubuntu1.7", "HIGH", "CVE-2022-3602"),
+ )
+
+ def test_trivy_without_a_fixed_version_has_no_fix(self):
+ self.assertEqual(SCRIPT.parse_trivy(TRIVY_HOST, "host")[1].fixed, "")
+
+ def test_trivy_vendor_ids_become_aliases(self):
+ finding = SCRIPT.parse_trivy(TRIVY_HOST, "host")[2]
+ self.assertEqual(finding.ids, ("CVE-2021-44906", "GHSA-xvch-5gv4-984h"))
+
+ def test_trivy_without_results_reports_nothing(self):
+ self.assertEqual(SCRIPT.parse_trivy({"SchemaVersion": 2}, "host"), [])
+
+ def test_grype_prefers_the_related_cve_id(self):
+ finding = SCRIPT.parse_grype(GRYPE_HOST, "host")[1]
+ self.assertEqual(
+ (finding.id, finding.ids),
+ ("CVE-2020-8203", ("CVE-2020-8203", "GHSA-p6mc-m468-83gw")),
+ )
+
+ def test_grype_severity_is_upper_case(self):
+ self.assertEqual(SCRIPT.parse_grype(GRYPE_HOST, "host")[0].severity, "HIGH")
+
+ def test_grype_not_fixed_has_no_fix(self):
+ self.assertEqual(SCRIPT.parse_grype(GRYPE_HOST, "host")[2].fixed, "")
+
+ def test_osv_maps_the_group_cvss_to_a_severity(self):
+ severities = [
+ f.severity for f in SCRIPT.parse_osv(OSV_HOST, lambda _path: "host")
+ ]
+ self.assertEqual(severities, ["HIGH", "CRITICAL", "HIGH"])
+
+ def test_osv_takes_fixed_from_the_ranges_of_the_same_package(self):
+ lodash = SCRIPT.parse_osv(OSV_HOST, lambda _path: "host")[0]
+ self.assertEqual(lodash.fixed, "4.17.19")
+
+ def test_osv_without_a_fixed_event_has_no_fix(self):
+ php = SCRIPT.parse_osv(OSV_HOST, lambda _path: "host")[2]
+ self.assertEqual(php.fixed, "")
+
+ def test_osv_collects_upstream_and_group_aliases(self):
+ openssl = SCRIPT.parse_osv(OSV_HOST, lambda _path: "host")[1]
+ self.assertEqual(openssl.ids[0], "CVE-2022-1292")
+ self.assertIn("USN-5402-1", openssl.ids)
+
+ def test_osv_maps_each_source_to_its_target(self):
+ seen = []
+ SCRIPT.parse_osv(OSV_HOST, lambda path: seen.append(path) or "host")
+ self.assertEqual(seen, [OSV_SOURCE])
+
+
+class TestCvssSeverity(TestCase):
+ def test_boundaries(self):
+ cases = {
+ "9.0": "CRITICAL",
+ "8.9": "HIGH",
+ "7.0": "HIGH",
+ "6.9": "MEDIUM",
+ "4.0": "MEDIUM",
+ "0.1": "LOW",
+ "0.0": "NONE",
+ "": "UNKNOWN",
+ }
+ for score, severity in cases.items():
+ with self.subTest(score=score):
+ self.assertEqual(SCRIPT.cvss_severity(score), severity)
+
+
+class TestOsvSbom(TestCase):
+ def _purls(self):
+ return [c.get("purl") for c in SCRIPT.osv_sbom(CYCLONEDX)["components"]]
+
+ def test_a_deb_purl_names_the_source_package(self):
+ self.assertTrue(
+ self._purls()[1].startswith("pkg:deb/ubuntu/openssl@3.0.2-0ubuntu1?")
+ )
+
+ def test_a_source_version_replaces_the_binary_version(self):
+ self.assertTrue(
+ self._purls()[2].startswith("pkg:deb/debian/glibc@2.36-9+deb12u4?")
+ )
+
+ def test_a_purl_without_upstream_is_kept(self):
+ self.assertEqual(self._purls()[3], CYCLONEDX["components"][3]["purl"])
+
+ def test_a_language_purl_is_kept(self):
+ self.assertEqual(self._purls()[0], "pkg:npm/lodash@4.17.15")
+
+ def test_the_input_is_not_changed(self):
+ SCRIPT.osv_sbom(CYCLONEDX)
+ self.assertIn("libssl3@", CYCLONEDX["components"][1]["purl"])
+
+
+class TestThreshold(TestCase):
+ def test_a_fixable_critical_maps_to_fail(self):
+ self.assertEqual(
+ SCRIPT.threshold(_finding(severity="CRITICAL"), _config()), "fail"
+ )
+
+ def test_a_fixable_high_maps_to_warn(self):
+ self.assertEqual(SCRIPT.threshold(_finding(), _config()), "warn")
+
+ def test_an_unfixed_critical_is_below_the_threshold_while_fixed_only(self):
+ self.assertIsNone(
+ SCRIPT.threshold(_finding(severity="CRITICAL", fixed=""), _config())
+ )
+
+ def test_an_unfixed_critical_fails_without_fixed_only(self):
+ self.assertEqual(
+ SCRIPT.threshold(
+ _finding(severity="CRITICAL", fixed=""), _config(fixed_only=False)
+ ),
+ "fail",
+ )
+
+ def test_an_unmapped_severity_is_below_the_threshold(self):
+ self.assertIsNone(SCRIPT.threshold(_finding(severity="MEDIUM"), _config()))
+
+
+class TestVerdict(TestCase):
+ def _verdict(self, suppressed, action):
+ return SCRIPT.Verdict(
+ _finding(),
+ SCRIPT.host_target("node"),
+ (None, None),
+ _rule() if suppressed else None,
+ suppressed,
+ action,
+ )
+
+ def test_an_unsuppressed_verdict_is_its_action(self):
+ self.assertEqual(
+ [self._verdict(False, action).verdict for action in SCRIPT.ACTIONS],
+ ["fail", "warn"],
+ )
+
+ def test_a_suppressed_verdict_is_suppressed_whatever_its_action(self):
+ self.assertEqual(
+ {self._verdict(True, action).verdict for action in SCRIPT.ACTIONS},
+ {"suppressed"},
+ )
+
+
+class TestSuppressions(TestCase):
+ def _container_target(self, owners, tag="2.4.0p39"):
+ return SCRIPT.Target(
+ "img",
+ "container",
+ "sha256:img",
+ "checkmk/check-mk-raw:2.4.0p39",
+ owners,
+ tuple((owner, tag) for owner in owners),
+ )
+
+ def _evaluate(self, target, suppressions, finding=None):
+ return SCRIPT.evaluate(
+ [finding or _finding(target=target.key)],
+ {target.key: target},
+ _config(severity=STRICT),
+ suppressions,
+ TODAY,
+ )
+
+ def test_a_suppression_of_the_owning_role_silences_its_container(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ failures, _warnings, infos = self._evaluate(
+ target, _suppressions({"checkmk": {"checkmk": (_rule(),)}})
+ )
+ self.assertEqual((failures, len(infos)), ([], 1))
+
+ def test_a_suppression_of_another_role_does_not_apply(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ failures, _warnings, _infos = self._evaluate(
+ target, _suppressions({"nextcloud": {"checkmk": (_rule(),)}})
+ )
+ self.assertEqual(len(failures), 1)
+
+ def test_a_suppression_of_another_service_of_the_role_does_not_apply(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ failures, _warnings, _infos = self._evaluate(
+ target, _suppressions({"checkmk": {"checkmkmcp": (_rule(),)}})
+ )
+ self.assertEqual(len(failures), 1)
+
+ def test_a_shared_image_fails_for_the_owner_without_suppression(self):
+ target = self._container_target((("checkmk", "checkmk"), ("other", "app")))
+ failures, _warnings, _infos = self._evaluate(
+ target, _suppressions({"checkmk": {"checkmk": (_rule(),)}})
+ )
+ self.assertEqual(
+ failures,
+ [
+ "trivy container other/app checkmk/check-mk-raw:2.4.0p39: CVE-2026-0001 HIGH openssl 1.0 (fixed in 1.1)"
+ ],
+ )
+
+ def test_an_expired_suppression_fails_and_says_so(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ failures, _warnings, infos = self._evaluate(
+ target,
+ _suppressions(
+ {"checkmk": {"checkmk": (_rule(until=TODAY - dt.timedelta(days=1)),)}}
+ ),
+ )
+ self.assertEqual(len(failures), 1)
+ self.assertIn("expired on 2026-10-30", infos[0])
+
+ def test_a_suppression_matches_an_alias(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ finding = _finding(target="img", ids=("CVE-2026-0002", "GHSA-aaaa-bbbb-cccc"))
+ failures, _warnings, _infos = self._evaluate(
+ target,
+ _suppressions({"checkmk": {"checkmk": (_rule("CVE-2026-0002"),)}}),
+ finding,
+ )
+ self.assertEqual(failures, [])
+
+ def test_a_host_suppression_covers_only_its_engine(self):
+ target = SCRIPT.host_target("node")
+ suppressions = _suppressions(host={"grype": (_rule(),)})
+ failures, _warnings, _infos = SCRIPT.evaluate(
+ [_finding(engine="trivy"), _finding(engine="grype")],
+ {"host": target},
+ _config(severity=STRICT),
+ suppressions,
+ TODAY,
+ )
+ self.assertEqual(
+ failures, ["trivy host node: CVE-2026-0001 HIGH openssl 1.0 (fixed in 1.1)"]
+ )
+
+ def test_an_unmanaged_container_cannot_be_suppressed(self):
+ target = self._container_target(((None, None),))
+ failures, _warnings, _infos = self._evaluate(target, _suppressions())
+ self.assertIn("unmanaged container", failures[0])
+
+ def test_an_image_tag_suppression_silences_every_finding_of_that_tag(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ failures, _warnings, infos = SCRIPT.evaluate(
+ [
+ _finding(target="img", ids=("CVE-2026-0001",)),
+ _finding(target="img", ids=("CVE-2026-0002",), severity="CRITICAL"),
+ ],
+ {target.key: target},
+ _config(severity=STRICT),
+ _suppressions({"checkmk": {"checkmk": (_tag_rule("2.4.0p39"),)}}),
+ TODAY,
+ )
+ self.assertEqual((failures, len(infos)), ([], 2))
+
+ def test_an_image_tag_suppression_of_another_tag_does_not_apply(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ failures, _warnings, infos = self._evaluate(
+ target, _suppressions({"checkmk": {"checkmk": (_tag_rule("2.4.0p38"),)}})
+ )
+ self.assertEqual((len(failures), infos), (1, []))
+
+ def test_an_expired_image_tag_suppression_fails_and_names_the_tag(self):
+ target = self._container_target((("checkmk", "checkmk"),))
+ failures, _warnings, infos = self._evaluate(
+ target,
+ _suppressions(
+ {
+ "checkmk": {
+ "checkmk": (
+ _tag_rule("2.4.0p39", TODAY - dt.timedelta(days=1)),
+ )
+ }
+ }
+ ),
+ )
+ self.assertEqual(len(failures), 1)
+ self.assertIn("image tag 2.4.0p39 expired on 2026-10-30", infos[0])
+
+ def test_each_owner_of_a_shared_image_is_judged_by_its_own_tag(self):
+ hugo, moodle = ("hugo", "nginx"), ("moodle", "nginx")
+ target = SCRIPT.Target(
+ "img",
+ "container",
+ "sha256:img",
+ "nginx:1.31.8-alpine",
+ (hugo, moodle),
+ ((hugo, "1.31-alpine"), (moodle, "1.31.8-alpine")),
+ )
+ rule = (_tag_rule("1.31-alpine"),)
+ failures, _warnings, _infos = self._evaluate(
+ target, _suppressions({"hugo": {"nginx": rule}, "moodle": {"nginx": rule}})
+ )
+ self.assertEqual(
+ failures,
+ [
+ "trivy container moodle/nginx nginx:1.31.8-alpine: CVE-2026-0001 HIGH openssl 1.0 (fixed in 1.1)"
+ ],
+ )
+
+ def test_an_image_tag_never_suppresses_the_host(self):
+ target = SCRIPT.host_target("latest")
+ failures, _warnings, _infos = SCRIPT.evaluate(
+ [_finding()],
+ {"host": target},
+ _config(severity=STRICT),
+ _suppressions(host={"trivy": (_tag_rule("latest"),)}),
+ TODAY,
+ )
+ self.assertEqual(len(failures), 1)
+
+ def test_suppressions_from_json(self):
+ parsed = SCRIPT.suppressions_from_json(
+ {
+ "containers": {
+ "checkmk": {
+ "checkmk": [
+ {
+ "id": "CVE-2026-1",
+ "image_tag": None,
+ "until": "2026-12-31",
+ },
+ {
+ "id": None,
+ "image_tag": "2.4.0p39",
+ "until": "2026-12-31",
+ },
+ ]
+ }
+ },
+ "host": {},
+ }
+ )
+ self.assertEqual(
+ parsed.containers["checkmk"]["checkmk"],
+ (
+ SCRIPT.Suppression("CVE-2026-1", None, dt.date(2026, 12, 31)),
+ SCRIPT.Suppression(None, "2.4.0p39", dt.date(2026, 12, 31)),
+ ),
+ )
+
+
+class TestImageTag(TestCase):
+ def test_cases(self):
+ cases = {
+ "checkmk/check-mk-raw:2.4.0p39": "2.4.0p39",
+ "ghcr.io/infinito-nexus/core/mirror/docker.io/penpotapp/exporter:2.18.5": "2.18.5",
+ "penpotapp/exporter:2.18.5@sha256:abc": "2.18.5",
+ "registry.local:5000/app": "latest",
+ "registry.local:5000/app:1.2": "1.2",
+ "postgres@sha256:abc": "latest",
+ }
+ self.assertEqual({name: SCRIPT.image_tag(name) for name in cases}, cases)
+
+
+class TestContainerTargets(TestCase):
+ def test_each_owner_keeps_the_tag_its_container_runs(self):
+ first = _container("a", "hugo", "nginx")
+ second = SCRIPT.Container(
+ id="id-b",
+ name="b",
+ stack="moodle",
+ service="nginx",
+ image="sha256:img",
+ image_name="nginx:1.31.8-alpine@sha256:abc",
+ )
+ (target,) = SCRIPT.container_targets([first, second])
+ self.assertEqual(
+ (target.tag_of(("hugo", "nginx")), target.tag_of(("moodle", "nginx"))),
+ ("1", "1.31.8-alpine"),
+ )
+
+ def test_the_host_has_no_image_tag(self):
+ self.assertIsNone(SCRIPT.host_target("node").tag_of((None, None)))
+
+ def test_containers_of_one_image_share_a_target(self):
+ targets = SCRIPT.container_targets(
+ [
+ _container("a", "checkmk", "checkmk"),
+ _container("b", "checkmk", "checkmk"),
+ ]
+ )
+ self.assertEqual(len(targets), 1)
+ self.assertEqual(
+ targets[0].owners, (("checkmk", "checkmk"), ("checkmk", "checkmk"))
+ )
+
+ def test_the_target_key_is_the_image_digest(self):
+ target = SCRIPT.container_targets([_container("a", image="sha256:abc")])[0]
+ self.assertEqual(target.key, "abc")
+
+
+EMPTY_REPORTS = {
+ "trivy.json": {"SchemaVersion": 2},
+ "grype.json": {"matches": []},
+ "runtime.grype.json": {"matches": []},
+ "json": {"results": []},
+}
+
+
+class FakeEngines:
+ """A runner that answers every engine command with a fixture report."""
+
+ def __init__(self, layout, reports, *, fail=()):
+ self.layout = layout
+ self.reports = {**EMPTY_REPORTS, **reports}
+ self.fail = fail
+ self.calls = []
+ self.active = 0
+ self.peak = 0
+ self.lock = threading.Lock()
+
+ def __call__(self, argv):
+ with self.lock:
+ self.calls.append(list(argv))
+ self.active += 1
+ self.peak = max(self.peak, self.active)
+ try:
+ text = " ".join(argv)
+ for marker in self.fail:
+ if marker in text:
+ return SimpleNamespace(returncode=2, stdout="", stderr="boom")
+ self._write(list(argv))
+ return SimpleNamespace(returncode=0, stdout="", stderr="")
+ finally:
+ with self.lock:
+ self.active -= 1
+
+ def _write(self, argv):
+ for index, arg in enumerate(argv):
+ if arg in ("--output", "--file", "--output-file"):
+ name = Path(argv[index + 1]).name
+ report = self.reports[name.split(".", 1)[1]]
+ (self.layout.work / name).write_text(
+ json.dumps(report), encoding="utf-8"
+ )
+ if arg.startswith(("syft-json=", "cyclonedx-json=")):
+ name = Path(arg.split("=", 1)[1]).name
+ document = SYFT_PHP_IMAGE if name.endswith("syft.json") else CYCLONEDX
+ (self.layout.sbom / name).write_text(
+ json.dumps(document), encoding="utf-8"
+ )
+
+
+class TestScan(TestCase):
+ def setUp(self):
+ self.tmp = tempfile.TemporaryDirectory()
+ root = Path(self.tmp.name)
+ for name in ("db", "sbom", "work"):
+ (root / name).mkdir()
+ self.layout = SCRIPT.Layout(
+ runtime=("container", "run"),
+ databases=root / "db",
+ sbom=root / "sbom",
+ work=root / "work",
+ excludes=("/proc",),
+ )
+ self.images = {engine: f"{engine}:1" for engine in SCRIPT.ENGINES}
+ self.targets = [SCRIPT.host_target("node")]
+
+ def tearDown(self):
+ self.tmp.cleanup()
+
+ def _scan(self, config, reports, fail=()):
+ runner = FakeEngines(self.layout, reports, fail=fail)
+ with mock.patch.object(SCRIPT, "pause") as self.pauses:
+ findings, errors = SCRIPT.scan(
+ self.targets, config, self.images, self.layout, runner
+ )
+ return findings, errors, runner
+
+ def _download_calls(self, runner, flag):
+ return [call for call in runner.calls if flag in call]
+
+ def test_a_failing_database_download_is_retried_with_a_short_pause(self):
+ _findings, _errors, runner = self._scan(
+ _config(targets=["host"]), {}, fail=("--download-db-only",)
+ )
+ self.assertEqual(
+ len(self._download_calls(runner, "--download-db-only")), SCRIPT.DB_ATTEMPTS
+ )
+ self.assertEqual(
+ [call.args for call in self.pauses.call_args_list],
+ [(SCRIPT.DB_RETRY_SECONDS,)] * (SCRIPT.DB_ATTEMPTS - 1),
+ )
+
+ def test_a_database_download_that_recovers_is_not_retried_again(self):
+ attempts = []
+
+ def flaky(argv):
+ if "--download-db-only" in argv:
+ attempts.append(argv)
+ if len(attempts) == 1:
+ return SimpleNamespace(returncode=1, stdout="", stderr="timeout")
+ return FakeEngines(self.layout, {})(argv)
+
+ with mock.patch.object(SCRIPT, "pause"):
+ _findings, errors = SCRIPT.scan(
+ self.targets, _config(targets=["host"]), self.images, self.layout, flaky
+ )
+ self.assertEqual((len(attempts), errors), (2, []))
+
+ def test_a_finding_is_never_retried(self):
+ _findings, _errors, runner = self._scan(
+ _config(targets=["host"]), {"trivy.json": TRIVY_HOST}
+ )
+ self.assertEqual(len(self._download_calls(runner, "rootfs")), 1)
+ self.pauses.assert_not_called()
+
+ def test_every_engine_reports_into_one_result(self):
+ reports = {"trivy.json": TRIVY_HOST, "grype.json": GRYPE_HOST, "json": OSV_HOST}
+ findings, errors, _runner = self._scan(_config(targets=["host"]), reports)
+ self.assertEqual(errors, [])
+ self.assertEqual({f.engine for f in findings}, {"trivy", "grype", "osv"})
+
+ def test_the_parallel_runs_respect_the_worker_bound(self):
+ _findings, _errors, runner = self._scan(
+ _config(targets=["host"], workers=1), {}
+ )
+ self.assertEqual(runner.peak, 1)
+
+ def test_a_failing_database_download_fails_loudly_and_skips_the_engine(self):
+ findings, errors, runner = self._scan(
+ _config(targets=["host"]),
+ {"trivy.json": TRIVY_HOST},
+ fail=("--download-db-only",),
+ )
+ self.assertTrue(
+ any(error.startswith("trivy database: exited 2") for error in errors)
+ )
+ self.assertFalse(any("rootfs" in call for call in runner.calls))
+ self.assertNotIn("trivy", {f.engine for f in findings})
+
+ def test_a_provided_database_that_is_missing_fails_loudly(self):
+ _findings, errors, runner = self._scan(
+ _config(targets=["host"], engines=["syft", "grype"], db_update=False), {}
+ )
+ self.assertEqual(
+ errors,
+ [
+ f"grype: provided database {self.layout.databases / 'grype' / '6/vulnerability.db'} is missing"
+ ],
+ )
+ self.assertFalse(
+ any("db" in call and "update" in call for call in runner.calls)
+ )
+
+ def test_a_pinned_trivy_run_still_scans_source_built_runtimes_with_grype(self):
+ for engine in ("trivy", "grype"):
+ for marker in SCRIPT.DB_MARKERS[engine]:
+ path = self.layout.databases / engine / marker
+ path.parent.mkdir(parents=True, exist_ok=True)
+ path.write_text("", encoding="utf-8")
+ findings, errors, _runner = self._scan(
+ _config(targets=["host"], engines=["syft", "trivy"], db_update=False),
+ {"runtime.grype.json": GRYPE_PHP_RUNTIME},
+ )
+ self.assertEqual(errors, [])
+ self.assertEqual(
+ {(f.engine, f.id) for f in findings},
+ {("grype", "CVE-2026-109618"), ("grype", "CVE-2026-109619")},
+ )
+
+ def test_the_provided_trivy_database_is_read_from_memory_cache(self):
+ step = SCRIPT.trivy_step(
+ self.layout,
+ "trivy:1",
+ self.targets[0],
+ _config(db_update=False, engines=["syft", "trivy"]),
+ )
+ self.assertIn("memory", step.argv)
+
+ def test_a_failed_sbom_skips_the_sbom_readers_of_that_target(self):
+ _findings, errors, runner = self._scan(
+ _config(targets=["host"], engines=["syft", "grype"]),
+ {},
+ fail=("dir:/host",),
+ )
+ self.assertTrue(errors[0].startswith("syft host node: exited 2"))
+ self.assertFalse(
+ any(arg.startswith("sbom:") for call in runner.calls for arg in call)
+ )
+
+ def test_osv_names_a_missing_ecosystem_database(self):
+ result = SimpleNamespace(
+ returncode=1,
+ stdout="",
+ stderr="could not load db for PyPI ecosystem: no offline",
+ )
+ errors = SCRIPT.run_lane(
+ [SCRIPT.Step("osv sbom", ("x",), SCRIPT.OSV_ACCEPTED_EXIT_CODES)],
+ lambda _argv: result,
+ )
+ self.assertEqual(errors, ["osv sbom: no OSV database for PyPI"])
+
+ def test_osv_exit_code_one_means_findings(self):
+ result = SimpleNamespace(returncode=1, stdout="", stderr="")
+ errors = SCRIPT.run_lane(
+ [SCRIPT.Step("osv sbom", ("x",), SCRIPT.OSV_ACCEPTED_EXIT_CODES)],
+ lambda _argv: result,
+ )
+ self.assertEqual(errors, [])
+
+ def test_a_timed_out_engine_is_an_error(self):
+ def hung(_argv):
+ raise subprocess.TimeoutExpired(cmd="trivy", timeout=5)
+
+ errors = SCRIPT.run_lane(
+ [SCRIPT.Step("trivy host node", ("x",), SCRIPT.SUCCESS)], hung
+ )
+ self.assertEqual(errors, ["trivy host node: no result within 5s"])
+
+
+class TestCommands(TestCase):
+ def setUp(self):
+ self.layout = SCRIPT.Layout(
+ runtime=("container", "run"),
+ databases=Path("/var/cache/v/db"),
+ sbom=Path("/var/cache/v/sbom"),
+ work=Path("/var/cache/v/run"),
+ excludes=("/proc", "/var/lib/docker"),
+ )
+ self.host = SCRIPT.host_target("node")
+ self.container = SCRIPT.Target(
+ "abc",
+ "container",
+ "sha256:abc",
+ "app:1",
+ (("app", "app"),),
+ ((("app", "app"), "1"),),
+ )
+
+ def test_the_host_is_mounted_read_only(self):
+ step = SCRIPT.trivy_step(self.layout, "trivy:1", self.host, _config())
+ self.assertIn("/:/host:ro", step.argv)
+
+ def test_every_engine_writes_its_temp_files_to_the_work_mount(self):
+ for engine in ("trivy", "grype", "osv", "syft"):
+ with self.subTest(engine=engine):
+ argv = SCRIPT.run_argv(
+ self.layout, engine, f"{engine}:1", [], target=None, extra_env={}
+ )
+ self.assertIn("TMPDIR=/work", argv)
+ self.assertIn("/var/cache/v/run:/work", argv)
+
+ def test_the_grype_database_update_writes_its_listing_to_the_work_mount(self):
+ (step,) = SCRIPT.db_steps("grype", self.layout, "grype:1")
+ self.assertIn("TMPDIR=/work", step.argv)
+
+ def test_a_container_scan_reads_the_docker_socket_read_only(self):
+ step = SCRIPT.trivy_step(self.layout, "trivy:1", self.container, _config())
+ self.assertIn("/var/run/docker.sock:/var/run/docker.sock:ro", step.argv)
+
+ def test_the_host_scan_skips_the_excluded_paths(self):
+ step = SCRIPT.trivy_step(self.layout, "trivy:1", self.host, _config())
+ self.assertIn("/host/proc,/host/var/lib/docker", step.argv)
+
+ def test_syft_scans_the_host_with_the_image_catalogers(self):
+ step = SCRIPT.sbom_step(self.layout, "syft:1", self.host)
+ self.assertIn("--override-default-catalogers", step.argv)
+ self.assertIn("./var/lib/docker", step.argv)
+
+ def test_grype_reads_the_sbom_when_syft_runs(self):
+ step = SCRIPT.grype_step(self.layout, "grype:1", self.container, _config())
+ self.assertIn("sbom:/sbom/abc.syft.json", step.argv)
+
+ def test_grype_reads_the_image_without_syft(self):
+ step = SCRIPT.grype_step(
+ self.layout,
+ "grype:1",
+ self.container,
+ _config(engines=["grype"], targets=["container"]),
+ )
+ self.assertIn("docker:sha256:abc", step.argv)
+
+ def test_osv_without_syft_exports_the_image(self):
+ steps = SCRIPT.osv_image_steps(
+ self.layout,
+ "osv:1",
+ self.container,
+ _config(engines=["osv", "grype"], targets=["container"]),
+ )
+ self.assertEqual(steps[0].argv[:2], ("container", "save"))
+
+ def test_osv_downloads_its_databases_only_when_asked(self):
+ self.assertIn(
+ "--download-offline-databases", SCRIPT.osv_args(_config(), "/work/osv.json")
+ )
+ self.assertNotIn(
+ "--download-offline-databases",
+ SCRIPT.osv_args(
+ _config(db_update=False, engines=["syft", "osv"]), "/work/osv.json"
+ ),
+ )
class TestParseProbe(TestCase):
def test_startup_warnings_before_the_probe_line_are_skipped(self):
- stdout = f"PHP Warning: Module 'redis' already loaded\n{MARKER}|8.3.36||0\n"
- self.assertEqual(SCRIPT.parse_probe(stdout), _probe("8.3.36"))
+ stdout = f"PHP Warning: Module 'redis' already loaded\n{MARKER}||0\n"
+ self.assertEqual(
+ SCRIPT.parse_probe(stdout).settings,
+ {"expose_php": False, "session.upload_progress.enabled": False},
+ )
def test_enabled_settings_are_reported_on(self):
self.assertEqual(
- SCRIPT.parse_probe(f"\n{MARKER}|8.4.27|1|1\n"),
- _probe("8.4.27", expose_php=True, upload_progress=True),
+ SCRIPT.parse_probe(f"\n{MARKER}|1|1\n").settings,
+ {"expose_php": True, "session.upload_progress.enabled": True},
)
def test_output_without_the_probe_line_raises(self):
@@ -96,7 +1327,7 @@ class TestParseProbe(TestCase):
def test_a_probe_line_with_missing_fields_raises(self):
with self.assertRaises(SCRIPT.ProbeError):
- SCRIPT.parse_probe(f"{MARKER}|8.4.27\n")
+ SCRIPT.parse_probe(f"{MARKER}|1\n")
class TestIdentity(TestCase):
@@ -118,22 +1349,24 @@ class TestIdentity(TestCase):
self.assertEqual(SCRIPT.identity(None), (None, None))
+def _probe(expose_php=False, upload_progress=False):
+ return SCRIPT.PhpProbe(
+ settings={
+ "expose_php": expose_php,
+ "session.upload_progress.enabled": upload_progress,
+ }
+ )
+
+
+def _check(containers, probes, hardened):
+ return SCRIPT.check(containers, hardened, lambda container_id: probes[container_id])
+
+
class TestCheck(TestCase):
- def test_an_eol_runtime_outside_any_stack_fails(self):
- failures, _infos = _check(
- [_container("legacy")], {"id-legacy": _probe("8.1.34")}
- )
- self.assertEqual(failures, ["legacy: PHP 8.1.34 runs the end-of-life line 8.1"])
-
- def test_a_patched_runtime_passes(self):
- self.assertEqual(
- _check([_container("app")], {"id-app": _probe("8.5.12")}), ([], [])
- )
-
def test_a_hardened_service_with_expose_php_on_fails(self):
failures, _infos = _check(
[_container("wp", "wordpress", "wordpress")],
- {"id-wp": _probe("8.4.27", expose_php=True)},
+ {"id-wp": _probe(expose_php=True)},
{"wordpress": ["wordpress"]},
)
self.assertEqual(
@@ -144,7 +1377,7 @@ class TestCheck(TestCase):
self.assertEqual(
_check(
[_container("wp", "wordpress", "wordpress")],
- {"id-wp": _probe("8.4.27")},
+ {"id-wp": _probe()},
{"wordpress": ["wordpress"]},
),
([], []),
@@ -153,7 +1386,7 @@ class TestCheck(TestCase):
def test_a_sidecar_of_a_hardened_stack_is_info_only(self):
failures, infos = _check(
[_container("nc-cron", "nextcloud", "cron")],
- {"id-nc-cron": _probe("8.4.27", upload_progress=True)},
+ {"id-nc-cron": _probe(upload_progress=True)},
{"nextcloud": ["nextcloud"]},
)
self.assertEqual(failures, [])
@@ -164,12 +1397,10 @@ class TestCheck(TestCase):
],
)
- def test_a_container_outside_hardened_stacks_is_not_judged_on_settings(self):
+ def test_a_container_outside_hardened_stacks_is_not_probed(self):
self.assertEqual(
_check(
- [_container("app", "other", "app")],
- {"id-app": _probe("8.4.27", expose_php=True)},
- {"wordpress": ["wordpress"]},
+ [_container("app", "other", "app")], {}, {"wordpress": ["wordpress"]}
),
([], []),
)
@@ -184,15 +1415,16 @@ class TestCheck(TestCase):
failures, ["wp: declares php_hardening but has no php to verify it"]
)
- def test_a_container_without_php_is_skipped(self):
- self.assertEqual(_check([_container("db")], {"id-db": None}), ([], []))
-
- def test_a_probe_error_is_a_failure(self):
+ def test_a_probe_error_in_a_hardened_stack_is_a_failure(self):
def broken(_container_id):
raise SCRIPT.ProbeError("php exited 255: boom")
- failures, _infos = SCRIPT.check([_container("app")], FLOORS, {}, broken)
- self.assertEqual(failures, ["app: php exited 255: boom"])
+ failures, _infos = SCRIPT.check(
+ [_container("wp", "wordpress", "wordpress")],
+ {"wordpress": ["wordpress"]},
+ broken,
+ )
+ self.assertEqual(failures, ["wp: php exited 255: boom"])
class TestProbePhp(TestCase):
@@ -204,9 +1436,6 @@ class TestProbePhp(TestCase):
def test_exit_127_means_no_php(self):
self.assertIsNone(self._run(127, stderr="executable file not found"))
- def test_exit_126_means_no_php(self):
- self.assertIsNone(self._run(126, stderr="OCI runtime exec failed"))
-
def test_another_non_zero_exit_raises(self):
with self.assertRaises(SCRIPT.ProbeError):
self._run(255, stderr="PHP Fatal error")
@@ -224,102 +1453,496 @@ class TestProbePhp(TestCase):
class TestRunningContainers(TestCase):
- def test_every_engine_call_is_bounded_by_a_timeout(self):
- timeouts = []
-
- def fake_run(args, **kwargs):
- timeouts.append(kwargs.get("timeout"))
+ def test_the_image_of_every_container_is_read(self):
+ def fake_run(args, **_kwargs):
if args[:2] == ["container", "ps"]:
return SimpleNamespace(returncode=0, stdout="id-app\n", stderr="")
- inspected = [{"Id": "id-app", "Name": "/app", "Config": {"Labels": None}}]
+ inspected = [
+ {
+ "Id": "id-app",
+ "Name": "/app",
+ "Image": "sha256:abc",
+ "Config": {"Labels": None, "Image": "app:1"},
+ }
+ ]
return SimpleNamespace(
returncode=0, stdout=json.dumps(inspected), stderr=""
)
with mock.patch.object(SCRIPT.subprocess, "run", side_effect=fake_run):
- SCRIPT.running_containers()
- self.assertEqual(timeouts, [SCRIPT.EXEC_TIMEOUT_SECONDS] * 2)
+ container = SCRIPT.running_containers()[0]
+ self.assertEqual(
+ (container.image, container.image_name), ("sha256:abc", "app:1")
+ )
+
+
+RUN = SCRIPT.Run(
+ id="run-1",
+ started=dt.datetime(2026, 10, 31, 0, 0, 5, tzinfo=dt.UTC),
+ host="node",
+ environment="production",
+)
+NEXTCLOUD = SCRIPT.Target(
+ "abc",
+ "container",
+ "sha256:abc",
+ "nextcloud:31",
+ (("nextcloud", "nextcloud"), ("nextcloud", "cron")),
+ ((("nextcloud", "nextcloud"), "31"), (("nextcloud", "cron"), "31")),
+)
+
+
+def _verdict(target, owner, *, action, rule=None, **fields):
+ return SCRIPT.Verdict(
+ _finding(target=target.key, **fields),
+ target,
+ owner,
+ rule,
+ rule is not None,
+ action,
+ )
+
+
+def _outcome(verdicts, *, errors=(), failed=False, targets=()):
+ return SCRIPT.Outcome(
+ run=RUN,
+ targets=tuple(targets),
+ records=tuple(SCRIPT.record(verdict, RUN) for verdict in verdicts),
+ errors=tuple(errors),
+ engines=("grype", "syft"),
+ failed=failed,
+ finished=1793404805.5,
+ )
+
+
+class TestRecord(TestCase):
+ def test_a_container_record_names_owner_image_and_suppression(self):
+ verdict = _verdict(
+ NEXTCLOUD,
+ ("nextcloud", "nextcloud"),
+ action="warn",
+ rule=_rule(until=dt.date(2026, 12, 31)),
+ engine="osv",
+ )
+ self.assertEqual(
+ SCRIPT.record(verdict, RUN),
+ {
+ "run_id": "run-1",
+ "timestamp": "2026-10-31T00:00:05Z",
+ "host": "node",
+ "environment": "production",
+ "target": "nextcloud/nextcloud",
+ "kind": "container",
+ "image": "nextcloud:31@sha256:abc",
+ "scanner": "osv",
+ "id": "CVE-2026-0001",
+ "severity": "HIGH",
+ "package": "openssl",
+ "installed_version": "1.0",
+ "fixed_version": "1.1",
+ "suppressed": True,
+ "suppressed_until": "2026-12-31",
+ "verdict": "suppressed",
+ },
+ )
+
+ def test_a_host_record_names_the_host_as_target_and_image(self):
+ record = SCRIPT.record(
+ _verdict(SCRIPT.host_target("node"), (None, None), action="fail"), RUN
+ )
+ self.assertEqual(
+ (record["target"], record["image"], record["kind"]),
+ ("node", "node", "host"),
+ )
+
+ def test_an_unsuppressed_record_carries_its_action_and_no_until(self):
+ record = SCRIPT.record(
+ _verdict(SCRIPT.host_target("node"), (None, None), action="fail"), RUN
+ )
+ self.assertEqual(
+ (record["verdict"], record["suppressed"], record["suppressed_until"]),
+ ("fail", False, None),
+ )
+
+ def test_a_finding_without_a_fix_has_no_fixed_version(self):
+ record = SCRIPT.record(
+ _verdict(SCRIPT.host_target("node"), (None, None), action="fail", fixed=""),
+ RUN,
+ )
+ self.assertIsNone(record["fixed_version"])
+
+
+class TestJournalEvents(TestCase):
+ def test_each_owner_of_a_shared_image_gets_its_own_line(self):
+ outcome = _outcome(
+ [_verdict(NEXTCLOUD, ("nextcloud", "nextcloud"), action="fail")],
+ targets=[NEXTCLOUD],
+ )
+ self.assertEqual(
+ [
+ (event["target"], event["counts"], event["verdict"])
+ for event in outcome.target_events()
+ ],
+ [
+ ("nextcloud/cron", {"fail": 0, "warn": 0, "suppressed": 0}, "ok"),
+ (
+ "nextcloud/nextcloud",
+ {"fail": 1, "warn": 0, "suppressed": 0},
+ "fail",
+ ),
+ ],
+ )
+
+ def test_a_target_with_warnings_only_is_warn(self):
+ host = SCRIPT.host_target("node")
+ outcome = _outcome(
+ [
+ _verdict(host, (None, None), action="warn"),
+ _verdict(host, (None, None), action="fail", rule=_rule()),
+ ],
+ targets=[host],
+ )
+ self.assertEqual(
+ outcome.target_events()[0]["counts"],
+ {"fail": 0, "warn": 1, "suppressed": 1},
+ )
+ self.assertEqual(outcome.target_events()[0]["verdict"], "warn")
+
+ def test_an_engine_error_fails_the_summary_without_findings(self):
+ summary = _outcome(
+ [], errors=["grype database: exited 1"], failed=True
+ ).summary_event()
+ self.assertEqual(
+ summary,
+ {
+ "event": "hlth_runtime.summary",
+ "run_id": "run-1",
+ "counts": {"fail": 0, "warn": 0, "suppressed": 0},
+ "errors": 1,
+ "verdict": "fail",
+ },
+ )
+
+
+class TestMetrics(TestCase):
+ def _lines(self, outcome):
+ return outcome.metrics().splitlines()
+
+ def test_one_series_counts_the_findings_of_one_label_set(self):
+ host = SCRIPT.host_target("node")
+ lines = self._lines(
+ _outcome(
+ [
+ _verdict(host, (None, None), action="fail", severity="CRITICAL"),
+ _verdict(
+ host,
+ (None, None),
+ action="fail",
+ severity="CRITICAL",
+ ids=("CVE-2026-0002",),
+ ),
+ ]
+ )
+ )
+ self.assertIn(
+ 'infinito_hlth_runtime_findings{target="node",kind="host",image="node",'
+ 'severity="CRITICAL",scanner="trivy",verdict="fail"} 2',
+ lines,
+ )
+
+ def test_no_series_names_the_vulnerability(self):
+ text = _outcome(
+ [_verdict(NEXTCLOUD, ("nextcloud", "nextcloud"), action="warn")]
+ ).metrics()
+ labels = re.findall(r"(\w+)=\"", text.split("_findings{", 1)[1].split("}")[0])
+ self.assertEqual((tuple(labels), "CVE-" in text), (SCRIPT.METRIC_LABELS, False))
+
+ def test_every_metric_declares_help_and_gauge_type(self):
+ lines = self._lines(_outcome([]))
+ for name in (
+ "findings",
+ "last_run_timestamp_seconds",
+ "last_run_success",
+ "scanner_errors",
+ ):
+ with self.subTest(metric=name):
+ metric = f"infinito_hlth_runtime_{name}"
+ self.assertTrue(
+ any(line.startswith(f"# HELP {metric} ") for line in lines)
+ )
+ self.assertIn(f"# TYPE {metric} gauge", lines)
+
+ def test_the_last_run_carries_its_time_and_success(self):
+ lines = self._lines(_outcome([], failed=True))
+ self.assertIn(
+ "infinito_hlth_runtime_last_run_timestamp_seconds 1793404805", lines
+ )
+ self.assertIn("infinito_hlth_runtime_last_run_success 0", lines)
+
+ def test_scanner_errors_are_counted_per_engine_with_clean_engines_at_zero(self):
+ lines = self._lines(
+ _outcome(
+ [],
+ errors=[
+ "grype database: exited 1",
+ "grype: provided database /db/grype/6/vulnerability.db is missing",
+ "osv export app:1: exited 1",
+ ],
+ )
+ )
+ self.assertEqual(
+ [
+ line
+ for line in lines
+ if line.startswith("infinito_hlth_runtime_scanner")
+ ],
+ [
+ 'infinito_hlth_runtime_scanner_errors{scanner="grype"} 2',
+ 'infinito_hlth_runtime_scanner_errors{scanner="osv"} 1',
+ 'infinito_hlth_runtime_scanner_errors{scanner="syft"} 0',
+ ],
+ )
+
+ def test_label_values_are_escaped(self):
+ target = SCRIPT.Target(
+ "abc",
+ "container",
+ "sha256:abc",
+ 'odd"\\name\n',
+ ((None, None),),
+ (((None, None), "latest"),),
+ )
+ text = _outcome([_verdict(target, (None, None), action="warn")]).metrics()
+ self.assertIn('image="odd\\"\\\\name\\n@sha256:abc"', text)
+
+
+class TestWriteAtomic(TestCase):
+ def test_the_file_is_replaced_without_a_leftover_temp_file(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ path = Path(tmp) / "infinito_hlth_runtime.prom"
+ SCRIPT.write_atomic(path, "old\n")
+ SCRIPT.write_atomic(path, "new\n")
+ text = path.read_text() # nocheck: cache-read tempdir file rewritten
+ self.assertEqual(
+ ([p.name for p in Path(tmp).iterdir()], text),
+ (["infinito_hlth_runtime.prom"], "new\n"),
+ )
+
+
+NO_SUPPRESSIONS = {"containers": {}, "host": {}}
+MAIN_SCAN = {
+ "targets": ["host"],
+ "engines": ["grype"],
+ "severity": SEVERITY,
+ "fixed_only": True,
+ "workers": 1,
+ "db_update": True,
+}
+CRITICAL_FINDING = _finding(engine="grype", severity="CRITICAL")
+HIGH_FINDING = _finding(engine="grype", ids=("CVE-2026-0002",))
class TestMain(TestCase):
- def _main(self, php_versions):
- """Run main() against a fake engine.
+ def setUp(self):
+ self.tmp = tempfile.TemporaryDirectory()
+ self.root = Path(self.tmp.name)
+ for name in ("cache", "report", "log", "metrics"):
+ (self.root / name).mkdir()
+ self.metrics = self.root / "metrics" / "infinito_hlth_runtime.prom"
- Args:
- php_versions: ``{container name: PHP version or None}``.
- """
- inspected = [
- {
- "Id": f"id-{name}",
- "Name": f"/{name}",
- "Config": {"Labels": None},
- }
- for name in php_versions
+ def tearDown(self):
+ self.tmp.cleanup()
+
+ def _args(self, scan, suppressions, metrics):
+ return [
+ "--scan",
+ json.dumps(scan),
+ "--hardened",
+ "{}",
+ "--images",
+ "{}",
+ "--suppressions",
+ json.dumps(suppressions),
+ "--cache-dir",
+ str(self.root / "cache"),
+ "--database-dir",
+ str(self.root / "cache" / "db"),
+ "--host-excludes",
+ "[]",
+ "--environment",
+ "production",
+ "--report-dir",
+ str(self.root / "report"),
+ "--log-dir",
+ str(self.root / "log"),
+ *metrics,
]
- def fake_run(args, **_kwargs):
- if args[:2] == ["container", "ps"]:
- return SimpleNamespace(
- returncode=0,
- stdout="\n".join(i["Id"] for i in inspected),
- stderr="",
- )
- if args[:2] == ["container", "inspect"]:
- return SimpleNamespace(
- returncode=0, stdout=json.dumps(inspected), stderr=""
- )
- if args[:2] == ["container", "exec"]:
- version = php_versions[args[2].removeprefix("id-")]
- if version is None:
- return SimpleNamespace(
- returncode=127, stdout="", stderr="not found"
- )
- return SimpleNamespace(
- returncode=0, stdout=f"\n{MARKER}|{version}||0\n", stderr=""
- )
- raise AssertionError(f"unexpected command {args}")
-
- argv = ["--floors", json.dumps({"php": FLOORS}), "--hardened", "{}"]
+ def _early(self, scan, side_effect):
with (
- mock.patch.object(SCRIPT.subprocess, "run", side_effect=fake_run),
+ mock.patch.object(SCRIPT.subprocess, "run", side_effect=side_effect),
contextlib.redirect_stdout(io.StringIO()) as out,
):
- code = SCRIPT.main(argv)
+ code = SCRIPT.main(self._args(scan, NO_SUPPRESSIONS, []))
return code, out.getvalue()
- def test_main_fails_on_an_eol_runtime(self):
- code, output = self._main({"akaunting": "8.1.34", "postgres": None})
- self.assertEqual(code, 1)
- self.assertIn("akaunting: PHP 8.1.34 runs the end-of-life line 8.1", output)
-
- def test_main_passes_when_every_runtime_is_patched(self):
- code, _output = self._main({"wordpress": "8.4.27", "postgres": None})
- self.assertEqual(code, 0)
-
- def _main_on_engine_error(self, error):
- argv = ["--floors", json.dumps({"php": FLOORS}), "--hardened", "{}"]
+ def _main(self, findings, *, errors=(), suppressions=NO_SUPPRESSIONS, metrics=None):
+ flags = ["--metrics-file", str(self.metrics)] if metrics is None else metrics
with (
- mock.patch.object(SCRIPT.subprocess, "run", side_effect=error),
+ mock.patch.object(SCRIPT, "running_containers", return_value=[]),
+ mock.patch.object(SCRIPT, "check", return_value=([], [])),
+ mock.patch.object(SCRIPT, "docker_root", return_value="/var/lib/docker"),
+ mock.patch.object(
+ SCRIPT, "scan", return_value=(list(findings), list(errors))
+ ),
+ mock.patch.object(SCRIPT.socket, "gethostname", return_value="node"),
contextlib.redirect_stdout(io.StringIO()) as out,
):
- code = SCRIPT.main(argv)
+ code = SCRIPT.main(self._args(MAIN_SCAN, suppressions, flags))
return code, out.getvalue()
- def test_main_fails_with_one_line_on_a_hung_engine(self):
- code, output = self._main_on_engine_error(
- subprocess.TimeoutExpired(cmd=["container", "ps"], timeout=60)
+ def _report(self):
+ path = self.root / "report" / "report.json"
+ text = path.read_text() # nocheck: cache-read tempdir report of main()
+ return json.loads(text)
+
+ def test_an_invalid_scan_config_fails_with_one_line(self):
+ code, output = self._early(
+ {"targets": ["host"]}, AssertionError("no engine call expected")
)
- self.assertEqual(code, 1)
- self.assertEqual(len(output.splitlines()), 1)
+ self.assertEqual((code, len(output.splitlines())), (1, 1))
+ self.assertIn("scan config lacks", output)
+
+ def test_a_hung_container_listing_fails_with_one_line(self):
+ code, output = self._early(
+ MAIN_SCAN, subprocess.TimeoutExpired(cmd=["container", "ps"], timeout=60)
+ )
+ self.assertEqual((code, len(output.splitlines())), (1, 1))
self.assertIn("timed out after 60 seconds", output)
- def test_main_fails_with_one_line_on_a_failing_engine(self):
- code, output = self._main_on_engine_error(
- subprocess.CalledProcessError(returncode=1, cmd=["container", "ps"])
- )
+ def test_a_finding_mapped_to_fail_fails_the_run(self):
+ code, output = self._main([CRITICAL_FINDING])
self.assertEqual(code, 1)
- self.assertEqual(len(output.splitlines()), 1)
- self.assertIn("returned non-zero exit status 1", output)
+ self.assertIn(
+ "❌ grype host node: CVE-2026-0001 CRITICAL openssl 1.0 (fixed in 1.1)",
+ output,
+ )
+
+ def test_a_finding_mapped_to_warn_passes_with_a_warning(self):
+ code, output = self._main([HIGH_FINDING])
+ self.assertEqual((code, "❌" in output), (0, False))
+ self.assertIn(
+ "⚠️ grype host node: CVE-2026-0002 HIGH openssl 1.0 (fixed in 1.1)", output
+ )
+
+ def test_a_suppressed_finding_is_info_and_passes(self):
+ suppressions = {
+ "containers": {},
+ "host": {
+ "grype": [
+ {"id": "CVE-2026-0001", "image_tag": None, "until": "2099-12-31"}
+ ]
+ },
+ }
+ code, output = self._main([CRITICAL_FINDING], suppressions=suppressions)
+ self.assertEqual(code, 0)
+ self.assertIn(
+ "ℹ️ grype host node: CVE-2026-0001 CRITICAL openssl 1.0 (fixed in 1.1) "
+ "suppressed until 2099-12-31",
+ output,
+ )
+
+ def test_an_engine_error_still_fails_the_check(self):
+ code, output = self._main([], errors=["grype database: exited 1"])
+ self.assertEqual(code, 1)
+ self.assertIn("❌ grype database: exited 1", output)
+
+ def test_the_journal_has_one_json_line_per_target(self):
+ _code, output = self._main([CRITICAL_FINDING, HIGH_FINDING])
+ events = [json.loads(line) for line in output.splitlines() if line[:1] == "{"]
+ target = events[0]
+ self.assertEqual(
+ (len(events), target["event"], target["target"], target["kind"]),
+ (2, "hlth_runtime.target", "node", "host"),
+ )
+ self.assertEqual(
+ (target["counts"], target["verdict"]),
+ ({"fail": 1, "warn": 1, "suppressed": 0}, "fail"),
+ )
+
+ def test_the_journal_ends_with_the_summary(self):
+ _code, output = self._main([HIGH_FINDING])
+ summary = json.loads(output.splitlines()[-1])
+ self.assertEqual(
+ {key: summary[key] for key in ("event", "counts", "errors", "verdict")},
+ {
+ "event": "hlth_runtime.summary",
+ "counts": {"fail": 0, "warn": 1, "suppressed": 0},
+ "errors": 0,
+ "verdict": "warn",
+ },
+ )
+
+ def test_the_report_holds_the_summary_and_the_records(self):
+ self._main(
+ [CRITICAL_FINDING, HIGH_FINDING], errors=["grype database: exited 1"]
+ )
+ report = self._report()
+ self.assertEqual(
+ (
+ report["host"],
+ report["environment"],
+ report["verdict"],
+ report["counts"],
+ report["errors"],
+ [(item["id"], item["verdict"]) for item in report["findings"]],
+ ),
+ (
+ "node",
+ "production",
+ "fail",
+ {"fail": 1, "warn": 1, "suppressed": 0},
+ ["grype database: exited 1"],
+ [("CVE-2026-0001", "fail"), ("CVE-2026-0002", "warn")],
+ ),
+ )
+
+ def test_the_report_holds_the_last_run_only(self):
+ self._main([CRITICAL_FINDING])
+ self._main([])
+ self.assertEqual(
+ (self._report()["findings"], self._report()["verdict"]), ([], "ok")
+ )
+
+ def test_findings_are_appended_across_runs(self):
+ self._main([CRITICAL_FINDING])
+ self._main([HIGH_FINDING])
+ path = self.root / "log" / "findings.jsonl"
+ text = path.read_text() # nocheck: cache-read tempdir log of two runs
+ records = [json.loads(line) for line in text.splitlines()]
+ self.assertEqual(
+ [item["id"] for item in records], ["CVE-2026-0001", "CVE-2026-0002"]
+ )
+ self.assertNotEqual(records[0]["run_id"], records[1]["run_id"])
+
+ def test_the_metrics_file_is_written_when_asked(self):
+ self._main([CRITICAL_FINDING])
+ text = self.metrics.read_text() # nocheck: cache-read tempdir metrics of main()
+ self.assertIn(
+ 'infinito_hlth_runtime_findings{target="node",kind="host",image="node",'
+ 'severity="CRITICAL",scanner="grype",verdict="fail"} 1',
+ text.splitlines(),
+ )
+
+ def test_no_metrics_file_is_written_without_the_flag(self):
+ self._main([CRITICAL_FINDING], metrics=[])
+ written = list(self.root.rglob("*.prom")) # nocheck: project-walk tempdir
+ self.assertEqual(written, [])
+
+ def test_no_metrics_file_is_written_for_an_empty_flag(self):
+ self._main([CRITICAL_FINDING], metrics=["--metrics-file", ""])
+ written = list(self.root.rglob("*.prom")) # nocheck: project-walk tempdir
+ self.assertEqual(written, [])
if __name__ == "__main__":
diff --git a/tests/unit/python/roles/sys-ctl-hlth-runtime/lookup_plugins/test_cve_suppressions.py b/tests/unit/python/roles/sys-ctl-hlth-runtime/lookup_plugins/test_cve_suppressions.py
new file mode 100644
index 0000000000..5f440c4d18
--- /dev/null
+++ b/tests/unit/python/roles/sys-ctl-hlth-runtime/lookup_plugins/test_cve_suppressions.py
@@ -0,0 +1,119 @@
+from __future__ import annotations
+
+import datetime as dt
+import importlib.util
+import sys
+from unittest import TestCase, main, mock
+
+from ansible.errors import AnsibleError
+
+from utils.security.suppressions import Suppression, SuppressionError
+
+from . import PROJECT_ROOT
+
+
+def _load_module():
+ path = (
+ PROJECT_ROOT
+ / "roles"
+ / "sys-ctl-hlth-runtime"
+ / "lookup_plugins"
+ / "cve_suppressions.py"
+ )
+ spec = importlib.util.spec_from_file_location("cve_suppressions_lookup", path)
+ module = importlib.util.module_from_spec(spec)
+ assert spec and spec.loader
+ sys.modules[spec.name] = module
+ spec.loader.exec_module(module)
+ return module
+
+
+MODULE = _load_module()
+UNTIL = dt.date(2026, 12, 31)
+DECLARED = {
+ "web-app-checkmk": {
+ "checkmk": [
+ Suppression("CVE-2026-1", None, UNTIL),
+ Suppression(None, "2.4.0p39", UNTIL),
+ ]
+ },
+ "sys-ctl-hlth-runtime": {
+ "trivy": [Suppression("CVE-2026-2", None, UNTIL)],
+ "runtime": [Suppression("CVE-2026-3", None, UNTIL)],
+ },
+}
+
+
+def _declared(declared):
+ return lambda _roles_dir, role: declared.get(role, {})
+
+
+class TestCollect(TestCase):
+ def _collect(self, roles, declared=DECLARED):
+ with mock.patch.object(
+ MODULE, "role_suppressions", side_effect=_declared(declared)
+ ):
+ return MODULE.collect(roles)
+
+ def test_a_role_is_keyed_by_its_stack_name(self):
+ self.assertEqual(
+ self._collect(["web-app-checkmk"])["containers"],
+ {
+ "checkmk": {
+ "checkmk": [
+ {"id": "CVE-2026-1", "image_tag": None, "until": "2026-12-31"},
+ {"id": None, "image_tag": "2.4.0p39", "until": "2026-12-31"},
+ ]
+ }
+ },
+ )
+
+ def test_a_role_without_suppressions_is_left_out(self):
+ self.assertEqual(self._collect(["web-app-nextcloud"])["containers"], {})
+
+ def test_host_suppressions_come_from_the_engine_entries_only(self):
+ self.assertEqual(
+ self._collect([])["host"],
+ {"trivy": [{"id": "CVE-2026-2", "image_tag": None, "until": "2026-12-31"}]},
+ )
+
+ def test_an_engine_image_tag_entry_covers_its_image_not_the_host(self):
+ declared = {
+ "sys-ctl-hlth-runtime": {
+ "grype": [
+ Suppression("CVE-2026-2", None, UNTIL),
+ Suppression(None, "v0.121.0", UNTIL),
+ ]
+ }
+ }
+ collected = self._collect(["sys-ctl-hlth-runtime"], declared)
+ self.assertEqual(
+ (
+ [entry["image_tag"] for entry in collected["host"]["grype"]],
+ [
+ entry["image_tag"]
+ for entries in collected["containers"].values()
+ for entry in entries["grype"]
+ ],
+ ),
+ ([None], [None, "v0.121.0"]),
+ )
+
+
+class TestLookup(TestCase):
+ def test_group_names_must_be_a_list(self):
+ with self.assertRaises(AnsibleError):
+ MODULE.LookupModule().run([], {}, group_names="web-app-checkmk")
+
+ def test_a_malformed_suppression_fails_the_lookup(self):
+ with (
+ mock.patch.object(
+ MODULE, "role_suppressions", side_effect=SuppressionError("bad")
+ ),
+ self.assertRaisesRegex(AnsibleError, "bad"),
+ ):
+ MODULE.LookupModule().run([], {}, group_names=["web-app-checkmk"])
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/roles/test-e2e-playwright/files/test_run_parallel.py b/tests/unit/python/roles/test-e2e-playwright/files/test_run_parallel.py
index 596da9645c..08f9aa6379 100644
--- a/tests/unit/python/roles/test-e2e-playwright/files/test_run_parallel.py
+++ b/tests/unit/python/roles/test-e2e-playwright/files/test_run_parallel.py
@@ -385,7 +385,7 @@ class TestRun(unittest.TestCase):
rc=1 if name == "b" else 0,
after=["head"],
timeout=10,
- until="b" if name == "a" else None,
+ until={"a": "b", "b": "a"}.get(name),
)
(self.jobs / rp.SEALED).touch()
self.assertEqual(self._run(2), 0)
@@ -523,21 +523,28 @@ class TestRun(unittest.TestCase):
(self.jobs / rp.SEALED).touch()
runner = threading.Thread(target=self._run, args=(2,))
runner.start()
- time.sleep(0.6)
- self.assertEqual(self._stamps("start", "onion"), [])
- self.assertEqual(len(self._stamps("end", "clear")), 1)
- released = time.time()
- fcntl.flock(writer, fcntl.LOCK_UN)
- os.close(writer)
- runner.join(timeout=10)
+ try:
+ deadline = time.monotonic() + 10
+ while time.monotonic() < deadline and not (
+ self.trace.exists() and self._stamps("end", "clear")
+ ):
+ time.sleep(0.05)
+ self.assertEqual(len(self._stamps("end", "clear")), 1)
+ self.assertEqual(self._stamps("start", "onion"), [])
+ released = time.time()
+ finally:
+ fcntl.flock(writer, fcntl.LOCK_UN)
+ os.close(writer)
+ runner.join(timeout=10)
self.assertGreaterEqual(self._stamps("start", "onion")[0], released)
def test_onion_jobs_share_tor_with_each_other(self):
self._job(0, "onion-a", 0.1, tor=True, timeout=10, until="onion-b")
- self._job(1, "onion-b", 0.1, tor=True)
+ self._job(1, "onion-b", 0.1, tor=True, timeout=10, until="onion-a")
(self.jobs / rp.SEALED).touch()
self.assertEqual(self._run(2), 0)
self.assertFalse(self._result("onion-a")["timed_out"])
+ self.assertFalse(self._result("onion-b")["timed_out"])
self.assertEqual(self._peak(), 2)
def test_onion_jobs_stay_within_the_tor_cap(self):
@@ -548,7 +555,7 @@ class TestRun(unittest.TestCase):
0.4,
tor=True,
timeout=10,
- until="clear" if name == "onion-a" else None,
+ until="clear",
)
self._job(3, "clear", 0.4)
(self.jobs / rp.SEALED).touch()
diff --git a/tests/unit/python/roles/test-e2e-playwright/test_budget_timeout_not_retried.py b/tests/unit/python/roles/test-e2e-playwright/test_budget_timeout_not_retried.py
index 426a1f2795..24f73463b0 100644
--- a/tests/unit/python/roles/test-e2e-playwright/test_budget_timeout_not_retried.py
+++ b/tests/unit/python/roles/test-e2e-playwright/test_budget_timeout_not_retried.py
@@ -43,7 +43,9 @@ def stash_facts(failures: list[str], budget_timeouts: list[str]) -> dict[str, An
failures: every role the first pass recorded as failed.
budget_timeouts: those of them killed by the suite budget.
"""
- env = jinja2.Environment(autoescape=False) # noqa: S701 - renders a task's own list expression, not markup
+ env = jinja2.Environment(
+ autoescape=jinja2.select_autoescape(default_for_string=False)
+ )
env.filters.update(FilterModule().filters())
tasks = load_yaml_str(read_text(str(ORCHESTRATE)))
diff --git a/tests/unit/python/roles/test-e2e-playwright/test_env_canonical_domain.py b/tests/unit/python/roles/test-e2e-playwright/test_env_canonical_domain.py
index 3694d07830..e8c6dc34f4 100644
--- a/tests/unit/python/roles/test-e2e-playwright/test_env_canonical_domain.py
+++ b/tests/unit/python/roles/test-e2e-playwright/test_env_canonical_domain.py
@@ -4,7 +4,7 @@ import json
import unittest
from urllib.parse import urlsplit
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from plugins.filter.dotenv import dotenv_quote
from plugins.filter.network_of import in_network, network_of, network_suffixes
@@ -26,7 +26,11 @@ TOR = [f"api.s3.{NODE}", f"console.s3.{NODE}"]
def render(pass_domain: str) -> str:
tasks = load_yaml_any(str(TASKS))
task = next(t for t in tasks if t.get("name") == TASK_NAME)
- env = Environment(autoescape=False, trim_blocks=True, undefined=StrictUndefined) # noqa: S701 - dotenv file, not markup
+ env = Environment(
+ autoescape=select_autoescape(default_for_string=False),
+ trim_blocks=True,
+ undefined=StrictUndefined,
+ )
env.filters.update(
dotenv_quote=dotenv_quote,
in_network=in_network,
diff --git a/tests/unit/python/roles/web-app-baserow/vars/test_database_keepalive.py b/tests/unit/python/roles/web-app-baserow/vars/test_database_keepalive.py
index 02311d6159..2b23f5a09d 100644
--- a/tests/unit/python/roles/web-app-baserow/vars/test_database_keepalive.py
+++ b/tests/unit/python/roles/web-app-baserow/vars/test_database_keepalive.py
@@ -2,7 +2,7 @@ from __future__ import annotations
import unittest
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from psycopg2.extensions import parse_dsn
from utils.cache.yaml import load_yaml
@@ -16,7 +16,10 @@ _SWARM_IPVS_IDLE_TIMEOUT_SECONDS = 900
class TestDatabaseUrlKeepalive(unittest.TestCase):
def _connection_parameters(self) -> dict[str, str]:
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders a connection URI, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
url = env.from_string(
load_yaml(str(_ROLE_VARS))["BASEROW_DATABASE_URL"]
).render(
diff --git a/tests/unit/python/roles/web-app-dashboard/test_branding_mirror_origin.py b/tests/unit/python/roles/web-app-dashboard/test_branding_mirror_origin.py
index d15d790834..a115291e67 100644
--- a/tests/unit/python/roles/web-app-dashboard/test_branding_mirror_origin.py
+++ b/tests/unit/python/roles/web-app-dashboard/test_branding_mirror_origin.py
@@ -2,7 +2,7 @@ from __future__ import annotations
import unittest
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from plugins.filter.mirror_filters import external_asset_origins
from utils.cache.files import PROJECT_ROOT, read_text
@@ -23,7 +23,10 @@ def _mirror_origins(asset_url: str) -> list[str]:
raise AssertionError(f"img-src renders an unexpected lookup{terms}")
return asset_url
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders an ansible var expression, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
img_src = load_yaml_str(read_text(str(CSP)))["whitelist"]["img-src"]
rendered = [env.from_string(token).render(lookup=lookup) for token in img_src]
applications = {APPLICATION_ID: {"csp": {"whitelist": {"img-src": rendered}}}}
diff --git a/tests/unit/python/roles/web-app-keycloak/templates/test_admin_allowlist.py b/tests/unit/python/roles/web-app-keycloak/templates/test_admin_allowlist.py
index 0e507cf7e7..40a29fd636 100644
--- a/tests/unit/python/roles/web-app-keycloak/templates/test_admin_allowlist.py
+++ b/tests/unit/python/roles/web-app-keycloak/templates/test_admin_allowlist.py
@@ -82,7 +82,6 @@ def stub_lookup(networks, deployment_mode: str = "compose"):
f"127.0.0.1:{kwargs['local_port']}",
deployment_mode,
tail=kwargs["tail"],
- location=kwargs["location"],
)
raise AssertionError(f"unexpected lookup({kind!r}, ...)")
@@ -174,7 +173,7 @@ def location_block(rendered: str, path: str) -> tuple[str, list[str]]:
path: the path the location's matcher names, modifier excluded.
"""
for match in re.finditer(
- r"^location\s+([^{\n]+?)\s*\{([^{}]*)\}", rendered, re.MULTILINE
+ r"^location\s+([^{\n]+?)\s*\{((?:[^{}]|\{[^{}]*\})*)\}", rendered, re.MULTILINE
):
matcher = match.group(1).strip()
if matcher.split()[-1] == path:
@@ -268,9 +267,16 @@ class TestRestrictedLocation(unittest.TestCase):
def test_compose_passes_the_request_path_unchanged(self):
_, directives = location_block(render(list(NETWORKS)), "/admin")
- self.assertIn(
- f"proxy_pass http://127.0.0.1:{LOCAL_HTTP_PORT}/admin;", directives
- )
+ self.assertIn(f"proxy_pass http://127.0.0.1:{LOCAL_HTTP_PORT};", directives)
+
+ def test_dot_dot_semicolon_paths_never_reach_the_upstream(self):
+ for mode in ("compose", "swarm"):
+ with self.subTest(mode=mode):
+ _, directives = location_block(render(list(NETWORKS), mode), "/admin")
+ self.assertIn(
+ 'if ($request_uri ~* "(^|/)(\\.|%2e){2}(;|%3b)") {', directives
+ )
+ self.assertIn("return 400;", directives)
def test_swarm_passes_the_raw_request_uri(self):
_, directives = location_block(render(list(NETWORKS), "swarm"), "/admin")
diff --git a/tests/unit/python/roles/web-app-matrix/test_telegram_gate.py b/tests/unit/python/roles/web-app-matrix/test_telegram_gate.py
index 768c2736c8..10da5d88c9 100644
--- a/tests/unit/python/roles/web-app-matrix/test_telegram_gate.py
+++ b/tests/unit/python/roles/web-app-matrix/test_telegram_gate.py
@@ -14,7 +14,7 @@ import unittest
from pathlib import Path
from typing import ClassVar
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from utils import PROJECT_ROOT
from utils.cache.yaml import load_yaml, load_yaml_any
@@ -49,7 +49,10 @@ class TestTelegramGate(unittest.TestCase):
what ``lookup('config', ...)`` answers.
"""
credentials = context.pop("credentials", "")
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders an ansible var expression, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.filters["bool"] = _ansible_bool
env.globals["lookup"] = lambda *_a, **_kw: credentials
return env.from_string(self.variables[key]).render(
diff --git a/tests/unit/python/roles/web-app-nextcloud/test_talk_version_pins.py b/tests/unit/python/roles/web-app-nextcloud/test_talk_version_pins.py
index fddc1a2e78..5bcb18adb8 100644
--- a/tests/unit/python/roles/web-app-nextcloud/test_talk_version_pins.py
+++ b/tests/unit/python/roles/web-app-nextcloud/test_talk_version_pins.py
@@ -15,12 +15,36 @@ ROLE = "web-app-nextcloud"
SERVICES_FILE = PROJECT_ROOT / "roles" / ROLE / ROLE_FILE_META_SERVICES
JANUS = "https://github.com/meetecho/janus-gateway.git"
RECORDING = "https://github.com/nextcloud/nextcloud-talk-recording.git"
+NEWER_HEAD = "f" * 40
+FOREIGN_VARIANT_TAG = "1000.0.0-foreign"
def _pinned(service: str, key: str) -> str:
return str(load_yaml_any(str(SERVICES_FILE))[service][key])
+def _outranking(pin: str) -> str:
+ """
+ Args:
+ pin: a pinned image tag or git ref.
+
+ Returns:
+ ``pin`` with its leading version raised to ``999.0...`` of the same
+ depth, so prefix, variant and patch suffix stay the pin's own and the
+ result outranks every real release; a commit SHA yields a newer tip.
+ """
+ if repository.is_commit_sha(pin):
+ return NEWER_HEAD
+ return re.sub(
+ r"^(v?)(\d+(?:\.\d+)*)",
+ lambda match: (
+ match.group(1) + ".".join(["999"] + ["0"] * match.group(2).count("."))
+ ),
+ pin,
+ count=1,
+ )
+
+
class TestTalkPinsAreWatched(unittest.TestCase):
IMAGES: ClassVar[dict[str, str]] = {
"talk_signaling": "strukturag/nextcloud-spreed-signaling",
@@ -66,26 +90,38 @@ class TestTalkPinsAreWatched(unittest.TestCase):
self.assertNotIn("nocheck", line)
def test_a_newer_upstream_release_is_reported_for_every_pin(self):
- newer = {
- "strukturag/nextcloud-spreed-signaling": ["2.1.1", "9.0.0", "9.0.0-proxy"],
- "nats": ["2.12.6-alpine", "9.0.0-alpine", "9.1.0"],
- "alpine": ["3.23.3", "9.0.0"],
- "python": ["3.14.3-alpine3.23", "3.14.9-alpine3.23", "3.15.0-slim"],
+ newer: dict[str, list[str]] = {}
+ for entry in docker.collect_entries(PROJECT_ROOT):
+ if entry.role == ROLE:
+ newer.setdefault(entry.image, [FOREIGN_VARIANT_TAG]).extend(
+ [entry.version, _outranking(entry.version)]
+ )
+ pinned_refs = {service: _pinned(service, "ref") for service in self.REFS}
+ tags = {
+ self.REFS[service]: [ref, _outranking(ref)]
+ for service, ref in pinned_refs.items()
}
- tags = {JANUS: ["v1.4.0", "v9.0.0"], RECORDING: ["v0.2.1", "v9.0.0"]}
+ heads = {self.REFS[service]: NEWER_HEAD for service in pinned_refs}
with (
mock.patch.dict(os.environ, {"INFINITO_WORKER_FETCH": "2"}),
mock.patch.object(
docker, "fetch_dockerhub_tags", lambda image: newer.get(image, [])
),
- mock.patch.object(docker, "fetch_ghcr_tags", lambda image: []),
- mock.patch.object(docker, "fetch_mcr_tags", lambda image: []),
mock.patch.object(
- docker, "fetch_registry_tags", lambda image, last=None: []
+ docker, "fetch_ghcr_tags", lambda image: newer.get(image, [])
+ ),
+ mock.patch.object(
+ docker, "fetch_mcr_tags", lambda image: newer.get(image, [])
+ ),
+ mock.patch.object(
+ docker,
+ "fetch_registry_tags",
+ lambda image, last=None: newer.get(image, []),
),
mock.patch.object(
repository, "git_ls_remote_tags", lambda url: tags.get(url, [])
),
+ mock.patch.object(repository, "git_ls_remote_head", heads.get),
):
images = {
(update.entry.service, update.latest)
@@ -99,15 +135,16 @@ class TestTalkPinsAreWatched(unittest.TestCase):
}
self.assertTrue(
{
- ("talk_signaling", "9.0.0"),
- ("talk_nats", "9.0.0-alpine"),
- ("talk", "9.0.0"),
- ("talk_recording", "3.14.9-alpine3.23"),
+ (service, _outranking(_pinned(service, "version")))
+ for service in self.IMAGES
}
<= images,
images,
)
- self.assertEqual(refs, {(("talk",), "v9.0.0"), (("talk_recording",), "v9.0.0")})
+ self.assertEqual(
+ refs,
+ {((service,), _outranking(ref)) for service, ref in pinned_refs.items()},
+ )
def test_negative_control_current_tags_report_nothing(self):
current = {
diff --git a/tests/unit/python/roles/web-app-openclaw/test_control_ui_origins.py b/tests/unit/python/roles/web-app-openclaw/test_control_ui_origins.py
index 5c92cf576d..4a16b732be 100644
--- a/tests/unit/python/roles/web-app-openclaw/test_control_ui_origins.py
+++ b/tests/unit/python/roles/web-app-openclaw/test_control_ui_origins.py
@@ -3,7 +3,7 @@ from __future__ import annotations
import json
import unittest
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from plugins.filter.mcp.authorization import FilterModule as McpFilterModule
from utils.cache.files import PROJECT_ROOT, read_text
@@ -19,7 +19,10 @@ ONION_URL = f"http://claw.ai.{NODE_ONION}"
def _environment() -> Environment:
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders JSON and an ansible var expression, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.filters.update(McpFilterModule().filters())
env.filters.update({"to_json": json.dumps, "bool": bool})
return env
diff --git a/tests/unit/python/roles/web-app-pgadmin/files/test_realign_admin_password.py b/tests/unit/python/roles/web-app-pgadmin/files/test_realign_admin_password.py
index 6084912ca3..c0c840ff9a 100644
--- a/tests/unit/python/roles/web-app-pgadmin/files/test_realign_admin_password.py
+++ b/tests/unit/python/roles/web-app-pgadmin/files/test_realign_admin_password.py
@@ -571,7 +571,7 @@ class TestTaskHandover(unittest.TestCase):
def render(self, source: str, password: str) -> str:
environment = jinja2.Environment(
- autoescape=False, # noqa: S701 - renders a shell task, not markup
+ autoescape=jinja2.select_autoescape(default_for_string=False),
undefined=jinja2.StrictUndefined,
)
environment.filters["b64encode"] = ansible_b64encode
diff --git a/tests/unit/python/roles/web-svc-libretranslate/test_gpu_gate.py b/tests/unit/python/roles/web-svc-libretranslate/test_gpu_gate.py
index 4b48cda070..2fd549d7c8 100644
--- a/tests/unit/python/roles/web-svc-libretranslate/test_gpu_gate.py
+++ b/tests/unit/python/roles/web-svc-libretranslate/test_gpu_gate.py
@@ -13,7 +13,7 @@ import unittest
from pathlib import Path
from typing import ClassVar
-from jinja2 import Environment, StrictUndefined
+from jinja2 import Environment, StrictUndefined, select_autoescape
from utils import PROJECT_ROOT
from utils.cache.yaml import load_yaml
@@ -46,7 +46,10 @@ class TestGpuGate(unittest.TestCase):
The rendered string and the ``(name, terms)`` of every lookup.
"""
asked: list = []
- env = Environment(undefined=StrictUndefined, autoescape=False) # noqa: S701 - renders an ansible var expression, not markup
+ env = Environment(
+ undefined=StrictUndefined,
+ autoescape=select_autoescape(default_for_string=False),
+ )
env.filters["bool"] = _ansible_bool
def _lookup(name, *terms, **_kwargs):
diff --git a/tests/unit/python/scripts/tests/deploy/act/test_workflow.py b/tests/unit/python/scripts/tests/deploy/act/test_workflow.py
index c79bddf97c..e5e6c86555 100644
--- a/tests/unit/python/scripts/tests/deploy/act/test_workflow.py
+++ b/tests/unit/python/scripts/tests/deploy/act/test_workflow.py
@@ -11,6 +11,7 @@ from utils.cache.files import PROJECT_ROOT
SCRIPT = PROJECT_ROOT / "scripts" / "tests" / "deploy" / "act" / "workflow.sh"
ACT_STUB = '#!/usr/bin/env bash\nprintf \'%s\\0\' "$@" >"${STUB_LOG}"\n'
+DB_ENV = "INFINITO_VULNERABILITY_DB_HOST_PATH"
EXTRA_VARS = json.dumps(
{
"applications": {
@@ -21,8 +22,59 @@ EXTRA_VARS = json.dumps(
)
+def run_act(
+ db_host_path: str | None, act_env: str = ""
+) -> tuple[subprocess.CompletedProcess, list[str], Path, bool]:
+ """Run the wrapper against an ``act`` stub that records its argv.
+
+ Args:
+ db_host_path: value of ``INFINITO_VULNERABILITY_DB_HOST_PATH`` below a
+ scratch directory, or None to leave it unset.
+ act_env: value of ``ACT_ENV``.
+
+ Returns:
+ The finished process, the argv act received (one list item per
+ argument), the shared database directory the run was given, and
+ whether it existed afterwards.
+ """
+ with tempfile.TemporaryDirectory() as tmp:
+ stub = Path(tmp) / "act"
+ stub.write_text(ACT_STUB)
+ stub.chmod(0o755)
+ log = Path(tmp) / "act.argv"
+ log.touch()
+ workflow = Path(tmp) / "call-test-deploy.yml"
+ workflow.write_text("on: workflow_dispatch\njobs: {}\n")
+ env = {
+ k: v
+ for k, v in os.environ.items()
+ if k not in ("BASH_ENV", DB_ENV, "ACT_CONTAINER_OPTIONS")
+ }
+ env.update(
+ PATH=f"{tmp}{os.pathsep}{os.environ['PATH']}",
+ STUB_LOG=str(log),
+ ACT_WORKFLOW=str(workflow),
+ ACT_ENV=act_env,
+ ACT_ACTION_CACHE_PATH=str(Path(tmp) / "actcache"),
+ INFINITO_CONTAINER="infinito-test",
+ ACT_PLATFORM_IMAGE="catthehacker/ubuntu:act-latest",
+ )
+ shared = Path(tmp) / "cache" / (db_host_path or "unset")
+ if db_host_path is not None:
+ env[DB_ENV] = str(shared)
+ done = subprocess.run(
+ ["bash", str(SCRIPT)],
+ env=env,
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+ argv = log.read_text().split("\0")[:-1] # nocheck: cache-read stub argv log
+ return done, argv, shared, shared.is_dir()
+
+
def act_argv(act_env: str) -> list[str]:
- """Run the act wrapper against an ``act`` stub and return the argv it got.
+ """Run the act wrapper and return the argv the stub got.
Args:
act_env: value of ``ACT_ENV``.
@@ -30,43 +82,64 @@ def act_argv(act_env: str) -> list[str]:
Returns:
The arguments the stub received, one list item per argument.
"""
- with tempfile.TemporaryDirectory() as tmp:
- stub = Path(tmp) / "act"
- stub.write_text(ACT_STUB)
- stub.chmod(0o755)
- workflow = Path(tmp) / "call-test-deploy.yml"
- workflow.write_text("on: workflow_dispatch\n")
- log = Path(tmp) / "act.argv"
- env = {k: v for k, v in os.environ.items() if k != "BASH_ENV"}
- env.update(
- PATH=f"{tmp}{os.pathsep}{os.environ['PATH']}",
- STUB_LOG=str(log),
- ACT_WORKFLOW=str(workflow),
- ACT_ENV=act_env,
- ACT_ACTION_CACHE_PATH=str(Path(tmp) / "actcache"),
- ACT_PLATFORM_IMAGE="catthehacker/ubuntu:act-latest",
- INFINITO_CONTAINER="infinito-test",
- )
- subprocess.run(
- ["bash", str(SCRIPT)],
- env=env,
- capture_output=True,
- text=True,
- check=True,
- )
- return log.read_text().split("\0")[:-1] # nocheck: cache-read stub argv log
+ done, argv, _shared, _created = run_act("vulnerability-db", act_env)
+ done.check_returncode()
+ return argv
+
+
+def option(argv: list[str], flag: str) -> list[str]:
+ return [argv[index + 1] for index, value in enumerate(argv[:-1]) if value == flag]
def env_items(argv: list[str]) -> list[str]:
- """Collect the values passed behind each ``--env`` flag.
+ """Collect the ``ACT_ENV`` values passed behind each ``--env`` flag.
Args:
argv: arguments the act stub received.
Returns:
- Every ``--env`` value in order.
+ Every ``--env`` value in order, without the wrapper's own
+ ``INFINITO_VULNERABILITY_DB_HOST_PATH`` pin.
"""
- return [argv[i + 1] for i, arg in enumerate(argv) if arg == "--env"]
+ return [
+ value for value in option(argv, "--env") if not value.startswith(f"{DB_ENV}=")
+ ]
+
+
+class TestVulnerabilityDatabaseBind(unittest.TestCase):
+ def test_the_shared_databases_sit_at_the_host_path_in_the_job_container(
+ self,
+ ) -> None:
+ done, argv, shared, _created = run_act("vulnerability-db")
+ self.assertEqual(done.returncode, 0, done.stderr)
+ self.assertIn(
+ f"--volume {shared}:{shared}", option(argv, "--container-options")[0]
+ )
+
+ def test_the_job_steps_receive_the_host_path(self) -> None:
+ _done, argv, shared, _created = run_act("vulnerability-db")
+ self.assertIn(f"{DB_ENV}={shared}", option(argv, "--env"))
+
+ def test_the_directory_exists_before_act_binds_it(self) -> None:
+ _done, _argv, _shared, created = run_act("vulnerability-db")
+ self.assertTrue(created)
+
+ def test_the_job_container_keeps_the_host_daemon_socket(self) -> None:
+ _done, argv, _shared, _created = run_act("vulnerability-db")
+ self.assertNotIn("--container-daemon-socket", argv)
+
+ def test_the_default_options_survive(self) -> None:
+ _done, argv, _shared, _created = run_act("vulnerability-db")
+ self.assertTrue(
+ option(argv, "--container-options")[0].startswith(
+ "--privileged --label infinito.worktree=infinito-test "
+ )
+ )
+
+ def test_an_unset_host_path_starts_no_act_run(self) -> None:
+ done, argv, _shared, created = run_act(None)
+ self.assertNotEqual(done.returncode, 0)
+ self.assertEqual((argv, created), ([], False))
class TestActWorkflowEnv(unittest.TestCase):
diff --git a/tests/unit/python/utils/docker/test_image_runtime.py b/tests/unit/python/utils/docker/test_image_runtime.py
deleted file mode 100644
index 077659ce38..0000000000
--- a/tests/unit/python/utils/docker/test_image_runtime.py
+++ /dev/null
@@ -1,274 +0,0 @@
-from __future__ import annotations
-
-import io
-import json
-import tempfile
-from pathlib import Path
-from unittest import TestCase, main, mock
-
-from utils.docker.image import runtime
-
-FLOORS = {"8.2": "8.2.35", "8.3": "8.3.36", "8.4": "8.4.27", "8.5": "8.5.12"}
-
-
-def _php(version=None, lines=(), packages=()):
- return runtime.PhpRuntime(
- version=version, lines=tuple(lines), packages=tuple(packages)
- )
-
-
-class TestPhpRuntime(TestCase):
- def test_reads_php_version_from_an_env_instruction(self):
- self.assertEqual(
- runtime.php_runtime(
- ["ENV PHP_INI_DIR=/usr/local/etc/php", "ENV PHP_VERSION=8.4.15"]
- ),
- _php("8.4.15"),
- )
-
- def test_the_last_php_version_wins(self):
- self.assertEqual(
- runtime.php_runtime(
- ["ENV PHP_VERSION=8.3.1", "ENV PHP_VERSION=8.4.27"]
- ).version,
- "8.4.27",
- )
-
- def test_alpine_packages_name_their_line(self):
- found = runtime.php_runtime(
- ["RUN /bin/sh -c apk add php83 php83-fpm php83-ldap"]
- )
- self.assertEqual(found, _php(lines=["8.3"]))
-
- def test_debian_packages_name_their_line(self):
- found = runtime.php_runtime(
- ["RUN apt-get install -y php8.4-cli libapache2-mod-php8.4 php8.4-ldap"]
- )
- self.assertEqual(found, _php(lines=["8.4"]))
-
- def test_an_unversioned_alpine_php7_package_names_its_major(self):
- self.assertEqual(
- runtime.php_runtime(["RUN apk add php7 php7-fpm"]), _php(lines=["7"])
- )
-
- def test_a_php_base_build_argument_names_its_line(self):
- self.assertEqual(
- runtime.php_runtime(
- ["ARG PHP_BASE=7.4", "RUN |1 PHP_BASE=7.4 /bin/bash -c build"]
- ),
- _php(lines=["7.4"]),
- )
-
- def test_a_php_directory_outside_a_package_install_is_not_php(self):
- self.assertIsNone(
- runtime.php_runtime(
- ["COPY /app/snuffleupagus.so /usr/lib/php83/modules/ # buildkit"]
- )
- )
-
- def test_apk_options_before_add_still_name_the_line(self):
- self.assertEqual(
- runtime.php_runtime(["RUN apk --no-cache add php7 php7-fpm"]),
- _php(lines=["7"]),
- )
-
- def test_apk_in_a_path_or_comment_is_no_package_install(self):
- for instruction in (
- "RUN rm -rf /var/cache/apk/* && cp php7 /srv/add",
- "RUN echo php7 # apk cache: add nothing",
- ):
- with self.subTest(instruction=instruction):
- self.assertIsNone(runtime.php_runtime([instruction]))
-
- def test_a_pinned_alpine_package_names_its_line(self):
- found = runtime.php_runtime(["RUN apk add --no-cache php84=8.4.27-r0 nginx;"])
- self.assertEqual(found, _php(lines=["8.4"]))
-
- def test_php_paths_are_not_packages(self):
- self.assertIsNone(
- runtime.php_runtime(
- ['RUN mkdir -p "$PHP_INI_DIR/conf.d" /usr/local/etc/php']
- )
- )
-
- def test_an_unversioned_debian_runtime_package_is_php(self):
- self.assertEqual(
- runtime.php_runtime(["RUN apt-get install -y php-cli"]),
- _php(packages=["php-cli"]),
- )
-
- def test_unversioned_runtime_packages_are_php(self):
- found = runtime.php_runtime(
- [
- "RUN dnf install -y php php-fpm php-mysqlnd",
- "RUN apt-get install -y libapache2-mod-php php-cgi=2:8.2+93 \\",
- ]
- )
- self.assertEqual(
- found, _php(packages=["libapache2-mod-php", "php", "php-cgi", "php-fpm"])
- )
-
- def test_php_libraries_extensions_and_paths_are_not_a_runtime(self):
- self.assertIsNone(
- runtime.php_runtime(
- [
- (
- "RUN apt-get install -y php-common php-pear php-mysql phpmyadmin"
- " && docker-php-ext-install gd && cp php-fpm.conf /etc/php-fpm.d/"
- )
- ]
- )
- )
-
- def test_an_image_without_php_has_no_runtime(self):
- self.assertIsNone(
- runtime.php_runtime(
- ["ENV PG_VERSION=17.2", "RUN apt-get install -y postgresql"]
- )
- )
-
-
-class TestPhpFinding(TestCase):
- def test_a_version_below_its_floor_is_a_finding(self):
- self.assertIn(
- "below the security floor 8.4.27",
- runtime.php_finding(_php("8.4.15"), FLOORS),
- )
-
- def test_a_version_at_its_floor_is_fine(self):
- self.assertIsNone(runtime.php_finding(_php("8.2.35"), FLOORS))
-
- def test_php_8_1_is_end_of_life(self):
- self.assertIn(
- "end-of-life line 8.1", runtime.php_finding(_php("8.1.34"), FLOORS)
- )
-
- def test_a_line_newer_than_every_floor_is_fine(self):
- self.assertIsNone(runtime.php_finding(_php("8.6.0"), FLOORS))
-
- def test_a_distro_php7_is_end_of_life(self):
- self.assertEqual(
- runtime.php_finding(_php(lines=["7"]), FLOORS), "line 7 is end of life"
- )
-
- def test_a_distro_php_8_1_is_end_of_life(self):
- self.assertEqual(
- runtime.php_finding(_php(lines=["8.1"]), FLOORS), "line 8.1 is end of life"
- )
-
- def test_a_supported_distro_line_is_no_finding(self):
- self.assertIsNone(runtime.php_finding(_php(lines=["8.3"]), FLOORS))
-
- def test_an_eol_line_fails_next_to_a_patched_php_version(self):
- self.assertEqual(
- runtime.php_finding(_php("8.4.27", lines=["7"]), FLOORS),
- "line 7 is end of life",
- )
-
- def test_a_php_version_below_its_floor_outranks_an_eol_line(self):
- self.assertIn(
- "below the security floor 8.4.27",
- runtime.php_finding(_php("8.4.15", lines=["7"]), FLOORS),
- )
-
- def test_an_unversioned_package_alone_is_no_finding(self):
- self.assertIsNone(runtime.php_finding(_php(packages=["php-cli"]), FLOORS))
-
-
-class TestLoadPhpFloors(TestCase):
- def test_reads_the_php_floors_from_the_vars_file(self):
- with tempfile.TemporaryDirectory() as tmp:
- path = Path(tmp) / "main.yml"
- path.write_text(
- "HEALTH_RUNTIME_FLOORS:\n php:\n '8.4': '8.4.27'\n",
- encoding="utf-8",
- )
- with mock.patch.object(runtime, "FLOORS_FILE", path):
- self.assertEqual(runtime.load_php_floors(), {"8.4": "8.4.27"})
-
-
-class TestBuildInstructions(TestCase):
- def test_a_docker_hub_tag_is_read_through_the_hub_api(self):
- with (
- mock.patch.object(
- runtime, "_hub_instructions", return_value=["ENV A=1"]
- ) as hub,
- mock.patch.object(runtime, "config_blob") as blob,
- ):
- found = runtime.build_instructions(
- "docker.io/wordpress", "6.8", os_name="linux", architecture="amd64"
- )
- self.assertEqual(found, ["ENV A=1"])
- hub.assert_called_once_with("library/wordpress", "6.8", "linux", "amd64")
- blob.assert_not_called()
-
- def test_another_registry_is_read_through_the_config_blob(self):
- blob = {
- "history": [{"created_by": "RUN apk add php84"}],
- "config": {"Env": ["PHP_VERSION=8.4.27"]},
- }
- with mock.patch.object(runtime, "config_blob", return_value=blob):
- found = runtime.build_instructions(
- "ghcr.io/acme/app", "1.0", os_name="linux", architecture="amd64"
- )
- self.assertEqual(found, ["RUN apk add php84", "ENV PHP_VERSION=8.4.27"])
-
- def test_a_docker_hub_digest_pin_is_read_through_the_config_blob(self):
- with (
- mock.patch.object(runtime, "_hub_instructions") as hub,
- mock.patch.object(runtime, "config_blob", return_value=None),
- ):
- found = runtime.build_instructions(
- "docker.io/acme/app",
- "sha256:" + "a" * 64,
- os_name="linux",
- architecture="amd64",
- )
- self.assertIsNone(found)
- hub.assert_not_called()
-
-
-class TestHubInstructions(TestCase):
- def _respond(self, payload):
- response = mock.MagicMock()
- response.__enter__.return_value = io.BytesIO(json.dumps(payload).encode())
- return mock.patch.object(
- runtime.urllib.request, "urlopen", return_value=response
- )
-
- def test_picks_the_layers_of_the_requested_platform(self):
- payload = [
- {
- "os": "linux",
- "architecture": "arm64",
- "layers": [{"instruction": "ENV PHP_VERSION=1"}],
- },
- {
- "os": "linux",
- "architecture": "amd64",
- "layers": [{"instruction": "ENV PHP_VERSION=2"}],
- },
- ]
- with self._respond(payload):
- found = runtime._hub_instructions("library/php", "8.4", "linux", "amd64")
- self.assertEqual(found, ["ENV PHP_VERSION=2"])
-
- def test_a_tag_without_the_platform_is_unanswered(self):
- with self._respond([{"os": "linux", "architecture": "arm64", "layers": []}]):
- self.assertIsNone(
- runtime._hub_instructions("library/php", "8.4", "linux", "amd64")
- )
-
- def test_a_network_error_is_unanswered(self):
- with mock.patch.object(
- runtime.urllib.request,
- "urlopen",
- side_effect=runtime.urllib.error.URLError("down"),
- ):
- self.assertIsNone(
- runtime._hub_instructions("library/php", "8.4", "linux", "amd64")
- )
-
-
-if __name__ == "__main__":
- main()
diff --git a/tests/unit/python/utils/docker/test_registry.py b/tests/unit/python/utils/docker/test_registry.py
index fe91eac26e..f5724fdd2a 100644
--- a/tests/unit/python/utils/docker/test_registry.py
+++ b/tests/unit/python/utils/docker/test_registry.py
@@ -318,5 +318,40 @@ class TestFetchManifest(unittest.TestCase):
self.assertEqual(registry.fetch_manifest("img", "1"), {"layers": []})
+_PLATFORMS = (
+ {"digest": "sha256:arm", "platform": {"os": "linux", "architecture": "arm64"}},
+ {"digest": "sha256:amd", "platform": {"os": "linux", "architecture": "amd64"}},
+)
+
+
+class TestImagePlatformDigest(unittest.TestCase):
+ def _digest(self, manifest, head):
+ with (
+ mock.patch.object(registry, "fetch_manifest", return_value=manifest),
+ mock.patch.object(registry, "_request", return_value=head),
+ ):
+ return registry.image_platform_digest(
+ "ghcr.io/o/r", "1", os_name="linux", architecture="amd64"
+ )
+
+ def test_an_index_resolves_to_the_platform_manifest(self) -> None:
+ self.assertEqual(
+ self._digest({"manifests": list(_PLATFORMS)}, None), "sha256:amd"
+ )
+
+ def test_a_single_manifest_answers_with_its_content_digest(self) -> None:
+ headers = Message()
+ headers["Docker-Content-Digest"] = "sha256:single"
+ self.assertEqual(
+ self._digest({"layers": []}, (200, headers, None)), "sha256:single"
+ )
+
+ def test_an_unreachable_registry_is_indeterminate(self) -> None:
+ self.assertIsNone(self._digest(None, None))
+
+ def test_an_index_without_the_platform_is_indeterminate(self) -> None:
+ self.assertIsNone(self._digest({"manifests": list(_PLATFORMS[:1])}, None))
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/tests/unit/python/utils/github/variant/test_axes.py b/tests/unit/python/utils/github/variant/test_axes.py
index eaf5dbc0db..09a1c21bd3 100644
--- a/tests/unit/python/utils/github/variant/test_axes.py
+++ b/tests/unit/python/utils/github/variant/test_axes.py
@@ -2,8 +2,10 @@ from __future__ import annotations
import unittest
import unittest.mock as mock
+from typing import ClassVar
from utils.github.variant import axes, network, pins, pools
+from utils.packages.schema import PackagesShapeError
from utils.roles.display import display_names
from utils.roles.mapping import (
ROLE_FILE_META_DOMAINS,
@@ -805,6 +807,40 @@ class TestDistroAndFilesystemAxes(unittest.TestCase):
)
+class TestEngineAxis(unittest.TestCase):
+ def _entries(self, count: int, sweep: int, **kwargs) -> list[dict[str, str]]:
+ names = [f"web-app-engine{index}" for index in range(count)]
+ return _assign(
+ [_row(name, 0, ("compose",)) for name in names],
+ sweep=sweep,
+ network_input="auto",
+ variants_per_app={name: [{"services": {}}] for name in names},
+ **kwargs,
+ )
+
+ def test_every_row_draws_a_scanner(self) -> None:
+ entries = self._entries(40, 0)
+ self.assertEqual({e["engine"] for e in entries}, set(pools.ENGINES))
+
+ def test_the_sweep_moves_a_row_on_to_the_next_engine(self) -> None:
+ picks = {
+ self._entries(1, sweep)[0]["engine"] for sweep in range(len(pools.ENGINES))
+ }
+ self.assertEqual(picks, set(pools.ENGINES))
+
+ def test_the_engine_never_moves_in_lockstep_with_the_distro(self) -> None:
+ entries = self._entries(60, 0, distros=("arch", "debian", "ubuntu"))
+ self.assertEqual(len({(e["distro"], e["engine"]) for e in entries}), 9)
+
+ def test_the_label_carries_the_engine_glyph(self) -> None:
+ entry = self._entries(1, 0)[0]
+ self.assertIn(to_emoji(entry["engine"]), entry["label"])
+
+ def test_the_engine_is_read_back_from_the_label(self) -> None:
+ entry = self._entries(1, 0)[0]
+ self.assertEqual(axes.parse_label(entry["label"]).engine, entry["engine"])
+
+
class TestSortKey(unittest.TestCase):
def _entries(self) -> list[dict[str, str]]:
rows = [
@@ -1022,6 +1058,98 @@ class TestArchitectureAxis(unittest.TestCase):
):
_assign(rows, sweep=0, network_input="auto", variants_per_app=_VARIANTS)
+ _CENTOS_AMD64_ONLY: ClassVar[dict] = {"web-app-b": {"centos": frozenset({"amd64"})}}
+
+ def _pairs(self, rows, published, sweeps=range(1)) -> set[tuple[str, str]]:
+ with mock.patch.object(pins, "published_architectures", return_value=published):
+ return {
+ (entry["distro"], entry["architecture"])
+ for sweep in sweeps
+ for entry in _assign(
+ rows,
+ sweep=sweep,
+ network_input="clearnet",
+ variants_per_app=_VARIANTS,
+ )
+ }
+
+ def test_an_unpublished_pair_is_never_planned_and_every_other_is(self) -> None:
+ rows = [_row("web-app-b", index, ("compose",)) for index in range(10)]
+ drawn = self._pairs(rows, self._CENTOS_AMD64_ONLY, sweeps=range(4))
+ self.assertNotIn(("centos", "arm64"), drawn)
+ self.assertEqual(
+ drawn,
+ {
+ (distro, architecture)
+ for distro in pools.DISTROS
+ for architecture in pools.ARCHITECTURES
+ }
+ - {("centos", "arm64")},
+ )
+
+ def test_a_service_package_narrows_the_row_like_its_own(self) -> None:
+ rows = [
+ {**_row("web-app-c", index, ("compose",)), "services": ["web-app-b"]}
+ for index in range(10)
+ ]
+ self.assertNotIn(
+ ("centos", "arm64"),
+ self._pairs(rows, self._CENTOS_AMD64_ONLY, sweeps=range(4)),
+ )
+
+ def test_a_published_everywhere_row_draws_what_it_drew_before(self) -> None:
+ rows = [_row("web-app-b", index, ("compose",)) for index in range(10)]
+ entries = _assign(
+ rows, sweep=3, network_input="clearnet", variants_per_app=_VARIANTS
+ )
+ self.assertEqual(
+ [(entry["distro"], entry["architecture"]) for entry in entries],
+ [
+ (
+ pools.rotate(pools.DISTROS, index, 3),
+ pools.rotate(pools.ARCHITECTURES, index, 3),
+ )
+ for index in range(10)
+ ],
+ )
+
+ def test_a_pinned_distro_keeps_the_architecture_it_is_published_for(self) -> None:
+ rows = [
+ _row("web-app-b", index, ("compose",), pin_distro="centos")
+ for index in range(4)
+ ]
+ self.assertEqual(
+ self._pairs(rows, self._CENTOS_AMD64_ONLY), {("centos", "amd64")}
+ )
+
+ def test_a_pinned_unpublished_pair_aborts_the_matrix(self) -> None:
+ rows = [
+ _row(
+ "web-app-b",
+ 0,
+ ("compose",),
+ pin_distro="centos",
+ pin_architecture="arm64",
+ )
+ ]
+ with self.assertRaises(SystemExit) as caught:
+ self._pairs(rows, self._CENTOS_AMD64_ONLY)
+ self.assertIn("not published", str(caught.exception))
+
+ def test_an_unparsable_registry_refuses_in_one_line(self) -> None:
+ with (
+ mock.patch.object(
+ pins,
+ "published_architectures",
+ side_effect=PackagesShapeError("meta/packages.yml: app.centos bad"),
+ ),
+ self.assertRaises(SystemExit) as caught,
+ ):
+ pins.row_pairs("web-app-b", pools.DISTROS, pools.ARCHITECTURES)
+ self.assertEqual(
+ str(caught.exception), "web-app-b: meta/packages.yml: app.centos bad"
+ )
+
def test_the_architecture_survives_the_label_round_trip(self) -> None:
entry = _assign(
[_row("web-app-a", 0, ("swarm",))],
diff --git a/tests/unit/python/utils/inventory/test_tools_model.py b/tests/unit/python/utils/inventory/test_tools_model.py
index 0d684ae0e9..d12048afbe 100644
--- a/tests/unit/python/utils/inventory/test_tools_model.py
+++ b/tests/unit/python/utils/inventory/test_tools_model.py
@@ -2,11 +2,14 @@
from __future__ import annotations
+import shutil
+import tempfile
import unittest
+from pathlib import Path
from utils import PROJECT_ROOT
from utils.cache.yaml import load_yaml_any
-from utils.inventory.tools import LANE_MODEL_ALIAS, render
+from utils.inventory.tools import LANE_MODEL_ALIAS, TEMPLATE, render
OLLAMA_ROLE = "svc-ai-ollama"
@@ -21,8 +24,16 @@ class TestLaneModel(unittest.TestCase):
deploy that writes the rendered file. A lane serving one model while
the probe expects another never reports ready and redeploys on every
call.
+
+ The render runs in a scratch root: inside the test container a render
+ into the real tree leaves a nobody-owned tools.rendered.yml behind,
+ and the host-side test-oracle then dies writing it (EACCES).
"""
- rendered = load_yaml_any(str(render(PROJECT_ROOT, ["en"])))
+ with tempfile.TemporaryDirectory() as scratch:
+ root = Path(scratch)
+ (root / TEMPLATE).parent.mkdir(parents=True)
+ shutil.copy(Path(PROJECT_ROOT) / TEMPLATE, root / TEMPLATE)
+ rendered = load_yaml_any(str(render(root, ["en"])))
ollama = rendered["applications"][OLLAMA_ROLE]["services"]["ollama"]
self.assertEqual(
diff --git a/tests/unit/python/utils/networks/test_proxy.py b/tests/unit/python/utils/networks/test_proxy.py
index a8eb7ae899..aaa2e82148 100644
--- a/tests/unit/python/utils/networks/test_proxy.py
+++ b/tests/unit/python/utils/networks/test_proxy.py
@@ -184,43 +184,21 @@ class TestRenderProxyPassSwarm(unittest.TestCase):
" proxy_pass http://$proxy_pass_upstream/logout;",
)
- def test_location_ignored_in_swarm(self):
- a = render_proxy_pass("x_app:80", "swarm", tail="request", location="/sub")
- b = render_proxy_pass("x_app:80", "swarm", tail="request", location="/")
- self.assertEqual(a, b)
-
def test_host_gateway_renders_literal_not_resolver(self):
out = render_proxy_pass(
"host.docker.internal:8021", "swarm", tail="request", host_gateway=True
)
- self.assertEqual(out, "proxy_pass http://host.docker.internal:8021/;")
+ self.assertEqual(out, "proxy_pass http://host.docker.internal:8021;")
self.assertNotIn("set $", out)
class TestRenderProxyPassCompose(unittest.TestCase):
- def test_app_root_location_keeps_slash(self):
- out = render_proxy_pass(
- "127.0.0.1:8017", "compose", tail="request", location="/"
- )
- self.assertEqual(out, "proxy_pass http://127.0.0.1:8017/;")
-
- def test_app_regex_location_no_suffix(self):
- out = render_proxy_pass(
- "127.0.0.1:8032",
- "compose",
- tail="request",
- location="~ ^/realms/[^/]+/protocol/",
- )
- self.assertEqual(out, "proxy_pass http://127.0.0.1:8032;")
-
- def test_app_modifier_stripped(self):
- out = render_proxy_pass(
- "127.0.0.1:80", "compose", tail="request", location="^~ /assets"
- )
- self.assertEqual(out, "proxy_pass http://127.0.0.1:80/assets;")
+ def test_app_request_forwards_the_raw_uri(self):
+ out = render_proxy_pass("127.0.0.1:8017", "compose", tail="request")
+ self.assertEqual(out, "proxy_pass http://127.0.0.1:8017;")
def test_plain_no_suffix(self):
- out = render_proxy_pass("127.0.0.1:8017", "compose", tail="plain", location="/")
+ out = render_proxy_pass("127.0.0.1:8017", "compose", tail="plain")
self.assertEqual(out, "proxy_pass http://127.0.0.1:8017;")
def test_oauth2_no_suffix(self):
diff --git a/tests/unit/python/utils/packages/test_plan.py b/tests/unit/python/utils/packages/test_plan.py
index b3752bfb3d..2b5ecd01be 100644
--- a/tests/unit/python/utils/packages/test_plan.py
+++ b/tests/unit/python/utils/packages/test_plan.py
@@ -1,9 +1,15 @@
import re
import unittest
+from typing import ClassVar
from utils.packages.calls import STATE_ABSENT, STATE_PRESENT
from utils.packages.installed import deb_pin_argv
-from utils.packages.plan import build_plan, merge_plans
+from utils.packages.plan import (
+ HOST_ARCHITECTURE_VAR,
+ build_plan,
+ ensure_published,
+ merge_plans,
+)
from utils.packages.schema import (
SOURCE_AUR,
SOURCE_BUILD,
@@ -385,6 +391,43 @@ class TestFlatpakSource(unittest.TestCase):
)
+class TestEnsurePublished(unittest.TestCase):
+ """A host the source publishes nothing for is refused by name, before the
+ remote answers with an anonymous ``Nothing matches``."""
+
+ SPEC = PackageSpec(
+ ("org.blender.Blender",), source=SOURCE_FLATPAK, architectures=("amd64",)
+ )
+ BY_KERNEL: ClassVar[dict[str, str]] = {"x86_64": "amd64", "aarch64": "arm64"}
+
+ def _ensure(self, kernel, spec=SPEC, distribution="centos"):
+ ensure_published("blender", distribution, kernel, self.BY_KERNEL, spec)
+
+ def test_an_unpublished_architecture_names_package_distro_and_arch(self):
+ with self.assertRaises(ValueError) as caught:
+ self._ensure("aarch64")
+ for word in ("blender", "centos", "arm64", "org.blender.Blender", "amd64"):
+ with self.subTest(word=word):
+ self.assertIn(word, str(caught.exception))
+
+ def test_a_published_architecture_passes(self):
+ self._ensure("x86_64")
+
+ def test_an_unmapped_kernel_architecture_fails_loud(self):
+ for kernel in ("riscv64", ""):
+ with (
+ self.subTest(kernel=kernel),
+ self.assertRaises(ValueError) as caught,
+ ):
+ self._ensure(kernel)
+ self.assertIn(HOST_ARCHITECTURE_VAR, str(caught.exception))
+
+ def test_an_entry_without_architectures_passes_everywhere(self):
+ for kernel in ("aarch64", "riscv64"):
+ with self.subTest(kernel=kernel):
+ self._ensure(kernel, PackageSpec(("blender",)), "fedora")
+
+
def _plan(*names, **spec):
return build_plan(PackageSpec(tuple(names), **spec), STATE_PRESENT)
diff --git a/tests/unit/python/utils/packages/test_registry.py b/tests/unit/python/utils/packages/test_registry.py
index f649296aa7..7ecb27b51d 100644
--- a/tests/unit/python/utils/packages/test_registry.py
+++ b/tests/unit/python/utils/packages/test_registry.py
@@ -3,11 +3,13 @@ import unittest
from pathlib import Path
from utils.cache.yaml import dump_yaml
+from utils.github.variant.pools import ARCHITECTURES
from utils.packages.registry import (
build_registry,
iter_inventory_package_lists,
load_declarations,
load_references,
+ published_architectures,
resolve,
)
from utils.packages.schema import (
@@ -255,6 +257,72 @@ class TestRegistry(unittest.TestCase):
self.assertEqual(spec.source, "download")
self.assertEqual(spec.download["url"], "https://vendor.example/editor.deb")
+ def _architectures(self, value):
+ entry = {"names": ["org.example.App"], "source": "flatpak"}
+ if value is not None:
+ entry["architectures"] = value
+ _write_role(self.root, "role-a", {"app": {"centos": entry}})
+ return resolve(self._declaration("app"), "centos").architectures
+
+ def test_an_entry_without_architectures_takes_every_one(self):
+ self.assertEqual(self._architectures(None), ARCHITECTURES)
+
+ def test_an_entry_narrows_to_its_declared_architectures(self):
+ self.assertEqual(self._architectures(["amd64"]), ("amd64",))
+
+ def test_an_unknown_entry_key_is_refused(self):
+ _write_role(
+ self.root,
+ "role-a",
+ {"app": {"centos": {"names": ["app"], "architecture": ["amd64"]}}},
+ )
+ with self.assertRaises(PackagesShapeError) as ctx:
+ resolve(self._declaration("app"), "centos")
+ self.assertIn("architecture", str(ctx.exception))
+
+ def test_an_entry_key_beside_the_distro_keys_is_refused(self):
+ _write_role(
+ self.root,
+ "role-a",
+ {"app": {"centos": ["app"], "architectures": ["amd64"]}},
+ )
+ with self.assertRaises(PackagesShapeError) as ctx:
+ build_registry(self.root)
+ self.assertIn("architectures", str(ctx.exception))
+
+ def test_architectures_reject_what_no_host_can_match(self):
+ for value in ("amd64", [], ["x86_64"]):
+ with (
+ self.subTest(value=value),
+ self.assertRaises(PackagesShapeError) as ctx,
+ ):
+ self._architectures(value)
+ self.assertIn("architectures", str(ctx.exception))
+
+ def test_published_architectures_lists_only_the_narrowed_pairs(self):
+ _write_shared(
+ self.root,
+ {
+ "app": {
+ "Debian": ["app"],
+ "Archlinux": ["app"],
+ "RedHat": ["app"],
+ "centos": {
+ "names": ["org.example.App"],
+ "source": "flatpak",
+ "architectures": ["amd64"],
+ },
+ },
+ "lib": {"Debian": ["lib"], "Archlinux": ["lib"], "RedHat": ["lib"]},
+ },
+ )
+ _write_role(self.root, "role-a", {"app": {"shared": True}})
+ _write_role(self.root, "role-b", {"lib": {"shared": True}})
+ self.assertEqual(
+ published_architectures(self.root),
+ {"role-a": {"centos": frozenset({"amd64"})}},
+ )
+
def test_unknown_distro_raises_without_family(self):
_write_role(self.root, "role-a", {"git": {"Debian": ["git"]}})
with self.assertRaises(PackagesShapeError):
diff --git a/tests/unit/python/utils/security/__init__.py b/tests/unit/python/utils/security/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/unit/python/utils/security/test_database.py b/tests/unit/python/utils/security/test_database.py
new file mode 100644
index 0000000000..ca38ff0b66
--- /dev/null
+++ b/tests/unit/python/utils/security/test_database.py
@@ -0,0 +1,197 @@
+from __future__ import annotations
+
+import http.client
+import os
+import tempfile
+import time
+from pathlib import Path
+from types import SimpleNamespace
+from unittest import TestCase, main, mock
+
+from utils.security import database
+from utils.security.pipeline import pipeline
+
+P = pipeline()
+
+
+def _touch(path: Path, age: float) -> None:
+ path.parent.mkdir(parents=True, exist_ok=True)
+ path.write_text("db", encoding="utf-8")
+ stamp = time.time() - age
+ os.utime(path, (stamp, stamp))
+
+
+class _Root(TestCase):
+ def setUp(self):
+ self.tmp = tempfile.TemporaryDirectory()
+ self.root = Path(self.tmp.name)
+
+ def tearDown(self):
+ self.tmp.cleanup()
+
+
+class TestOsvUrl(TestCase):
+ def test_an_ecosystem_with_a_space_is_quoted(self):
+ self.assertEqual(
+ database.osv_url("Red Hat"),
+ "https://osv-vulnerabilities.storage.googleapis.com/Red%20Hat/all.zip",
+ )
+
+
+class TestFetchDatabases(_Root):
+ def _fetch(self, engines, returncode):
+ downloads = []
+ calls = []
+
+ def runner(argv):
+ calls.append(list(argv))
+ return SimpleNamespace(
+ returncode=returncode, stdout="", stderr="no network"
+ )
+
+ def fetch(url, destination):
+ downloads.append(url)
+ destination.write_bytes(b"zip")
+
+ errors = database.fetch_databases(P, self.root, engines, runner, fetch)
+ return errors, calls, downloads
+
+ def test_osv_lands_in_the_layout_the_scanner_reads(self):
+ errors, _calls, downloads = self._fetch(["osv"], 0)
+ self.assertEqual(errors, [])
+ self.assertTrue(
+ (self.root / "osv" / "osv-scalibr" / "Ubuntu" / "all.zip").is_file()
+ )
+ self.assertEqual(len(downloads), len(database.osv_zips(P, self.root)))
+
+ def test_a_failed_download_is_reported(self):
+ errors, calls, _downloads = self._fetch(["grype"], 1)
+ self.assertTrue(errors[0].startswith("grype database: exited 1"))
+ self.assertIn(["db", "update"], [call[-2:] for call in calls])
+
+ def test_a_download_that_leaves_no_database_is_reported(self):
+ errors, _calls, _downloads = self._fetch(["trivy"], 0)
+ self.assertTrue(any("provided database" in error for error in errors))
+
+ def test_an_interrupted_osv_download_leaves_no_zip_and_is_reported(self):
+ def fetch(url, destination):
+ destination.write_bytes(b"trunc")
+ raise TimeoutError("timed out")
+
+ errors = database.fetch_databases(P, self.root, ["osv"], None, fetch)
+ ubuntu = self.root / "osv" / "osv-scalibr" / "Ubuntu"
+ self.assertIn("osv Ubuntu: timed out", errors)
+ self.assertEqual(list(ubuntu.iterdir()), [])
+
+ def test_a_truncated_chunked_osv_download_leaves_no_zip_and_is_reported(self):
+ def fetch(url, destination):
+ destination.write_bytes(b"trunc")
+ raise http.client.IncompleteRead(b"trunc", 1024)
+
+ errors = database.fetch_databases(P, self.root, ["osv"], None, fetch)
+ ubuntu = self.root / "osv" / "osv-scalibr" / "Ubuntu"
+ self.assertTrue(
+ any(error.startswith("osv Ubuntu: IncompleteRead") for error in errors)
+ )
+ self.assertEqual(list(ubuntu.iterdir()), [])
+
+
+class TestStale(_Root):
+ def test_a_missing_database_is_stale(self):
+ self.assertTrue(database.stale(P, self.root, "grype", time.time()))
+
+ def test_a_database_of_today_is_fresh(self):
+ _touch(self.root / "grype" / "6" / "vulnerability.db", 3600)
+ self.assertFalse(database.stale(P, self.root, "grype", time.time()))
+
+ def test_a_database_older_than_a_day_is_stale(self):
+ _touch(
+ self.root / "grype" / "6" / "vulnerability.db",
+ database.MAX_AGE_SECONDS + 60,
+ )
+ self.assertTrue(database.stale(P, self.root, "grype", time.time()))
+
+ def test_osv_is_stale_while_one_ecosystem_is_missing(self):
+ zips = database.osv_zips(P, self.root)
+ for path in zips[1:]:
+ _touch(path, 60)
+ self.assertTrue(database.stale(P, self.root, "osv", time.time()))
+
+
+class TestRefresh(_Root):
+ def _refresh(self, engines, fetched=()):
+ with mock.patch.object(
+ database, "fetch_databases", return_value=list(fetched)
+ ) as fetch:
+ errors = database.refresh(
+ self.root, engines, lambda argv: None, lambda u, d: None
+ )
+ return errors, fetch
+
+ def test_only_stale_engines_are_downloaded(self):
+ _touch(self.root / "grype" / "6" / "vulnerability.db", 60)
+ _errors, fetch = self._refresh(["trivy", "grype"])
+ self.assertEqual(fetch.call_args.args[2], ["trivy"])
+
+ def test_fresh_databases_download_nothing(self):
+ _touch(self.root / "grype" / "6" / "vulnerability.db", 60)
+ errors, fetch = self._refresh(["grype"])
+ self.assertEqual(errors, [])
+ fetch.assert_not_called()
+
+ def test_the_lock_lives_in_the_shared_directory(self):
+ self._refresh(["grype"])
+ self.assertTrue((self.root / database.LOCK_NAME).is_file())
+
+ def test_a_missing_shared_directory_is_created(self):
+ self.root = self.root / "vulnerability-db"
+ self._refresh(["grype"])
+ self.assertTrue(self.root.is_dir())
+
+ def test_a_failed_download_is_returned(self):
+ errors, _fetch = self._refresh(["grype"], ["grype database: exited 1"])
+ self.assertEqual(errors, ["grype database: exited 1"])
+
+
+class TestHandOver(_Root):
+ def _hand_over(self, euid):
+ _touch(self.root / "osv" / "osv-scalibr" / "Ubuntu" / "all.zip", 60)
+ owner = self.root.stat()
+ with (
+ mock.patch.object(database.os, "geteuid", return_value=euid),
+ mock.patch.object(database.os, "chown") as chown,
+ ):
+ database.hand_over(self.root, [self.root / "osv"])
+ return chown, (owner.st_uid, owner.st_gid)
+
+ def test_a_root_refresh_gives_every_file_to_the_directory_owner(self):
+ chown, owner = self._hand_over(0)
+ self.assertEqual(
+ {(Path(call.args[0]), call.args[1:]) for call in chown.call_args_list},
+ {
+ (self.root / "osv", owner),
+ (self.root / "osv" / "osv-scalibr", owner),
+ (self.root / "osv" / "osv-scalibr" / "Ubuntu", owner),
+ (self.root / "osv" / "osv-scalibr" / "Ubuntu" / "all.zip", owner),
+ },
+ )
+
+ def test_an_unprivileged_refresh_changes_no_owner(self):
+ chown, _owner = self._hand_over(1000)
+ chown.assert_not_called()
+
+ def test_a_root_refresh_that_wrote_no_database_hands_over_the_lock(self):
+ with (
+ mock.patch.object(database.os, "geteuid", return_value=0),
+ mock.patch.object(database.os, "chown") as chown,
+ mock.patch.object(database, "fetch_databases", return_value=[]),
+ ):
+ database.refresh(self.root, ["grype"], lambda argv: None, lambda u, d: None)
+ self.assertEqual(
+ [Path(call.args[0]) for call in chown.call_args_list],
+ [self.root / database.LOCK_NAME],
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/utils/security/test_deploy.py b/tests/unit/python/utils/security/test_deploy.py
new file mode 100644
index 0000000000..eedbec8074
--- /dev/null
+++ b/tests/unit/python/utils/security/test_deploy.py
@@ -0,0 +1,86 @@
+from __future__ import annotations
+
+import contextlib
+import io
+import random
+import tempfile
+from pathlib import Path
+from unittest import TestCase, main, mock
+
+from utils.security import deploy
+from utils.security.engine import ENGINE_ENV, ROLE, databases_for
+
+
+class TestInventoryOverrides(TestCase):
+ def setUp(self):
+ self.tmp = tempfile.TemporaryDirectory()
+ self.root = Path(self.tmp.name)
+ self.refreshed = []
+
+ def tearDown(self):
+ self.tmp.cleanup()
+
+ def _env(self, engine):
+ return mock.patch.dict(
+ "os.environ",
+ {
+ ENGINE_ENV: engine,
+ deploy.HOST_PATH_ENV: str(self.root),
+ deploy.TARGET_DIR_ENV: "/opt/vulnerability-db",
+ },
+ )
+
+ def _refresher(self, errors):
+ def refresher(root, engines):
+ self.refreshed.append((root, engines))
+ return errors
+
+ return refresher
+
+ def _overrides(self, engine, errors=()):
+ with self._env(engine), contextlib.redirect_stdout(io.StringIO()):
+ return deploy.inventory_overrides(
+ random.Random(4), # noqa: S311 - seeded draw, not crypto
+ self._refresher(list(errors)),
+ )
+
+ def _runtime(self, overrides):
+ return overrides[ROLE]["services"]["runtime"]
+
+ def test_a_local_deploy_draws_one_engine_behind_syft(self):
+ engines = self._runtime(self._overrides(""))["engines"]
+ self.assertEqual((len(engines), engines[0]), (2, "syft"))
+
+ def test_a_local_deploy_refreshes_the_shared_databases_it_reads(self):
+ engine = self._runtime(self._overrides(""))["engines"][1]
+ self.assertEqual(self.refreshed, [(self.root, databases_for(engine))])
+
+ def test_the_stack_reads_the_read_only_mount(self):
+ runtime = self._runtime(self._overrides(""))
+ self.assertEqual(
+ (runtime["database_dir"], runtime["db_update"]),
+ ("/opt/vulnerability-db", False),
+ )
+
+ def test_a_failed_refresh_fails_the_deploy(self):
+ with self.assertRaisesRegex(SystemExit, "no network"):
+ self._overrides("", errors=["grype database: no network"])
+
+ def test_a_pinned_engine_never_downloads(self):
+ for name in ("trivy", "grype"):
+ (self.root / name).mkdir()
+ (self.root / name / "db").write_text("x", encoding="utf-8")
+ self.assertEqual(
+ self._runtime(self._overrides("trivy"))["engines"], ["syft", "trivy"]
+ )
+ self.assertEqual(self.refreshed, [])
+
+ def test_a_pinned_engine_without_its_databases_fails(self):
+ (self.root / "grype").mkdir()
+ (self.root / "grype" / "db").write_text("x", encoding="utf-8")
+ with self.assertRaisesRegex(SystemExit, "no osv database"):
+ self._overrides("osv")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/utils/security/test_engine.py b/tests/unit/python/utils/security/test_engine.py
new file mode 100644
index 0000000000..cfd809c110
--- /dev/null
+++ b/tests/unit/python/utils/security/test_engine.py
@@ -0,0 +1,72 @@
+from __future__ import annotations
+
+import random
+from unittest import TestCase, main
+
+from utils.security import engine
+from utils.security.pipeline import pipeline
+
+
+class TestEnginesFor(TestCase):
+ def test_every_pin_runs_behind_syft(self):
+ for name in engine.SCANNERS:
+ with self.subTest(engine=name):
+ self.assertEqual(engine.engines_for(name), ["syft", name])
+
+ def test_an_unknown_engine_is_rejected(self):
+ with self.assertRaises(ValueError):
+ engine.engines_for("clair")
+
+ def test_every_pin_reads_the_grype_database(self):
+ self.assertEqual(engine.databases_for("trivy"), ["trivy", "grype"])
+ self.assertEqual(engine.databases_for("grype"), ["grype"])
+
+ def test_the_ci_pool_matches_the_role_pipeline(self):
+ self.assertEqual(engine.SCANNERS, pipeline().SCANNERS)
+
+ def test_every_pin_is_a_valid_role_config(self):
+ p = pipeline()
+ for name in engine.SCANNERS:
+ with self.subTest(engine=name):
+ config = p.scan_config(
+ {
+ "targets": ["host", "container"],
+ "engines": engine.engines_for(name),
+ "severity": {"CRITICAL": "fail", "HIGH": "warn"},
+ "fixed_only": True,
+ "workers": 2,
+ "db_update": False,
+ }
+ )
+ self.assertEqual(list(config.databases()), engine.databases_for(name))
+
+
+class TestDrawEngine(TestCase):
+ def test_a_draw_is_one_scanner(self):
+ rng = random.Random(1) # noqa: S311 - seeded draw, not crypto
+ self.assertIn(engine.draw_engine(rng), engine.SCANNERS)
+
+ def test_draws_cover_every_scanner(self):
+ rng = random.Random(7) # noqa: S311 - seeded draw, not crypto
+ self.assertEqual(
+ {engine.draw_engine(rng) for _ in range(60)}, set(engine.SCANNERS)
+ )
+
+
+class TestDeployOverrides(TestCase):
+ def test_a_deploy_reads_provided_databases(self):
+ runtime = engine.deploy_overrides("osv", "/opt/vulnerability-db")[engine.ROLE][
+ "services"
+ ]["runtime"]
+ self.assertEqual(
+ runtime,
+ {
+ "engines": ["syft", "osv"],
+ "database_dir": "/opt/vulnerability-db",
+ "db_update": False,
+ },
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/utils/security/test_pipeline.py b/tests/unit/python/utils/security/test_pipeline.py
new file mode 100644
index 0000000000..0e21e21bd6
--- /dev/null
+++ b/tests/unit/python/utils/security/test_pipeline.py
@@ -0,0 +1,35 @@
+from __future__ import annotations
+
+import os
+import re
+from unittest import TestCase, main
+
+from utils.security import pipeline
+
+
+class TestPipeline(TestCase):
+ def test_the_role_script_loads_once(self):
+ self.assertIs(pipeline.pipeline(), pipeline.pipeline())
+
+ def test_every_engine_has_a_semver_pin(self):
+ for engine in pipeline.pipeline().ENGINES:
+ with self.subTest(engine=engine):
+ self.assertRegex(
+ pipeline.engine_image(engine),
+ re.compile(r"^ghcr\.io/.+:v?\d+\.\d+\.\d+$"),
+ )
+
+ def test_the_engines_run_as_the_calling_user(self):
+ self.assertEqual(pipeline.user_runtime()[-1], f"{os.getuid()}:{os.getgid()}")
+
+ def test_the_role_default_is_a_valid_scan_config(self):
+ runtime = pipeline.role_services()["runtime"]
+ keys = ("targets", "engines", "severity", "fixed_only", "workers", "db_update")
+ config = pipeline.pipeline().scan_config({key: runtime[key] for key in keys})
+ self.assertLessEqual(
+ set(config.severity.values()), set(pipeline.pipeline().ACTIONS)
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/utils/security/test_suppressions.py b/tests/unit/python/utils/security/test_suppressions.py
new file mode 100644
index 0000000000..4bc9deb990
--- /dev/null
+++ b/tests/unit/python/utils/security/test_suppressions.py
@@ -0,0 +1,207 @@
+from __future__ import annotations
+
+import datetime as dt
+import tempfile
+from pathlib import Path
+from unittest import TestCase, main
+
+from utils.cache.yaml import load_yaml_str
+from utils.security.suppressions import (
+ Suppression,
+ SuppressionError,
+ drop_image_tag_entries,
+ parse_entries,
+ role_suppressions,
+ service_suppressions,
+)
+
+
+class TestParseEntries(TestCase):
+ def test_a_date_until_is_kept(self):
+ parsed = parse_entries(
+ [{"id": "CVE-2026-1234", "until": dt.date(2026, 12, 31)}], "r:s"
+ )
+ self.assertEqual(
+ parsed, [Suppression("CVE-2026-1234", None, dt.date(2026, 12, 31))]
+ )
+
+ def test_an_image_tag_entry_is_kept(self):
+ parsed = parse_entries([{"image_tag": "2.18.5", "until": "2026-12-31"}], "r:s")
+ self.assertEqual(parsed, [Suppression(None, "2.18.5", dt.date(2026, 12, 31))])
+
+ def test_an_entry_with_id_and_image_tag_is_rejected(self):
+ with self.assertRaisesRegex(
+ SuppressionError, "exactly one of id and image_tag"
+ ):
+ parse_entries(
+ [
+ {
+ "id": "CVE-2026-1234",
+ "image_tag": "2.18.5",
+ "until": "2026-12-31",
+ }
+ ],
+ "r:s",
+ )
+
+ def test_an_entry_without_id_or_image_tag_is_rejected(self):
+ with self.assertRaisesRegex(
+ SuppressionError, "exactly one of id and image_tag"
+ ):
+ parse_entries([{"until": "2026-12-31"}], "r:s")
+
+ def test_an_unquoted_numeric_image_tag_is_rejected(self):
+ with self.assertRaisesRegex(SuppressionError, "non-empty quoted string"):
+ parse_entries([{"image_tag": 1.1, "until": "2026-12-31"}], "r:s")
+
+ def test_an_empty_image_tag_is_rejected(self):
+ with self.assertRaisesRegex(SuppressionError, "non-empty quoted string"):
+ parse_entries([{"image_tag": "", "until": "2026-12-31"}], "r:s")
+
+ def test_a_quoted_until_is_parsed(self):
+ parsed = parse_entries([{"id": "CVE-2026-1234", "until": "2026-12-31"}], "r:s")
+ self.assertEqual(parsed[0].until, dt.date(2026, 12, 31))
+
+ def test_a_ghsa_id_is_rejected(self):
+ with self.assertRaisesRegex(SuppressionError, "no CVE-YYYY-NNNN id"):
+ parse_entries([{"id": "GHSA-aaaa-bbbb-cccc", "until": "2026-12-31"}], "r:s")
+
+ def test_a_missing_until_is_rejected(self):
+ with self.assertRaisesRegex(SuppressionError, "until is required"):
+ parse_entries([{"id": "CVE-2026-1234"}], "r:s")
+
+ def test_a_timestamp_until_is_rejected(self):
+ with self.assertRaisesRegex(SuppressionError, "not a timestamp"):
+ parse_entries(
+ [
+ {
+ "id": "CVE-2026-1234",
+ "until": dt.datetime(2026, 12, 31, tzinfo=dt.UTC),
+ }
+ ],
+ "r:s",
+ )
+
+ def test_an_unknown_key_is_rejected(self):
+ with self.assertRaisesRegex(SuppressionError, "unknown key"):
+ parse_entries(
+ [{"id": "CVE-2026-1234", "until": "2026-12-31", "reason": "x"}], "r:s"
+ )
+
+ def test_a_mapping_instead_of_a_list_is_rejected(self):
+ with self.assertRaisesRegex(SuppressionError, "must be a list"):
+ parse_entries({"id": "CVE-2026-1234"}, "r:s")
+
+
+MIXED = """\
+app:
+ image: app
+ version: "1.2"
+ security:
+ suppressions:
+ # nocheck: cve the module is not built into the image
+ - id: CVE-2026-1234
+ until: 2026-12-31
+
+ # nocheck: cve upstream ships no rebuild yet
+ - until: 2026-12-31
+ image_tag: "1.2"
+ mem_limit: 1g
+db:
+ image: postgres
+ version: "17"
+ security:
+ suppressions:
+ # nocheck: cve upstream ships no rebuild yet
+ - image_tag: "17"
+ until: 2026-12-31
+"""
+
+
+def _drop(text, service):
+ return "".join(drop_image_tag_entries(text.splitlines(keepends=True), service))
+
+
+class TestDropImageTagEntries(TestCase):
+ def test_only_the_tag_entry_and_its_marker_leave(self):
+ self.assertEqual(
+ _drop(MIXED, "app"),
+ MIXED.replace(
+ "\n # nocheck: cve upstream ships no rebuild yet\n"
+ " - until: 2026-12-31\n"
+ ' image_tag: "1.2"\n',
+ "\n",
+ ),
+ )
+
+ def test_an_emptied_list_takes_suppressions_and_security_along(self):
+ self.assertEqual(
+ _drop(MIXED, "db"),
+ MIXED.replace(
+ ' version: "17"\n'
+ " security:\n"
+ " suppressions:\n"
+ " # nocheck: cve upstream ships no rebuild yet\n"
+ ' - image_tag: "17"\n'
+ " until: 2026-12-31\n",
+ ' version: "17"\n',
+ ),
+ )
+
+ def test_the_result_still_parses(self):
+ for service in ("app", "db"):
+ with self.subTest(service=service):
+ parsed = load_yaml_str(_drop(MIXED, service))
+ self.assertEqual(
+ [
+ entry.image_tag
+ for entries in service_suppressions(parsed, "r").values()
+ for entry in entries
+ ],
+ [None, "17"] if service == "app" else [None, "1.2"],
+ )
+
+ def test_a_sequence_at_the_key_indent_is_handled(self):
+ text = (
+ "app:\n"
+ " security:\n"
+ " suppressions:\n"
+ " # nocheck: cve upstream ships no rebuild yet\n"
+ ' - image_tag: "1"\n'
+ " until: 2026-12-31\n"
+ " mem_limit: 1g\n"
+ )
+ self.assertEqual(_drop(text, "app"), "app:\n mem_limit: 1g\n")
+
+ def test_a_service_without_tag_entries_is_unchanged(self):
+ text = "app:\n image: app\n"
+ self.assertEqual(_drop(text, "app"), text)
+ self.assertEqual(_drop(text, "other"), text)
+
+
+class TestServiceSuppressions(TestCase):
+ def test_services_without_security_are_left_out(self):
+ services = {
+ "app": {
+ "image": "app",
+ "security": {
+ "suppressions": [{"id": "CVE-2026-1001", "until": "2026-12-31"}]
+ },
+ },
+ "db": {"image": "postgres"},
+ }
+ self.assertEqual(list(service_suppressions(services, "role")), ["app"])
+
+ def test_security_without_suppressions_is_rejected(self):
+ with self.assertRaisesRegex(
+ SuppressionError, "security must hold suppressions"
+ ):
+ service_suppressions({"app": {"security": {}}}, "role")
+
+ def test_a_role_without_services_file_has_none(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ self.assertEqual(role_suppressions(Path(tmp), "web-app-none"), {})
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/unit/python/utils/test_requires_python.py b/tests/unit/python/utils/test_requires_python.py
new file mode 100644
index 0000000000..a0c685475a
--- /dev/null
+++ b/tests/unit/python/utils/test_requires_python.py
@@ -0,0 +1,29 @@
+from __future__ import annotations
+
+import tempfile
+import unittest
+from pathlib import Path
+
+from utils.requires_python import requires_python, supported_minors
+
+
+class TestRequiresPython(unittest.TestCase):
+ def test_the_spec_is_read_from_pyproject(self) -> None:
+ with tempfile.TemporaryDirectory() as tmp:
+ Path(tmp, "pyproject.toml").write_text(
+ '[project]\nname = "demo"\nrequires-python = ">=3.11,<3.15"\n',
+ encoding="utf-8",
+ )
+ self.assertEqual(requires_python(Path(tmp)), ">=3.11,<3.15")
+
+ def test_the_range_admits_every_minor_below_the_cap(self) -> None:
+ self.assertEqual(list(supported_minors(">=3.11,<3.15")), [11, 12, 13, 14])
+
+ def test_another_shape_is_refused(self) -> None:
+ for spec in (">=3.11", ">=3.11,<=3.14", "~=3.11", ">=3.11, <3.15"):
+ with self.subTest(spec=spec), self.assertRaises(ValueError):
+ supported_minors(spec)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tests/unit/python/utils/update/test_docker.py b/tests/unit/python/utils/update/test_docker.py
index b44f72ef2a..2bd497d720 100644
--- a/tests/unit/python/utils/update/test_docker.py
+++ b/tests/unit/python/utils/update/test_docker.py
@@ -77,6 +77,43 @@ nginx:
self.assertIn("version: alpine", updated)
self.assertNotIn('version: "4.5" # Keep comment', updated)
+ def test_a_bump_drops_the_image_tag_suppression_of_the_old_tag(self) -> None:
+ original = """penpot:
+ image: penpotapp/exporter
+ version: "2.18.5"
+ security:
+ suppressions:
+ # nocheck: cve upstream ships no rebuild yet
+ - image_tag: "2.18.5"
+ until: 2026-12-31
+# nocheck: shared
+nginx:
+ image: nginx
+ version: "1.29"
+ security:
+ suppressions:
+ # nocheck: cve upstream ships no rebuild yet
+ - image_tag: "1.29"
+ until: 2026-12-31
+"""
+ expected = original.replace(
+ """ version: "2.18.5"
+ security:
+ suppressions:
+ # nocheck: cve upstream ships no rebuild yet
+ - image_tag: "2.18.5"
+ until: 2026-12-31
+""",
+ ' version: "2.18.6"\n',
+ )
+ with tempfile.TemporaryDirectory() as tmpdir:
+ config_path = Path(tmpdir) / "main.yml"
+ config_path.write_text(original, encoding="utf-8")
+
+ update_config_versions(config_path, {"penpot": "2.18.6"})
+
+ self.assertEqual(read_text(str(config_path)), expected)
+
if __name__ == "__main__":
unittest.main()
diff --git a/tests/unit/python/utils/update/test_follow.py b/tests/unit/python/utils/update/test_follow.py
index d119f19b3c..6045d6c3e5 100644
--- a/tests/unit/python/utils/update/test_follow.py
+++ b/tests/unit/python/utils/update/test_follow.py
@@ -69,6 +69,47 @@ class TestFollowedTags(unittest.TestCase):
self.assertIn("WARN fedora:44", stderr.getvalue())
self.assertIn("IncompleteRead", stderr.getvalue())
+ def test_requires_python_keeps_only_supported_minors(self) -> None:
+ tags = [
+ "3.13-slim",
+ "3.14-slim",
+ "3.15-slim",
+ "3.16-slim",
+ "3.15",
+ "3.14.2-slim",
+ ]
+ with (
+ mock.patch(
+ "utils.update.follow.requires_python", return_value=">=3.11,<3.16"
+ ),
+ mock.patch("utils.update.follow.tag_digest") as digest,
+ contextlib.redirect_stderr(io.StringIO()),
+ ):
+ found = followed_tags(
+ "python", tags, {"follow": "requires-python"}, "3.14-slim"
+ )
+ self.assertEqual(found, ["3.15-slim"])
+ digest.assert_not_called()
+
+ def test_requires_python_at_the_cap_proposes_nothing(self) -> None:
+ with (
+ mock.patch(
+ "utils.update.follow.requires_python", return_value=">=3.11,<3.15"
+ ),
+ mock.patch(
+ "utils.update.follow.tag_digest", return_value="sha256:one"
+ ) as digest,
+ contextlib.redirect_stderr(io.StringIO()),
+ ):
+ found = followed_tags(
+ "python",
+ ["3.14-slim", "3.15-slim"],
+ {"follow": "requires-python"},
+ "3.14-slim",
+ )
+ self.assertEqual(found, [])
+ digest.assert_not_called()
+
def test_a_rate_limited_digest_is_retried(self) -> None:
limited = urllib.error.HTTPError("url", 429, "Too Many Requests", {}, None)
body = json.dumps({"digest": "sha256:45"}).encode()
diff --git a/utils/cache/render.py b/utils/cache/render.py
index 26f6cbef05..8e041f6737 100644
--- a/utils/cache/render.py
+++ b/utils/cache/render.py
@@ -12,7 +12,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
-from jinja2 import Environment, FileSystemLoader
+from jinja2 import Environment, FileSystemLoader, select_autoescape
from utils.cache.hosts import (
host_records,
@@ -87,7 +87,7 @@ def _render(template: str, **context) -> str:
loader=FileSystemLoader([str(path) for path in TEMPLATE_DIRS]),
trim_blocks=True,
keep_trailing_newline=True,
- autoescape=False, # noqa: S701 - nginx and compose config, not markup
+ autoescape=select_autoescape(default_for_string=False),
)
return env.get_template(template).render(**context)
diff --git a/utils/docker/image/runtime.py b/utils/docker/image/runtime.py
deleted file mode 100644
index e776388426..0000000000
--- a/utils/docker/image/runtime.py
+++ /dev/null
@@ -1,207 +0,0 @@
-from __future__ import annotations
-
-import http.client
-import json
-import re
-import urllib.error
-import urllib.request
-from dataclasses import dataclass
-from urllib.parse import quote
-
-from utils.cache import PROJECT_ROOT
-from utils.cache.yaml import load_yaml_any
-from utils.docker.image.pin import is_digest
-from utils.docker.image.ref import DOCKER_HUB_REGISTRIES, split_registry_and_name
-from utils.docker.registry import config_blob
-from utils.roles.mapping import ROLE_FILE_VARS_MAIN
-
-FLOORS_FILE = PROJECT_ROOT / "roles" / "sys-ctl-hlth-runtime" / ROLE_FILE_VARS_MAIN
-FLOORS_KEY = "HEALTH_RUNTIME_FLOORS"
-USER_AGENT = "infinito-nexus-runtime-report"
-PHP_VERSION_PATTERN = re.compile(r"\bPHP_VERSION=([0-9][^\s\"';]*)")
-PHP_BASE_PATTERN = re.compile(r"\bPHP_BASE=(\d+\.\d+)(?![\d.])")
-PACKAGE_INSTALL_PATTERN = re.compile(
- r"\b(?:apk\s+(?:-\S+\s+)*add|(?:apt-get|apt|dnf|microdnf|yum)\s+(?:-\S+\s+)*install)\b"
-)
-PHP_PACKAGE_PATTERN = re.compile(
- r"(? dict[str, str]:
- """Return ``{".": ""}`` from the SPOT."""
- return load_yaml_any(str(FLOORS_FILE))[FLOORS_KEY]["php"]
-
-
-def _hub_instructions(
- repository: str, tag: str, os_name: str, architecture: str
-) -> list[str] | None:
- url = (
- f"https://hub.docker.com/v2/repositories/{quote(repository, safe='/')}"
- f"/tags/{quote(tag, safe='')}/images"
- )
- request = urllib.request.Request(
- url, headers={"User-Agent": USER_AGENT, "Accept": "application/json"}
- )
- try:
- with urllib.request.urlopen(request, timeout=15) as response: # noqa: S310 - https request to hub.docker.com
- images = json.loads(response.read().decode())
- except (
- urllib.error.URLError,
- OSError,
- http.client.HTTPException,
- json.JSONDecodeError,
- UnicodeDecodeError,
- ):
- return None
- if not isinstance(images, list):
- return None
- for image in images:
- if (
- isinstance(image, dict)
- and image.get("os") == os_name
- and image.get("architecture") == architecture
- ):
- return [
- str(layer.get("instruction") or "")
- for layer in image.get("layers") or []
- if isinstance(layer, dict)
- ]
- return None
-
-
-def _oci_instructions(
- image: str, reference: str, os_name: str, architecture: str
-) -> list[str] | None:
- blob = config_blob(image, reference, os_name, architecture)
- if blob is None:
- return None
- history = [
- str(step.get("created_by") or "")
- for step in blob.get("history") or []
- if isinstance(step, dict)
- ]
- env = [f"ENV {item}" for item in (blob.get("config") or {}).get("Env") or []]
- return history + env
-
-
-def build_instructions(
- image: str,
- reference: str,
- *,
- os_name: str,
- architecture: str,
-) -> list[str] | None:
- """Return the build instructions of ``image:reference`` without pulling it.
-
- Args:
- image: image name, with or without registry host.
- reference: tag or digest.
- os_name: platform to resolve a multi-arch index to.
- architecture: platform to resolve a multi-arch index to.
-
- Returns:
- The image's history plus its final ``ENV`` lines, or ``None`` when the
- registry gave no answer. A Docker Hub tag is read through the Hub API,
- which a pull rate limit does not meter; every other image through its
- OCI config blob.
- """
- parsed = split_registry_and_name(image)
- if parsed is None:
- return None
- registry, name = parsed
- on_hub = registry is None or registry in DOCKER_HUB_REGISTRIES
- if on_hub and not is_digest(reference):
- repository = name if "/" in name else f"library/{name}"
- return _hub_instructions(repository, reference, os_name, architecture)
- return _oci_instructions(image, reference, os_name, architecture)
-
-
-def php_runtime(instructions: list[str]) -> PhpRuntime | None:
- """Read the PHP an image ships from its build instructions.
-
- Args:
- instructions: see :func:`build_instructions`.
-
- Returns:
- The last ``PHP_VERSION`` set, the lines of the distro PHP packages
- and ``PHP_BASE`` arguments, and the unversioned interpreter packages,
- or ``None`` when none of them appears.
- """
- version = None
- lines: set[str] = set()
- packages: set[str] = set()
- for instruction in instructions:
- for match in PHP_VERSION_PATTERN.finditer(instruction):
- version = match.group(1)
- lines.update(PHP_BASE_PATTERN.findall(instruction))
- if not PACKAGE_INSTALL_PATTERN.search(instruction):
- continue
- for major, minor in PHP_PACKAGE_PATTERN.findall(instruction):
- lines.add(f"{major}.{minor}" if minor else major)
- packages.update(PHP_UNVERSIONED_PACKAGE_PATTERN.findall(instruction))
- if version is None and not lines and not packages:
- return None
- return PhpRuntime(
- version=version,
- lines=tuple(sorted(lines)),
- packages=tuple(sorted(packages)),
- )
-
-
-def _numbers(text: str) -> tuple[int, ...]:
- return tuple(int(part) for part in text.split("."))
-
-
-def php_finding(runtime: PhpRuntime, floors: dict[str, str]) -> str | None:
- """Judge an image's PHP against the floors.
-
- Args:
- runtime: see :func:`php_runtime`.
- floors: see :func:`load_php_floors`.
-
- Returns:
- ``None`` when nothing is below its floor, otherwise the reason. The
- lines are judged next to ``PHP_VERSION``, so an end-of-life package
- line fails an image whose ``PHP_VERSION`` is patched. Unversioned
- packages alone are no finding: their patch level is unknown.
- """
- oldest = min(_numbers(line) for line in floors)
- newest = max(_numbers(line) for line in floors)
- if runtime.version is not None:
- match = VERSION_PATTERN.match(runtime.version)
- if match is None:
- return f"unparsable PHP_VERSION {runtime.version!r}"
- current = tuple(int(part) for part in match.groups())
- line = f"{current[0]}.{current[1]}"
- if line in floors and current < _numbers(floors[line]):
- return f"{runtime.version} is below the security floor {floors[line]}"
- if line not in floors and current[:2] <= newest:
- return f"{runtime.version} runs the end-of-life line {line}"
- eol = [line for line in runtime.lines if _numbers(line) < oldest]
- if eol:
- return f"line {', '.join(eol)} is end of life"
- return None
diff --git a/utils/docker/registry.py b/utils/docker/registry.py
index 7878ce1537..99a8e33a82 100644
--- a/utils/docker/registry.py
+++ b/utils/docker/registry.py
@@ -341,6 +341,31 @@ def config_blob(
return fetch_blob(image, config_digest)
+def image_platform_digest(
+ image: str, reference: str, *, os_name: str, architecture: str
+) -> str | None:
+ """Return the digest of the ``os_name``/``architecture`` manifest.
+
+ Args:
+ image: image name, with or without registry host.
+ reference: tag or digest.
+ os_name: platform a multi-arch index is resolved to.
+ architecture: platform a multi-arch index is resolved to.
+
+ Returns:
+ The platform manifest's digest, or ``None`` on any indeterminate
+ outcome (see :func:`fetch_manifest`) and on an index without a
+ matching platform.
+ """
+ doc = fetch_manifest(image, reference)
+ if doc is None:
+ return None
+ manifests = doc.get("manifests")
+ if isinstance(manifests, list) and manifests:
+ return platform_digest(manifests, os_name, architecture)
+ return manifest_digest(image, reference)
+
+
def _platforms_at(image: str, reference: str) -> set[str] | None:
doc = fetch_manifest(image, reference)
if doc is None:
diff --git a/utils/env/handlers/passthrough.py b/utils/env/handlers/passthrough.py
index fbbae5d4c3..25cdb37674 100644
--- a/utils/env/handlers/passthrough.py
+++ b/utils/env/handlers/passthrough.py
@@ -69,6 +69,9 @@ STATIC_KEYS = (
"INFINITO_DOCKER_FILESYSTEM_ENFORCED",
"INFINITO_DOCKER_FILESYSTEM_PICK",
"INFINITO_DOCKER_FILESYSTEM_REQUIRED",
+ "INFINITO_VULNERABILITY_DB_DIR",
+ "INFINITO_VULNERABILITY_DB_HOST_PATH",
+ "INFINITO_VULNERABILITY_ENGINE",
"INFINITO_ARCHITECTURE",
"INFINITO_ARCHITECTURES",
"INFINITO_PACKAGE_INSTALL_SCRIPT",
@@ -77,6 +80,7 @@ STATIC_KEYS = (
"INFINITO_INTERPRETERS_INSTALL_SCRIPT",
"INFINITO_ALIAS_REPOSITORY",
"INFINITO_APT_UBUNTU_MIRRORS",
+ "INFINITO_APT_UBUNTU_PORTS_MIRRORS",
"INFINITO_FORK_REPOSITORY_NAME",
"INFINITO_API_ANTHROPIC_KEY",
"INFINITO_API_OPENAI_KEY",
diff --git a/utils/github/variant/axes.py b/utils/github/variant/axes.py
index 65b0eef251..379cd3591d 100644
--- a/utils/github/variant/axes.py
+++ b/utils/github/variant/axes.py
@@ -1,6 +1,6 @@
"""Assign the deploy axes to CI matrix rows.
-Every row of the CI matrix is one ``role#variant`` selection. Six axes are
+Every row of the CI matrix is one ``role#variant`` selection. Seven axes are
decided here, all as a deterministic rotation over the row's position in the
*global* discovery order and the sweep number -- never at random, so a red job
can be reproduced by re-running the same sweep, and so consecutive sweeps
@@ -41,6 +41,10 @@ cover the combinations instead of sampling them:
architecture forever. A role may narrow the pool to one value in
``meta/services.yml`` when only that hardware can run it.
+* **engine** -- which vulnerability engine the row's deploy-time scan runs.
+ It is the odometer digit above distro and filesystem, so it never moves in
+ lockstep with either of them.
+
A row's position is its index in the uncapped discovery order, not its index
inside a chunk, so slicing the list into chunks never changes what a row is
assigned. A priority row, which deploys several mode/network combinations at
@@ -67,10 +71,17 @@ from utils.github.variant.network import (
row_pulls_tor,
row_states,
)
-from utils.github.variant.pins import check_pins, priority_picks, row_architectures
+from utils.github.variant.pins import (
+ check_pins,
+ draw_pair,
+ priority_picks,
+ row_architectures,
+ row_pairs,
+)
from utils.github.variant.pools import (
ARCHITECTURES,
DISTROS,
+ ENGINES,
FILESYSTEMS,
MODES,
rotate,
@@ -99,6 +110,7 @@ __all__ = [
"priority_picks",
"resolve_sweep",
"row_architectures",
+ "row_pairs",
"sort_key",
]
@@ -192,7 +204,8 @@ def assign(
Returns:
one entry per (row, mode, network) the run deploys, each stamped with
- the distro and filesystem its rotation drew, carrying the row's
+ the distro, filesystem and vulnerability engine its rotation drew,
+ carrying the row's
discovery ``id`` and the ``covered`` id of the earlier row that already
embeds it (``0``: nothing does), so a reader of the plan can tell a
redundant row from a unique one without a second query. A regular row
@@ -225,6 +238,7 @@ def assign(
offered_architectures = row_architectures(
app, architectures, row.get("services", ())
)
+ pairs = row_pairs(app, distros, offered_architectures, row.get("services", ()))
check_pins(
app,
variant_csv,
@@ -241,6 +255,7 @@ def assign(
distros=distros,
filesystems=filesystems,
architectures=offered_architectures,
+ pairs=pairs,
)
if priority:
picked = priority_picks(
@@ -284,12 +299,20 @@ def assign(
]
label = codec.encode(app, variant_csv)
for step, (mode, state, meshed) in enumerate(picked):
- distro = pin_distro or rotate(distros, position + step, sweep)
+ distro, architecture = draw_pair(
+ pairs,
+ distros,
+ offered_architectures,
+ pin_distro=pin_distro,
+ pin_architecture=pin_architecture,
+ index=position + step,
+ sweep=sweep,
+ )
filesystem = pin_filesystem or rotate(
filesystems, (position + step) // len(distros), sweep
)
- architecture = pin_architecture or rotate(
- offered_architectures, position + step, sweep
+ engine = rotate(
+ ENGINES, (position + step) // (len(distros) * len(filesystems)), sweep
)
glyphs = (
to_emoji(mode)
@@ -302,6 +325,7 @@ def assign(
+ to_emoji(distro)
+ to_emoji(filesystem)
+ to_emoji(architecture)
+ + to_emoji(engine)
)
entries.append(
{
@@ -314,6 +338,7 @@ def assign(
"filesystem": filesystem,
"architecture": architecture,
"runner": runner_of(architecture),
+ "engine": engine,
"enforce_filesystem": "true"
if pin_filesystem is not None or len(filesystems) == 1
else "false",
diff --git a/utils/github/variant/label.py b/utils/github/variant/label.py
index b74495b32d..4158871abc 100644
--- a/utils/github/variant/label.py
+++ b/utils/github/variant/label.py
@@ -5,7 +5,13 @@ from __future__ import annotations
import re
from typing import TYPE_CHECKING, NamedTuple
-from utils.github.variant.pools import ARCHITECTURES, DISTROS, FILESYSTEMS, MODES
+from utils.github.variant.pools import (
+ ARCHITECTURES,
+ DISTROS,
+ ENGINES,
+ FILESYSTEMS,
+ MODES,
+)
from utils.networks.reachability import CLEARNET, NODE_MODES
from utils.roles.display import VARIANT_SEPARATOR
from utils.symbol_glossary import to_emoji, to_word
@@ -41,6 +47,7 @@ LABEL_RE = re.compile(
r"(?P" + _alternation(DISTROS) + r")?️?"
r"(?P" + _alternation(FILESYSTEMS) + r")?️?"
r"(?P" + _alternation(ARCHITECTURES) + r")?️?"
+ r"(?P" + _alternation(ENGINES) + r")?️?"
r"[" + re.escape(_AXIS_GLYPHS) + r"️\s]*"
r"(?P.+?)"
r"(?:" + re.escape(VARIANT_SEPARATOR) + r"(?P[0-9,]+))?"
@@ -63,6 +70,7 @@ class Label(NamedTuple):
filesystem: str = ""
architecture: str = ""
vpn: bool = False
+ engine: str = ""
def parse_label(name: str) -> Label | None:
@@ -101,6 +109,7 @@ def parse_label(name: str) -> Label | None:
to_word(match.group("filesystem") or ""),
to_word(match.group("architecture") or ""),
match.group("vpn") is not None,
+ to_word(match.group("engine") or ""),
)
diff --git a/utils/github/variant/pins.py b/utils/github/variant/pins.py
index 45a6e69db0..8554efad68 100644
--- a/utils/github/variant/pins.py
+++ b/utils/github/variant/pins.py
@@ -9,16 +9,25 @@ from __future__ import annotations
from typing import TYPE_CHECKING
+from utils.cache import PROJECT_ROOT
from utils.github.variant.network import combinations, network_states
-from utils.github.variant.pools import ARCHITECTURES
+from utils.github.variant.pools import ARCHITECTURES, rotate
from utils.github.variant.vpn import VPN_DEPLOY_MODES, pinned_vpn_states
+from utils.packages.registry import published_architectures
+from utils.packages.schema import PackagesShapeError
from utils.roles.display import VARIANT_SEPARATOR
from utils.roles.meta_lookup import get_role_architectures
if TYPE_CHECKING:
from collections.abc import Sequence
-__all__ = ["check_pins", "priority_picks", "row_architectures"]
+__all__ = [
+ "check_pins",
+ "draw_pair",
+ "priority_picks",
+ "row_architectures",
+ "row_pairs",
+]
def _reject(app: str, variant: str, reason: str) -> None:
@@ -50,6 +59,7 @@ def check_pins(
distros: Sequence[str],
filesystems: Sequence[str],
architectures: Sequence[str] = ARCHITECTURES,
+ pairs: Sequence[tuple[str, str]] | None = None,
) -> None:
"""Prove the row can take what the selection token pinned on it.
@@ -57,7 +67,8 @@ def check_pins(
network modes by its ``--network`` input, the mesh states by its ``--vpn``
input and the two pools by ``--distros`` and ``--filesystem``, so this
catches a pin that fights the role, the variant, or the run's own axes with
- one check each.
+ one check each. ``pairs`` (:func:`row_pairs`) adds the distro and
+ architecture combinations the row's packages are published for.
"""
if pin_mode is not None and pin_mode not in offered:
_reject(
@@ -78,6 +89,15 @@ def check_pins(
f"pinned {axis} {value!r} is outside this run's {axis} pool "
f"({', '.join(pool) or 'empty'})",
)
+ if pairs is not None and not _pinned_pairs(pairs, pin_distro, pin_architecture):
+ _reject(
+ app,
+ variant,
+ f"pinned {pin_distro or 'any distro'} on "
+ f"{pin_architecture or 'any architecture'} is impossible here: a "
+ f"package the row installs is not published there "
+ f"(meta/packages.yml architectures)",
+ )
modes = (pin_mode,) if pin_mode else offered
if pin_network is not None and not any(
pin_network in network_states(mode, states=states, network_input=network_input)
@@ -172,3 +192,103 @@ def row_architectures(
f"pool or the declarations."
)
return allowed
+
+
+def _pinned_pairs(
+ pairs: Sequence[tuple[str, str]],
+ pin_distro: str | None,
+ pin_architecture: str | None,
+) -> list[tuple[str, str]]:
+ return [
+ (distro, architecture)
+ for distro, architecture in pairs
+ if pin_distro in (None, distro) and pin_architecture in (None, architecture)
+ ]
+
+
+def row_pairs(
+ app: str,
+ distros: Sequence[str],
+ architectures: Sequence[str],
+ services: Sequence[str] = (),
+) -> tuple[tuple[str, str], ...]:
+ """The distro and architecture pairs one row may deploy on this run.
+
+ Args:
+ app: role id, read for the packages its ``meta/packages.yml`` installs.
+ distros: the run's distro pool.
+ architectures: what :func:`row_architectures` left the row.
+ services: the roles the row's variant deploys, whose packages the
+ deploy installs too.
+
+ Raises:
+ SystemExit: no pair is left, which dropping the row instead would
+ report as a green run for a role that never deployed; or the
+ registry does not parse, which planning must refuse in one line
+ rather than a traceback.
+ """
+ try:
+ published = published_architectures(PROJECT_ROOT)
+ except PackagesShapeError as exc:
+ raise SystemExit(f"{app}: {exc}") from exc
+ pairs = tuple(
+ (distro, architecture)
+ for distro in distros
+ for architecture in architectures
+ if all(
+ architecture in published.get(role, {}).get(distro, ARCHITECTURES)
+ for role in (app, *services)
+ )
+ )
+ if not pairs:
+ raise SystemExit(
+ f"{app}: meta/packages.yml publishes no package of the row for any "
+ f"of {', '.join(distros) or 'no distro'} on "
+ f"{', '.join(architectures) or 'no architecture'}. Widen the run's "
+ f"distro or architecture pool."
+ )
+ return pairs
+
+
+def draw_pair(
+ pairs: Sequence[tuple[str, str]],
+ distros: Sequence[str],
+ architectures: Sequence[str],
+ *,
+ pin_distro: str | None,
+ pin_architecture: str | None,
+ index: int,
+ sweep: int,
+) -> tuple[str, str]:
+ """The distro and architecture one deploy of a row takes.
+
+ Both rotate independently. Only an unpublished draw moves: first to
+ another architecture of the same distro, so the distro walk keeps its
+ coprime coverage, then to another distro of the same architecture when
+ the architecture is pinned.
+
+ Args:
+ pairs: :func:`row_pairs` of the row, already proven by
+ :func:`check_pins` to hold a pair the pins allow.
+ distros: the run's distro pool, in rotation order.
+ architectures: the row's architectures, in rotation order.
+ pin_distro: the token's pinned distro, ``None`` for any.
+ pin_architecture: the token's pinned architecture, ``None`` for any.
+ index: the deploy's rotation index.
+ sweep: the sweep number.
+ """
+ allowed = _pinned_pairs(pairs, pin_distro, pin_architecture)
+ distro = pin_distro or rotate(distros, index, sweep)
+ architecture = pin_architecture or rotate(architectures, index, sweep)
+ if (distro, architecture) in allowed:
+ return distro, architecture
+ same_distro = [pair for pair in allowed if pair[0] == distro]
+ same_architecture = [pair for pair in allowed if pair[1] == architecture]
+ for candidates in (
+ [] if pin_architecture else same_distro,
+ [] if pin_distro else same_architecture,
+ allowed,
+ ):
+ if candidates:
+ return candidates[(index + sweep) % len(candidates)]
+ raise AssertionError("check_pins proved a pair the pins allow")
diff --git a/utils/github/variant/pools.py b/utils/github/variant/pools.py
index 8c8eccf740..d16b00f180 100644
--- a/utils/github/variant/pools.py
+++ b/utils/github/variant/pools.py
@@ -11,6 +11,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
from utils.distros import distro_names
+from utils.security.engine import SCANNERS
if TYPE_CHECKING:
from collections.abc import Sequence
@@ -21,6 +22,8 @@ DISTROS = distro_names()
FILESYSTEMS = ("zfs", "btrfs", "ext4")
+ENGINES = SCANNERS
+
ARCHITECTURES = ("amd64", "arm64")
RUNNERS = {"amd64": "ubuntu-26.04", "arm64": "ubuntu-24.04-arm"}
diff --git a/utils/networks/proxy.py b/utils/networks/proxy.py
index 4d795349a2..7a8866798a 100644
--- a/utils/networks/proxy.py
+++ b/utils/networks/proxy.py
@@ -4,11 +4,15 @@ requests reach an application from (compose/swarm), SPOT.
Trip-wire: the swarm oauth2 endpoint must forward ``$uri$is_args$args``, not
``$request_uri`` — during the ``error_page 401 = @oauth2_start`` jump the original
``$request_uri`` stays ``/`` and oauth2-proxy 403s instead of redirecting.
+
+Trip-wire: a compose ``request`` tail renders no URI part. With one, nginx
+forwards the normalized, percent-decoded URI (``%3A`` becomes ``:``), so a
+signed request such as Matrix federation (``/v2/invite/!room%3Aserver/...``)
+fails its signature check upstream.
"""
from __future__ import annotations
-import re
from typing import TYPE_CHECKING, Any
from utils.networks.address import subnet_gateway
@@ -18,8 +22,6 @@ from utils.roles.entity.name import entity_name
if TYPE_CHECKING:
from collections.abc import Callable
-_REGEX_OR_NAMED_LOCATION = re.compile(r"^[@~]")
-_LOCATION_MODIFIER = re.compile(r"^(?:=|\^~)\s*")
_UPSTREAM_VAR = "proxy_pass_upstream"
REVERSE_PROXY_APPLICATION_ID = "svc-prx-openresty"
@@ -98,12 +100,7 @@ def resolve_upstream(
return f"{entity}_{service_key}:{port}"
-def _compose_suffix(tail: str, location: str) -> str:
- if tail == "request":
- loc = location.strip()
- if _REGEX_OR_NAMED_LOCATION.match(loc):
- return ""
- return _LOCATION_MODIFIER.sub("", loc)
+def _compose_suffix(tail: str) -> str:
if tail.startswith("/"):
return tail
return ""
@@ -121,7 +118,6 @@ def render_proxy_pass(
authority: str,
deployment_mode: str,
tail: str = "request",
- location: str = "/",
host_gateway: bool = False,
) -> str:
"""``proxy_pass`` directive; swarm prepends a ``set`` line (request-time DNS).
@@ -137,7 +133,7 @@ def render_proxy_pass(
f'set ${_UPSTREAM_VAR} "{authority}";\n'
f" proxy_pass http://${_UPSTREAM_VAR}{_swarm_tail(tail)};"
)
- return f"proxy_pass http://{authority}{_compose_suffix(tail, location)};"
+ return f"proxy_pass http://{authority}{_compose_suffix(tail)};"
def proxy_hops(
diff --git a/utils/packages/plan.py b/utils/packages/plan.py
index bc397ca129..711c03007b 100644
--- a/utils/packages/plan.py
+++ b/utils/packages/plan.py
@@ -10,7 +10,9 @@ plugin only executes what it is handed.
from __future__ import annotations
from dataclasses import replace
+from typing import TYPE_CHECKING
+from utils.github.variant.pools import ARCHITECTURES
from utils.packages.calls import (
GENERIC_PACKAGE,
STATE_ABSENT,
@@ -35,6 +37,54 @@ from utils.packages.sources import (
repository_calls,
)
+if TYPE_CHECKING:
+ from collections.abc import Mapping
+
+HOST_ARCHITECTURE_VAR = "HOST_ARCHITECTURE_BY_KERNEL"
+"""The group_vars map from kernel machine names to architecture tokens."""
+
+
+def ensure_published(
+ package_id: str,
+ distribution: str,
+ kernel: str,
+ by_kernel: Mapping[str, str],
+ spec: PackageSpec,
+) -> None:
+ """Refuse a package whose source publishes nothing for the host.
+
+ Args:
+ package_id: the logical id, named in the refusal.
+ distribution: the host's distribution, named in the refusal.
+ kernel: the host's ``ansible_facts.architecture``, ``""`` when absent.
+ by_kernel: :data:`HOST_ARCHITECTURE_VAR`, read from the inventory.
+ spec: the entry resolved for that distribution.
+
+ Raises:
+ ValueError: the entry narrows its architectures and the host's is
+ either not among them or cannot be mapped to judge it.
+ """
+ if set(ARCHITECTURES) <= set(spec.architectures):
+ return
+ architecture = by_kernel.get(kernel)
+ if architecture is None:
+ raise ValueError(
+ f"Package '{package_id}' is published for "
+ f"{', '.join(spec.architectures)} only on {distribution}, and "
+ f"{HOST_ARCHITECTURE_VAR} ({dict(by_kernel)}) maps no architecture "
+ f"for this host's kernel architecture {kernel or '(fact missing)'!r}."
+ )
+ if architecture in spec.architectures:
+ return
+ raise ValueError(
+ f"Package '{package_id}' cannot be installed on {distribution} "
+ f"{architecture}: its {spec.source} source "
+ f"({', '.join(spec.names)}) is published for "
+ f"{', '.join(spec.architectures)} only. Deploy it on "
+ f"{' or '.join(spec.architectures)}, or on a distribution whose "
+ f"entry ships it for {architecture}."
+ )
+
def build_plan(spec: PackageSpec, state: str) -> list[ModuleCall]:
"""Return the ordered module calls that bring ``spec`` into ``state``."""
diff --git a/utils/packages/registry.py b/utils/packages/registry.py
index 10098914fd..78cf0ccdf6 100644
--- a/utils/packages/registry.py
+++ b/utils/packages/registry.py
@@ -14,6 +14,7 @@ for a target distribution. The declaration shape itself lives in
from __future__ import annotations
+import functools
import os
from dataclasses import dataclass, field
from pathlib import Path
@@ -24,9 +25,11 @@ if TYPE_CHECKING:
from utils.cache import PROJECT_ROOT
from utils.cache.yaml import load_yaml_any
+from utils.github.variant.pools import ARCHITECTURES
from utils.packages.schema import (
BATCH_KEY,
DISTRO_FAMILY,
+ ENTRY_KEYS,
INVENTORY_PACKAGES_VAR,
ROLE_FILE_META_PACKAGES,
SHARED_REFERENCE,
@@ -116,6 +119,13 @@ def load_declarations(project_root: Path) -> list[Declaration]:
raise PackagesShapeError(
f"{path}: {package_id}.{BATCH_KEY} must be a boolean when set."
)
+ misplaced = sorted(mapping.keys() & ENTRY_KEYS)
+ if misplaced:
+ raise PackagesShapeError(
+ f"{path}: {package_id} carries {misplaced} beside its distro "
+ f"keys, where no distro resolves them; move them into the "
+ f"distro entry they belong to."
+ )
declarations.append(Declaration(package_id, role, path, mapping))
return declarations
@@ -202,6 +212,39 @@ def build_registry(project_root: Path) -> dict[str, Declaration]:
return registry
+@functools.cache
+def published_architectures(project_root: Path) -> dict[str, dict[str, frozenset[str]]]:
+ """Per role, per default distro, the architectures every package the role
+ declares or references is published for.
+
+ Args:
+ project_root: repository root holding the package registry.
+
+ Returns:
+ only the narrowed pairs; a role or distro that is absent takes every
+ architecture.
+ """
+ registry = build_registry(project_root)
+ installs: dict[str, set[str]] = {}
+ for package_id, declaration in registry.items():
+ if declaration.role is not None:
+ installs.setdefault(declaration.role, set()).add(package_id)
+ for role, package_ids in load_references(project_root).items():
+ installs.setdefault(role, set()).update(package_ids & registry.keys())
+ narrowed: dict[str, dict[str, frozenset[str]]] = {}
+ for role, package_ids in installs.items():
+ for package_id in sorted(package_ids):
+ for distro in DISTRO_FAMILY:
+ spec = resolve(registry[package_id], distro)
+ if spec is None or not set(ARCHITECTURES) - set(spec.architectures):
+ continue
+ per_distro = narrowed.setdefault(role, {})
+ per_distro[distro] = per_distro.get(
+ distro, frozenset(ARCHITECTURES)
+ ) & frozenset(spec.architectures)
+ return narrowed
+
+
def project_root_from_env() -> Path:
"""Repository root, overridable for tests via ``INFINITO_PROJECT_ROOT``."""
key = "INFINITO_PROJECT_ROOT" # nocheck: test-only override, never set by a deploy
diff --git a/utils/packages/schema.py b/utils/packages/schema.py
index 31c921f3b1..c1ef7a673e 100644
--- a/utils/packages/schema.py
+++ b/utils/packages/schema.py
@@ -48,6 +48,20 @@ pulls them from a Flatpak remote::
named after the application id, not after the binary inside it, so without
this key a role calling ``blender`` finds nothing on PATH.
+``architectures`` narrows one distro entry to the CPU architectures its
+source publishes, drawn from
+:data:`utils.github.variant.pools.ARCHITECTURES`; absent means every one::
+
+ blender:
+ centos:
+ source: flatpak
+ names: [org.blender.Blender]
+ architectures: [amd64]
+
+The deploy matrix keeps a role installing it off that distro and
+architecture pair, and ``package_install`` refuses it there before any
+module runs.
+
``source: download`` fetches one vendor artefact and installs it locally,
for a vendor that publishes a ``.deb`` or ``.rpm`` but runs no repository::
@@ -99,6 +113,7 @@ from dataclasses import dataclass
from typing import TYPE_CHECKING, Any
from utils.distros import distro_family
+from utils.github.variant.pools import ARCHITECTURES
if TYPE_CHECKING:
from pathlib import Path
@@ -155,6 +170,22 @@ REPO_KEYS: frozenset[str] = frozenset(
"""A repository definition must declare at least one of these; the rest
(``name``, ``description``, ``gpgkey``, ``gpgcheck``, ``state``) qualify it."""
+ENTRY_KEYS: frozenset[str] = frozenset(
+ {
+ "names",
+ "source",
+ "repo",
+ "virtual",
+ "build",
+ "download",
+ "flatpak",
+ "architectures",
+ }
+)
+"""Every key a distro entry may carry. Anything else is refused rather than
+ignored: a misspelt ``architecture`` would otherwise drop the narrowing and
+install where the source publishes nothing."""
+
DISTRO_FAMILY: dict[str, str] = distro_family()
"""The default distro matrix mapped onto the ``os_family`` ansible reports
for it, read from the ``meta/distros.yml`` SPOT. Coverage is required for
@@ -176,6 +207,23 @@ class PackageSpec:
build: dict[str, Any] | None = None
flatpak: dict[str, Any] | None = None
download: dict[str, Any] | None = None
+ architectures: tuple[str, ...] = ARCHITECTURES
+
+
+def _validate_architectures(
+ package_id: str, key: str, architectures: Any, path: Path
+) -> None:
+ if (
+ not isinstance(architectures, list)
+ or not architectures
+ or any(value not in ARCHITECTURES for value in architectures)
+ ):
+ raise PackagesShapeError(
+ f"{path}: {package_id}.{key}.architectures must be a non-empty "
+ f"list drawn from {ARCHITECTURES}, got {architectures!r}. An "
+ f"unknown token would match no host and refuse the package "
+ f"everywhere."
+ )
def _validate_repo(package_id: str, key: str, repo: Any, path: Path) -> None:
@@ -270,6 +318,12 @@ def normalize_entry(package_id: str, key: str, value: Any, path: Path) -> Packag
f"{path}: {package_id}.{key} must be a list of names or a mapping, "
f"got {type(value).__name__}."
)
+ unknown = sorted(set(value) - ENTRY_KEYS)
+ if unknown:
+ raise PackagesShapeError(
+ f"{path}: {package_id}.{key} has unknown key(s) {unknown}; an entry "
+ f"may carry {sorted(ENTRY_KEYS)}."
+ )
names = value.get("names")
if not isinstance(names, list) or any(not isinstance(n, str) for n in names):
@@ -302,6 +356,16 @@ def normalize_entry(package_id: str, key: str, value: Any, path: Path) -> Packag
flatpak = value.get("flatpak")
_validate_flatpak(package_id, key, source, flatpak, path)
+ architectures = value.get("architectures", list(ARCHITECTURES))
+ _validate_architectures(package_id, key, architectures, path)
+
return PackageSpec(
- tuple(names), str(source), repo, virtual, build, flatpak, download
+ tuple(names),
+ str(source),
+ repo,
+ virtual,
+ build,
+ flatpak,
+ download,
+ tuple(architectures),
)
diff --git a/utils/requires_python.py b/utils/requires_python.py
new file mode 100644
index 0000000000..dcfed60a97
--- /dev/null
+++ b/utils/requires_python.py
@@ -0,0 +1,37 @@
+"""The Python 3 minors core runs on, read from ``requires-python`` of pyproject.toml."""
+
+from __future__ import annotations
+
+import re
+import tomllib
+from pathlib import Path
+
+from utils.cache.files import PROJECT_ROOT, read_text
+
+FOLLOW = "requires-python"
+_RANGE = re.compile(r"^>=3\.(\d+),<3\.(\d+)$")
+
+
+def requires_python(root: Path = PROJECT_ROOT) -> str:
+ """Return the ``requires-python`` spec of ``/pyproject.toml``.
+
+ Args:
+ root: the repository root holding pyproject.toml.
+ """
+ pyproject = tomllib.loads(read_text(str(Path(root) / "pyproject.toml")))
+ return str(pyproject["project"]["requires-python"])
+
+
+def supported_minors(spec: str) -> range:
+ """Return the Python 3 minors a ``>=3.X,<3.Y`` spec admits.
+
+ Args:
+ spec: the ``requires-python`` value.
+
+ Raises:
+ ValueError: the spec has another shape.
+ """
+ match = _RANGE.fullmatch(spec)
+ if match is None:
+ raise ValueError(f"requires-python {spec!r} must read >=3.X,<3.Y")
+ return range(int(match[1]), int(match[2]))
diff --git a/utils/security/__init__.py b/utils/security/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/utils/security/database.py b/utils/security/database.py
new file mode 100644
index 0000000000..078e912a9a
--- /dev/null
+++ b/utils/security/database.py
@@ -0,0 +1,148 @@
+"""Download the vulnerability databases into one shared directory."""
+
+from __future__ import annotations
+
+import fcntl
+import http.client
+import os
+import shutil
+import time
+import urllib.parse
+import urllib.request
+from pathlib import Path
+from typing import TYPE_CHECKING
+
+from utils.security.pipeline import engine_image, pipeline, role_services, user_runtime
+
+if TYPE_CHECKING:
+ from collections.abc import Callable, Sequence
+ from types import ModuleType
+
+OSV_BUCKET = "https://osv-vulnerabilities.storage.googleapis.com"
+DOWNLOAD_TIMEOUT_SECONDS = 600
+MAX_AGE_SECONDS = 24 * 3600
+LOCK_NAME = ".lock"
+
+
+def osv_url(ecosystem: str) -> str:
+ return f"{OSV_BUCKET}/{urllib.parse.quote(ecosystem)}/all.zip"
+
+
+def fetch_url(url: str, destination: Path) -> None:
+ request = urllib.request.Request( # noqa: S310 - https download from the OSV bucket
+ url, headers={"User-Agent": "infinito-nexus-vulnerability-db"}
+ )
+ with (
+ urllib.request.urlopen(request, timeout=DOWNLOAD_TIMEOUT_SECONDS) as response, # noqa: S310 - https download from the OSV bucket
+ destination.open("wb") as target,
+ ):
+ shutil.copyfileobj(response, target)
+
+
+def osv_zips(p: ModuleType, root: Path) -> list[Path]:
+ """Return the OSV offline database file of every listed ecosystem."""
+ return [
+ root / "osv" / p.OSV_DB_LAYOUT / ecosystem / "all.zip"
+ for ecosystem in role_services()["osv"]["ecosystems"]
+ ]
+
+
+def fetch_databases(
+ p: ModuleType,
+ root: Path,
+ engines: Sequence[str],
+ runner,
+ fetch: Callable[[str, Path], None],
+) -> list[str]:
+ """Download the databases of *engines* into *root*.
+
+ Args:
+ p: the vulnerability pipeline.
+ root: the database root, one directory per engine.
+ engines: the engines whose database to download.
+ runner: runs one engine command.
+ fetch: ``(url, destination)`` downloader.
+
+ Returns:
+ The error lines of the engines whose download failed.
+ """
+ layout = p.Layout(
+ runtime=user_runtime(), databases=root, sbom=root, work=root, excludes=()
+ )
+ lanes = []
+ for engine in engines:
+ (root / engine).mkdir(parents=True, exist_ok=True)
+ if engine != "osv":
+ lanes.append(p.db_steps(engine, layout, engine_image(engine)))
+ errors = p._flat(p.run_lanes(lanes, runner, len(lanes) or 1))
+ if "osv" in engines:
+ for zip_file in osv_zips(p, root):
+ zip_file.parent.mkdir(parents=True, exist_ok=True)
+ partial = zip_file.with_name(f"{zip_file.name}.part")
+ try:
+ fetch(osv_url(zip_file.parent.name), partial)
+ except (OSError, http.client.HTTPException) as exc:
+ partial.unlink(missing_ok=True)
+ errors.append(f"osv {zip_file.parent.name}: {exc}")
+ continue
+ partial.replace(zip_file)
+ for engine in engines:
+ errors += p.missing_databases(engine, root)
+ return errors
+
+
+def database_files(p: ModuleType, root: Path, engine: str) -> list[Path]:
+ """Return the files that make up one engine's database."""
+ if engine == "osv":
+ return osv_zips(p, root)
+ return [root / engine / marker for marker in p.DB_MARKERS[engine]]
+
+
+def stale(p: ModuleType, root: Path, engine: str, now: float) -> bool:
+ """Whether one engine's database is missing or older than a day."""
+ files = database_files(p, root, engine)
+ return not all(
+ path.is_file() and now - path.stat().st_mtime < MAX_AGE_SECONDS
+ for path in files
+ )
+
+
+def hand_over(root: Path, paths: Sequence[Path]) -> None:
+ """Give *paths* and everything below them to the owner of *root*.
+
+ Args:
+ root: the shared database directory.
+ paths: what this process may have written below *root*; a path it
+ did not create is skipped.
+ """
+ if os.geteuid() != 0:
+ return
+ owner = root.stat()
+ for path in (path for path in paths if path.exists()):
+ os.chown(path, owner.st_uid, owner.st_gid)
+ tree = os.walk(path) # nocheck: project-walk - not the repository
+ for directory, dirs, files in tree:
+ for name in (*dirs, *files):
+ os.chown(Path(directory) / name, owner.st_uid, owner.st_gid)
+
+
+def refresh(
+ root: Path,
+ engines: Sequence[str],
+ runner,
+ fetch: Callable[[str, Path], None],
+) -> list[str]:
+ """Download every database of *engines* that is missing or stale.
+
+ Returns:
+ The error lines of the downloads that failed.
+ """
+ p = pipeline()
+ root.mkdir(parents=True, exist_ok=True)
+ lock_path = root / LOCK_NAME
+ with lock_path.open("a") as lock:
+ fcntl.flock(lock, fcntl.LOCK_EX)
+ outdated = [engine for engine in engines if stale(p, root, engine, time.time())]
+ errors = fetch_databases(p, root, outdated, runner, fetch) if outdated else []
+ hand_over(root, [lock_path, *(root / engine for engine in outdated)])
+ return errors
diff --git a/utils/security/deploy.py b/utils/security/deploy.py
new file mode 100644
index 0000000000..fc72b4f1fc
--- /dev/null
+++ b/utils/security/deploy.py
@@ -0,0 +1,80 @@
+"""Pin the vulnerability scan of a development or CI deploy to one engine."""
+
+from __future__ import annotations
+
+import os
+import random
+from pathlib import Path
+from typing import TYPE_CHECKING
+
+from utils.security.database import fetch_url, refresh
+from utils.security.engine import (
+ ENGINE_ENV,
+ databases_for,
+ deploy_overrides,
+ draw_engine,
+ pinned_engine,
+)
+from utils.security.pipeline import pipeline
+
+if TYPE_CHECKING:
+ from collections.abc import Callable
+
+HOST_PATH_ENV = "INFINITO_VULNERABILITY_DB_HOST_PATH"
+TARGET_DIR_ENV = "INFINITO_VULNERABILITY_DB_DIR"
+
+
+def provided_databases(root: Path, engine: str) -> None:
+ """Fail unless every database a pinned *engine* reads is in *root*.
+
+ Raises:
+ SystemExit: a database was not provided.
+ """
+ for name in databases_for(engine):
+ path = root / name
+ if not path.is_dir() or not any(path.iterdir()):
+ raise SystemExit(
+ f"{ENGINE_ENV}={engine} but no {name} database at {path}; "
+ "provide it before the deploy"
+ )
+
+
+def inventory_overrides(
+ rng: random.Random,
+ refresher: Callable[[Path, list[str]], list[str]],
+) -> dict:
+ """Return the inventory override of one development or CI deploy.
+
+ A pinned engine reads databases that were provided and never downloads
+ one. Without a pin the deploy draws an engine and refreshes the shared
+ host databases it reads first.
+
+ Args:
+ rng: draws the engine of an unpinned deploy.
+ refresher: ``(root, engines) -> error lines``, see
+ :func:`utils.security.database.refresh`.
+
+ Raises:
+ SystemExit: a provided database is missing or a refresh failed.
+ """
+ root = Path(os.environ[HOST_PATH_ENV])
+ engine = pinned_engine()
+ if engine:
+ provided_databases(root, engine)
+ else:
+ engine = draw_engine(rng)
+ print(f">>> vulnerability engine of this deploy: {engine}")
+ errors = refresher(root, databases_for(engine))
+ if errors:
+ raise SystemExit("\n".join(errors))
+ return deploy_overrides(engine, os.environ[TARGET_DIR_ENV])
+
+
+def refresh_shared(root: Path, engines: list[str]) -> list[str]:
+ """:func:`utils.security.database.refresh` with the real engines and downloads."""
+ return refresh(root, engines, pipeline().default_runner, fetch_url)
+
+
+def deploy_inventory_overrides() -> dict:
+ """:func:`inventory_overrides` for a real deploy."""
+ return inventory_overrides(random.SystemRandom(), refresh_shared)
diff --git a/utils/security/engine.py b/utils/security/engine.py
new file mode 100644
index 0000000000..dcf88c78fe
--- /dev/null
+++ b/utils/security/engine.py
@@ -0,0 +1,84 @@
+"""Which vulnerability engines a development or CI deploy runs.
+
+Every such deploy runs Syft and one drawn engine, plus Grype over the
+source-built runtimes. A CI deploy job pins the engine its matrix row drew in
+``INFINITO_VULNERABILITY_ENGINE`` and provides the databases; a local deploy
+draws one at random. Only production hosts run every engine of
+``sys-ctl-hlth-runtime``.
+"""
+
+from __future__ import annotations
+
+import os
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ import random
+
+ROLE = "sys-ctl-hlth-runtime"
+SCANNERS = ("trivy", "grype", "osv")
+SBOM_BUILDER = "syft"
+RUNTIME_ENGINE = "grype"
+ENGINE_ENV = "INFINITO_VULNERABILITY_ENGINE"
+
+
+def pinned_engine() -> str:
+ """Return the engine the environment pins, ``""`` when none is pinned."""
+ return os.environ.get(ENGINE_ENV, "").strip()
+
+
+def draw_engine(rng: random.Random) -> str:
+ """Draw the engine of a local deploy."""
+ return rng.choice(SCANNERS)
+
+
+def _known(engine: str) -> str:
+ if engine not in SCANNERS:
+ raise ValueError(
+ f"unknown vulnerability engine {engine!r}; expected {', '.join(SCANNERS)}"
+ )
+ return engine
+
+
+def engines_for(engine: str) -> list[str]:
+ """Return the engine list that runs *engine* behind a Syft SBOM.
+
+ Raises:
+ ValueError: *engine* is not one of :data:`SCANNERS`.
+ """
+ return [SBOM_BUILDER, _known(engine)]
+
+
+def databases_for(engine: str) -> list[str]:
+ """Return the databases a deploy pinned to *engine* reads.
+
+ Grype also scans the source-built runtimes of every SBOM, so its
+ database is always among them.
+
+ Raises:
+ ValueError: *engine* is not one of :data:`SCANNERS`.
+ """
+ return [name for name in SCANNERS if name in {_known(engine), RUNTIME_ENGINE}]
+
+
+def deploy_overrides(engine: str, database_dir: str) -> dict:
+ """Return the ``applications`` override that pins the scan to *engine*.
+
+ Args:
+ engine: the engine of the deploy.
+ database_dir: where the deploy target reads the databases.
+
+ Returns:
+ The override of ``sys-ctl-hlth-runtime``'s ``runtime`` service.
+ """
+ return {
+ ROLE: {
+ "services": {
+ "runtime": {
+ "engines": engines_for(engine),
+ "database_dir": database_dir,
+ "db_update": False,
+ }
+ }
+ }
+ }
diff --git a/utils/security/pipeline.py b/utils/security/pipeline.py
new file mode 100644
index 0000000000..e7a67349f4
--- /dev/null
+++ b/utils/security/pipeline.py
@@ -0,0 +1,52 @@
+"""Repository-side access to the vulnerability pipeline of ``sys-ctl-hlth-runtime``.
+
+The role ships the pipeline as one standalone script, since a node runs it
+without the repository. The repository tools load that same file instead of
+keeping a second copy of the parsers, the threshold and the suppression
+matching.
+"""
+
+from __future__ import annotations
+
+import functools
+import importlib.util
+import os
+import sys
+from typing import TYPE_CHECKING, Any
+
+from utils import PROJECT_ROOT
+from utils.cache.yaml import load_yaml_any
+from utils.roles.mapping import ROLE_FILE_META_SERVICES
+from utils.security.engine import ROLE
+
+if TYPE_CHECKING:
+ from types import ModuleType
+
+SCRIPT = PROJECT_ROOT / "roles" / ROLE / "files" / "python" / "script.py"
+MODULE = "sys_ctl_hlth_runtime_script"
+
+
+@functools.cache
+def pipeline() -> ModuleType:
+ """Return the role's ``script.py`` loaded as a module."""
+ spec = importlib.util.spec_from_file_location(MODULE, SCRIPT)
+ module = importlib.util.module_from_spec(spec)
+ sys.modules[MODULE] = module
+ spec.loader.exec_module(module)
+ return module
+
+
+def role_services() -> dict[str, Any]:
+ """Return the role's ``meta/services.yml`` as declared."""
+ return load_yaml_any(str(PROJECT_ROOT / "roles" / ROLE / ROLE_FILE_META_SERVICES))
+
+
+def user_runtime() -> tuple[str, ...]:
+ """Return ``docker run`` as the calling user, so the engines write files it owns."""
+ return ("docker", "run", "--user", f"{os.getuid()}:{os.getgid()}")
+
+
+def engine_image(engine: str) -> str:
+ """Return the pinned ``:`` of one engine."""
+ service = role_services()[engine]
+ return f"{service['image']}:{service['version']}"
diff --git a/utils/security/suppressions.py b/utils/security/suppressions.py
new file mode 100644
index 0000000000..7abe987a1b
--- /dev/null
+++ b/utils/security/suppressions.py
@@ -0,0 +1,307 @@
+"""CVE suppressions a role declares in its ``meta/services.yml``.
+
+Each service entry MAY carry::
+
+ :
+ security:
+ suppressions:
+ # nocheck: cve
+ - id: CVE-2026-1234
+ until: 2026-12-31
+ # nocheck: cve
+ - image_tag: "2.18.5"
+ until: 2026-12-31
+
+An ``id`` entry accepts one CVE, an ``image_tag`` entry every finding of the
+service's image while it runs that tag.
+"""
+
+from __future__ import annotations
+
+import datetime as dt
+import re
+from collections.abc import Mapping
+from dataclasses import dataclass
+from typing import TYPE_CHECKING, Any
+
+from utils.cache.yaml import load_yaml_any
+from utils.roles.mapping import ROLE_FILE_META_SERVICES
+
+if TYPE_CHECKING:
+ from pathlib import Path
+
+RULE = "cve"
+CVE_PATTERN = re.compile(r"^CVE-\d{4}-\d{4,}$")
+ENTRY_KEYS = frozenset({"id", "image_tag", "until"})
+SUBJECT_KEYS = ("id", "image_tag")
+
+
+class SuppressionError(ValueError):
+ """A ``security.suppressions`` entry that does not follow the format."""
+
+
+@dataclass(frozen=True)
+class Suppression:
+ """One accepted CVE, or every finding of one image tag, of one service.
+
+ Args:
+ id: the ``CVE-YYYY-NNNN`` id, ``None`` for an image tag entry.
+ image_tag: the image tag, ``None`` for a CVE entry.
+ until: the last day the suppression applies.
+ """
+
+ id: str | None
+ image_tag: str | None
+ until: dt.date
+
+ @property
+ def subject(self) -> str:
+ return self.id or f"image tag {self.image_tag}"
+
+ def as_json(self) -> dict[str, str | None]:
+ return {
+ "id": self.id,
+ "image_tag": self.image_tag,
+ "until": self.until.isoformat(),
+ }
+
+
+def _until(value: Any, where: str) -> dt.date:
+ if isinstance(value, dt.datetime):
+ raise SuppressionError(f"{where}: until must be a date, not a timestamp")
+ if isinstance(value, dt.date):
+ return value
+ if isinstance(value, str):
+ try:
+ return dt.date.fromisoformat(value)
+ except ValueError as exc:
+ raise SuppressionError(
+ f"{where}: until {value!r} is no YYYY-MM-DD date"
+ ) from exc
+ raise SuppressionError(f"{where}: until is required and must be a YYYY-MM-DD date")
+
+
+def parse_entries(entries: Any, where: str) -> list[Suppression]:
+ """Validate the ``security.suppressions`` list of one service.
+
+ Args:
+ entries: the raw list.
+ where: ``:`` for the error message.
+
+ Returns:
+ The suppressions in declaration order.
+
+ Raises:
+ SuppressionError: the list or one of its entries is malformed.
+ """
+ if not isinstance(entries, list):
+ raise SuppressionError(f"{where}: security.suppressions must be a list")
+ parsed = []
+ for index, entry in enumerate(entries):
+ label = f"{where} suppression #{index}"
+ if not isinstance(entry, Mapping):
+ raise SuppressionError(
+ f"{label}: must be a mapping with id or image_tag and until"
+ )
+ unknown = sorted(set(entry) - ENTRY_KEYS)
+ if unknown:
+ raise SuppressionError(f"{label}: unknown key(s) {', '.join(unknown)}")
+ subjects = [key for key in SUBJECT_KEYS if key in entry]
+ if len(subjects) != 1:
+ raise SuppressionError(f"{label}: needs exactly one of id and image_tag")
+ cve = entry.get("id")
+ tag = entry.get("image_tag")
+ if "id" in entry and (not isinstance(cve, str) or not CVE_PATTERN.match(cve)):
+ raise SuppressionError(f"{label}: id {cve!r} is no CVE-YYYY-NNNN id")
+ if "image_tag" in entry and (not isinstance(tag, str) or not tag):
+ raise SuppressionError(
+ f"{label}: image_tag {tag!r} must be a non-empty quoted string"
+ )
+ parsed.append(
+ Suppression(id=cve, image_tag=tag, until=_until(entry.get("until"), label))
+ )
+ return parsed
+
+
+def service_suppressions(services: Any, role: str) -> dict[str, list[Suppression]]:
+ """Return the suppressions of every service of one role.
+
+ Args:
+ services: the role's ``meta/services.yml`` mapping.
+ role: the role id, for error messages.
+
+ Returns:
+ ``{service: [Suppression, ...]}`` for each service that declares
+ ``security.suppressions``.
+
+ Raises:
+ SuppressionError: a declared list is malformed.
+ """
+ if not isinstance(services, Mapping):
+ return {}
+ found: dict[str, list[Suppression]] = {}
+ for service, spec in services.items():
+ if not isinstance(spec, Mapping):
+ continue
+ security = spec.get("security")
+ if security is None:
+ continue
+ if not isinstance(security, Mapping) or "suppressions" not in security:
+ raise SuppressionError(f"{role}:{service}: security must hold suppressions")
+ found[str(service)] = parse_entries(
+ security["suppressions"], f"{role}:{service}"
+ )
+ return found
+
+
+def role_suppressions(roles_dir: Path, role: str) -> dict[str, list[Suppression]]:
+ """Read :func:`service_suppressions` from a role's ``meta/services.yml``.
+
+ Args:
+ roles_dir: the ``roles/`` directory.
+ role: the role id.
+ """
+ path = roles_dir / role / ROLE_FILE_META_SERVICES
+ if not path.is_file():
+ return {}
+ return service_suppressions(load_yaml_any(str(path)), role)
+
+
+IMAGE_TAG_KEY = re.compile(r"^\s*(?:-\s+)?image_tag\s*:")
+
+
+def _blank(line: str) -> bool:
+ return not line.strip()
+
+
+def _indent(line: str) -> int:
+ return len(line) - len(line.lstrip(" "))
+
+
+def _item(line: str, indent: int) -> bool:
+ return _indent(line) == indent and line.lstrip().startswith("-")
+
+
+def _span_end(lines: list[str], index: int) -> int:
+ """Return the index after the last line of the value under the key at *index*.
+
+ A sequence written at the key's own indent belongs to the value too, with
+ the comments directly above its items.
+ """
+ key = _indent(lines[index])
+ end = index + 1
+ cursor = index + 1
+ while cursor < len(lines):
+ line = lines[cursor]
+ if _blank(line):
+ cursor += 1
+ continue
+ if _indent(line) > key or _item(line, key):
+ cursor += 1
+ end = cursor
+ continue
+ ahead = cursor
+ while ahead < len(lines) and (
+ _blank(lines[ahead]) or lines[ahead].lstrip().startswith("#")
+ ):
+ ahead += 1
+ if ahead < len(lines) and _item(lines[ahead], key):
+ cursor = ahead
+ continue
+ break
+ return end
+
+
+def _kept_entries(region: list[str]) -> list[str]:
+ """Return the list *region* without its ``image_tag`` entries and their markers."""
+ starts = [line for line in region if line.lstrip().startswith("-")]
+ if not starts:
+ return region
+ item_indent = min(_indent(line) for line in starts)
+ groups: list[list[str]] = []
+ pending: list[str] = []
+ for line in region:
+ if _item(line, item_indent):
+ groups.append([*pending, line])
+ pending = []
+ elif groups and not (
+ line.lstrip().startswith("#") and _indent(line) <= item_indent
+ ):
+ groups[-1].append(line)
+ else:
+ pending.append(line)
+ kept = [
+ line
+ for group in groups
+ if not any(IMAGE_TAG_KEY.match(line) for line in group)
+ for line in group
+ ]
+ return [*kept, *pending]
+
+
+def _drop_in_body(body: list[str]) -> list[str]:
+ content = [line for line in body if not _blank(line)]
+ if not content:
+ return body
+ child = min(_indent(line) for line in content)
+ security = next(
+ (
+ index
+ for index, line in enumerate(body)
+ if _indent(line) == child and re.match(r"^\s*security\s*:\s*$", line)
+ ),
+ None,
+ )
+ if security is None:
+ return body
+ security_end = _span_end(body, security)
+ listing = next(
+ (
+ index
+ for index in range(security + 1, security_end)
+ if re.match(r"^\s*suppressions\s*:\s*$", body[index])
+ ),
+ None,
+ )
+ if listing is None:
+ return body
+ listing_end = _span_end(body, listing)
+ kept = _kept_entries(body[listing + 1 : listing_end])
+ if any(not _blank(line) and not line.lstrip().startswith("#") for line in kept):
+ return [*body[: listing + 1], *kept, *body[listing_end:]]
+ body = [*body[:listing], *body[listing_end:]]
+ security_end = _span_end(body, security)
+ if all(_blank(line) for line in body[security + 1 : security_end]):
+ body = [*body[:security], *body[security_end:]]
+ return body
+
+
+def drop_image_tag_entries(lines: list[str], service: str) -> list[str]:
+ """Remove the ``image_tag`` suppressions of one top-level service.
+
+ The image updater calls this when it moves the service to another
+ version, so a tag suppression never outlives its tag. Each entry leaves
+ with the marker comments above it; a list left empty takes its
+ ``suppressions:`` key along, and a ``security:`` key left empty its own.
+
+ Args:
+ lines: the lines of a ``meta/services.yml``, line endings kept.
+ service: the top-level service key.
+
+ Returns:
+ The lines without those entries; *lines* itself when there are none.
+ """
+ header = re.compile(rf"^{re.escape(service)}\s*:")
+ start = next((i for i, line in enumerate(lines) if header.match(line)), None)
+ if start is None:
+ return lines
+ end = next(
+ (
+ index
+ for index in range(start + 1, len(lines))
+ if not _blank(lines[index]) and _indent(lines[index]) == 0
+ ),
+ len(lines),
+ )
+ body = _drop_in_body(lines[start + 1 : end])
+ return [*lines[: start + 1], *body, *lines[end:]]
diff --git a/utils/symbol_glossary.py b/utils/symbol_glossary.py
index d5b429ad92..9b32a8cd4b 100644
--- a/utils/symbol_glossary.py
+++ b/utils/symbol_glossary.py
@@ -40,6 +40,10 @@ SYMBOLS: dict[str, str] = {
"multi": "🌈",
"vpn": "🚇",
"direct": "🛣️",
+ "vulnerability_engine": "🔬",
+ "trivy": "🔺",
+ "grype": "🍇",
+ "osv": "🐙",
"stack": "🥞",
"host": "💻",
"row": "🔢",
diff --git a/utils/tests/swarm/matrix.py b/utils/tests/swarm/matrix.py
index f576f096b3..71f442b6bf 100644
--- a/utils/tests/swarm/matrix.py
+++ b/utils/tests/swarm/matrix.py
@@ -11,6 +11,7 @@ import time
from plugins.filter.merge.with_defaults import merge_with_defaults
from utils import PROJECT_ROOT
+from utils.security.deploy import deploy_inventory_overrides
from utils.storage.constrained import host_storage_constrained
from utils.tests.swarm.derive_includes import derive_includes, variant_scope
from utils.tests.swarm.extend_inventory import drop_backup_network_mode, mesh_enabled
@@ -378,6 +379,7 @@ def main(argv: list[str] | None = None) -> int:
total = len(plan)
rc = 0
meshed = mesh_enabled()
+ scan_pin = deploy_inventory_overrides()
for plan_index, (
round_index,
inv_dir,
@@ -415,6 +417,7 @@ def main(argv: list[str] | None = None) -> int:
applications = backup_applications_overrides(providers)
if meshed:
applications = merge_with_defaults(applications, layout_applications())
+ applications = merge_with_defaults(applications, scan_pin)
base_overrides = {
"applications": applications,
"users": {
@@ -464,9 +467,7 @@ def main(argv: list[str] | None = None) -> int:
)
if rc == 0 and meshed:
rc = _mesh_prologue(
- app_id=app_id,
- inv_dir=inv_root,
- round_variants=round_variants,
+ app_id=app_id, inv_dir=inv_root, round_variants=round_variants
)
if rc == 0:
rc = _deploy(**deploy_args)
diff --git a/utils/update/docker.py b/utils/update/docker.py
index 19fdcc630d..46a7d1a3d5 100644
--- a/utils/update/docker.py
+++ b/utils/update/docker.py
@@ -42,6 +42,7 @@ from utils.docker.image.ref import (
)
from utils.docker.registry import fetch_registry_tags
from utils.roles.mapping import ROLE_FILE_META_SERVICES
+from utils.security.suppressions import drop_image_tag_entries
from utils.update.base import (
declares_source,
is_maintained,
@@ -410,12 +411,13 @@ def update_config_versions(config_path: Path, service_versions: dict[str, str])
The file root IS the services map (no ``services.`` wrapper), so the
walker tracks one nesting level: top-level service keys and their
- immediate ``version:`` field.
+ immediate ``version:`` field. A service that moves to another version
+ loses its ``image_tag`` CVE suppressions, which named the old tag.
"""
lines = config_path.read_text( # nocheck: cache-read — read-then-write of the same file; cached read would go stale
encoding="utf-8"
).splitlines(keepends=True)
- changed = False
+ moved: list[str] = []
services_indent: int = 0
current_service: str | None = None
@@ -463,12 +465,14 @@ def update_config_versions(config_path: Path, service_versions: dict[str, str])
if line.endswith("\n"):
new_line += "\n"
lines[index] = new_line
- changed = True
+ moved.append(current_service)
- if changed:
+ for service in moved:
+ lines = drop_image_tag_entries(lines, service)
+ if moved:
config_path.write_text("".join(lines), encoding="utf-8")
- return changed
+ return bool(moved)
def apply_updates(updates: list[DockerImageVersionUpdate]) -> list[Path]:
diff --git a/utils/update/follow.py b/utils/update/follow.py
index 8c22f84128..76a0225bb7 100644
--- a/utils/update/follow.py
+++ b/utils/update/follow.py
@@ -5,6 +5,10 @@ newer tag of the same shape whose digest equals the one ```` points at.
Ubuntu's ``latest`` names the newest LTS release and Fedora's the newest
stable one, while the higher numbers (Ubuntu's interim releases, Fedora's
rawhide) point elsewhere.
+
+``follow: requires-python`` holds a ``python`` base that pip-installs core to
+the minors ``requires-python`` of pyproject.toml admits, since pip refuses
+core on any other.
"""
from __future__ import annotations
@@ -16,6 +20,7 @@ import time
import urllib.error
from utils.docker.image.ref import dockerhub_repo
+from utils.requires_python import FOLLOW, requires_python, supported_minors
from utils.update.base import version_depth, version_flavor, version_key
from utils.update.fetch import get
@@ -53,9 +58,11 @@ def followed_tags(
current: the pinned version.
Returns:
- The tags unchanged without ``follow``; otherwise the newer tags of the
- pin's depth and flavor that share the followed tag's digest, and none
- when Docker Hub cannot be read, which is reported on stderr.
+ The tags unchanged without ``follow``; with ``follow: requires-python``
+ the newer tags of the pin's depth and flavor on a Python 3 minor that
+ ``requires-python`` admits; otherwise the newer ones that share the
+ followed tag's digest, and none when Docker Hub cannot be read, which
+ is reported on stderr.
"""
follow = config.get("follow") if isinstance(config, dict) else None
if follow is None:
@@ -67,6 +74,19 @@ def followed_tags(
and version_flavor(tag) == version_flavor(current)
and version_key(tag) > version_key(current)
]
+ if follow == FOLLOW:
+ minors = supported_minors(requires_python())
+ kept = [
+ tag
+ for tag in newer
+ if version_key(tag)[0] == 3 and version_key(tag)[1] in minors
+ ]
+ print(
+ f"[follow] {image}:{current}: requires-python admits "
+ f"{kept or 'none'} among newer {newer or 'none'}",
+ file=sys.stderr,
+ )
+ return kept
try:
target = tag_digest(image, str(follow))
kept = [tag for tag in newer if tag_digest(image, tag) == target]