Files
hermes-agent/tests/pm/test_git_package.py
Maciej Lisiewski a95f462421 fix(pm): bump the pinned Git for Windows 2.53.0.3 -> 2.56.1
2.53.0.3 predates three Git for Windows security releases: 2.56.0.3
(eMudhra CA compromise, Git LFS CVE-2026-105803), 2.56.0.4 (bundled
brotli 1.2.1, CVE-2026-111497, reachable via libcurl's br encoding) and
2.56.1 (git CVE-2026-111760 recursive-clone RCE and five others).
2.56.1 was published 2026-11-10, past the release-age window; its first
build ships as PortableGit-2.56.1-*, which the salvaged fetch_url fix
resolves.

2.56 moved the x64 MSYS2 prefix from mingw64/ to ucrt64/, so the
trampoline self-heal git-core candidates, the non-login bash coreutils
PATH dirs and the desktop bundle-arch PortableGit exemption now also
cover ucrt64 (mingw64 kept for existing installs).

Fixes #148835
2026-11-14 17:07:28 +01:00

21 lines
896 B
Python

"""The pinned Git for Windows (bash.exe + internal git calls on Windows)."""
from pm.lock import Lockfile
from pm.packages import Git
from pm.paths import lockfile_path
def test_locked_git_carries_the_2_56_security_fixes():
"""2.56.0.3 drops the compromised eMudhra CA chain, 2.56.0.4 ships brotli
1.2.1, 2.56.1 carries the 2.56.1 git CVE fixes (#148835). Every locked
artifact must be the URL the downloader builds for the pinned version."""
package = Git()
lock = Lockfile(lockfile_path())
version = lock.version(package.name)
assert version is not None
tag, _, build = version.partition("+")
assert (tuple(int(p) for p in tag.split(".")), int(build)) >= ((2, 56, 1), 1)
for target in ("win32-x64", "win32-arm64"):
rows = lock.artifacts(package.name, target)
assert [row["url"] for row in rows] == [package.fetch_url(version, target)]