Repository navigation
feat: preflight-validate every module against its image's real OCI config - #21
Merged
Merged
Conversation
…nfig
Four modules shipped broken and were only caught by launching them on a
cluster. Every failure was statically detectable from the image's own config:
ark no ENTRYPOINT and Cmd=/bin/bash, template set no spec.command, so
the container got a non-interactive bash, read EOF and exited 0 —
restart-looping with an empty log
pz image is rootless; we ran it as root, then as the uid its README
claims (1000) rather than the uid its /etc/passwd actually has
pz spec.security.runAsUser silently drops $HOME, so SteamCMD resolved
"$HOME/Steam" to "//Steam" and died
gmod PVC mounted over baked-in image content, shadowing entrypoint.sh
validate.py pulls each declared image's OCI config (Docker Hub anonymous
token flow, handling multi-arch indexes) and enforces the rules those bugs
imply, plus: the image must actually exist (three modules once shipped with
fabricated images), rcon.protocol must be one the agent implements, and
mods.loaders requires a versions catalog. Registry failures degrade to a
warning rather than failing the build spuriously.
Verified against git history: it flags all four historical bugs from the
pre-fix templates, and is clean on the current ones.
It also found a real, unlaunched bug: cs2 declares User 1000:1000 with no
security block and no HOME, so it would have hit BOTH project-zomboid
failures on first boot. Fixed here before anyone ran it.
Wires into CI — this repo had none.
Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The root issue: four modules shipped broken and were only ever caught by launching them on a cluster. Every single failure was statically detectable from the image's own config — we just never looked.
validate.pypulls each declared image's OCI config (Docker Hub anonymous token flow, multi-arch aware) and enforces the rules those bugs imply:spec.commandUsernon-root ⇒ template must setsecurity.runAsUserrunAsUserset ⇒ template must declareHOME$HOME/Steam→//SteammountPathmust not shadow the entrypointrcon.protocol∈ {source, telnet, none}mods.loadersrequiresspec.versionsVerified against git history: it flags all four historical bugs from their pre-fix templates, and is clean on the current ones.
It already earned its keep: it found a real bug in cs2, which has never been launched —
joedwards32/cs2declaresUser: 1000:1000but the template had nosecurityblock and noHOME, so it would have hit both Project Zomboid failures on first boot. Fixed in this PR before anyone ran it.Registry failures degrade to a warning rather than failing the build spuriously. Wires into CI — this repo had none.