Skip to content

Commit 635a668

Browse files
authored
Update IncorrectChangingWorkingDirectory.ql
1 parent 0addb2d commit 635a668

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-243/IncorrectChangingWorkingDirectory.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ where
5050
fc.getTarget().hasGlobalOrStdName("chroot") and
5151
not inExistsChdir(fc) and
5252
not outExistsChdir(fc) and
53+
// in this section I want to exclude calls to functions containing chroot that have a direct path to chdir, or to a function containing chdir
5354
exists(FunctionCall fctmp |
5455
fc.getEnclosingStmt().getParentStmt*() = fctmp.getTarget().getEntryPoint().getChildStmt*() and
5556
not inExistsChdir(fctmp) and

0 commit comments

Comments
 (0)