JS: Mark regressions due to lack of local field steps

This commit is contained in:
Asger F
2025-02-12 10:12:16 +01:00
parent e5bee19b19
commit e026b9e048
4 changed files with 13 additions and 13 deletions

View File

@@ -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;

View File

@@ -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
}
}

View File

@@ -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
}
}

View File

@@ -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() {