Metrics:
Total lines of code: 3901
Total lines skipped (#nosec): 0

try_except_pass: Try, Except, Pass detected.
Test ID: B110
Severity: LOW
Confidence: HIGH
CWE: CWE-703
File: /custom_nodes/ComfyUI-Inspire-Pack/__init__.py
Line number: 48
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html
44	                                 {'version': version_code,
45	                                  'name': 'Inspire Pack',
46	                                  'nodes': set(NODE_CLASS_MAPPINGS.keys()),
47	                                  'description': '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.', })
48	except:
49	    pass
blacklist: Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Test ID: B311
Severity: LOW
Confidence: HIGH
CWE: CWE-330
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/a1111_compat.py
Line number: 258
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
254	
255	    return hcand, wcand
256	
257	
258	def random_divisor(value: int, min_value: int, /, max_options: int = 1, rand_obj=random.Random()) -> int:
259	    # print(f"value={value}, min_value={min_value}, max_options={max_options}")
260	    min_value = min(min_value, value)
261	
blacklist: Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Test ID: B311
Severity: LOW
Confidence: HIGH
CWE: CWE-330
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/a1111_compat.py
Line number: 321
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
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):
blacklist: Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Test ID: B311
Severity: LOW
Confidence: HIGH
CWE: CWE-330
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/inspire_server.py
Line number: 88
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
84	            self.base_value -= 1
85	            if self.base_value < 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	
blacklist: Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Test ID: B311
Severity: LOW
Confidence: HIGH
CWE: CWE-330
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/inspire_server.py
Line number: 106
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
102	        value -= 1
103	        if value < 0:
104	            value = max_seed
105	    elif action == 'randomize' or action == 'randomize for each node':
106	        value = random.randint(0, max_seed)
107	
108	    v['inputs']['value'] = value
109	
try_except_continue: Try, Except, Continue detected.
Test ID: B112
Severity: LOW
Confidence: HIGH
CWE: CWE-703
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/inspire_server.py
Line number: 289
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html
285	                                    continue
286	                            else:
287	                                print(f"[Inspire Pack] Only `ImpactInt`, `Seed (rgthree)` and `Primitive` Node are allowed as the seed for '{v['class_type']}'. It will be ignored. ")
288	                                continue
289	                        except:
290	                            continue
291	                    else:
292	                        input_seed = int(inputs['seed'])
293	
try_except_continue: Try, Except, Continue detected.
Test ID: B112
Severity: LOW
Confidence: HIGH
CWE: CWE-703
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/inspire_server.py
Line number: 317
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b112_try_except_continue.html
313	                                    continue
314	                            else:
315	                                print(f"[Inspire Pack] Only `ImpactInt`, `Seed (rgthree)` and `Primitive` Node are allowed as the seed for '{v['class_type']}'. It will be ignored. ")
316	                                continue
317	                        except:
318	                            continue
319	                    else:
320	                        input_seed = int(inputs['seed'])
321	
yaml_load: Use of unsafe yaml load. Allows instantiation of arbitrary objects. Consider yaml.safe_load().
Test ID: B506
Severity: MEDIUM
Confidence: HIGH
CWE: CWE-20
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/prompt_support.py
Line number: 38
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b506_yaml_load.html
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, 'r', encoding="utf-8") as f:
38	        prompt_builder_preset = yaml.load(f, Loader=yaml.FullLoader)
39	except Exception as e:
40	    print(f"[Inspire Pack] Failed to load 'prompt-builder.yaml'")
41	
blacklist: Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Test ID: B311
Severity: LOW
Confidence: HIGH
CWE: CWE-330
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/prompt_support.py
Line number: 702
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
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	
blacklist: Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Test ID: B311
Severity: LOW
Confidence: HIGH
CWE: CWE-330
File: /custom_nodes/ComfyUI-Inspire-Pack/inspire/prompt_support.py
Line number: 704
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
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