Skip to content

Commit a5a0861

Browse files
committed
Python: Expand test of py/paramiko-missing-host-key-validation
1 parent 4e49df1 commit a5a0861

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/ql/test/query-tests/Security/CWE-295-MissingHostKeyValidation/paramiko_host_key.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@
1111
client.set_missing_host_key_policy(AutoAddPolicy()) # bad
1212
client.set_missing_host_key_policy(RejectPolicy()) # good
1313
client.set_missing_host_key_policy(WarningPolicy()) # bad
14+
15+
# different import
16+
17+
import paramiko
18+
19+
client = paramiko.SSHClient()
20+
client.set_missing_host_key_policy(paramiko.AutoAddPolicy) # bad

0 commit comments

Comments
 (0)