fix(ci): drop the stale 3x-ui whitelist entry and the wrong helper name (T43)

Check #1 allows `:latest` images listed in LATEST_ALLOWLIST. The list still
carried `ghcr.io/mhsanaei/3x-ui:latest` with the comment "panel frozen on
:latest", but the panel has been pinned to `ghcr.io/mhsanaei/3x-ui:v3.10.2`
since 2026-10-20 (modules/containers/3x-ui.nix:62, R1.5). The entry matched
nothing, and the comment stated the opposite of the invariant it cited.

Consequence of the stale entry: if someone reverted the pin to `:latest`, the
check would have stayed green and said nothing. Verified by mutation — with
v3.10.2 temporarily replaced by :latest the check now reports
"Images using :latest (not in whitelist): ghcr.io/mhsanaei/3x-ui:latest";
before this commit the same mutation passed silently.

Also: check #4's description named `mkServiceStorage`, while the guard the
consumers actually call is `mkStorageGuard` (lib/xlib/helpers.nix:180). Both
names exist in that file and mean different things, so the comment pointed at
the wrong helper. Now it names the right one and says so explicitly.

`bash .ci/checks.sh --no-build` -> PASS 3 / FAIL 0, before and after; the
current tree contains exactly two `:latest` images, both tape-rotation, both
still whitelisted.

Not pushed.
This commit is contained in:
oqyude committed 2026-10-24 02:19:39 +03:00
1 parent 39e1887d78
commit 3fb1f3ca6e
2 files changed
+10 -6

No files matched your search

+9 -5
View File
@@ -13,12 +13,15 @@
# Checks implemented: # Checks implemented:
# #2 nix flake check (all outputs evaluate) # #2 nix flake check (all outputs evaluate)
# #7 secrets/ files match .sops.yaml path_regex # #7 secrets/ files match .sops.yaml path_regex
# #1 no `:latest` in container images (with R1.5 whitelist: 3x-ui is frozen on :latest) # #1 no `:latest` in container images (whitelist: tape-rotation only;
# 3x-ui is pinned to v3.10.2 since 2026-10-20, R1.5)
# #8 every import reference resolves (no dangling imports) — added 2026-10-24 # #8 every import reference resolves (no dangling imports) — added 2026-10-24
# #
# Not yet implemented (candidates from analysis-report.md §5): # Not yet implemented (candidates from analysis-report.md §5):
# #3 coredns domains ↔ nginx vhosts bidirectional match # #3 coredns domains ↔ nginx vhosts bidirectional match
# #4 mkServiceStorage consumers have existing External dir # #4 mkStorageGuard consumers have an existing External dir
# (lib/xlib/helpers.nix:180 — note the helper is mkStorageGuard, not
# mkServiceStorage; the two names referred to the same idea historically)
# #5 last nftables chain rule is explicit (drop/reject/policy) # #5 last nftables chain rule is explicit (drop/reject/policy)
# #6 listen.addr is interface, not network (e.g. 0.0.0.0 is OK, 192.168.0.0/24 is not) # #6 listen.addr is interface, not network (e.g. 0.0.0.0 is OK, 192.168.0.0/24 is not)
@@ -28,9 +31,10 @@ REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$REPO_ROOT" cd "$REPO_ROOT"
LATEST_ALLOWLIST=( LATEST_ALLOWLIST=(
# R1.5: 3x-ui panel frozen on :latest; Xray version is panel state (R1.8) # tape-rotation: data on External (storage-guarded); manual updates.
"ghcr.io/mhsanaei/3x-ui:latest" # The 3x-ui panel used to be whitelisted here as "frozen on :latest".
# tape-rotation: data on External (storage-guarded); manual updates # It is pinned to ghcr.io/mhsanaei/3x-ui:v3.10.2 since 2026-10-20 (R1.5),
# so a `:latest` for it must now fail this check instead of being allowed.
"docker.io/elizaroveugene/taperotation-backend:latest" "docker.io/elizaroveugene/taperotation-backend:latest"
"docker.io/elizaroveugene/taperotation-frontend:latest" "docker.io/elizaroveugene/taperotation-frontend:latest"
) )
+1 -1
View File
@@ -5,7 +5,7 @@ repos:
name: nixos flake invariant checks name: nixos flake invariant checks
description: | description: |
Runs .ci/checks.sh: sops path_regex compliance, no Runs .ci/checks.sh: sops path_regex compliance, no
`:latest` in container images (with R1.5/R1.8 whitelist), `:latest` in container images (whitelist: tape-rotation only),
and `nix flake check` (skippable via --no-build). and `nix flake check` (skippable via --no-build).
entry: bash .ci/checks.sh --no-build entry: bash .ci/checks.sh --no-build
language: script language: script