Skip to content

Commit

Permalink
fix: escape heading string
Browse files Browse the repository at this point in the history
  • Loading branch information
tembleking committed Jul 29, 2024
1 parent a9aecb8 commit 921d841
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] } = {}
Expand All @@ -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;
Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 921d841

Please sign in to comment.