'const path = matchedStar ? subst.replace("*", matchedStar) : subst; // CodeQL [SM02383] This is a false positive, the code is from the TypeScript compiler'
);
// The output from this build will only be accessible via ESM; rather than removing
// references to require/module, define them as dummy variables that bundlers will ignore.
// The TS code can figure out that it's not running under Node even with these defined.
@ -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.
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) {
constjs=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.
def=eval("(function(){ "+langModel.getValue()+"; })()");// CodeQL [SM01632] langModel.getValue() is a default value with volatile user modifications. This is an essential functionality for the monarch playground and safe, as no injection is possible.