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
gates / gates (push) Successful in 40s
This commit is contained in:
1 parent
abf3db352e
commit
71e3fdfc95
12 files changed
+717
-20
No files matched your search
@@ -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()
|
||||
Reference in new issue
Block a user