Skip to content

Commit

Permalink
Merge pull request #353 from step-security/markdown
Browse files Browse the repository at this point in the history
Update markdown
  • Loading branch information
varunsh-coder authored Oct 27, 2023
2 parents abb3730 + fc9d972 commit d4ca02b
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 39 deletions.
19 changes: 10 additions & 9 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61211,8 +61211,8 @@ function addSummary() {
if (tableEntries.length === 0) {
return;
}
const insightsRow = `<h4><a href="${insights_url}">View Full Runtime Security Report & Recommended Policy</a></h4>`;
yield core.summary.addSeparator().addRaw(`<h2>StepSecurity Report</h2>`);
const insightsRow = `<p><b><a href="${insights_url}">📄 View Full Runtime Security Report & Recommended Policy</a></b></p>`;
yield core.summary.addSeparator().addRaw(`<h2>🛡 StepSecurity Report</h2>`);
tableEntries.sort((a, b) => {
if (a.status === "❌ Blocked" && b.status !== "❌ Blocked") {
return -1;
Expand All @@ -61226,8 +61226,9 @@ function addSummary() {
});
tableEntries = tableEntries.slice(0, 3);
yield core.summary.addRaw(`
<p>Preview of the network events that occurred on the GitHub-hosted runner during this workflow run.</p>
<h3>🌐 Network Events</h3>
<blockquote>
<p>Preview of the outbound network calls during this workflow run.</p></blockquote>
<h3>Network Events</h3>
<table>
<thead>
<tr>
Expand All @@ -61239,21 +61240,21 @@ function addSummary() {
<tbody>
${tableEntries
.map((entry) => `<tr>
<td>${entry.process}</td>
<td><code>${entry.process}</code></td>
<td>${entry.domain.replace(/\.$/, "")}</td>
<td>${entry.status}</td>
</tr>`)
.join("")}
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
<td><code>...</code></td>
<td><code>...</code></td>
<td><code>...</code></td>
</tr>
</tbody>
</table>
${insightsRow}
`);
yield core.summary.addRaw(`<p>Markdown generated by the <a href="https://github.com/step-security/harden-runner">Harden-Runner GitHub Action</a></p>`)
yield core.summary.addRaw(`<p><i>Markdown generated by the <a href="https://github.com/step-security/harden-runner">Harden-Runner GitHub Action</a>.</i></p>`)
.addSeparator()
.write();
});
Expand Down
2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions dist/pre/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pre/index.js.map

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ export async function addSummary() {
return;
}

const insightsRow = `<h4><a href="${insights_url}">View Full Runtime Security Report & Recommended Policy</a></h4>`;
const insightsRow = `<p><b><a href="${insights_url}">📄 View Full Runtime Security Report & Recommended Policy</a></b></p>`;

await core.summary.addSeparator().addRaw(`<h2>StepSecurity Report</h2>`);
await core.summary.addSeparator().addRaw(`<h2>🛡 StepSecurity Report</h2>`);

tableEntries.sort((a, b) => {
if (a.status === "❌ Blocked" && b.status !== "❌ Blocked") {
Expand All @@ -118,8 +118,9 @@ export async function addSummary() {
tableEntries = tableEntries.slice(0, 3);

await core.summary.addRaw(`
<p>Preview of the network events that occurred on the GitHub-hosted runner during this workflow run.</p>
<h3>🌐 Network Events</h3>
<blockquote>
<p>Preview of the outbound network calls during this workflow run.</p></blockquote>
<h3>Network Events</h3>
<table>
<thead>
<tr>
Expand All @@ -132,16 +133,16 @@ export async function addSummary() {
${tableEntries
.map(
(entry) => `<tr>
<td>${entry.process}</td>
<td><code>${entry.process}</code></td>
<td>${entry.domain.replace(/\.$/, "")}</td>
<td>${entry.status}</td>
</tr>`
)
.join("")}
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
<td><code>...</code></td>
<td><code>...</code></td>
<td><code>...</code></td>
</tr>
</tbody>
</table>
Expand All @@ -150,7 +151,7 @@ export async function addSummary() {

await core.summary
.addRaw(
`<p>Markdown generated by the <a href="/step-security/harden-runner">Harden-Runner GitHub Action</a></p>`
`<p><i>Markdown generated by the <a href="/step-security/harden-runner">Harden-Runner GitHub Action</a>.</i></p>`
)
.addSeparator()
.write();
Expand Down

0 comments on commit d4ca02b

Please sign in to comment.