Allow digest-pinned latest image tags

This commit is contained in:
nmfretz committed 2026-06-19 12:28:15 +10:00
1 parent fd52f7d8ac
commit 782ee760cc
1 file changed
+4 -1
+4 -1
View File
@@ -534,7 +534,10 @@ class AppLinter {
}
if (parsed.tag === "latest") {
this.add("error", "image.latest", `${app}/docker-compose.yml`, serviceKeyLine(content, service, "image"), `Image \`${image}\` uses the moving \`latest\` tag.`);
// Pinned latest is reproducible, but still weaker than a release tag.
// Unpinned latest never reaches this branch because parseImageRef requires
// a tag plus sha256 digest.
this.add("warning", "image.latest", `${app}/docker-compose.yml`, serviceKeyLine(content, service, "image"), `Image \`${image}\` uses the moving \`latest\` tag pinned by digest. Use a versioned release, commit, or date tag when upstream publishes one; pinned \`latest\` should be a last resort when no stable tag is available.`);
}
if (this.options.checkImages) {