From fb08e20544b9c74f5521da3d230b82fd9f8b44b0 Mon Sep 17 00:00:00 2001 From: Bakhtiar Date: Wed, 22 Apr 2026 15:48:09 -0700 Subject: [PATCH] Potential fix for code scanning alert no. 1: Use of insecure SSL/TLS version Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- https_server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/https_server.py b/https_server.py index 18ab112..41980a9 100644 --- a/https_server.py +++ b/https_server.py @@ -7,6 +7,7 @@ def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True): self.allow_reuse_address = True super().__init__(server_address, RequestHandlerClass, bind_and_activate) context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + context.minimum_version = ssl.TLSVersion.TLSv1_2 context.load_cert_chain(certfile="cert.pem", keyfile="key.pem") self.socket = context.wrap_socket(self.socket, server_side=True)