Files
custom-nodes-security-scan/docs/ComfyUI-Inspire-Pack-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

378 lines
13 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">3901</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-low">
<b>try_except_pass: </b> Try, Except, Pass detected.<br>
<b>Test ID:</b> B110<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/__init__.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/__init__.py</a><br>
<b>Line number: </b>48<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html</a><br>
<div class="code">
<pre>
44 {&#x27;version&#x27;: version_code,
45 &#x27;name&#x27;: &#x27;Inspire Pack&#x27;,
46 &#x27;nodes&#x27;: set(NODE_CLASS_MAPPINGS.keys()),
47 &#x27;description&#x27;: &#x27;This extension provides various nodes to support Lora Block Weight and the Impact Pack. Provides many easily applicable regional features and applications for Variation Seed.&#x27;, })
48 except:
49 pass
</pre>
</div>
</div>
</div>
<div id="issue-1">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/a1111_compat.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/a1111_compat.py</a><br>
<b>Line number: </b>258<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
254
255 return hcand, wcand
256
257
258 def random_divisor(value: int, min_value: int, /, max_options: int = 1, rand_obj=random.Random()) -&gt; int:
259 # print(f&quot;value={value}, min_value={min_value}, max_options={max_options}&quot;)
260 min_value = min(min_value, value)
261
</pre>
</div>
</div>
</div>
<div id="issue-2">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/a1111_compat.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/a1111_compat.py</a><br>
<b>Line number: </b>321<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
317 def patch(self, model, tile_size, swap_size, max_depth, scale_depth, seed):
318 latent_tile_size = max(32, tile_size) // 8
319 temp = None
320
321 rand_obj = random.Random()
322 rand_obj.seed(seed)
323
324 def hypertile_in(q, k, v, extra_options):
</pre>
</div>
</div>
</div>
<div id="issue-3">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py</a><br>
<b>Line number: </b>88<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
84 self.base_value -= 1
85 if self.base_value &lt; 0:
86 self.base_value = max_seed
87 elif self.action == SGmode.RAND:
88 self.base_value = random.randint(0, max_seed)
89
90 return seed
91
</pre>
</div>
</div>
</div>
<div id="issue-4">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py</a><br>
<b>Line number: </b>106<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
102 value -= 1
103 if value &lt; 0:
104 value = max_seed
105 elif action == &#x27;randomize&#x27; or action == &#x27;randomize for each node&#x27;:
106 value = random.randint(0, max_seed)
107
108 v[&#x27;inputs&#x27;][&#x27;value&#x27;] = value
109
</pre>
</div>
</div>
</div>
<div id="issue-5">
<div class="issue-block issue-sev-low">
<b>try_except_continue: </b> Try, Except, Continue detected.<br>
<b>Test ID:</b> B112<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py</a><br>
<b>Line number: </b>289<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html</a><br>
<div class="code">
<pre>
285 continue
286 else:
287 print(f&quot;[Inspire Pack] Only `ImpactInt`, `Seed (rgthree)` and `Primitive` Node are allowed as the seed for &#x27;{v[&#x27;class_type&#x27;]}&#x27;. It will be ignored. &quot;)
288 continue
289 except:
290 continue
291 else:
292 input_seed = int(inputs[&#x27;seed&#x27;])
293
</pre>
</div>
</div>
</div>
<div id="issue-6">
<div class="issue-block issue-sev-low">
<b>try_except_continue: </b> Try, Except, Continue detected.<br>
<b>Test ID:</b> B112<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/703.html" target="_blank">CWE-703</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/inspire_server.py</a><br>
<b>Line number: </b>317<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html</a><br>
<div class="code">
<pre>
313 continue
314 else:
315 print(f&quot;[Inspire Pack] Only `ImpactInt`, `Seed (rgthree)` and `Primitive` Node are allowed as the seed for &#x27;{v[&#x27;class_type&#x27;]}&#x27;. It will be ignored. &quot;)
316 continue
317 except:
318 continue
319 else:
320 input_seed = int(inputs[&#x27;seed&#x27;])
321
</pre>
</div>
</div>
</div>
<div id="issue-7">
<div class="issue-block issue-sev-medium">
<b>yaml_load: </b> Use of unsafe yaml load. Allows instantiation of arbitrary objects. Consider yaml.safe_load().<br>
<b>Test ID:</b> B506<br>
<b>Severity: </b>MEDIUM<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/20.html" target="_blank">CWE-20</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/prompt_support.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/prompt_support.py</a><br>
<b>Line number: </b>38<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/plugins/b506_yaml_load.html" target="_blank">https://bandit.readthedocs.io/en/1.7.9/plugins/b506_yaml_load.html</a><br>
<div class="code">
<pre>
34 if not os.path.exists(pb_yaml_path):
35 shutil.copy(pb_yaml_path_example, pb_yaml_path)
36
37 with open(pb_yaml_path, &#x27;r&#x27;, encoding=&quot;utf-8&quot;) as f:
38 prompt_builder_preset = yaml.load(f, Loader=yaml.FullLoader)
39 except Exception as e:
40 print(f&quot;[Inspire Pack] Failed to load &#x27;prompt-builder.yaml&#x27;&quot;)
41
</pre>
</div>
</div>
</div>
<div id="issue-8">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/prompt_support.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/prompt_support.py</a><br>
<b>Line number: </b>702<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
698 count = list_counter_map[unique_id]
699
700 list_counter_map[unique_id] = count + 1
701
702 rn = random.Random()
703 rn.seed(seed + count)
704 new_seed = random.randint(0, 1125899906842624)
705
</pre>
</div>
</div>
</div>
<div id="issue-9">
<div class="issue-block issue-sev-low">
<b>blacklist: </b> Standard pseudo-random generators are not suitable for security/cryptographic purposes.<br>
<b>Test ID:</b> B311<br>
<b>Severity: </b>LOW<br>
<b>Confidence: </b>HIGH<br>
<b>CWE: </b><a href="https://cwe.mitre.org/data/definitions/330.html" target="_blank">CWE-330</a><br>
<b>File: </b><a href="/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/prompt_support.py" target="_blank">/custom_nodes/Hanzo Studio-Inspire-Pack/inspire/prompt_support.py</a><br>
<b>Line number: </b>704<br>
<b>More info: </b><a href="https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random" target="_blank">https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random</a><br>
<div class="code">
<pre>
700 list_counter_map[unique_id] = count + 1
701
702 rn = random.Random()
703 rn.seed(seed + count)
704 new_seed = random.randint(0, 1125899906842624)
705
706 return (signal, new_seed)
707
</pre>
</div>
</div>
</div>
</div>
</body>
</html>