File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/semmle/javascript/frameworks
test/library-tests/TypeTracking Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 5
5
import javascript
6
6
import semmle.javascript.frameworks.HTTP
7
7
import semmle.javascript.security.SensitiveActions
8
+ private import semmle.javascript.dataflow.internal.PreCallGraphStep
8
9
9
10
module NodeJSLib {
10
11
private GlobalVariable processVariable ( ) { variables ( result , "process" , any ( GlobalScope sc ) ) }
@@ -610,6 +611,22 @@ module NodeJSLib {
610
611
)
611
612
}
612
613
614
+ /**
615
+ * A call to `util.deprecate`, considered to introduce data flow from its first argument
616
+ * to its result.
617
+ */
618
+ private class UtilDeprecateStep extends PreCallGraphStep {
619
+ override predicate step ( DataFlow:: Node pred , DataFlow:: Node succ ) {
620
+ exists ( DataFlow:: CallNode deprecate |
621
+ deprecate = DataFlow:: moduleMember ( "util" , "deprecate" ) .getACall ( ) or
622
+ deprecate = DataFlow:: moduleImport ( "util-deprecate" ) .getACall ( )
623
+ |
624
+ pred = deprecate .getArgument ( 0 ) and
625
+ succ = deprecate
626
+ )
627
+ }
628
+ }
629
+
613
630
/**
614
631
* A call to a method from module `child_process`.
615
632
*/
Original file line number Diff line number Diff line change 1
- | client2.js:3:6:3:16 | // track: f | Failed to track f here. |
You can’t perform that action at this time.
0 commit comments