continue to convert paramiko query to a more general query,

the proxy command is not a secondary command execution
so we can add proxy command to SystemCommandExecution::Range, update QLDocs,
add a proper Paramiko test case
fix a typo
This commit is contained in:
amammad
2024-02-24 18:30:50 +04:00
committed by Taus
parent 5fea71e5d6
commit 4df73f9975
12 changed files with 105 additions and 47 deletions

View File

@@ -1,4 +1,4 @@
import python
import experimental.dataflow.TestUtil.DataflowQueryTest
import experimental.semmle.python.security.SecondaryServerCmdInjection
import FromTaintTrackingConfig<ParamikoConfig>
import FromTaintTrackingConfig<SecondaryCommandInjectionConfig>

View File

@@ -23,5 +23,5 @@ async def read_item(cmd: str):
@app.get("/bad3")
async def read_item(cmd: str):
stdin, stdout, stderr = paramiko_ssh_client.connect('hostname', username='user',password='yourpassword',sock=paramiko.ProxyCommand(cmd)) # $ result=BAD
paramiko_ssh_client.connect('hostname', username='user',password='yourpassword',sock=paramiko.ProxyCommand(cmd)) # $ result=BAD
return {"success": "OK"}