Skip to content

Commit 0affd89

Browse files
committed
JS: Track trusted type policy callbacks
1 parent 9b02eb7 commit 0affd89

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

javascript/ql/lib/semmle/javascript/frameworks/TrustedTypes.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ module TrustedTypes {
2525

2626
/** Gets the function passed as the given option. */
2727
DataFlow::FunctionNode getPolicyCallback(string method) {
28-
// Require local callback to avoid potential call/return mismatch in the uses below
29-
result = getOptionArgument(1, method).getALocalSource()
28+
result = getParameter(1).getMember(method).getAValueReachingSink()
3029
}
3130
}
3231

0 commit comments

Comments
 (0)