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

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-KJNodes/nodes/image_nodes.py
Line number: 308
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
304	            image = Image.new("RGB", (width, height), color='black')
305	            draw = ImageDraw.Draw(image)
306	            
307	            # Generate a random color for the text
308	            font_color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
309	            
310	            font = ImageFont.truetype(font_path, font_size)
311	            
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-KJNodes/nodes/image_nodes.py
Line number: 308
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
304	            image = Image.new("RGB", (width, height), color='black')
305	            draw = ImageDraw.Draw(image)
306	            
307	            # Generate a random color for the text
308	            font_color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
309	            
310	            font = ImageFont.truetype(font_path, font_size)
311	            
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-KJNodes/nodes/image_nodes.py
Line number: 308
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
304	            image = Image.new("RGB", (width, height), color='black')
305	            draw = ImageDraw.Draw(image)
306	            
307	            # Generate a random color for the text
308	            font_color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
309	            
310	            font = ImageFont.truetype(font_path, font_size)
311	            
assert_used: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Test ID: B101
Severity: LOW
Confidence: HIGH
CWE: CWE-703
File: /custom_nodes/ComfyUI-KJNodes/nodes/image_nodes.py
Line number: 462
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b101_assert_used.html
458	        
459	        if caption == "":
460	            processed_images = [process_image(img, text) for img in image]
461	        else:
462	            assert len(caption) == batch_size, "Number of captions does not match number of images"
463	            processed_images = [process_image(img, cap) for img, cap in zip(image, caption)]
464	        processed_batch = torch.cat(processed_images, dim=0)
465	
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-KJNodes/nodes/image_nodes.py
Line number: 820
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
816	class ImageAndMaskPreview(SaveImage):
817	    def __init__(self):
818	        self.output_dir = folder_paths.get_temp_directory()
819	        self.type = "temp"
820	        self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5))
821	        self.compress_level = 4
822	
823	    @classmethod
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-KJNodes/nodes/image_nodes.py
Line number: 1189
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
1185	class PreviewAnimation:
1186	    def __init__(self):
1187	        self.output_dir = folder_paths.get_temp_directory()
1188	        self.type = "temp"
1189	        self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5))
1190	        self.compress_level = 1
1191	
1192	    methods = {"default": 4, "fastest": 0, "slowest": 6}
request_without_timeout: Requests call without timeout
Test ID: B113
Severity: MEDIUM
Confidence: LOW
CWE: CWE-400
File: /custom_nodes/ComfyUI-KJNodes/nodes/nodes.py
Line number: 1630
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html
1626	                config = json.load(file)
1627	            api_key_from_config = config.get("sai_api_key")
1628	            headers["authorization"] = api_key_from_config            
1629	        
1630	        response = requests.post(
1631	            f"https://api.stability.ai/v2beta/stable-image/generate/sd3",
1632	            headers=headers,
1633	            files = files,
1634	            data = data,
1635	        )
1636	
1637	        if response.status_code == 200:
1638	            # Convert the response content to a PIL Image