Client-side Javascript injection by assinging the output of window.location.href.substr to a variable

Sample code:
function winLoad() {
var sessionId = ”;
if (window.location == window.top.location) {
var semicolonIndex = window.location.href.indexOf(‘;’);
if (semicolonIndex != -1) {
var questionMarkInd… Continue reading Client-side Javascript injection by assinging the output of window.location.href.substr to a variable

Is this code vulnerable to "Client DOM Code Injection". Checkmarx scan is saying yes, but I don’t see how [closed]

Apologies if this is a basic question.
I’m trying to understand why checkmarx scan thinks the below code is vulnerable to "Client DOM Code Injection". It says

The application’s function method receives and dynamically executes
u… Continue reading Is this code vulnerable to "Client DOM Code Injection". Checkmarx scan is saying yes, but I don’t see how [closed]