Skip to content

armgit / strix

Public Imported from GitHub
0

Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.

fix(session): use HTTPS scheme for Caido endpoint if TLS is enabled (#722)

alex sb9994e2e0e4d
diff --git a/strix/runtime/session_manager.py b/strix/runtime/session_manager.py
index a19495cc..b16e79ba 100644
--- a/strix/runtime/session_manager.py
+++ b/strix/runtime/session_manager.py
@@ -114,7 +114,8 @@ async def create_or_reuse(
)
caido_endpoint = await session.resolve_exposed_port(_CONTAINER_CAIDO_PORT)
- host_caido_url = f"http://{caido_endpoint.host}:{caido_endpoint.port}"
+ scheme = "https" if caido_endpoint.tls else "http"
+ host_caido_url = f"{scheme}://{caido_endpoint.host}:{caido_endpoint.port}"
logger.debug("Caido host endpoint resolved: %s", host_caido_url)
caido_client = await bootstrap_caido(