JS: address review comments

This commit is contained in:
Esben Sparre Andreasen
2018-10-08 13:53:44 +02:00
parent 6b8fd49fba
commit c885490c7e
2 changed files with 2 additions and 7 deletions

View File

@@ -379,7 +379,7 @@ module NodeJSLib {
*
* We determine this by looking for an externs declaration for
* `fs.methodName` where the `i`th parameter's name is `data` or
* `buffer` or a 'callback'.
* `buffer` or a `callback`.
*/
private predicate fsDataParam(string methodName, int i, string n) {
exists (ExternalMemberDecl decl, Function f, JSDocParamTag p |

View File

@@ -42,13 +42,8 @@ module FileAccessToHttp {
node instanceof Sanitizer
}
/** additional taint step that taints an object wrapping a source */
override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
(
pred = DataFlow::valueNode(_) or
pred = DataFlow::parameterNode(_) or
pred instanceof DataFlow::PropRead
) and
// taint entire object on property write
exists (DataFlow::PropWrite pwr |
succ = pwr.getBase() and
pred = pwr.getRhs()