Skip to content

Commit 446798f

Browse files
Merge pull request #455 from step-security/rc-12
Release v2.10.0
2 parents 951b485 + f0d3b1e commit 446798f

File tree

12 files changed

+251
-144
lines changed

12 files changed

+251
-144
lines changed

dist/index.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pre/index.js

Lines changed: 117 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pre/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/checksum.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,33 @@ import * as core from "@actions/core";
22
import * as crypto from "crypto";
33
import * as fs from "fs";
44

5-
export function verifyChecksum(downloadPath: string, is_tls: boolean) {
5+
const CHECKSUMS = {
6+
tls: {
7+
amd64: "0bd500769646f0a90c0dfe9ac59699d5165bed549a9870c031b861146af337b2", // v1.3.2
8+
arm64: "c2448ac205fd90f46abba31c13cf34c3b997824881502f736315fb08ac0a5a5c",
9+
},
10+
non_tls: {
11+
amd64: "a9f1842e3d7f3d38c143dbe8ffe1948e6c8173cd04da072d9f9d128bb400844a", // v0.13.7
12+
},
13+
};
14+
15+
export function verifyChecksum(
16+
downloadPath: string,
17+
isTLS: boolean,
18+
variant: string
19+
) {
620
const fileBuffer: Buffer = fs.readFileSync(downloadPath);
721
const checksum: string = crypto
822
.createHash("sha256")
923
.update(fileBuffer)
1024
.digest("hex"); // checksum of downloaded file
1125

12-
let expectedChecksum: string =
13-
"a9f1842e3d7f3d38c143dbe8ffe1948e6c8173cd04da072d9f9d128bb400844a"; // checksum for v0.13.7
26+
let expectedChecksum: string = "";
1427

15-
if (is_tls) {
16-
expectedChecksum =
17-
"fa9defcf9e125a62cb29747574d6a07aee4f04153e7bce4a3c7ce29681469e92"; // checksum for tls_agent
28+
if (isTLS) {
29+
expectedChecksum = CHECKSUMS["tls"][variant];
30+
} else {
31+
expectedChecksum = CHECKSUMS["non_tls"][variant];
1832
}
1933

2034
if (checksum !== expectedChecksum) {

src/cleanup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ import { arcCleanUp, isArcRunner, removeStepPolicyFiles } from "./arc-runner";
2727
return;
2828
}
2929

30+
if (process.env.STATE_isTLS === "false" && process.arch === "arm64") {
31+
return;
32+
}
33+
3034
if (
3135
String(process.env.STATE_monitorStatusCode) ===
3236
common.STATUS_HARDEN_RUNNER_UNAVAILABLE

src/common.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,7 @@ export const HARDEN_RUNNER_UNAVAILABLE_MESSAGE =
180180
"Sorry, we are currently experiencing issues with the Harden Runner installation process. It is currently unavailable.";
181181

182182
export const ARC_RUNNER_MESSAGE =
183-
"Workflow is currently being executed in ARC based runner";
183+
"Workflow is currently being executed in ARC based runner.";
184+
185+
export const ARM64_RUNNER_MESSAGE =
186+
"ARM runners are not supported in the Harden-Runner community tier.";

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import { STEPSECURITY_WEB_URL } from "./configs";
2323
return;
2424
}
2525

26+
if (process.env.STATE_isTLS === "false" && process.arch === "arm64") {
27+
return;
28+
}
29+
2630
if (
2731
core.getBooleanInput("disable-telemetry") &&
2832
core.getInput("egress-policy") === "block"

0 commit comments

Comments
 (0)