diff --git a/change-notes/2020-10-12-x-net-html.md b/change-notes/2020-10-12-x-net-html.md index 485dd38971c..d0ffca3c9fa 100644 --- a/change-notes/2020-10-12-x-net-html.md +++ b/change-notes/2020-10-12-x-net-html.md @@ -1,2 +1,2 @@ lgtm,codescanning -* Added partial support for the `golang.org/x/net/html` package, modelling tainted data flow from a retrieved HTML document to its attributes and other data. +* Added partial support for the `golang.org/x/net/html` package, modeling tainted data flow from a retrieved HTML document to its attributes and other data. diff --git a/ql/src/semmle/go/frameworks/XNetHtml.qll b/ql/src/semmle/go/frameworks/XNetHtml.qll index 18548c5dced..096b3e847e2 100644 --- a/ql/src/semmle/go/frameworks/XNetHtml.qll +++ b/ql/src/semmle/go/frameworks/XNetHtml.qll @@ -30,6 +30,10 @@ module XNetHtml { "NewTokenizer", "NewTokenizerFragment"] and input.isParameter(0) and output.isResult(0) + or + getName() = ["AppendChild", "InsertBefore"] and + input.isParameter(0) and + output.isReceiver() } }