Add new example to illustrate taint propagation with def-use dataflow

This commit is contained in:
Michael Hohn
2023-11-28 16:39:13 -08:00
committed by =Michael Hohn
parent c1962230c2
commit 8cdb8ef0dd
5 changed files with 126 additions and 5 deletions

23
sample-utility-0.js Normal file
View File

@@ -0,0 +1,23 @@
var SampleUtility = function(){};
SampleUtility.prototype = Object.extendsObject(Processor, {
setUserStatus: function() {
var value = this.getParameter('value');
var ua = new GR('users');
ua.query();
if(!ua.hasNext()){
ua.initialize();
ua.setValue('status',value);
ua.insert();
}
else {
ua.next();
ua.setValue('status',value);
ua.update();
}
},
type: 'SampleUtility'
});