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>
This commit is contained in:
Siddharth Balyan 2026-04-30 00:58:03 +05:30 committed by Teknium
parent d7d1503595
commit 9835f57e9c

View file

@ -26,7 +26,7 @@ import json
import sys
import argparse
from pathlib import Path
from urllib.parse import urljoin
from urllib.parse import urljoin, urlparse
try:
import requests
@ -86,7 +86,10 @@ def check_deps(workflow_path: str, host: str = "http://127.0.0.1:8188", api_key:
if api_key:
headers["X-API-Key"] = api_key
is_cloud = "cloud.comfy.org" in host or api_key is not None
parsed_host = urlparse(host)
hostname = (parsed_host.hostname or "").lower()
is_cloud_host = hostname == "cloud.comfy.org" or hostname.endswith(".cloud.comfy.org")
is_cloud = is_cloud_host or api_key is not None
base = host.rstrip("/")
# Get installed node types