-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Describe the bug
We discovered that our security scanner (AWS InspectorV2) found a potential issue with the following snipped located in "ld_eventsource/testing/http_util.py"
if secure:
self.server.socket = ssl.wrap_socket(
self.server.socket,
certfile='./ld_eventsource/testing/selfsigned.pem',
keyfile='./ld_eventsource/testing/selfsigned.key',
server_side=True,
)
It states that ssl.wrap_socket is deprecated and should be replaced with SSLContext.wrap_socket.
The snippet above should look like that:
if secure:
self.server.socket = SSLContext.wrap_socket(
self.server.socket,
certfile='./ld_eventsource/testing/selfsigned.pem',
keyfile='./ld_eventsource/testing/selfsigned.key',
server_side=True,
)
To reproduce
- Install the library in any project
- Scan the artifact with AWS InspectorV2
SDK version
- launchdarkly-eventsource:1.2.2
Language version, developer tools
Python 3.12.8
OS/platform
MacOS
Additional context
Metadata
Metadata
Assignees
Labels
No labels