mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
Apply suggestion: use exists(var | range | formula) idiom in OsPathBasenameCall
Agent-Logs-Url: https://github.com/github/codeql/sessions/a319e151-8e8f-4770-b87c-12b5cdb268b8 Co-authored-by: hvitved <3667920+hvitved@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3a512ae777
commit
3229b9052e
@@ -118,11 +118,10 @@ module PathInjection {
|
||||
private class OsPathBasenameCall extends Sanitizer, DataFlow::CallCfgNode {
|
||||
OsPathBasenameCall() {
|
||||
exists(API::Node osPathModule |
|
||||
(
|
||||
osPathModule = API::moduleImport("os").getMember("path")
|
||||
or
|
||||
osPathModule = API::moduleImport(["posixpath", "ntpath", "genericpath"])
|
||||
) and
|
||||
osPathModule = API::moduleImport("os").getMember("path")
|
||||
or
|
||||
osPathModule = API::moduleImport(["posixpath", "ntpath", "genericpath"])
|
||||
|
|
||||
this = osPathModule.getMember("basename").getACall()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user