mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
JS: Mark regressions due to lack of local field steps
This commit is contained in:
@@ -363,8 +363,8 @@ function MyTrainer(opts) {
|
||||
|
||||
MyTrainer.prototype = {
|
||||
train: function() {
|
||||
var command = "learn " + this.learn_args + " " + model; // $ Alert
|
||||
cp.exec(command);
|
||||
var command = "learn " + this.learn_args + " " + model; // $ MISSING: Alert - lack of local field step
|
||||
cp.exec(command);
|
||||
}
|
||||
};
|
||||
module.exports.MyTrainer = MyTrainer;
|
||||
|
||||
@@ -44,7 +44,7 @@ class Foo {
|
||||
|
||||
doXss() {
|
||||
// not called here, but still bad.
|
||||
document.querySelector("#class").innerHTML = "<span>" + this.step + "</span>"; // $ Alert
|
||||
document.querySelector("#class").innerHTML = "<span>" + this.step + "</span>"; // $ MISSING: Alert - needs localFieldStep
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export function Template(text, opts) {
|
||||
Template.prototype = {
|
||||
compile: function () {
|
||||
var opts = this.opts;
|
||||
eval(" var " + opts.varName + " = something();"); // $ Alert
|
||||
eval(" var " + opts.varName + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
},
|
||||
// The below are justs tests that ensure the global-access-path computations terminate.
|
||||
pathsTerminate1: function (node, prev) {
|
||||
@@ -100,10 +100,10 @@ export class AccessPathClass {
|
||||
}
|
||||
|
||||
doesTaint() {
|
||||
eval(" var " + this.options1.taintedOption + " = something();"); // $ Alert
|
||||
eval(" var " + this.options2.taintedOption + " = something();"); // $ Alert
|
||||
eval(" var " + this.options3.taintedOption + " = something();"); // $ Alert
|
||||
eval(" var " + this.taint + " = something();"); // $ Alert
|
||||
eval(" var " + this.options1.taintedOption + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
eval(" var " + this.options2.taintedOption + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
eval(" var " + this.options3.taintedOption + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
eval(" var " + this.taint + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,10 +132,10 @@ export class AccessPathClassBB {
|
||||
}
|
||||
|
||||
doesTaint() {
|
||||
eval(" var " + this.options1.taintedOption + " = something();"); // $ Alert
|
||||
eval(" var " + this.options2.taintedOption + " = something();"); // $ Alert
|
||||
eval(" var " + this.options3.taintedOption + " = something();"); // $ Alert
|
||||
eval(" var " + this.taint + " = something();"); // $ Alert
|
||||
eval(" var " + this.options1.taintedOption + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
eval(" var " + this.options2.taintedOption + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
eval(" var " + this.options3.taintedOption + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
eval(" var " + this.taint + " = something();"); // $ MISSING: Alert - due to lack of localFieldStep
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class Foo {
|
||||
const obj = this.obj;
|
||||
const path = this.path;
|
||||
const value = this.value;
|
||||
return (obj[path[0]][path[1]] = value); // $ Alert
|
||||
return (obj[path[0]][path[1]] = value); // $ MISSING: Alert - lacking local field step
|
||||
}
|
||||
|
||||
safe() {
|
||||
|
||||
Reference in New Issue
Block a user