Skip to content

fix: resolve GHSA-6w46-j5rx-g56g by requiring pytest >= 9.0.3#256

Merged
fabiocaccamo merged 3 commits intomainfrom
copilot/fix-security-issue-in-code-scanning
Apr 17, 2026
Merged

fix: resolve GHSA-6w46-j5rx-g56g by requiring pytest >= 9.0.3#256
fabiocaccamo merged 3 commits intomainfrom
copilot/fix-security-issue-in-code-scanning

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

pytest < 9.0.3 is vulnerable to GHSA-6w46-j5rx-g56g (vulnerable tmpdir handling, CVE-2025-71176). The previous constraint pytest==9.0.* permitted installing affected versions 9.0.0–9.0.2, flagged by OpenSSF Scorecard (code scanning alert #18).

Changes

  • requirements-test.txt: pytest==9.0.*pytest>=9.0.3,<10 — excludes all vulnerable patch releases while staying within the 9.x series

Describe your changes
Update pytest lower bound to the patched release (9.0.3) and cap at <10 to avoid unintended major-version drift.

Related issue
https://github.com/fabiocaccamo/python-codicefiscale/security/code-scanning/18

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have added tests for the proposed changes.
  • I have run the tests and there are not errors.

@fabiocaccamo fabiocaccamo marked this pull request as ready for review April 17, 2026 13:30
Copilot AI review requested due to automatic review settings April 17, 2026 13:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (0d73c37) to head (cca5c5c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #256   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files           6        6           
  Lines         370      370           
=======================================
  Hits          362      362           
  Misses          8        8           
Flag Coverage Δ
unittests 97.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the test dependency constraints to address a reported pytest vulnerability (GHSA-6w46-j5rx-g56g / CVE-2025-71176) by tightening the minimum allowed pytest version.

Changes:

  • Updates requirements-test.txt to require pytest >= 9.0.3 and cap at <10 (replacing pytest==9.0.*).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread requirements-test.txt Outdated
Comment thread requirements-test.txt Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@fabiocaccamo fabiocaccamo merged commit 16ab647 into main Apr 17, 2026
22 checks passed
@fabiocaccamo fabiocaccamo deleted the copilot/fix-security-issue-in-code-scanning branch April 17, 2026 13:48
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