Skip to content

Commit f0fe3a3

Browse files
authored
Merge pull request #17260 from owen-mc/go/mad/convert-sink-5
Go: Allow MaD models for XSS sinks using "html-injection" or "js-injection"
2 parents 8b4e060 + 30f8d6e commit f0fe3a3

File tree

1 file changed

+4
-0
lines changed
  • go/ql/lib/semmle/go/security

1 file changed

+4
-0
lines changed

go/ql/lib/semmle/go/security/Xss.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ module SharedXss {
4949
override Locatable getAssociatedLoc() { result = this.getRead().getEnclosingTextNode() }
5050
}
5151

52+
private class DefaultSink extends Sink {
53+
DefaultSink() { sinkNode(this, ["html-injection", "js-injection"]) }
54+
}
55+
5256
/**
5357
* Holds if `body` may send a response with a content type other than HTML.
5458
*/

0 commit comments

Comments
 (0)