From 528a13b37ac7c9b44e501deb934fa5ef5c7591ac Mon Sep 17 00:00:00 2001 From: Siddharth Balyan <52913345+alt-glitch@users.noreply.github.com> Date: Thu, 30 Apr 2026 00:58:11 +0530 Subject: [PATCH] Potential fix for pull request finding 'CodeQL / Incomplete URL substring sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- optional-skills/creative/comfyui/scripts/run_workflow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/optional-skills/creative/comfyui/scripts/run_workflow.py b/optional-skills/creative/comfyui/scripts/run_workflow.py index d1df7fd72b..95b598fa79 100644 --- a/optional-skills/creative/comfyui/scripts/run_workflow.py +++ b/optional-skills/creative/comfyui/scripts/run_workflow.py @@ -32,7 +32,7 @@ import uuid import copy import argparse from pathlib import Path -from urllib.parse import urljoin, urlencode +from urllib.parse import urljoin, urlencode, urlparse try: import requests @@ -82,7 +82,8 @@ class ComfyRunner: def __init__(self, host: str = "http://127.0.0.1:8188", api_key: str = None): self.host = host.rstrip("/") self.api_key = api_key - self.is_cloud = "cloud.comfy.org" in self.host or api_key is not None + parsed_host = urlparse(self.host).hostname or "" + self.is_cloud = parsed_host.lower() == "cloud.comfy.org" or api_key is not None self.client_id = str(uuid.uuid4()) @property