mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
backtrack string-concatenations from shell-execution sinks
This commit is contained in:
@@ -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()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user