Skip to content

Commit 76311ed

Browse files
Potential fix for code scanning alert no. 12: Accepting unknown SSH host keys when using Paramiko
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 774c3be commit 76311ed

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)