HTTP2Shell (CVE-2026-111497) lane batch 2: security-fix steps karakeep 0.34.1, tandoor 2.7.2 (Node 24.22.1 read from the image; 9202 proven); box_walk moves two services sharing one image (felhom.eu R-1332)
gates / gates (push) Successful in 40s

This commit is contained in:
admin committed 2026-10-28 10:31:38 +01:00
1 parent abf3db352e
commit 71e3fdfc95
12 files changed
+717 -20

No files matched your search

+20 -5
View File
@@ -397,6 +397,22 @@ def drill_bump(app, frm, to, service_hint=None):
return _drill_bump(app, frm, to, service_hint)
def move_images(s, froms, tos):
"""Move each `image: FROM` line of a compose text to its TO. Returns (text, None), or (the text unchanged, the FROM
that cannot move). Two services that share one image (dawarich + dawarich-sidekiq) list the same pair twice and move
together; one FROM asked to go to two different TOs is refused. Pinned by test_box_walk_drill_move.py."""
pairs = {}
for f1, t1 in zip(froms, tos):
if pairs.setdefault(f1, t1) != t1:
return s, f1
out = s
for f1, t1 in pairs.items():
if f"image: {f1}" not in out:
return s, f1
out = out.replace(f"image: {f1}", f"image: {t1}")
return out, None
def _drill_bump(app, frm, to, service_hint=None):
"""Commit the edge to the DRILL repo. catalog_since set by hand (the drill repo has no gates).
@@ -413,11 +429,10 @@ def _drill_bump(app, frm, to, service_hint=None):
if len(froms) != len(tos):
say(f" [5] from/to lists differ in length: {froms} vs {tos}")
return None
for f1, t1 in zip(froms, tos):
if f"image: {f1}" not in s:
say(f" [5] FROM ref not found in compose: {f1}")
return None
s = s.replace(f"image: {f1}", f"image: {t1}")
s, missing = move_images(s, froms, tos)
if missing:
say(f" [5] FROM ref not found in compose: {missing}")
return None
open(comp, "w").write(s)
f = open(fy).read()
today = datetime.now().strftime("%Y-%m-%d")
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
"""The drill mover moves every service that carries the app's own image, also when two services share one image
(dawarich + dawarich-sidekiq on freikin/dawarich — the 2026-10-28 walk stopped with „FROM ref not found").
Run: python3 scripts/test_box_walk_drill_move.py"""
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import box_walk as w # noqa: E402
TWO = """services:
dawarich:
image: freikin/dawarich:1.15.3
dawarich-sidekiq:
image: freikin/dawarich:1.15.3
dawarich-db:
image: postgis/postgis:17-3.5-alpine
"""
class DrillMove(unittest.TestCase):
def test_shared_image_moves_both_services(self):
out, missing = w.move_images(TWO, ["freikin/dawarich:1.15.3", "freikin/dawarich:1.15.3"],
["freikin/dawarich:1.19.0", "freikin/dawarich:1.19.0"])
self.assertIsNone(missing)
self.assertEqual(out.count("image: freikin/dawarich:1.19.0"), 2)
self.assertNotIn("1.15.3", out)
self.assertIn("image: postgis/postgis:17-3.5-alpine", out) # the engine sidecar stays
def test_two_images_move_each(self):
s = "a:\n image: x/back:v1\nb:\n image: x/front:v1\n"
out, missing = w.move_images(s, ["x/back:v1", "x/front:v1"], ["x/back:v2", "x/front:v2"])
self.assertIsNone(missing)
self.assertEqual(out, "a:\n image: x/back:v2\nb:\n image: x/front:v2\n")
def test_missing_from_is_refused(self):
out, missing = w.move_images(TWO, ["freikin/dawarich:1.14.0"], ["freikin/dawarich:1.19.0"])
self.assertEqual(missing, "freikin/dawarich:1.14.0")
self.assertEqual(out, TWO)
def test_one_image_two_targets_is_refused(self):
out, missing = w.move_images(TWO, ["freikin/dawarich:1.15.3", "freikin/dawarich:1.15.3"],
["freikin/dawarich:1.19.0", "freikin/dawarich:1.18.0"])
self.assertEqual(missing, "freikin/dawarich:1.15.3")
self.assertEqual(out, TWO)
def test_mover_uses_move_images(self):
self.assertIn("move_images(s, froms, tos)", open(w.__file__).read(), "_drill_bump no longer calls move_images")
if __name__ == "__main__":
unittest.main()