Skip to content

Commit 0b6db09

Browse files
Merge pull request #36 from netboxlabs/features-2025.11.01
Potential fix for code scanning alert no. 12: Accepting unknown SSH host keys when using Paramiko
2 parents fe47b31 + 76311ed commit 0b6db09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup/helpers/netbox_proxmox_cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def __get_proxmox_node_info_cmd(self, proxmox_node_info: dict, run_command: str)
8282
# Create an SSH client instance
8383
client = paramiko.SSHClient()
8484

85-
# Set policy for handling unknown host keys (AutoAddPolicy for convenience, RejectPolicy for security in production)
86-
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
85+
# Set policy for handling unknown host keys (RejectPolicy for security)
86+
client.set_missing_host_key_policy(paramiko.RejectPolicy())
8787

8888
# Connect to the server
8989
try:

0 commit comments

Comments
 (0)