Skip to content

Commit 94870b8

Browse files
committed
add failing test
1 parent 1a19909 commit 94870b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

javascript/ql/test/query-tests/Security/CWE-079/XssThroughDom/xss-through-dom.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,6 @@ const cashDom = require("cash-dom");
146146
}
147147
};
148148
cashDom("#id").html(DOMPurify ? DOMPurify.sanitize(src) : src); // OK
149+
150+
$("<a />", { html: src }).appendTo("#id"); // NOT OK - but not flagged [INCONSISTENCY]
149151
})();

0 commit comments

Comments
 (0)