backtrack string-concatenations from shell-execution sinks

This commit is contained in:
Erik Krogh Kristensen
2021-04-07 15:33:06 +02:00
parent 073a43ce74
commit 365b4d722d
3 changed files with 21 additions and 0 deletions

View File

@@ -70,6 +70,12 @@ module UnsafeShellCommandConstruction {
exists(DataFlow::TypeBackTracker t2 |
t2 = t.smallstep(result, isExecutedAsShellCommand(t2, sys))
)
or
exists(DataFlow::TypeBackTracker t2, StringOps::ConcatenationRoot prev |
t = t2.continue() and
isExecutedAsShellCommand(t2, sys) = prev and
result = prev.getALeaf()
)
}
/**