Skip to content

[Snyk] Security upgrade pillow from 9.2.0 to 13.0.0 - #33

Open
bkizer-tenable wants to merge 1 commit into
masterfrom
snyk-fix-417e93f69e1fc2fd53c2727e14af9506
Open

bkizer-tenable wants to merge 1 commit into
masterfrom
snyk-fix-417e93f69e1fc2fd53c2727e14af9506

Conversation

@bkizer-tenable

Copy link
Copy Markdown
Collaborator

snyk-top-banner

Snyk has created this PR to fix 23 vulnerabilities in the pip dependencies of this project.

Snyk changed the following file(s):

  • requirements.txt
⚠️ Warning
matplotlib 3.3.3 requires numpy, which is not installed.
matplotlib 3.3.3 requires pillow, which is not installed.
fpdf2 2.5.5 requires Pillow, which is not installed.

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Uncontrolled Recursion
🦉 Regular Expression Denial of Service (ReDoS)
🦉 Allocation of Resources Without Limits or Throttling
🦉 More lessons are available in Snyk Learn

@bkizer-tenable

Copy link
Copy Markdown
Collaborator Author

Merge Risk: High

This is a major upgrade from Pillow 9.2.0 to 13.0.0, which includes multiple significant breaking changes and requires code modifications.

Key Breaking Changes:

  • Python Version Support: Support for Python 3.7, 3.8, and 3.9 has been dropped across these releases. Pillow 12.0.0 and later require Python 3.10+.

  • Pillow 10.0.0:

    • Image Resampling: The Image.ANTIALIAS constant has been removed. It must be replaced with Image.Resampling.LANCZOS.
    • Font Rendering: The widely used ImageFont.getsize() method has been removed. You must migrate to using font.getbbox() or font.getlength().
    • Image Frames: The im.category attribute has been removed. To check if an image is animated, use getattr(im, "is_animated", False).
  • Pillow 13.0.0:

    • PNG Saving: Saving 32-bit integer (I mode) images directly to PNG is no longer supported to prevent silent data loss. You must explicitly convert the image to a supported bit depth first, for example: im.convert("I;16").save("out.png").
    • Removed Methods: Several previously deprecated methods have been removed, including Image._show() and parts of the Image.fromarray() mode parameter functionality.

Recommendation:
This upgrade will likely break existing image processing and text rendering code. Developers must carefully review the changelogs, especially for the migration away from Image.ANTIALIAS and ImageFont.getsize(). Thorough testing is required after updating.

Source: Pillow Release Notes

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

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.

2 participants