Files
custom-nodes-security-scan/docs/comfyui_lumaAPI-bandit.html
zeekay 6bdea42e64 rebrand: Hanzo AI Inc — full rebrand from ComfyUI/Comfy-Org
- Updated copyright to Hanzo AI, Inc.
- Replaced ComfyUI references with Hanzo Studio
- Updated GitHub org URLs (Comfy-Org → hanzoui)
- Updated domains (comfy.org → hanzo.ai)
- Updated package names and npm scopes
- Updated LICENSE with Hanzo AI copyright header
2026-02-23 10:54:25 -08:00

296 lines
9.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>
Bandit Report
</title>
<style>
html * {
font-family: "Arial", sans-serif;
}
pre {
font-family: "Monaco", monospace;
}
.bordered-box {
border: 1px solid black;
padding-top:.5em;
padding-bottom:.5em;
padding-left:1em;
}
.metrics-box {
font-size: 1.1em;
line-height: 130%;
}
.metrics-title {
font-size: 1.5em;
font-weight: 500;
margin-bottom: .25em;
}
.issue-description {
font-size: 1.3em;
font-weight: 500;
}
.candidate-issues {
margin-left: 2em;
border-left: solid 1px; LightGray;
padding-left: 5%;
margin-top: .2em;
margin-bottom: .2em;
}
.issue-block {
border: 1px solid LightGray;
padding-left: .5em;
padding-top: .5em;
padding-bottom: .5em;
margin-bottom: .5em;
}
.issue-sev-high {
background-color: Pink;
}
.issue-sev-medium {
background-color: NavajoWhite;
}
.issue-sev-low {
background-color: LightCyan;
}
</style>
</head>
<body>
<div id="metrics">
<div class="metrics-box bordered-box">
<div class="metrics-title">
Metrics:<br>
</div>
Total lines of code: <span id="loc">199</span><br>
Total lines skipped (#nosec): <span id="nosec">0</span>
</div>
</div>
<br>
<div id="results">
<div id="issue-0">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/hanzo_studio_lumaAPI/generator.py" target="_blank">/custom_nodes/hanzo_studio_lumaAPI/generator.py</a><br>
<b>Line number: </b>16<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
12 }
13
14 def get_video_response(ids):
15 api_url = f&quot;{lumalabs_internal_url}/{ids}&quot;
16 response = requests.get(url = api_url,headers = COMMON_HEADERS)
17 return response.json()
18
19 def get_video(ids):
</pre>
</div>
</div>
</div>
<div id="issue-1">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/hanzo_studio_lumaAPI/generator.py" target="_blank">/custom_nodes/hanzo_studio_lumaAPI/generator.py</a><br>
<b>Line number: </b>31<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
27 params = {
28 &#x27;file_type&#x27;: &#x27;image&#x27;,
29 &#x27;filename&#x27;: &#x27;file.jpg&#x27;
30 }
31 response = requests.post(full_url, params = params, cookies = Cookie)
32 presigned_url, public_url = response.json()[&quot;presigned_url&quot;], response.json()[&quot;public_url&quot;]
33 print(presigned_url)
34 print(public_url)
</pre>
</div>
</div>
</div>
<div id="issue-2">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/hanzo_studio_lumaAPI/generator.py" target="_blank">/custom_nodes/hanzo_studio_lumaAPI/generator.py</a><br>
<b>Line number: </b>42<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
38 try:
39 presigned_url, public_url = get_upload_link(Cookie)
40 time.sleep(1)
41 with open(file_path, &#x27;rb&#x27;) as file:
42 response = requests.put(presigned_url, data=file,
43 headers={&#x27;Content-Type&#x27;: &quot;image/*&quot;, &quot;Referer&quot;: &quot;https://lumalabs.ai/&quot;, &quot;origin&quot;: &quot;https://lumalabs.ai&quot;})
44
45 if response.status_code == 200:
46 print(&quot;Upload successful:&quot;, public_url)
</pre>
</div>
</div>
</div>
<div id="issue-3">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/hanzo_studio_lumaAPI/generator.py" target="_blank">/custom_nodes/hanzo_studio_lumaAPI/generator.py</a><br>
<b>Line number: </b>58<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
54 def upload_file_comfyui(Cookie, binary_image):
55 try:
56 presigned_url, public_url = get_upload_link(Cookie)
57 time.sleep(1)
58 response = requests.put(presigned_url, data=binary_image,
59 headers={&#x27;Content-Type&#x27;: &quot;image/*&quot;, &quot;Referer&quot;: &quot;https://lumalabs.ai/&quot;, &quot;origin&quot;: &quot;https://lumalabs.ai&quot;})
60
61 if response.status_code == 200:
62 print(&quot;Upload successful:&quot;, public_url)
</pre>
</div>
</div>
</div>
<div id="issue-4">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/hanzo_studio_lumaAPI/generator.py" target="_blank">/custom_nodes/hanzo_studio_lumaAPI/generator.py</a><br>
<b>Line number: </b>93<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
89 else:
90 return &quot;Something Wrong&quot;
91
92
93 response = requests.post(lumalabs_internal_url, json=payload, cookies = Cookie_dict, headers=COMMON_HEADERS)
94 response_json = response.json()
95 return response_json
96
</pre>
</div>
</div>
</div>
<div id="issue-5">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/hanzo_studio_lumaAPI/generator.py" target="_blank">/custom_nodes/hanzo_studio_lumaAPI/generator.py</a><br>
<b>Line number: </b>101<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
97 def check_res(Cookie = str):
98 try:
99 url = &quot;https://internal-api.virginia.labs.lumalabs.ai/api/photon/v1/user/generations/&quot;
100 params = {&quot;offset&quot;: &quot;0&quot;, &quot;limit&quot;: &quot;10&quot;}
101 res = requests.get(url,headers = {&quot;Cookie&quot;:Cookie},params = params)
102 return res.json()
103 except Exception as ex:
104 print(&quot;Failed to get result: %s&quot;%ex)
</pre>
</div>
</div>
</div>
<div id="issue-6">
<div class="issue-block issue-sev-medium">
<b>request_without_timeout: </b> Requests call without timeout<br>
<b>Test ID:</b> B113<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>LOW<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/400.html" target="_blank">CWE-400</a><br>
<b>File: </b><a href="/custom_nodes/hanzo_studio_lumaAPI/generator.py" target="_blank">/custom_nodes/hanzo_studio_lumaAPI/generator.py</a><br>
<b>Line number: </b>113<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html</a><br>
<div class="code">
<pre>
109 if ids == i[&#x27;id&#x27;]:
110 video_url = i[&quot;video&quot;][&#x27;url&#x27;]
111 if download:
112 with open(output_name, &#x27;wb&#x27;) as file:
113 response = requests.get(video_url, stream=True)
114 for chunk in response.iter_content(chunk_size=1024):
115 if chunk:
116 file.write(chunk)
</pre>
</div>
</div>
</div>
</div>
</body>
</html>