Properties like innerHTML and outerHTML should not be modified directly unless such modifications are clearly reviewed. Modifying innerHTML or outerHTML using user inputs that has not been validated can lead to XSS injection.
if(typeof(SERVER_DOMAIN)==='undefined'){window.location.replace("/unconfigured.html");}constRECEIVE_URL=SERVER_DOMAIN+"/challenge_scoreboard.html"+"?origin="+get_domain();varwindow_ref=null;document.getElementById("username").focus();functionstore_username() {varusername;varusername_obj;username_obj=document.getElementById("username");username=username_obj.valuevarwelcome;welcome=document.getElementById("welcome");welcome.innerHTML="Welcome "+html_encode(username);varset_username;set_username=document.getElementById("set_username");set_username.style.display="none";vargame;game=document.getElementById("game");game.style.display="inline";start_game();// have to do time out so the window can open
setTimeout(function(){send_username(username);},1000);returnfalse;}
シームレスな統合。 Datadog Code Security をお試しください
Datadog Code Security
このルールを試し、Datadog Code Security でコードを解析する
このルールの使用方法
1
2
rulesets:- typescript-browser-security # Rules to enforce TypeScript browser security.