fix(security): enable Dependabot pip updates + bump pytest to 9.0.3 (CVE-2025-71176)#8586
Merged
Merged
Conversation
Two compounding root causes prevented Dependabot from auto-creating a PR for the pytest CVE alert on vhdbuilder/packer/test/pam/requirements.txt: 1. .github/dependabot.yml only declared 'gomod' and 'github-actions' ecosystems — no 'pip' entry, so version-update scanning never ran against the PAM test manifest (vulnerability scanning still fires security alerts independently, which is why we saw the alert but no PR). 2. The pin 'pytest>=7.3.1,<7.4.0' is narrower than Dependabot's default 'auto' strategy can widen, so even with the ecosystem enabled, the bump to 9.0.3 would have been blocked. Changes: - .github/dependabot.yml: add 'pip' ecosystem covering /vhdbuilder/packer/test/pam with 'versioning-strategy: increase' so upper-bound bumps land automatically going forward. - vhdbuilder/packer/test/pam/requirements.txt: bump pytest to >=9.0.3,<10.0 (CVE-2025-71176 / GHSA-6w46-j5rx-g56g — pytest tmpdir predictable-name issue, fixed in 9.0.3), pytest-rerunfailures to >=16.0,<17.0 (required for pytest 9.x), and pexpect to >=4.9.0,<5.0. Compatibility: - testPam (vhdbuilder/packer/test/linux-vhd-content-test.sh) runs pip3 install on Mariner/AzureLinux only. MarinerV2/AzureLinuxV2 SIG images are frozen at 202512.06.0 (sig_config.go:387), so no new VHD builds run testPam against Python 3.9. AzureLinux V3 ships Python 3.12, which satisfies pytest 9.0.3's >=3.10 floor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a pip ecosystem entry to Dependabot so Python dependencies are auto-updated, and bumps pytest to 9.0.3 (with companion bumps to pytest-rerunfailures and pexpect) to close CVE-2025-71176 in the PAM test harness used during Mariner/AzureLinux VHD builds.
Changes:
- Enable
pipecosystem updates for/vhdbuilder/packer/test/pamwithversioning-strategy: increase. - Bump
pytestfrom>=7.3.1,<7.4.0to>=9.0.3,<10.0to remediate CVE-2025-71176. - Bump
pytest-rerunfailures(>=16.0,<17.0) andpexpect(>=4.9.0,<5.0) to remain compatible with pytest 9.x.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/dependabot.yml |
Adds a pip ecosystem block for the PAM test requirements so future Python CVE bumps are auto-PR'd. |
vhdbuilder/packer/test/pam/requirements.txt |
Upgrades pytest to the CVE-fixed line and adjusts companion packages for compatibility. |
awesomenix
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
GitHub Dependabot alert #43 flags CVE-2025-71176 (GHSA-6w46-j5rx-g56g, medium) in
pytestused byvhdbuilder/packer/test/pam/requirements.txt. The alert has been open but no auto-PR was ever created.Diagnosis turned up two compounding root causes:
.github/dependabot.ymlwas missing apipecosystem entry. Onlygomodandgithub-actionswere declared. Dependabot's vulnerability scanner happily fires alerts for any manifest it discovers, but the version-update scanner only runs against ecosystems explicitly listed in the config — so no PR attempt was ever made for this manifest.pytest>=7.3.1,<7.4.0is too tight to widen. Even if we'd enabledpip, the defaultversioning-strategy: autofor pip won't push past an explicit upper bound. The fix lives in pytest 9.0.3, far outside<7.4.0.What this PR does
.github/dependabot.ymlAdds a
pipecosystem block scoped to/vhdbuilder/packer/test/pamwithversioning-strategy: increase, so future Python CVE bumps land automatically.vhdbuilder/packer/test/pam/requirements.txtpytest>=7.3.1,<7.4.0>=9.0.3,<10.0tmpdirname → local DoS)pytest-rerunfailures>=14.0,<15.0>=16.0,<17.0pytest>=8.1,!=8.2.2)pexpect>=4.8.0,<4.9.0>=4.9.0,<5.0test_pam.pyCompatibility analysis
The only consumer of these requirements is the
testPamfunction invhdbuilder/packer/test/linux-vhd-content-test.sh:1610-1640, which runspip3 install -r requirements.txton Mariner / AzureLinux VHD builds only (other OSes skip).python3202512.06.0viaFrozenCBLMarinerV2AndAzureLinuxV2SIGImageVersion(pkg/agent/datamodel/sig_config.go:387)So in practice the bump only needs to work on AzureLinux V3 (Python 3.12), which it does.
Verification
pipecosystem entry follows the existinggomod/github-actionsschema (sametime, samecleanup+dependabotlabels).conftest.pyin the test dir uses only stable pytest hooks (pytest_configure,pytest_addoption), no API breakage 7.x → 9.x.--reruns 5resilience for transient flakes.Out of scope
testPaminvocation logic.🤖 Generated by GitHub Copilot