From 1c72b5f2f2e0114653d361ffa0ffda26f5b85cfd Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Fri, 12 Jun 2026 12:02:19 +1000 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- eng/pr-risk-scan.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/pr-risk-scan.mjs b/eng/pr-risk-scan.mjs index f4820e32..f96f66db 100644 --- a/eng/pr-risk-scan.mjs +++ b/eng/pr-risk-scan.mjs @@ -270,9 +270,15 @@ function toMarkdownReport(findings, scannedFiles, skippedFiles) { : finding.severity === severityLevels.medium ? "🟠" : "ℹ️"; - const match = finding.match.replace(/\|/g, "\\|"); + const match = finding.match + .replace(/\\/g, "\\\\") + .replace(/`/g, "\\`") + .replace(//g, ">") + .replace(/\|/g, "\\|") + .replace(/@/g, "@\u200b"); summary.push( - `| ${severity} | \`${finding.rule_id}\` | \`${finding.file}\` | ${finding.line} | ${match} |` + `| ${severity} | \`${finding.rule_id}\` | \`${finding.file}\` | ${finding.line} | \`${match}\` |` ); }