Henning Dieterichs 2023-07-06 23:20:35 +02:00
parent 34f6c10073
commit f70fabb863
No known key found for this signature in database
GPG key ID: 771381EFFDB9EC06
6 changed files with 12 additions and 7 deletions

View file

@ -84,7 +84,7 @@ function loadScript(path: string): Promise<void> {
script.onload = () => res();
script.async = true;
script.type = "text/javascript";
script.src = path;
script.src = path; // CodeQL [SM01507] This is safe because the runner (that allows for dynamic paths) runs in an isolated iframe. The hosting website uses a static path configuration. // CodeQL [SM03712] This is safe because the runner (that allows for dynamic paths) runs in an isolated iframe. The hosting website uses a static path configuration.
document.head.appendChild(script);
});
}

View file

@ -21,7 +21,7 @@ window.addEventListener("message", (event) => {
const style = document.getElementById(
"custom-style"
) as HTMLStyleElement;
style.innerHTML = e.css;
style.innerHTML = e.css; // CodeQL [SM03712] This is safe because the runner runs in an isolated iframe.
}
});
@ -54,7 +54,7 @@ async function initialize(state: IPreviewState) {
const js = massageJs(state.js);
try {
eval(js);
eval(js); // CodeQL [SM01632] This is safe because the runner runs in an isolated iframe. This feature is essential to the functionality of the playground. // CodeQL [SM02688] This is safe because the runner runs in an isolated iframe. This feature is essential to the functionality of the playground.
} catch (err) {
const pre = document.createElement("pre");
pre.appendChild(