Skip to content

[APPX-14773] Bump acceptance pytest to 9.0.3 to clear Dependabot alert - #469

Merged
Matjaz Pirnovar (Mat001) merged 2 commits into
masterfrom
mpirnovar-agent-dependabot-fssdk-13481
Dec 1, 2026
Merged

Matjaz Pirnovar (Mat001) merged 2 commits into
masterfrom
mpirnovar-agent-dependabot-fssdk-13481

Conversation

@Mat001

@Mat001 Matjaz Pirnovar (Mat001) commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bump pytest 8.4.2 → 9.0.3 in tests/acceptance/requirements.txt.

This clears the only Dependabot alert remaining on optimizely/agent: alert #69, CVE-2025-71176 / GHSA-6w46-j5rx-g56g (medium) — pytest has vulnerable tmpdir handling, patched in 9.0.3.

The other 86 of the 87 alerts tracked in APPX-14773 (all go.mod deps, plus examples/requirements.txt and the rest of tests/acceptance/requirements.txt) were already resolved by the Go/Python bumps in #468 and now show as fixed.

Why

pytest < 9.0.3 is flagged for vulnerable temp-directory handling. pytest 9.0.3 requires Python >= 3.10; the acceptance CI already runs Python 3.12 (.github/workflows/agent.yml), so the bump is compatible.

Verified locally on Python 3.12: the pinned acceptance requirements install together cleanly with pytest 9.0.3, and all 94 acceptance tests collect without error (all usage is standard parametrize / fixture / raises / pytest_addoption / pytest_configure, none of which changed in pytest 9).

Issues

🤖 Generated with Claude Code

CVE-2025-71176 (GHSA-6w46-j5rx-g56g, medium): pytest < 9.0.3 has
vulnerable tmpdir handling. This is the only Dependabot alert remaining
on optimizely/agent after the Go-dependency bumps in #468 cleared the
other 86.

pytest 9.0.3 requires Python >=3.10; the acceptance CI already runs
Python 3.12 (.github/workflows/agent.yml). Verified the pinned
acceptance requirements install together cleanly and all 94 acceptance
tests collect under pytest 9.0.3.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@Mat001
Matjaz Pirnovar (Mat001) force-pushed the mpirnovar-agent-dependabot-fssdk-13481 branch from bee80c9 to 3ff9b15 Compare November 25, 2026 18:20
@Mat001 Matjaz Pirnovar (Mat001) changed the title [FSSDK-13481] Bump acceptance pytest to 9.0.3 to clear Dependabot alert [APPX-14773] Bump acceptance pytest to 9.0.3 to clear Dependabot alert Nov 25, 2026
@datadog-optimizely-experimentation

This comment has been minimized.

@alexjoeyyong Alex Yong (alexjoeyyong) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve with a nit. One-line dependency bump, correctly scoped, and I ran the real acceptance suite against it: identical results on pytest 9.0.3 and the old 8.4.2. The only nit is stale README wording about the Python version.

TL;DR

  • The advisory is real and this is the fix. GHSA-6w46-j5rx-g56g / CVE-2025-71176 ("pytest has vulnerable tmpdir handling", medium) affects pytest < 9.0.3 and is patched in 9.0.3. Dependabot alert #69 is open on exactly tests/acceptance/requirements.txt, and it is the only open alert on the repo.
  • It doesn't break anything. I built the agent from this head, ran it with Redis and the Makefile's env (make test-acceptance equivalent), and ran the acceptance suite natively on Python 3.12: 89 passed, 5 deselected on pytest 9.0.3, and the same 89 on 8.4.2. The CI run on this head shows the same (pytest-9.0.3, Python 3.12.16, 89 passed).
  • The Python floor is fine. pytest 9.0.3 needs Python >= 3.10, but requests==2.34.2, already pinned on master, needs >= 3.10 too, so this bump doesn't raise it. I ran the suite on Python 3.10, the lowest it allows: 89 passed.
  • No warnings, no conflicts: the 9.0.3 run prints no warnings and uv pip check reports the 33 installed packages as compatible.

CI: all green on this head (lint, fmt, govulncheck, unit coverage, acceptance, integration, Windows build, compatibility suite); 3 jobs skipped (release/publish and Arnica), none failing, none pending. mergeStateStatus is CLEAN and junaed-optimizely already approved.

Findings

Blockers: none. Should-fix: none.

Nit (docs, tests/acceptance/README.md:8, outside this diff so I can't attach a suggestion to it): it still says "Python version 3.7 or greater is required." That has been wrong since requests==2.34.2 (>= 3.10) and is now also wrong for pytest 9.0.3. On Python 3.9 the install fails with "pytest==9.0.3 cannot be used" (and on the old pins it fails on requests), which is a confusing way for a contributor to find out. Suggested replacement for line 8: Python 3.10 or greater is required (CI uses 3.12). Fine as a follow-up.

Proof

Setup: agent built from the PR head (make build, Go 1.26.11, the same as CI), Redis 5 in Docker on a spare port, uv-built Python venvs, the Makefile's exact pytest arguments and env. One local-only change: the three hard-coded 6379 ports in test_odp_redis.py pointed at my Redis (port 6379 here belongs to another project's test stack); reverted afterwards, nothing was pushed. Without that change, the same two Redis tests fail identically on both pytest versions (a wrong-Redis artefact, not a pytest difference).

Results
pytest 9.0.3, Python 3.12.13 (PR pin)   89 passed, 5 deselected in 3.49s
pytest 8.4.2, Python 3.12.13 (base pin) 89 passed, 5 deselected in 3.47s
pytest 9.0.3, Python 3.10.20 (floor)    89 passed, 5 deselected in 4.03s
CI on this head: Python 3.12.16, pytest-9.0.3, pluggy-1.7.0 -> collected 94 items / 5 deselected / 89 selected -> 89 passed
uv pip check (9.0.3 env): Checked 33 packages ... All installed packages are compatible
Python 3.9 with the PR pins:  pytest==9.0.3 depends on Python>=3.10 -> unsatisfiable
Python 3.9 with the BASE pins: requests==2.34.2 depends on Python>=3.10 -> unsatisfiable (floor already 3.10)

Ponytail

One line changed; nothing to cut.
Lean already. Ship.
net: 0 lines possible.

Principles (installed principles plugin v0.5.0, org layer, 50 checks)

Ran principles.py lint and layer.py (33 static, 17 live; the repo has no docs/principles, REVIEW.md or constitution of its own). A test-dependency bump touches no endpoints, handlers or environments, so I applied the static checks that reach it by hand, not the full recorded run. FUN-1.S1 / FUN-2.S1 pass: the acceptance suite is the test of the declared change, with the same 89 passing before and after. SEC-6.S1 / SEC-6.S2 pass: dependency scanning reports on the repo (alert #69 is what this clears), and govulncheck and the other scanners are green on the head. CODE-1.S1 pass: no history references in the added text (the requirements line has none). The rest don't apply; live checks not run.

Comment thread tests/acceptance/requirements.txt Resolved
tests/acceptance/README.md said "Python 3.7 or greater"; the acceptance
suite has required Python >= 3.10 since requests==2.34.2 was pinned, and
pytest 9.0.3 (this PR) requires it too. Per Alex's review nit.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@Mat001
Matjaz Pirnovar (Mat001) merged commit 680462b into master Dec 1, 2026
13 checks passed
@Mat001
Matjaz Pirnovar (Mat001) deleted the mpirnovar-agent-dependabot-fssdk-13481 branch December 1, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants