fix: update pinned dependencies to resolve 9 known CVEs#44
Open
Rusty-8 wants to merge 1 commit intospotware:mainfrom
Open
fix: update pinned dependencies to resolve 9 known CVEs#44Rusty-8 wants to merge 1 commit intospotware:mainfrom
Rusty-8 wants to merge 1 commit intospotware:mainfrom
Conversation
Loosen exact version pins to compatible ranges that include security fixes while maintaining API compatibility. Changes: - protobuf: 3.20.1 → >=5.29.6,<7 (fixes CVE-2022-1941, CVE-2025-4565, CVE-2026-0994) - Twisted: 24.3.0 → >=24.7.0,<26 (fixes PYSEC-2024-75, CVE-2024-41671) - requests: 2.32.3 → >=2.32.4,<3 (fixes CVE-2024-47081) - pyOpenSSL: 24.1.0 → >=24.3.0,<26 (allows newer cryptography transitively) - inputimeout: 1.0.4 → >=1.0.4,<2 (loosened for flexibility) - Python minimum: 3.8 → 3.9 (required by protobuf 5.x) Resolves spotware#43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #43 — pinned dependencies carried 9 known CVEs. This PR loosens exact version pins to compatible ranges that include security fixes.
3.20.1>=5.29.6,<724.3.0>=24.7.0,<262.32.3>=2.32.4,<324.1.0>=24.3.0,<26cryptographytransitively (GHSA-h4gh-qq45-vh27, CVE-2024-12797, CVE-2026-26007)1.0.4>=1.0.4,<2Notes
_pb2.pyfiles use theAddSerializedFile+_buildercodegen pattern (stable since 3.20.0) — no proto stub regeneration needed. Verified by inspecting all four_pb2.pyfiles.<26,<7,<3,<2) guard against future major version breaks while allowing all patch and minor security releases.poetry.lockregenerated against the new ranges.Verification results
We installed
protobuf==5.29.6,Twisted==25.5.0,pyOpenSSL==25.3.0(withcryptography==46.0.5), andrequests==2.32.5, then ran the library through 11 test suites covering every code path. All passed with zero code changes.protobuf 5.29.6 — full compatibility confirmed
_pb2.pyimports (all 4 files)AddSerializedFile+_builderpattern works on protobuf 5.x_descriptor._USE_C_DESCRIPTORSTrue— theif == Falseblock simply skips (upb backend sets options viaAddSerializedFileinstead)EncodeErrorstill raised when required fields are missing — same behavior as 3.20models.MARKET,models.BUY)Protobuf.populate().payloadTypedefault accessor works on allProtobuf.get()by int, name, and abbreviationProtobuf.extract()ProtoMessage→ deserialize → extract round-tripisinstance(msg, ProtoMessage.__base__)google._upb._message.Messagebutisinstanceresolves correctly —tcpProtocol.py:41worksProtoOASpotEventwith trendbars,ProtoOAExecutionEventwith nestedOrder/TradeDataProtoOANewOrderReq)TcpProtocol.send()→ wire bytes →TcpProtocol.stringReceived()→Protobuf.extract()flowTwisted 25.5.0 — full compatibility confirmed
Int32StringReceiverbase classClientServiceClientFactoryLoopingCallclientFromString("ssl:demo.ctraderapi.com:5035")SSL4ClientEndpointsuccessfullypyOpenSSL 25.3.0 + cryptography 46.0.5 — full compatibility confirmed
SSL.Context(SSL.TLSv1_2_METHOD)requests 2.32.5 — full compatibility confirmed
Auth.getAuthUri()Auth.getToken()/Auth.refreshToken()APIrequests.get()API unchangedAreas to watch