Merge pull request #690 from step-security/rc-43 · step-security/harden-runner@e14015d · GitHub
Skip to content

Commit e14015d

Browse files
Merge pull request #690 from step-security/rc-43
v2.21.1
2 parents 05e3151 + 9001249 commit e14015d

9 files changed

Lines changed: 70 additions & 35 deletions

File tree

README.md

Lines changed: 44 additions & 14 deletions

dist/post/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32303,7 +32303,9 @@ process.on("unhandledRejection", (reason) => {
3230332303
}))();
3230432304
function handleAgentBravoCleanup() {
3230532305
return cleanup_awaiter(this, void 0, void 0, function* () {
32306-
external_child_process_.execFileSync("/usr/bin/echo", ["step_policy_jobend"]);
32306+
// Non-usr-merged distros (e.g. Debian bullseye) only have /bin/echo.
32307+
const echoBin = external_fs_.existsSync("/usr/bin/echo") ? "/usr/bin/echo" : "/bin/echo";
32308+
external_child_process_.execFileSync(echoBin, ["step_policy_jobend"]);
3230732309
const doneFile = "/home/agent/done.json";
3230832310
let counter = 0;
3230932311
while (true) {

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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85582,15 +85582,15 @@ var external_crypto_ = __nccwpck_require__(6982);
8558285582

8558385583
const CHECKSUMS = {
8558485584
tls: {
85585-
amd64: "07703be7dedacfa234e7962289e952d3731d9c5677054ce4f6e4c9dbf79b77ed", // v1.9.0
85586-
arm64: "6b3c8927928ccc0a9df3097eabd95ec3c00f98b3b25bb6eb6b5e99020584a53c", // v1.9.0
85585+
amd64: "b4efa8356de128c3daba6a7e334779877faafb08b49f9a4ef4152826c66ff4c2", // v1.9.1
85586+
arm64: "0e93ad693d562448fd62e322c8e165caba3de123c9cd631e2bdc2d4dbb4e091a", // v1.9.1
8558785587
},
8558885588
non_tls: {
85589-
amd64: "4b14d8a3a5fbcef95af55e0c54d3bee6f44da802878c10289a4ca0b79b6d0237", // v0.16.2
85589+
amd64: "4fca42590557ad92e50bd99cf81eba527d0699ac05dd11dfb0c795f48ae63e26", // v0.16.3
8559085590
},
8559185591
bravo: {
85592-
amd64: "3733cdd704e8f6455f036ff3534d53f965a0e6028a39c654ae4f1679e6b4c45b", // v1.9.0
85593-
arm64: "ecf8a50679cac9402795f7434f2edb470bd83fe47512bbc3f52bf9b956c1b62c", // v1.9.0
85592+
amd64: "59ea6f0a488514b2d3feaf5b98fb445af9d2875f32acf5878d84c72e835a3425", // v1.9.1
85593+
arm64: "0b1544370b89adee80f71cc0e9bed6dcc46fe3aa410338f9a305b892a194ebb8", // v1.9.1
8559485594
},
8559585595
darwin: "2990f0390d2760fa6262a3830060b6db1233f16a1410ffe1ed2bf13dfda80c38", // v0.0.6
8559685596
windows: {
@@ -85663,14 +85663,14 @@ function installAgent(isTLS, configStr) {
8566385663
encoding: "utf8",
8566485664
});
8566585665
if (isTLS) {
85666-
downloadPath = yield tool_cache.downloadTool(`https://github.com/step-security/agent-ebpf/releases/download/v1.9.0/harden-runner_1.9.0_linux_${variant}.tar.gz`, undefined, auth);
85666+
downloadPath = yield tool_cache.downloadTool(`https://github.com/step-security/agent-ebpf/releases/download/v1.9.1/harden-runner_1.9.1_linux_${variant}.tar.gz`, undefined, auth);
8566785667
}
8566885668
else {
8566985669
if (variant === "arm64") {
8567085670
console.log(ARM64_RUNNER_MESSAGE);
8567185671
return false;
8567285672
}
85673-
downloadPath = yield tool_cache.downloadTool("https://github.com/step-security/agent/releases/download/v0.16.2/agent_0.16.2_linux_amd64.tar.gz", undefined, auth);
85673+
downloadPath = yield tool_cache.downloadTool("https://github.com/step-security/agent/releases/download/v0.16.3/agent_0.16.3_linux_amd64.tar.gz", undefined, auth);
8567485674
}
8567585675
if (!verifyChecksum(downloadPath, isTLS, variant, "linux")) {
8567685676
return false;
@@ -85698,7 +85698,7 @@ function installAgentBravo(configStr_1) {
8569885698
const token = lib_core.getInput("token", { required: true });
8569985699
const auth = `token ${token}`;
8570085700
const variant = process.arch === "x64" ? "amd64" : "arm64";
85701-
const downloadPath = yield tool_cache.downloadTool(`https://github.com/step-security/agent-ebpf/releases/download/v1.9.0/harden-runner-bravo_1.9.0_linux_${variant}.tar.gz`, undefined, auth);
85701+
const downloadPath = yield tool_cache.downloadTool(`https://github.com/step-security/agent-ebpf/releases/download/v1.9.1/harden-runner-bravo_1.9.1_linux_${variant}.tar.gz`, undefined, auth);
8570285702
if (!verifyChecksum(downloadPath, true, variant, "linux", "bravo")) {
8570385703
return false;
8570485704
}

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.

docs/limitations.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Limitations
22

33
### GitHub-Hosted Runners
4-
* Harden-Runner is not supported when [job is run in a container](https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container) with built-in labels such as `ubuntu-latest`, as it needs sudo access on the Ubuntu VM to run. The limitation is if the entire job is run in a container. However, such jobs can be monitored when using custom VM images with GitHub-hosted runners. This is also not a limitation for Self-Hosted runners.
4+
* Harden-Runner is not supported when [job is run in a container](https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container) with built-in labels such as `ubuntu-latest`, as it needs sudo access on the Ubuntu VM to run. The limitation is if the entire job is run in a container. However, such jobs can be monitored when using [custom VM images with GitHub-hosted runners](https://docs.stepsecurity.io/github-actions/harden-runner#github-hosted-custom-vm), which requires the Enterprise tier. This is also not a limitation for Self-Hosted runners.
5+
* Harden-Runner is not supported on `ubuntu-slim` runners. The agent relies on kernel-level features that require elevated capabilities, which are not available on `ubuntu-slim`. The action detects `ubuntu-slim` and exits cleanly with an informational log message, without monitoring the job. See [issue #627](https://github.com/step-security/harden-runner/issues/627) for details.
56

67
### Self-Hosted Actions Runner Controller (ARC) Runners
78

src/checksum.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import * as fs from "fs";
44

55
export const CHECKSUMS = {
66
tls: {
7-
amd64: "07703be7dedacfa234e7962289e952d3731d9c5677054ce4f6e4c9dbf79b77ed", // v1.9.0
8-
arm64: "6b3c8927928ccc0a9df3097eabd95ec3c00f98b3b25bb6eb6b5e99020584a53c", // v1.9.0
7+
amd64: "b4efa8356de128c3daba6a7e334779877faafb08b49f9a4ef4152826c66ff4c2", // v1.9.1
8+
arm64: "0e93ad693d562448fd62e322c8e165caba3de123c9cd631e2bdc2d4dbb4e091a", // v1.9.1
99
},
1010
non_tls: {
11-
amd64: "4b14d8a3a5fbcef95af55e0c54d3bee6f44da802878c10289a4ca0b79b6d0237", // v0.16.2
11+
amd64: "4fca42590557ad92e50bd99cf81eba527d0699ac05dd11dfb0c795f48ae63e26", // v0.16.3
1212
},
1313
bravo: {
14-
amd64: "3733cdd704e8f6455f036ff3534d53f965a0e6028a39c654ae4f1679e6b4c45b", // v1.9.0
15-
arm64: "ecf8a50679cac9402795f7434f2edb470bd83fe47512bbc3f52bf9b956c1b62c", // v1.9.0
14+
amd64: "59ea6f0a488514b2d3feaf5b98fb445af9d2875f32acf5878d84c72e835a3425", // v1.9.1
15+
arm64: "0b1544370b89adee80f71cc0e9bed6dcc46fe3aa410338f9a305b892a194ebb8", // v1.9.1
1616
},
1717
darwin: "2990f0390d2760fa6262a3830060b6db1233f16a1410ffe1ed2bf13dfda80c38", // v0.0.6
1818
windows: {

src/cleanup.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ process.on("unhandledRejection", (reason) => {
8686
})();
8787

8888
async function handleAgentBravoCleanup() {
89-
cp.execFileSync("/usr/bin/echo", ["step_policy_jobend"]);
89+
// Non-usr-merged distros (e.g. Debian bullseye) only have /bin/echo.
90+
const echoBin = fs.existsSync("/usr/bin/echo") ? "/usr/bin/echo" : "/bin/echo";
91+
cp.execFileSync(echoBin, ["step_policy_jobend"]);
9092

9193
const doneFile = "/home/agent/done.json";
9294
let counter = 0;

src/install-agent.ts

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)