chore(deps): security updates for urllib3, wagtail, bleach and djangorestframework - #4000
Conversation
OpenAPI ChangesShow/hide changesUnexpected changes? Ensure your branch is up-to-date with |
|
The first CI attempt failed |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Dependency declarations and lockfile entries are consistent, and the combined update passed the reported full test suite.
Review effort: Balanced
Findings: None
What changed in this PR
Updates four Python dependencies to patched versions addressing security advisories.
Changes:
- Upgrades Django REST Framework and Wagtail pins.
- Updates Bleach and urllib3 lockfile resolutions.
- Refreshes package hashes and distribution metadata.
| File | Description |
|---|---|
| uv.lock | Locks all four patched dependency versions and artifacts. |
| pyproject.toml | Updates direct Django REST Framework and Wagtail pins. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What are the relevant tickets?
Supersedes #3990, #3988, #3766 and #3989.
Description (What does it do?)
Four Renovate security PRs are open against
uv.lock, each green on its own. Merging them one at a time forces a Renovate rebase of the rest after every merge, and Renovate only runs on weekends. This cherry-picks the four Renovate commits onto one branch, one commit per package, so the combined lock is what CI tests.formaction) and GHSA-8rfp-98v4-mmr6DATA_UPLOAD_MAX_MEMORY_SIZEbypass throughrequest.data) and GHSA-g47c-3xmw-q6m2Implementation details
The commits are Renovate's, unmodified, so the diff against
mainis 16 changed lines (+16/-16) acrosspyproject.tomlanduv.lock. I did not re-resolve the lock: a newer local uv (0.11.31) reorders theexclude-newer-packagetable and adds about 70 lines of noise per bump.Changelog review:
DEFAULT_SCHEMA_CLASSinmain/settings.py).DeprecationWarningtoFutureWarning. The suite runs withfilterwarnings = errorand none surfaced.How can this be tested?
I built the
webimage from this branch and ran the full suite in it against postgres and redis:pytest -n logical --no-cov, 3474 passed, 8 skipped, 0 failed.uv lock --checkpasses.One limit on what that shows for bleach: every bleach assertion (
cms/serializers_test.py,courses/serializers/v1/courses_test.py) computes its expected value withbleach.clean(...), so the suite can't detect a change in bleach's output. All of our call sites arebleach.clean(text, tags={}, strip=True), which keeps no tags and so no attributes, so the two URI-scheme fixes insanitize_uri_valuedon't reach us.One change in the 6.3.0...6.4.0 diff does:
bleach/html5lib_shim.pynow re-parses malformed input shaped like<nottag <b>text</b>. 6.3.0 emitted that whole run as characters. 6.4.0 emits<nottagas characters and parses the rest as a tag, whichstrip=Truethen removes. So a CMS description containing that kind of broken markup will come out with more markup stripped than before. That's the direction we want, and well-formed descriptions are unaffected.To check by hand: load a course page and
/api/v2/courses/and confirm descriptions still render as plain text, and open a page in the Wagtail admin.Additional Context
bleach 6.4.0 is its last release. Upstream's changelog says the project is no longer maintained and won't ship further security fixes (mozilla/bleach#698), so it needs replacing. That's follow-up work, not part of this PR.
#3767 (setuptools) and #3186 (react-router) are also labelled security and are left out on purpose. Three of setuptools' four advisories are already fixed in the locked 80.10.2 and the bump fails on
pkg_resources. Both react-router advisories cover>= 6.0.0and we run 4.3.1.🤖 Generated with Claude Code
https://claude.ai/code/session_013ezgZuYQpg4JZU1ohZAxhb