mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
change RouteSetup to a DataFlow::Node
This commit is contained in:
committed by
erik-krogh
parent
d98028be1a
commit
9cb7522bc1
@@ -135,7 +135,7 @@ DataFlow::CallNode servesAPrivateFolder(string description) {
|
||||
*/
|
||||
Express::RouteSetup getAnExposingExpressSetup(string path) {
|
||||
result.isUseCall() and
|
||||
result.getArgument([0 .. 1]) = servesAPrivateFolder(path).getEnclosingExpr()
|
||||
result.getArgument([0 .. 1]) = servesAPrivateFolder(path)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,7 +149,7 @@ DataFlow::CallNode getAnExposingServeSetup(string path) {
|
||||
|
||||
from DataFlow::Node node, string path
|
||||
where
|
||||
node = getAnExposingExpressSetup(path).flow()
|
||||
node = getAnExposingExpressSetup(path)
|
||||
or
|
||||
node = getAnExposingServeSetup(path)
|
||||
select node, "Serves " + path + ", which can contain private information."
|
||||
|
||||
@@ -77,7 +77,7 @@ private module StandardPoIs {
|
||||
UnpromotedRouteSetupPoI() { this = "UnpromotedRouteSetupPoI" }
|
||||
|
||||
override predicate is(Node l0) {
|
||||
l0 instanceof HTTP::RouteSetupCandidate and not l0.asExpr() instanceof HTTP::RouteSetup
|
||||
l0 instanceof HTTP::RouteSetupCandidate and not l0 instanceof HTTP::RouteSetup
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import CandidateTracking
|
||||
|
||||
from HTTP::RouteSetupCandidate setup
|
||||
where
|
||||
not setup.asExpr() instanceof HTTP::RouteSetup and
|
||||
not setup instanceof HTTP::RouteSetup and
|
||||
exists(HTTP::RouteHandlerCandidate rh |
|
||||
track(rh, DataFlow::TypeTracker::end()).flowsTo(setup.getARouteHandlerArg())
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user