mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-29 14:30:52 +00:00
Merge origin/main 9e8c47cc82 into fix/utils/docker/registry-realm-scheme
Brings Main's hotfix PRs #1702 to #1706 into the realm fix branch before its quality-high gate, on the operator's signed order of 2026-11-12 14:21 UTC to merge main before the next gate. Both sides changed utils/update/source.py and its test module; git merged them without a conflict. tests.unit.python.utils.update.test_source (20 tests) and tests.unit.python.utils.docker.test_registry (35 tests) pass on the merged tree. Security, named risk the operator accepted for this merge: MEDUSA rates the incoming main files at 10 %. Accepted as false positives after an independent skeptic review: MEDUSA-MEX-SCAN-1167 at cli/meta/ci/runtime_vulnerabilities.py:45 (the rce|lambda pattern matches inside source=lambda of an issue Tracker definition) and MEDUSA-INF-SCAN-2644, -3222, -1863, -1876, -1934, -2762, -2834 at roles/sys-ctl-hlth-runtime/files/python/script.py:1781 (tempfile.mkdtemp inside the root-owned 0700 cache). Still open in main's code and routed to Main: script.py:1532 (INF-SCAN-2056, -2447, -2744), where an unvalidated registry digest reaches rmtree through the scratch name, and script.py:1780 (the same rules on the run-* leftover cleanup, by design). This merge adds no line of its own to either file. 🎯 Fix: 95 % 💥 Break: 3 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: 10 % 🏆 Score: 9 🚦 Gate: ⚠️ security 10 % < 100: ask the operator before the commit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
78 files changed
+1462
-211
No files matched your search
@@ -288,6 +288,38 @@ class TestAddons(unittest.TestCase):
|
||||
self.assertIn("released/download/v1.3.0/app.tar.gz", written)
|
||||
self.assertIn("upstream_id: example/released", written)
|
||||
|
||||
def test_every_version_in_the_archive_moves_with_its_own_prefix(self) -> None:
|
||||
root = _addon_repo(
|
||||
{
|
||||
"prefixed": ADDONS["released"].replace(
|
||||
"v1.2.0/app.tar.gz", "v1.2.0/app-v1.2.0.tar.gz"
|
||||
),
|
||||
"bare": ADDONS["released"].replace(
|
||||
"v1.2.0/app.tar.gz", "v1.2.0/app-1.2.0.tar.gz"
|
||||
),
|
||||
}
|
||||
)
|
||||
with mock.patch.object(module, "candidates", return_value=["v2.0.0"]):
|
||||
module.apply_updates(module.find_outdated_updates(root))
|
||||
|
||||
directory = root / "roles" / "web-app-example" / ROLE_DIR_META_ADDONS
|
||||
prefixed_path = directory / "prefixed.yml"
|
||||
bare_path = directory / "bare.yml"
|
||||
prefixed = prefixed_path.read_text() # nocheck: cache-read just rewritten here
|
||||
bare = bare_path.read_text() # nocheck: cache-read just rewritten here
|
||||
self.assertIn("released/download/v2.0.0/app-v2.0.0.tar.gz", prefixed)
|
||||
self.assertIn("released/download/v2.0.0/app-2.0.0.tar.gz", bare)
|
||||
|
||||
def test_a_longer_version_holding_the_pin_stays(self) -> None:
|
||||
self.assertEqual(
|
||||
module.bump_archive(
|
||||
"archive: https://x.test/v1.2.0/app-11.2.0-v1.2.0.1.tar.gz",
|
||||
"v1.2.0",
|
||||
"v1.3.0",
|
||||
),
|
||||
"archive: https://x.test/v1.3.0/app-11.2.0-v1.2.0.1.tar.gz",
|
||||
)
|
||||
|
||||
def test_an_archive_that_does_not_carry_the_pin_is_reported(self) -> None:
|
||||
drifted = ADDONS["released"].replace('version: "v1.2.0"', 'version: "v1.1.0"')
|
||||
root = _addon_repo({"drifted": drifted})
|
||||
|
||||
Reference in new issue
Block a user