Skip to content

Commit 0d38121

Browse files
Release v2.9.0 (#435)
1 parent 29e9ae1 commit 0d38121

File tree

10 files changed

+181
-69
lines changed

10 files changed

+181
-69
lines changed

README.md

Lines changed: 150 additions & 46 deletions
Large diffs are not rendered by default.

dist/pre/index.js

Lines changed: 6 additions & 4 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.

images/org-level.png

51.6 KB
Loading

images/token-perms-recommendation.png

47.5 KB
Loading

package-lock.json

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

src/checksum.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ export function verifyChecksum(downloadPath: string, is_tls: boolean) {
1010
.digest("hex"); // checksum of downloaded file
1111

1212
let expectedChecksum: string =
13-
"ceb925c78e5c79af4f344f08f59bbdcf3376d20d15930a315f9b24b6c4d0328a"; // checksum for v0.13.5
13+
"a9f1842e3d7f3d38c143dbe8ffe1948e6c8173cd04da072d9f9d128bb400844a"; // checksum for v0.13.7
1414

1515
if (is_tls) {
1616
expectedChecksum =
17-
"846ae66c6cfab958fe61736cec0b58bdb7651b36af04c279405c7114675d7033"; // checksum for tls_agent
17+
"e45b85e29216eb1d217aad368bdb056bbd868a308925e7b2cf9133b06ab435d0"; // checksum for tls_agent
1818
}
1919

2020
if (checksum !== expectedChecksum) {

src/interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface Configuration {
1212
is_github_hosted: boolean;
1313
private: string;
1414
is_debug: boolean;
15+
one_time_key: string;
1516
}
1617

1718
export interface PolicyResponse {

src/policy-utils.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ test("merge configs", async () => {
4040
private: "true",
4141
is_github_hosted: true,
4242
is_debug: false,
43+
one_time_key: "",
4344
};
4445
let policyResponse: PolicyResponse = {
4546
owner: "h0x0er",
@@ -65,6 +66,7 @@ test("merge configs", async () => {
6566
private: "true",
6667
is_github_hosted: true,
6768
is_debug: false,
69+
one_time_key: "",
6870
};
6971

7072
localConfig = mergeConfigs(localConfig, policyResponse);

src/setup.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { isGithubHosted, isTLSEnabled } from "./tls-inspect";
2828

2929
interface MonitorResponse {
3030
runner_ip_address?: string;
31+
one_time_key?: string;
3132
monitoring_started?: boolean;
3233
}
3334

@@ -60,6 +61,7 @@ interface MonitorResponse {
6061
private: context?.payload?.repository?.private || false,
6162
is_github_hosted: isGithubHosted(),
6263
is_debug: core.isDebug(),
64+
one_time_key: "",
6365
};
6466

6567
let policyName = core.getInput("policy");
@@ -200,6 +202,7 @@ interface MonitorResponse {
200202

201203
if (statusCode === 200 && responseData) {
202204
console.log(`Runner IP Address: ${responseData.runner_ip_address}`);
205+
confg.one_time_key = responseData.one_time_key;
203206
addSummary = responseData.monitoring_started ? "true" : "false";
204207
}
205208
} catch (e) {
@@ -231,12 +234,12 @@ interface MonitorResponse {
231234

232235
if (await isTLSEnabled(context.repo.owner)) {
233236
downloadPath = await tc.downloadTool(
234-
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.2.0_linux_amd64.tar.gz"
237+
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.2.2_linux_amd64.tar.gz"
235238
);
236239
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
237240
} else {
238241
downloadPath = await tc.downloadTool(
239-
"https://github.com/step-security/agent/releases/download/v0.13.5/agent_0.13.5_linux_amd64.tar.gz",
242+
"https://github.com/step-security/agent/releases/download/v0.13.7/agent_0.13.7_linux_amd64.tar.gz",
240243
undefined,
241244
auth
242245
);

0 commit comments

Comments
 (0)