We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83cbbd7 commit 87cac2aCopy full SHA for 87cac2a
javascript/ql/lib/semmle/javascript/frameworks/Express.qll
@@ -1077,7 +1077,13 @@ module Express {
1077
* An express route setup configured with the `cors` package.
1078
*/
1079
class CorsConfiguration extends DataFlow::MethodCallNode {
1080
- CorsConfiguration() { exists(Express::RouteSetup setup | this = setup | setup.isUseCall()) }
+ CorsConfiguration() {
1081
+ exists(Express::RouteSetup setup | this = setup |
1082
+ setup.isUseCall() and setup.getArgument(0) instanceof Cors::Cors
1083
+ or
1084
+ not setup.isUseCall() and setup.getAnArgument() instanceof Cors::Cors
1085
+ )
1086
+ }
1087
1088
/** Gets the cors argument */
1089
Cors::Cors getArgument() { result = this.getArgument(0) }
0 commit comments