Skip to content

Commit

Permalink
Test avec AutoAddPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
alanzirek committed Feb 27, 2025
1 parent 3a0f45d commit 3bef987
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def get_sftp_credentials(self):
def connect_to_sftp(self, credentials):
self.stdout.write("Connexion au serveur SFTP...")
client = paramiko.SSHClient()
client.set_missing_host_key_policy(CleverCloudSftpVerifier(credentials["hostname"]))
# client.set_missing_host_key_policy(CleverCloudSftpVerifier(credentials["hostname"]))
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Check failure

Code scanning / CodeQL

Accepting unknown SSH host keys when using Paramiko High

Setting missing host key policy to AutoAddPolicy may be unsafe.
client.connect(**credentials)
sftp = client.open_sftp()
self.stdout.write(self.style.SUCCESS("Connexion SFTP établie"))
Expand Down

0 comments on commit 3bef987

Please sign in to comment.