Skip to content

Compact document#5167

Closed
pshao25 wants to merge 1 commit intoAzure:mainfrom
pshao25:comment5165
Closed

Compact document#5167
pshao25 wants to merge 1 commit intoAzure:mainfrom
pshao25:comment5165

Conversation

@pshao25
Copy link
Copy Markdown
Member

@pshao25 pshao25 commented Oct 11, 2025

for (let i = 0; i < wrapped.length; i++) {
if (wrapped[i].includes("@") || wrapped[i].includes("*/")) {
if (wrapped[i].includes("@")) {
wrapped[i] = wrapped[i].replace(/@/g, "\\@");

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This does not escape backslash characters in the input.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handled in L20

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that is what the codeql is warning you about. I think it tells you that you won't escape this correctly

\@

becomes

\\@

but I think for how doc comments are parsed its a false positive.

you might also be able to replace to .replaceAll("@", "\\@") instead of using regex and it might not flag

@microsoft-github-policy-service microsoft-github-policy-service Bot added the no-recent-activity There has been no recent activity on this issue. label Feb 27, 2026
@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

Hi @@pshao25. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

Hi @@pshao25. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-recent-activity There has been no recent activity on this issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate doc comments instead of @doc

4 participants