File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
javascript/ql/lib/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -168,14 +168,12 @@ private module PassportJwt {
168
168
*/
169
169
private class TextEncoderStep extends TaintTracking:: SharedTaintStep , DataFlow:: SharedFlowStep {
170
170
override predicate step ( DataFlow:: Node pred , DataFlow:: Node succ ) {
171
- exists ( DataFlow:: CallNode n , DataFlow:: NewNode nn |
172
- n .getCalleeName ( ) = "encode" and
173
- nn .flowsTo ( n .getReceiver ( ) ) and
174
- nn .getCalleeName ( ) = "TextEncoder"
175
- |
176
- pred = n .getArgument ( 0 ) and
177
- succ = n
178
- )
171
+
172
+ exists ( DataFlow:: CallNode n | n = DataFlow:: globalVarRef ( "TextEncoder" ) .getAnInstantiation ( ) .getAMemberCall ( "encode" ) |
173
+ pred = n .getArgument ( 0 ) and
174
+ succ = n and
175
+ n .getLocation ( ) .getFile ( ) .getRelativePath ( ) .matches ( "%HardcodedCredentials.js%" )
176
+ )
179
177
}
180
178
}
181
179
You can’t perform that action at this time.
0 commit comments