Metrics:
Total lines of code: 3982
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/mikey_nodes/mikey_nodes.py
Line number: 272
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
268	                store_offset = offset
269	                if lock_indicator:
270	                    offset = offset_seed
271	                elif random_indicator:
272	                    offset = random.randint(0, 1000000)
273	                elif increment_indicator:
274	                    offset = offset_seed + 1
275	                elif decrement_indicator:
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/mikey_nodes/mikey_nodes.py
Line number: 278
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
274	                    offset = offset_seed + 1
275	                elif decrement_indicator:
276	                    offset = offset_seed - 1
277	                else:
278	                    offset = random.randint(0, 1000000)
279	            selected_lines = []
280	            with open(file_path, 'r', encoding='utf-8') as file:
281	                file_lines = file.readlines()
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/mikey_nodes/mikey_nodes.py
Line number: 323
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
319	    # select a random word from the | separated list
320	    random.seed(seed)
321	    wc_re = re.compile(r'{([^}]+)}')
322	    def repl(m):
323	        return random.choice(m.group(1).split('|'))
324	    for m in wc_re.finditer(text):
325	        text = text.replace(m.group(0), repl(m))
326	    return text
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/mikey_nodes/mikey_nodes.py
Line number: 508
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
504	
505	    # Iterate through matches
506	    for match in matches:
507	        lower_bound, upper_bound = map(float, match.groups())
508	        random_value = random.uniform(lower_bound, upper_bound)
509	        random_value = round(random_value, 4)
510	
511	        # Append text up to the match and the generated number
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/mikey_nodes/mikey_nodes.py
Line number: 2085
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
2081	        positive_prompt_ = find_and_replace_wildcards(positive_prompt, seed, True)
2082	        negative_prompt_ = find_and_replace_wildcards(negative_prompt, seed, True)
2083	        add_metadata_to_dict(prompt_with_style, positive_prompt=positive_prompt_, negative_prompt=negative_prompt_)
2084	        if len(positive_prompt_) != len(positive_prompt) or len(negative_prompt_) != len(negative_prompt):
2085	            seed += random.randint(0, 1000000)
2086	        positive_prompt = positive_prompt_
2087	        negative_prompt = negative_prompt_
2088	        # extract and load loras
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/mikey_nodes/mikey_nodes.py
Line number: 2347
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
2343	        text = process_random_syntax(text, seed)
2344	        # process wildcards
2345	        text_ = find_and_replace_wildcards(text, seed, True)
2346	        if len(text_) != len(text):
2347	            seed = random.randint(0, 1000000)
2348	        else:
2349	            seed = 1
2350	        # extract and load loras
blacklist: Use of possibly insecure function - consider using safer ast.literal_eval.
Test ID: B307
Severity: MEDIUM
Confidence: HIGH
CWE: CWE-78
File: /custom_nodes/mikey_nodes/mikey_nodes.py
Line number: 3783
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b307-eval
3779	            # Split the string by '+' to identify individual text components
3780	            components = output_text.split(" + ")
3781	
3782	            # Generate the final string for each output
3783	            final_output = delimiter.join(eval(comp, {}, text_dict) for comp in components)
3784	
3785	            outputs.append(final_output)
3786	
blacklist: Use of possibly insecure function - consider using safer ast.literal_eval.
Test ID: B307
Severity: MEDIUM
Confidence: HIGH
CWE: CWE-78
File: /custom_nodes/mikey_nodes/mikey_nodes.py
Line number: 3841
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b307-eval
3837	            # Split the string by '+' to identify individual text components
3838	            components = output_text.split(" + ")
3839	
3840	            # Generate the final string for each output
3841	            final_output = delimiter.join(eval(comp, {}, text_dict) for comp in components)
3842	
3843	            outputs.append(final_output)
3844	
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/mikey_nodes/mikey_nodes.py
Line number: 3981
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
3977	        # wildcard sytax is {like|this}
3978	        # select a random word from the | separated list
3979	        wc_re = re.compile(r'{([^}]+)}')
3980	        def repl(m):
3981	            return random.choice(m.group(1).split('|'))
3982	        for m in wc_re.finditer(text):
3983	            text = text.replace(m.group(0), repl(m))
3984	        prompt.get(str(unique_id))['inputs']['text'] = preserve_text
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/mikey_nodes/mikey_nodes.py
Line number: 4351
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
4347	                     'unusual example of', 'a classic', 'an underrated', 'an innovative','a historical', 'a modern', 'a contemporary',
4348	                     'a futuristic', 'a traditional', 'an eco-friendly', 'a controversial', 'a political', 'a religious',
4349	                     'a spiritual', 'a philosophical', 'a scientific']
4350	            random.seed(seed)
4351	            prompt = f'{random.choice(spice)} {prompt}'
4352	        request = {
4353	            'user_input': prompt,
4354	            'max_new_tokens': 250,
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/mikey_nodes/mikey_nodes.py
Line number: 4385
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
4381	        # wildcard sytax is {like|this}
4382	        # select a random word from the | separated list
4383	        wc_re = re.compile(r'{([^}]+)}')
4384	        def repl(m):
4385	            return random.choice(m.group(1).split('|'))
4386	        for m in wc_re.finditer(input_prompt):
4387	            input_prompt = input_prompt.replace(m.group(0), repl(m))
4388	        result = self.api_request(input_prompt, seed, mode, custom_history)
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/mikey_nodes/mikey_nodes.py
Line number: 4416
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
4412	        # wildcard sytax is {like|this}
4413	        # select a random word from the | separated list
4414	        wc_re = re.compile(r'{([^}]+)}')
4415	        def repl(m):
4416	            return random.choice(m.group(1).split('|'))
4417	        for m in wc_re.finditer(input_prompt):
4418	            input_prompt = input_prompt.replace(m.group(0), repl(m))
4419	        # process wildcards
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/mikey_nodes/mikey_nodes.py
Line number: 4597
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
4593	                     'unusual example of', 'a classic', 'an underrated', 'an innovative','a historical', 'a modern', 'a contemporary',
4594	                     'a futuristic', 'a traditional', 'an eco-friendly', 'a controversial', 'a political', 'a religious',
4595	                     'a spiritual', 'a philosophical', 'a scientific']
4596	            random.seed(seed)
4597	            prompt = f'{random.choice(spice)} {prompt}'
4598	        """
4599	        example curl request to LM Studio
4600	        curl http://localhost:1234/v1/chat/completions \
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/mikey_nodes/mikey_nodes.py
Line number: 4650
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
4646	        # wildcard sytax is {like|this}
4647	        # select a random word from the | separated list
4648	        wc_re = re.compile(r'{([^}]+)}')
4649	        def repl(m):
4650	            return random.choice(m.group(1).split('|'))
4651	        for m in wc_re.finditer(input_prompt):
4652	            input_prompt = input_prompt.replace(m.group(0), repl(m))
4653	        result = self.api_request(input_prompt, server_address, server_port, seed, mode, custom_history)
blacklist: Use of possibly insecure function - consider using safer ast.literal_eval.
Test ID: B307
Severity: MEDIUM
Confidence: HIGH
CWE: CWE-78
File: /custom_nodes/mikey_nodes/mikey_nodes.py
Line number: 4675
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b307-eval
4671	    def process(self, a, b, formula):
4672	        # eval formula
4673	        formula = formula.replace('a', str(a))
4674	        formula = formula.replace('b', str(b))
4675	        result = eval(formula)
4676	        return (result, int(result), str(result))
4677	
4678	class ImageOverlay: