Skip to content

Update Python security dependencies and require Python 3.11 - #323

Merged
demigodmode merged 3 commits into
mainfrom
security/python-dependency-fixes
Oct 25, 2026
Merged

demigodmode merged 3 commits into
mainfrom
security/python-dependency-fixes

Conversation

@demigodmode

Copy link
Copy Markdown
Owner

Updates Pillow to 13.0.0 and pypdf to 6.21.2. Certifi is locked to 2026.10.23.

The backend and agent manifests require Pillow >=13.0.0, pypdf >=6.21.2 and certifi >=2026.10.19. The CLI also requires the certifi floor. Direct constraints in the agent protect standalone upgrades that keep an older backend installed.

Python 3.11 is the workspace minimum; Docker and native release builds stay on Python 3.13. Docs, classifiers and the Ruff target match the new minimum. Regression checks now require real PDF text extraction and decoded previews for alpha/palette images. Office fixtures contain embedded PNGs, and agent metadata tests reject vulnerable dependency versions.

Validation on Python 3.13 recorded 1,369 unique passes across separate serial runs: backend 889, agent 375, CLI 20 and shared contracts 85. Backend collection had 959 cases: 903 selected, including 14 skipped because Meilisearch was unavailable, and 56 concurrency/subprocess cases excluded. Agent totals combine the initial run with isolated reruns and include 5 skips. Eighteen separate cases passed with the original dependency versions as a baseline comparison; they are not included in the 1,369. Offline lock consistency passed. Syntax and undefined-name lint passed, with no added Ruff diagnostics.

Aggregate runs hit thread-creation failures under the task limit. Permission and timeout cases passed in isolation with POSIX temporary directories, but a clean aggregate run remains outstanding. Real Meilisearch integration and the excluded concurrency/subprocess cases still need validation, along with Python 3.11/3.12, Windows/ARM/frozen agents and container smoke.

The pypdf update overlaps with #322.

@demigodmode
demigodmode marked this pull request as ready for review October 25, 2026 16:42
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between a0bf3c6 and 381fa97.

Files ignored due to path filters: 1
  • uv.lock is excluded by !**/*.lock, !uv.lock
Files selected for processing: 13
  • .github/workflows/agent-tests.yml
  • .github/workflows/backend-tests.yml
  • CONTRIBUTING.md
  • agent/pyproject.toml
  • agent/tests/test_release_packaging.py
  • backend/pyproject.toml
  • backend/tests/test_extractors.py
  • backend/tests/test_preview_assets.py
  • cli/pyproject.toml
  • docs/development/backend-dev.md
  • docs/development/index.md
  • pyproject.toml
  • shared/pyproject.toml
Walkthrough

The project and package metadata now require Python 3.11 or later. Dependency minimums changed for Pillow, pypdf, and certifi. Tests now check dependency version constraints, PDF text extraction, images embedded in Office files, and generated previews from additional PNG and GIF modes.

Priority: Low

Merge Risk: Low · up to a0bf3

The dependency test may miss a future downgrade that permits an affected certifi release. Tighten the assertion; this does not establish a failure in the current dependency declarations.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 3 files. (8 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main changes: updating Python security dependencies and requiring Python 3.11.
Description check Passed The description explains the changes and rationale, documents detailed validation results, and lists remaining test gaps. It does not explicitly complete every checklist item from the template, but it…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the changes and rationale, documents detailed validation results, and lists remaining test gaps. It does not explicitly complete every checklist item from the template, but it is sufficiently complete and relevant.

Full details: Docstring Coverage

Explanation

Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 3 files. (8 skipped: 8 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f49c784 and a0bf3c6.

Files ignored due to path filters: 1
  • uv.lock is excluded by !**/*.lock, !uv.lock
Files selected for processing: 11
  • CONTRIBUTING.md
  • agent/pyproject.toml
  • agent/tests/test_release_packaging.py
  • backend/pyproject.toml
  • backend/tests/test_extractors.py
  • backend/tests/test_preview_assets.py
  • cli/pyproject.toml
  • docs/development/backend-dev.md
  • docs/development/index.md
  • pyproject.toml
  • shared/pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

[
("pillow", "12.3.0", "13.0.0"),
("pypdf", "6.21.1", "6.21.2"),
("certifi", "2025.11.12", "2026.10.19"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Security & Privacy · Quick win

Test the later affected certifi release.

If the agent floor regresses to certifi>=2026.7.22, this test still passes: it excludes 2025.11.12 and includes 2026.10.19. The regressed constraint permits 2026.7.22, which is an affected release. Replace the excluded sample with 2026.7.22, or assert the required floor directly. (pypi.org)

@demigodmode
demigodmode marked this pull request as draft October 25, 2026 16:47
@demigodmode
demigodmode marked this pull request as ready for review October 25, 2026 17:04
@demigodmode
demigodmode merged commit 115fa89 into main Oct 25, 2026
15 checks passed
@demigodmode
demigodmode deleted the security/python-dependency-fixes branch October 25, 2026 17:24
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.

1 participant