The digest check pushed utils/docker/registry.py past the 500-line limit of the Python file-size lint. valid_digest and its pattern move unchanged into utils/docker/digest.py, registry.py imports it for its two call sites, and TestValidDigest moves to test_digest.py with the same cases.
Tests: test_digest.py 2 passed, test_registry.py 37 passed, file-size lint passed, ruff clean; quality-high green on this tree (test 4/4, lint 15/15).
Security 65 % comes from two MEDUSA findings on unchanged lines of the existing registry HTTP client, committed on the operator word: registry.py:106 (a redirect forwards the bearer token to any host, B310) and registry.py:142 (Link next may switch host, WEB-SSRF); both are fixed in cluster/registry-redirect-token-leak on fix/utils/docker/registry-redirect-auth. Accepted as by design after a skeptic review: WEB-SSRF at registry.py:299, 465 and 488 (https-pinned URLs with quoted path segments) and B310 at registry.py:79 (https-only token realm).
🎯 Fix: 95 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 65 %
🏆 Score: 61
🚦 Gate: ⚠️ security 65 % < 100: committed on the operator word
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>