From 921d8411d8fba43f33f80c0a5ce471107033f11f Mon Sep 17 00:00:00 2001 From: Fede Barcelona Date: Mon, 29 Jul 2024 12:02:30 +0200 Subject: [PATCH] fix: escape heading string --- src/summary.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/summary.ts b/src/summary.ts index ce0dadd..e3c805f 100644 --- a/src/summary.ts +++ b/src/summary.ts @@ -41,7 +41,7 @@ function addVulnsByLayerTableToSummary(data: Report) { if (!data.result.layers) { return } - + core.summary.addSeparator(); core.summary.addHeading(`Package vulnerabilities per layer`) let packagesPerLayer: { [key: string]: Package[] } = {} @@ -52,7 +52,7 @@ function addVulnsByLayerTableToSummary(data: Report) { }) data.result.layers.forEach((layer, index) => { - core.summary.addHeading(`LAYER ${index} - ${layer.command}`, 4); + core.summary.addCodeBlock(`LAYER ${index} - ${layer.command.replace(new RegExp('\$', 'g'), "$").replace(new RegExp('\&', 'g'), '&')}`); if (!layer.digest) { return; @@ -106,6 +106,7 @@ function addReportToSummary(data: Report) { let packages = data.result.packages; policyEvaluations.forEach(policy => { + core.summary.addSeparator() core.summary.addHeading(`${EVALUATION[policy.evaluationResult]} Policy: ${policy.name}`, 2) if (policy.evaluationResult != "passed") {