
The way the paramiko check was previously working didn't catch many uses because the qualified name is difficult to predict for Paramiko calls. This commit changes it so that paramiko detection is accomplished by the combination of importing paramiko and using one of the paramiko functions that executes with a shell. Change-Id: Ib6e8f596a8f05475213be0ac8cf27e4e308b9617
12 lines
203 B
Python
12 lines
203 B
Python
import paramiko
|
|
|
|
# this is not safe
|
|
paramiko.exec_command('something; reallly; unsafe')
|
|
|
|
# this is safe
|
|
paramiko.connect('somehost')
|
|
|
|
# this is not safe
|
|
SSHClient.invoke_shell('something; bad; here\n')
|
|
|