Skip to content

fix(deps): selenium 4.45.0 + seleniumlibrary 6.9.0 + urllib3 2.7.0 security stopgap - #4006

Draft
jstvz wants to merge 11 commits into
SFDO-Tooling:devfrom
jstvz:selenium4-security-stopgap
Draft

fix(deps): selenium 4.45.0 + seleniumlibrary 6.9.0 + urllib3 2.7.0 security stopgap#4006
jstvz wants to merge 11 commits into
SFDO-Tooling:devfrom
jstvz:selenium4-security-stopgap

Conversation

@jstvz

@jstvz jstvz commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades selenium 3.141.0 -> 4.x, robotframework-seleniumlibrary 5.x -> 6.x, and unblocks urllib3 -> 2.x. Clears 5 urllib3-1.26.20 advisories and selenium CVE-2023-5590. Supersedes Dependabot #3977.

Does not touch the separate Playwright migration (ADR 0004).

Changes

  • Fixed the urllib3-2-incompatible VCR test harness.
  • Rewrote 14 deprecated find_element_by_* call sites to find_element(By.X, value).
  • Bumped selenium<4 -> selenium>=4,<5 and robotframework-seleniumlibrary<6 -> >=6,<7.
  • Regenerated the lock file.
  • Amended ADR 0004 locally to note the stopgap.

Test plan

  • Full local pytest suite green, except one pre-existing out-of-scope failure (test_check_components) that reproduces on a clean dev checkout.
  • Phase-0 compatibility probes confirmed before implementation: SeleniumLibrary 6 selenium floor, Command enum presence, WebDriver.execute signature, ProtocolError under urllib3 2.x, By attribute presence, deprecated call-site inventory, SeleniumLibrary 5->6 keyword delta (none affecting CCI).

Opened as draft pending final review before merge.

jstvz and others added 11 commits June 25, 2026 17:23
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…rms.robot

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…rllib3 2.x

Co-authored-by: Cursor <cursoragent@cursor.com>
…y mock

Co-authored-by: Cursor <cursoragent@cursor.com>
Two complementary fixes let the proven bulk-API cassettes replay under
urllib3 2.x without re-recording, fixing test_upsert_external_id_field and
test_upsert_complex_fields__bulk:

1. _body_to_bytes / sf_before_record_request: urllib3 2.x presents the
   bulk-upload body as a bytes iterator that vcr.Request stores as a list of
   int byte-values and re-wraps as a fresh iterator on every .body access. The
   old per-chunk bytes(int) coercion produced zero-filled garbage, and the
   request filter mutated .body without clearing _was_iter, so each match pass
   re-corrupted the body. Coerce int chunks correctly and materialize the body
   once via _normalize_request_body (clears _was_iter/_was_file) so repeated
   filter passes are idempotent.

2. salesforce_matcher: de-frame chunked-transfer bodies on both sides via a
   vendored vcr.matchers._dechunk. urllib3 1.x baked chunk framing into the
   recorded bodies; urllib3 2.x sends them unframed. Canonicalizing live and
   taped bodies lets the existing cassettes match (both fixes are required:
   disabling de-chunk alone reproduces CannotOverwriteExistingCassetteException).

Adds 5 unit tests (bytes-iterator coercion + filter idempotency).
Full suite: 1 failed / 3248 passed / 37 skipped; the single failure
(test_check_components::test_collect_components_from_paths) is pre-existing on
dev base 2df450c and out of scope.

Pre-commit: ruff + ruff-format + prettier pass. pyright skipped via SKIP=pyright
(pre-existing whole-repo failure in cumulusci/tasks/github/util.py under Python
3.14, reproduced on clean dev base; this is a per-hook skip, not --no-verify).

Co-authored-by: Cursor <cursoragent@cursor.com>
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