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

266 lines
8.0 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">537</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>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/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py" target="_blank">/custom_nodes/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py</a><br>
<b>Line number: </b>23<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>
19 return &quot;&quot;
20
21 lines = text.splitlines()
22 random.seed(seed)
23 random_line = random.choice(lines)
24 return random_line
25
26 class MultiTextMerge:
</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/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py" target="_blank">/custom_nodes/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py</a><br>
<b>Line number: </b>105<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>
101
102 def get_random_line(self, textt, seed):
103 lines = textt.splitlines()
104 random.seed(seed)
105 random_line = random.choice(lines)
106 return random_line
107
108 def get_random_line4(self, seed, delimiter, text1=&#x27;&#x27;, text2=&#x27;&#x27;, text3=&#x27;&#x27;, text4=&#x27;&#x27;):
</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/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py" target="_blank">/custom_nodes/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py</a><br>
<b>Line number: </b>189<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>
185
186 if line.startswith(&quot;?&quot;):
187 line = line[1:]
188 perc = self.line_perc(line)
189 if random.random() &gt; perc:
190 continue
191 line = self.get_perc_text(line)
192
</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/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py" target="_blank">/custom_nodes/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py</a><br>
<b>Line number: </b>222<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>
218 return re.sub(r&#x27;\s+&#x27;, &#x27; &#x27;, input.strip())
219
220 def replace_random(self, match):
221 options = match.group(1).split(&#x27;*&#x27;)
222 return random.choice(options)
223
224 def select_random_from_braces(self, input):
225 pattern = r&#x27;\[(.*?)\]&#x27;
</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/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py" target="_blank">/custom_nodes/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py</a><br>
<b>Line number: </b>274<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>
270 if num_choices:
271 # Randomly select between n-m choices
272 if &#x27;-&#x27; in num_choices:
273 start, end = map(int, num_choices.split(&#x27;-&#x27;))
274 n = random.randint(start, end)
275 # Randomly select n choices
276 else:
277 n = int(num_choices)
</pre>
</div>
</div>
</div>
<div id="issue-5">
<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/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py" target="_blank">/custom_nodes/Hakkun-Hanzo Studio-nodes/hakkun_nodes.py</a><br>
<b>Line number: </b>611<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>
607
608 dir_files = sorted(dir_files)
609
610 random.seed(seed)
611 random_index = random.randint(0, len(dir_files) - 1)
612 image_path = dir_files[random_index]
613
614 i = Image.open(image_path)
</pre>
</div>
</div>
</div>
</div>
</body>
</html>