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

exec_used: Use of exec detected.
Test ID: B102
Severity: MEDIUM
Confidence: HIGH
CWE: CWE-78
File: /custom_nodes/anynode/nodes/any.py
Line number: 333
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b102_exec_used.html
329	            except Exception as e:
330	                print(f"Failed to import submodules for {module_name}: {e}")
331	            
332	        try:
333	            exec(sanitize_code(code_string), globals_dict, locals_dict)
334	        except Exception as e:
335	            print("An error occurred:")
336	            traceback.print_exc()
hashlib: Use of weak MD5 hash for security. Consider usedforsecurity=False
Test ID: B324
Severity: HIGH
Confidence: HIGH
CWE: CWE-327
File: /custom_nodes/anynode/nodes/util_functions.py
Line number: 45
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b324_hashlib.html
41	        with open(self.registry_file, "w") as f:
42	            json.dump(self.registry, f, indent=4)
43	
44	    def hash_prompt(self, prompt):
45	        return hashlib.md5(prompt.encode('utf-8')).hexdigest()
46	
47	    def add_function(self, prompt, function_code, imports, comment, input_types):
48	        prompt_hash = self.hash_prompt(prompt)
request_without_timeout: Requests call without timeout
Test ID: B113
Severity: MEDIUM
Confidence: LOW
CWE: CWE-400
File: /custom_nodes/anynode/nodes/util_oai_compatible.py
Line number: 26
More info: https://bandit.readthedocs.io/en/1.7.9/plugins/b113_request_without_timeout.html
22	                         {"role": "user", "content": prompt}],
23	            "temperature": temperature,
24	            "max_tokens": max_tokens
25	        }
26	        response = requests.post(self.api_url, headers=headers, json=payload)
27	        if response.status_code == 200:
28	            return response.json().get('choices', [{}])[0].get('message', {}).get('content', '').strip()
29	        else: