Skip to content

Commit 3bcb411

Browse files
committed
Using Express::RouteSetup
1 parent f623db4 commit 3bcb411

File tree

1 file changed

+1
-3
lines changed
  • javascript/ql/lib/semmle/javascript/frameworks

1 file changed

+1
-3
lines changed

javascript/ql/lib/semmle/javascript/frameworks/Express.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,9 +1077,7 @@ module Express {
10771077
* An express route setup configured with the `cors` package.
10781078
*/
10791079
class CorsConfiguration extends DataFlow::MethodCallNode {
1080-
CorsConfiguration() {
1081-
this = appCreation().getAMethodCall("use") and this.getArgument(0) instanceof Cors::Cors
1082-
}
1080+
CorsConfiguration() { exists(Express::RouteSetup setup | this = setup | setup.isUseCall()) }
10831081

10841082
Cors::Cors getArgument() { result = this.getArgument(0) }
10851083

0 commit comments

Comments
 (0)