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

blacklist: Consider possible security implications associated with the subprocess module.
Test ID: B404
Severity: LOW
Confidence: HIGH
CWE: CWE-78
File: /custom_nodes/ComfyUI_tinyterraNodes/__init__.py
Line number: 5
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_imports.html#b404-import-subprocess
1	from .ttNpy.tinyterraNodes import TTN_VERSIONS
2	from .ttNpy import ttNserver # Do Not Remove
3	import configparser
4	import folder_paths
5	import subprocess
6	import shutil
7	import os
8	
start_process_with_partial_path: Starting a process with a partial executable path
Test ID: B607
Severity: LOW
Confidence: HIGH
CWE: CWE-78
File: /custom_nodes/ComfyUI_tinyterraNodes/__init__.py
Line number: 115
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b607_start_process_with_partial_path.html
111	
112	# Autoupdate if True
113	if config_value_validator("ttNodes", "auto_update", 'false') == 'true':
114	    try:
115	        with subprocess.Popen(["git", "pull"], cwd=cwd_path, stdout=subprocess.PIPE) as p:
116	            p.wait()
117	            result = p.communicate()[0].decode()
118	            if result != "Already up to date.\n":
subprocess_without_shell_equals_true: subprocess call - check for execution of untrusted input.
Test ID: B603
Severity: LOW
Confidence: HIGH
CWE: CWE-78
File: /custom_nodes/ComfyUI_tinyterraNodes/__init__.py
Line number: 115
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b603_subprocess_without_shell_equals_true.html
111	
112	# Autoupdate if True
113	if config_value_validator("ttNodes", "auto_update", 'false') == 'true':
114	    try:
115	        with subprocess.Popen(["git", "pull"], cwd=cwd_path, stdout=subprocess.PIPE) as p:
116	            p.wait()
117	            result = p.communicate()[0].decode()
118	            if result != "Already up to date.\n":
try_except_pass: Try, Except, Pass detected.
Test ID: B110
Severity: LOW
Confidence: HIGH
CWE: CWE-703
File: /custom_nodes/ComfyUI_tinyterraNodes/__init__.py
Line number: 120
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html
116	            p.wait()
117	            result = p.communicate()[0].decode()
118	            if result != "Already up to date.\n":
119	                print("\033[92m[t ttNodes Updated t]\033[0m")
120	    except:
121	        pass
122	
123	# --------- WEB ---------- #
124	# Remove old web JS folder
blacklist: Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
Test ID: B310
Severity: MEDIUM
Confidence: HIGH
CWE: CWE-22
File: /custom_nodes/ComfyUI_tinyterraNodes/ttNpy/tinyterraNodes.py
Line number: 78
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen
74	            # Fetch the NSP Pantry
75	            if pantry_path is None:
76	                pantry_path = os.path.join(ttNpaths.tinyterraNodes, 'nsp_pantry.json')
77	            if not os.path.exists(pantry_path):
78	                response = urlopen('https://raw.githubusercontent.com/WASasquatch/noodle-soup-prompts/main/nsp_pantry.json')
79	                tmp_pantry = json.loads(response.read())
80	                # Dump JSON locally
81	                pantry_serialized = json.dumps(tmp_pantry, indent=4)
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_tinyterraNodes/ttNpy/tinyterraNodes.py
Line number: 107
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
103	
104	            # Apply random results for each noodle counted
105	            for _ in range(tcount):
106	                new_text = new_text.replace(
107	                    tkey, random.choice(nspterminology[term]), 1)
108	                seed += 1
109	                random.seed(seed)
110	
try_except_pass: Try, Except, Pass detected.
Test ID: B110
Severity: LOW
Confidence: HIGH
CWE: CWE-703
File: /custom_nodes/ComfyUI_tinyterraNodes/ttNpy/tinyterraNodes.py
Line number: 548
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html
544	        font = None
545	        if os.path.exists(ttNpaths.font_path):
546	            try:
547	                font = ImageFont.truetype(str(Path(ttNpaths.font_path)), font_size)
548	            except:
549	                pass
550	            
551	        if font is None:
552	            font = ImageFont.load_default(font_size)
blacklist: Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
Test ID: B310
Severity: MEDIUM
Confidence: HIGH
CWE: CWE-22
File: /custom_nodes/ComfyUI_tinyterraNodes/ttNpy/ttNlegacyNodes.py
Line number: 40
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b310-urllib-urlopen
36	            # Fetch the NSP Pantry
37	            if pantry_path is None:
38	                pantry_path = os.path.join(ttNpaths.tinyterraNodes, 'nsp_pantry.json')
39	            if not os.path.exists(pantry_path):
40	                response = urlopen('https://raw.githubusercontent.com/WASasquatch/noodle-soup-prompts/main/nsp_pantry.json')
41	                tmp_pantry = json.loads(response.read())
42	                # Dump JSON locally
43	                pantry_serialized = json.dumps(tmp_pantry, indent=4)
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_tinyterraNodes/ttNpy/ttNlegacyNodes.py
Line number: 69
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
65	
66	            # Apply random results for each noodle counted
67	            for _ in range(tcount):
68	                new_text = new_text.replace(
69	                    tkey, random.choice(nspterminology[term]), 1)
70	                seed += 1
71	                random.seed(seed)
72	
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_tinyterraNodes/ttNpy/ttNlegacyNodes.py
Line number: 732
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
728	                plot_image_vars["seed"] = seed - index
729	                value_label = f"{plot_image_vars['seed']}"
730	
731	            elif value == 'randomize':
732	                plot_image_vars["seed"] = random.randint(0, 0xffffffffffffffff)
733	                value_label = f"{plot_image_vars['seed']}"
734	        else:
735	            plot_image_vars[value_type] = value
try_except_pass: Try, Except, Pass detected.
Test ID: B110
Severity: LOW
Confidence: HIGH
CWE: CWE-703
File: /custom_nodes/ComfyUI_tinyterraNodes/ttNpy/ttNserver.py
Line number: 15
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b110_try_except_pass.html
11	@routes.get("/ttN/reboot")
12	def restart(self):
13	    try:
14	        sys.stdout.close_log()
15	    except Exception as e:
16	        pass
17	
18	    print(f"\nRestarting...\n\n")
19	    if sys.platform.startswith('win32'):
start_process_with_no_shell: Starting a process without a shell.
Test ID: B606
Severity: LOW
Confidence: MEDIUM
CWE: CWE-78
File: /custom_nodes/ComfyUI_tinyterraNodes/ttNpy/ttNserver.py
Line number: 20
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b606_start_process_with_no_shell.html
16	        pass
17	
18	    print(f"\nRestarting...\n\n")
19	    if sys.platform.startswith('win32'):
20	        return os.execv(sys.executable, ['"' + sys.executable + '"', '"' + sys.argv[0] + '"'] + sys.argv[1:])
21	    else:
22	        return os.execv(sys.executable, [sys.executable] + sys.argv)
23	
start_process_with_no_shell: Starting a process without a shell.
Test ID: B606
Severity: LOW
Confidence: MEDIUM
CWE: CWE-78
File: /custom_nodes/ComfyUI_tinyterraNodes/ttNpy/ttNserver.py
Line number: 22
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b606_start_process_with_no_shell.html
18	    print(f"\nRestarting...\n\n")
19	    if sys.platform.startswith('win32'):
20	        return os.execv(sys.executable, ['"' + sys.executable + '"', '"' + sys.argv[0] + '"'] + sys.argv[1:])
21	    else:
22	        return os.execv(sys.executable, [sys.executable] + sys.argv)
23	
24	@routes.get("/ttN/models")
25	def get_models(self):