Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e67eba commit 5d9778cCopy full SHA for 5d9778c
1 file changed
javascript/ql/src/semmle/javascript/frameworks/Babel.qll
@@ -188,4 +188,20 @@ module Babel {
188
/** Gets the name of the variable used to create JSX elements. */
189
string getJsxFactoryVariableName() { result = getOption("pragma").(JSONString).getValue() }
190
}
191
+
192
+ /**
193
+ * A taint step through a call to the Babel `transform` function.
194
+ */
195
+ private class TransformTaintStep extends TaintTracking::SharedTaintStep {
196
+ override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
197
+ exists(DataFlow::CallNode call |
198
+ call =
199
+ API::moduleImport(["@babel/standalone", "@babel/core"])
200
+ .getMember(["transform", "transformSync"])
201
+ .getACall() and
202
+ pred = call.getArgument(0) and
203
+ succ = call
204
+ )
205
+ }
206
207
0 commit comments