Skip to content

Commit

Permalink
Release v2.3.1 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
varunsh-coder authored Apr 19, 2023
1 parent 910b327 commit 6b3083a
Show file tree
Hide file tree
Showing 15 changed files with 340 additions and 167 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: light)" srcset="images/banner.png" width="400">
<img src="images/banner.png" width="400">
<img alt="Dark Banner" src="images/banner-dark.png" width="400">
</picture>
</p>

Expand Down Expand Up @@ -57,7 +57,7 @@ Read this [case study](https://infosecwriteups.com/detecting-malware-packages-in
<img src="images/buildlog1.png" alt="Link in build log" >
</p>
3. Click on the link ([example link](https://app.stepsecurity.io/github/ossf/scorecard/actions/runs/2265028928)). You will see a process monitor view of file and network activities correlated with each step of the job.
3. Click on the link ([example link](https://app.stepsecurity.io/github/ossf/scorecard/actions/runs/2265028928)). You will see a process monitor view of file and network activities correlated with each step of the job. These insights hold significant value for forensic investigations, proving crucial in the event of an incident.
<p align="left">
<img src="images/insights2.png" alt="Insights from harden-runner" >
Expand Down
5 changes: 4 additions & 1 deletion 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.

368 changes: 251 additions & 117 deletions dist/post/index.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

92 changes: 64 additions & 28 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.

Binary file added images/banner-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "step-security-harden-runner",
"version": "2.3.0",
"version": "2.3.1",
"description": "Security agent for GitHub-hosted runner to monitor the build process",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 6 additions & 4 deletions src/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import * as cp from "child_process";

test("adding stepsecurity summary in github_summary", async () => {
let expected = `<hr>
<img src="https://github.com/step-security/harden-runner/raw/main/images/banner.png" alt="StepSecurity Harden-Runner" width="200">
<a href="https://app.stepsecurity.io/github/step-security/test/actions/runs/12345">View security insights and recommended policy</a>
<p><picture>
<source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/step-security/harden-runner/raw/main/images/banner.png\" width=\"200\">
<img alt=\"Dark Banner\" src=\"https://github.com/step-security/harden-runner/raw/main/images/banner-dark.png\" width=\"200\">
</picture></p>
<a href=\"https://app.stepsecurity.io/github/step-security/test/actions/runs/12345\">View security insights and recommended policy</a>
<hr>
`;

Expand All @@ -22,5 +25,4 @@ test("adding stepsecurity summary in github_summary", async () => {
cp.execSync(`rm ${github_summary}`);

expect(output).toMatch(expected);

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

await core.summary
.addSeparator()
.addImage(
"https://github.com/step-security/harden-runner/raw/main/images/banner.png",
"StepSecurity Harden-Runner",
{ width: "200" }
.addRaw(
`<p><picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/step-security/harden-runner/raw/main/images/banner.png" width="200">
<img alt="Dark Banner" src="https://github.com/step-security/harden-runner/raw/main/images/banner-dark.png" width="200">
</picture></p>`,
true
)
.addLink("View security insights and recommended policy", insights_url)
.addSeparator()
Expand Down
1 change: 0 additions & 1 deletion src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface Configuration {
disable_telemetry: boolean;
disable_sudo: boolean;
disable_file_monitoring: boolean;
private: string;
}

export interface PolicyResponse {
Expand Down
4 changes: 1 addition & 3 deletions src/policy-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test("success: fetching policy", async () => {
.get(`/github/${owner}/actions/policies/${policyName}`)
.reply(200, response);

let idToken = "xyz";
let idToken = "xyz";
let policy = await fetchPolicy(owner, policyName, idToken);
console.log(policy);
expect(policy).toStrictEqual(response);
Expand All @@ -36,7 +36,6 @@ test("merge configs", async () => {
disable_telemetry: false,
disable_sudo: false,
disable_file_monitoring: false,
private: "true",
};
let policyResponse: PolicyResponse = {
owner: "h0x0er",
Expand All @@ -59,7 +58,6 @@ test("merge configs", async () => {
disable_telemetry: false,
disable_sudo: false,
disable_file_monitoring: false,
private: "true",
};

localConfig = mergeConfigs(localConfig, policyResponse);
Expand Down
1 change: 0 additions & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import * as utils from '@actions/cache/lib/internal/cacheUtils'
disable_telemetry: core.getBooleanInput("disable-telemetry"),
disable_sudo: core.getBooleanInput("disable-sudo"),
disable_file_monitoring: core.getBooleanInput("disable-file-monitoring"),
private: context.payload.repository.private,
};

let policyName = core.getInput("policy");
Expand Down

0 comments on commit 6b3083a

Please sign in to comment.