Skip to content

Commit cfdfccf

Browse files
authored
Update Suppression Justification Message (#1235)
update suppression reason
1 parent 21c17b2 commit cfdfccf

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/common/copilot/assets/scripts/copilot.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
<path d="M7.73333 6.48697C7.55556 6.48697 7.43111 6.57586 7.36 6.75363C6.96889 7.85586 6.20444 9.59808 5.06667 11.9803C4.99556 12.1225 4.99556 12.2647 5.06667 12.407C5.13778 12.5136 5.26222 12.5492 5.44 12.5136H8.74667L9.22667 13.1536V13.6336L8.16 16.087C8.12444 16.1581 8.10667 16.247 8.10667 16.3536C8.14222 16.4247 8.19556 16.4959 8.26667 16.567C8.33778 16.6025 8.40889 16.6203 8.48 16.6203C8.58667 16.6203 8.67556 16.5847 8.74667 16.5136L14.8267 10.967L15.3067 10.807H16.64C16.7467 10.807 16.8356 10.7714 16.9067 10.7003C17.0133 10.6292 17.0667 10.5403 17.0667 10.4336V6.91363C17.0667 6.80697 17.0133 6.71808 16.9067 6.64697C16.8356 6.5403 16.7467 6.48697 16.64 6.48697H7.73333Z" fill="none" id="thumbsdown-path"/>
235235
</svg>
236236
</div>
237-
`; // CodeQL [SM04949] no user input is used
237+
`; // CodeQL [SM04949] no user input is used, therefore these need not be sanitized.
238238

239239
feedback.classList.add("feedback-div");
240240

@@ -245,8 +245,7 @@
245245
const gitHubCopilotText = document.createElement("div");
246246
gitHubCopilotText.classList.add("github-copilot-text");
247247

248-
gitHubCopilotText.innerHTML = `<span class="new-badge">${copilotStrings.NEW_BADGE}</span>
249-
<span class="gitHubCopilotText">${copilotStrings.GITHUB_COPILOT_CHAT}</span>`; // CodeQL [SM03712] no user input is used
248+
gitHubCopilotText.innerHTML = `<span class="new-badge">${copilotStrings.NEW_BADGE}</span><span class="gitHubCopilotText">${copilotStrings.GITHUB_COPILOT_CHAT}</span>`; // CodeQL [SM03712] no user input is used, therefore these need not be sanitized.
250249

251250
return gitHubCopilotText;
252251
}
@@ -279,7 +278,7 @@
279278
${starIconSvg}
280279
</span>
281280
${listPrompt}
282-
</a>`; // CodeQL [SM03712] no user input is used
281+
</a>`; // CodeQL [SM03712] no user input is used, therefore these need not be sanitized.
283282

284283
return suggestedPrompt;
285284
}
@@ -291,7 +290,7 @@
291290
<a href="#" class="walkthrough-content" tabindex="0" aria-label="${copilotStrings.LEARN_MORE_MESSAGE}">
292291
${bookIconSvg}
293292
<span id="walk-text">${copilotStrings.LEARN_MORE_MESSAGE}</span>
294-
</a>`; // CodeQL [SM04949] no user input is used
293+
</a>`; // CodeQL [SM04949] no user input is used, therefore these need not be sanitized.
295294
return walkthrough;
296295
}
297296

@@ -396,9 +395,7 @@
396395
userNotLoggedIn: function () {
397396
const notLoggedIn = document.createElement("div");
398397
notLoggedIn.classList.add("not-loggedIn");
399-
notLoggedIn.innerHTML = `<p id="greeting"></p>
400-
<p>${copilotStrings.LOGIN_MESSAGE}</p>
401-
<button id="loginButton" aria-label="${copilotStrings.LOGIN_BUTTON}">${copilotStrings.LOGIN_BUTTON}</button>`; // CodeQL [SM03712] no user input is used
398+
notLoggedIn.innerHTML = `<p id="greeting"></p><p>${copilotStrings.LOGIN_MESSAGE}</p><button id="loginButton" aria-label="${copilotStrings.LOGIN_BUTTON}">${copilotStrings.LOGIN_BUTTON}</button>`; // CodeQL [SM03712] no user input is used, therefore these need not be sanitized.
402399

403400
messageElement.appendChild(notLoggedIn);
404401

@@ -412,7 +409,7 @@
412409
}
413410
const loggedInDiv = document.createElement("div");
414411
loggedInDiv.classList.add("loggedIn");
415-
loggedInDiv.innerHTML = `<p id="greeting">${copilotStrings.HI} <strong>${userName}!</strong> ${copilotStrings.WELCOME_MESSAGE}</p>`; // CodeQL [SM03712] no user input is used
412+
loggedInDiv.innerHTML = `<p id="greeting">${copilotStrings.HI} <strong>${userName}!</strong> ${copilotStrings.WELCOME_MESSAGE}</p>`; // CodeQL [SM03712] no user input is used, therefore these need not be sanitized.
416413
messageElement.appendChild(loggedInDiv);
417414

418415
// Add GitHub Copilot link
@@ -471,9 +468,7 @@
471468

472469
const notAvailabel = document.createElement("div");
473470
notAvailabel.classList.add("not-available");
474-
notAvailabel.innerHTML = `<p id="notAvailableGreeting"></p>
475-
<p>${copilotStrings.COPILOT_SUPPORT_MESSAGE}</p>
476-
<p>${copilotStrings.DOCUMENTATION_LINK}<a></p>`; // CodeQL [SM04949] no user input is used
471+
notAvailabel.innerHTML = `<p id="notAvailableGreeting"></p><p>${copilotStrings.COPILOT_SUPPORT_MESSAGE}</p><p>${copilotStrings.DOCUMENTATION_LINK}<a></p>`; // CodeQL [SM04949] no user input is used, therefore these need not be sanitized.
477472

478473
messageElement.appendChild(notAvailabel);
479474
}

0 commit comments

Comments
 (0)