Skip to content

Commit

Permalink
Allow MaD models for XSS sinks using "html-injection" or "js-injection"
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-mc committed Aug 20, 2024
1 parent ff242dc commit 30f8d6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/ql/lib/semmle/go/security/Xss.qll
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ module SharedXss {
override Locatable getAssociatedLoc() { result = this.getRead().getEnclosingTextNode() }
}

private class DefaultSink extends Sink {
DefaultSink() { sinkNode(this, ["html-injection", "js-injection"]) }
}

/**
* Holds if `body` may send a response with a content type other than HTML.
*/
Expand Down

0 comments on commit 30f8d6e

Please sign in to comment.