You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodeQL considers DOMParser().parseFromString as XSS sink but I think it is no longer XSS sink.
Though there was a bug in Safari some years ago, but the method is designed not to execute JavaScript as far as I read the discussions in GoogleChrome/web.dev#6890 and the spec.
Description of the false positive
CodeQL considers
DOMParser().parseFromString
as XSS sink but I think it is no longer XSS sink.Though there was a bug in Safari some years ago, but the method is designed not to execute JavaScript as far as I read the discussions in GoogleChrome/web.dev#6890 and the spec.
https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring-dev
Code samples or links to source code
https://github.com/microsoft/vscode/blob/57bceb67381bd630e4e7bac7a8ea170fd2f0b01e/extensions/markdown-language-features/preview-src/index.ts#L133-L134
codeql/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/tst.js
Lines 177 to 180 in b6a7661
URL to the alert on GitHub code scanning (optional)
The text was updated successfully, but these errors were encountered: