Add comment on importance of Function.getACall()

This commit is contained in:
Owen Mansel-Chan
2025-04-25 13:58:11 +01:00
parent e6c19b0cbd
commit 3b934b8898

View File

@@ -25,6 +25,11 @@ class UnescapedType extends Type {
/**
* Holds if the sink is a data value argument of a template execution call.
*
* Note that this is slightly more general than
* `SharedXss::HtmlTemplateSanitizer` because it uses `Function.getACall()`,
* which finds calls through interfaces which the receiver implements. This
* finds more results in practice.
*/
predicate isSinkToTemplateExec(DataFlow::Node sink) {
exists(Method fn, string methodName, DataFlow::CallNode call |