Skip to content

Commit

Permalink
Merge pull request #17260 from owen-mc/go/mad/convert-sink-5
Browse files Browse the repository at this point in the history
Go: Allow MaD models for XSS sinks using "html-injection" or "js-injection"
  • Loading branch information
owen-mc authored Aug 20, 2024
2 parents 8b4e060 + 30f8d6e commit f0fe3a3
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 f0fe3a3

Please sign in to comment.