Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 02f353e

Browse files
committed
Add models for the read side of golang.org/x/net/html
This covers cases where an HTML document is retrieved and then parts of its structure are output without proper escaping.
1 parent 03bbef7 commit 02f353e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

change-notes/2020-10-12-x-net-html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
lgtm,codescanning
2-
* 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.
2+
* 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.

ql/src/semmle/go/frameworks/XNetHtml.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ module XNetHtml {
3030
"NewTokenizer", "NewTokenizerFragment"] and
3131
input.isParameter(0) and
3232
output.isResult(0)
33+
or
34+
getName() = ["AppendChild", "InsertBefore"] and
35+
input.isParameter(0) and
36+
output.isReceiver()
3337
}
3438
}
3539

0 commit comments

Comments
 (0)