Skip to content

Commit 0634a26

Browse files
Merge pull request #541 from step-security/rc-20
Release v2.12.0
2 parents 617de1d + 2e3c511 commit 0634a26

13 files changed

+49
-17
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ To integrate Harden-Runner, follow these steps:
6666
- Add the following code as the first step in each job:
6767
```yaml
6868
steps:
69-
- uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
69+
- name: Harden Runner
70+
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
7071
with:
7172
egress-policy: audit
7273

@@ -134,7 +135,7 @@ Explore the full feature set in the [Features Documentation](https://docs.stepse
134135

135136
## Trusted By and Case Studies
136137

137-
Harden-Runner is trusted by over 5000 leading open-source projects and enterprises, including Microsoft, Google, Kubernetes, and more.
138+
Harden-Runner is trusted by over 6000 leading open-source projects and enterprises, including Microsoft, Google, Kubernetes, and more.
138139

139140
### Trusted by
140141

@@ -147,6 +148,7 @@ Harden-Runner is trusted by over 5000 leading open-source projects and enterpris
147148

148149
- [How Coveo Strengthened GitHub Actions Security with StepSecurity](https://www.stepsecurity.io/case-studies/coveo)
149150
- [Hashgraph Achieves Comprehensive CI/CD Security Without Compromising Development Speed](https://www.stepsecurity.io/case-studies/hashgraph)
151+
- [Chainguard Secures GitHub Actions with StepSecurity](https://www.stepsecurity.io/case-studies/chainguard)
150152
- [Kapiche secures their GitHub Actions software supply chain with Harden-Runner](https://www.stepsecurity.io/case-studies/kapiche)
151153
- [Arcjet Enhances CI/CD Security with Harden-Runner](https://www.stepsecurity.io/case-studies/arcjet)
152154

action.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ inputs:
1717
required: false
1818
default: "false"
1919
disable-sudo:
20-
description: "Disable sudo access for the runner account"
20+
description: "Disable sudo access for the runner account. Note: This parameter will be deprecated in the future. Please use disable-sudo-and-containers instead."
21+
required: false
22+
default: "false"
23+
disable-sudo-and-containers:
24+
description: "Disable sudo and container access for the runner account"
2125
required: false
2226
default: "false"
2327
disable-file-monitoring:

dist/post/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -27947,7 +27947,8 @@ var cleanup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
2794727947
console.log(content);
2794827948
}
2794927949
var disable_sudo = process.env.STATE_disableSudo;
27950-
if (disable_sudo !== "true") {
27950+
var disable_sudo_and_containers = process.env.STATE_disableSudoAndContainers;
27951+
if (disable_sudo !== "true" && disable_sudo_and_containers !== "true") {
2795127952
try {
2795227953
var journalLog = external_child_process_.execSync("sudo journalctl -u agent.service --lines=1000", {
2795327954
encoding: "utf8",

dist/post/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pre/index.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -87890,6 +87890,9 @@ function mergeConfigs(localConfig, remoteConfig) {
8789087890
if (remoteConfig.disable_sudo !== undefined) {
8789187891
localConfig.disable_sudo = remoteConfig.disable_sudo;
8789287892
}
87893+
if (remoteConfig.disable_sudo_and_containers !== undefined) {
87894+
localConfig.disable_sudo_and_containers = remoteConfig.disable_sudo_and_containers;
87895+
}
8789387896
if (remoteConfig.disable_file_monitoring !== undefined) {
8789487897
localConfig.disable_file_monitoring = remoteConfig.disable_file_monitoring;
8789587898
}
@@ -88004,11 +88007,11 @@ var external_crypto_ = __nccwpck_require__(6417);
8800488007

8800588008
const CHECKSUMS = {
8800688009
tls: {
88007-
amd64: "38e7ed97ced6fe0c1cf0fb5ee3b3d521dfe28d5ddf1cdca72d130c8d1b4a314e",
88008-
arm64: "f67c80cc578c996d4f882c14fcdb63df57927d907cd22f1ec65f9fa940c08cf3",
88010+
amd64: "e7c0c5f96efbf96806d27dcbf65f71f72ecd34cdd596c556bb2ded0f2037c260",
88011+
arm64: "813a4cd40f6740bd9623a40884a78f14960c6bd3794391693a165f2ca71c90e3",
8800988012
},
8801088013
non_tls: {
88011-
amd64: "a9f1842e3d7f3d38c143dbe8ffe1948e6c8173cd04da072d9f9d128bb400844a", // v0.13.7
88014+
amd64: "f0a8bb49ce5480744f8c836af2abd5f311e918efef5b36b4cce7521d7b9dffe6", // v0.14.0
8801288015
},
8801388016
};
8801488017
function verifyChecksum(downloadPath, isTLS, variant) {
@@ -88058,14 +88061,14 @@ function installAgent(isTLS, configStr) {
8805888061
encoding: "utf8",
8805988062
});
8806088063
if (isTLS) {
88061-
downloadPath = yield tool_cache.downloadTool(`https://packages.stepsecurity.io/github-hosted/harden-runner_1.4.2_linux_${variant}.tar.gz`);
88064+
downloadPath = yield tool_cache.downloadTool(`https://packages.stepsecurity.io/github-hosted/harden-runner_1.6.3_linux_${variant}.tar.gz`);
8806288065
}
8806388066
else {
8806488067
if (variant === "arm64") {
8806588068
console.log(ARM64_RUNNER_MESSAGE);
8806688069
return false;
8806788070
}
88068-
downloadPath = yield tool_cache.downloadTool("https://github.com/step-security/agent/releases/download/v0.13.7/agent_0.13.7_linux_amd64.tar.gz", undefined, auth);
88071+
downloadPath = yield tool_cache.downloadTool("https://github.com/step-security/agent/releases/download/v0.14.0/agent_0.14.0_linux_amd64.tar.gz", undefined, auth);
8806988072
}
8807088073
verifyChecksum(downloadPath, isTLS, variant);
8807188074
const extractPath = yield tool_cache.extractTar(downloadPath);
@@ -88142,6 +88145,7 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
8814288145
egress_policy: lib_core.getInput("egress-policy"),
8814388146
disable_telemetry: lib_core.getBooleanInput("disable-telemetry"),
8814488147
disable_sudo: lib_core.getBooleanInput("disable-sudo"),
88148+
disable_sudo_and_containers: lib_core.getBooleanInput("disable-sudo-and-containers"),
8814588149
disable_file_monitoring: lib_core.getBooleanInput("disable-file-monitoring"),
8814688150
private: ((_b = (_a = github.context === null || github.context === void 0 ? void 0 : github.context.payload) === null || _a === void 0 ? void 0 : _a.repository) === null || _b === void 0 ? void 0 : _b.private) || false,
8814788151
is_github_hosted: isGithubHosted(),
@@ -88164,6 +88168,9 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
8816488168
external_fs_.appendFileSync(process.env.GITHUB_STATE, `disableSudo=${confg.disable_sudo}${external_os_.EOL}`, {
8816588169
encoding: "utf8",
8816688170
});
88171+
external_fs_.appendFileSync(process.env.GITHUB_STATE, `disableSudoAndContainers=${confg.disable_sudo_and_containers}${external_os_.EOL}`, {
88172+
encoding: "utf8",
88173+
});
8816788174
lib_core.info(`[!] Current Configuration: \n${JSON.stringify(confg)}\n`);
8816888175
if (confg.egress_policy !== "audit" && confg.egress_policy !== "block") {
8816988176
lib_core.setFailed("egress-policy must be either audit or block");

dist/pre/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/checksum.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import * as fs from "fs";
44

55
const CHECKSUMS = {
66
tls: {
7-
amd64: "38e7ed97ced6fe0c1cf0fb5ee3b3d521dfe28d5ddf1cdca72d130c8d1b4a314e", // v1.4.2
8-
arm64: "f67c80cc578c996d4f882c14fcdb63df57927d907cd22f1ec65f9fa940c08cf3",
7+
amd64: "e7c0c5f96efbf96806d27dcbf65f71f72ecd34cdd596c556bb2ded0f2037c260", // v1.6.3
8+
arm64: "813a4cd40f6740bd9623a40884a78f14960c6bd3794391693a165f2ca71c90e3",
99
},
1010
non_tls: {
11-
amd64: "a9f1842e3d7f3d38c143dbe8ffe1948e6c8173cd04da072d9f9d128bb400844a", // v0.13.7
11+
amd64: "f0a8bb49ce5480744f8c836af2abd5f311e918efef5b36b4cce7521d7b9dffe6", // v0.14.0
1212
},
1313
};
1414

src/cleanup.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ import { isGithubHosted } from "./tls-inspect";
8181
}
8282

8383
var disable_sudo = process.env.STATE_disableSudo;
84-
if (disable_sudo !== "true") {
84+
var disable_sudo_and_containers = process.env.STATE_disableSudoAndContainers;
85+
86+
if (disable_sudo !== "true" && disable_sudo_and_containers !== "true") {
8587
try {
8688
var journalLog = cp.execSync("sudo journalctl -u agent.service --lines=1000", {
8789
encoding: "utf8",

src/install-agent.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ export async function installAgent(
2525

2626
if (isTLS) {
2727
downloadPath = await tc.downloadTool(
28-
`https://packages.stepsecurity.io/github-hosted/harden-runner_1.4.2_linux_${variant}.tar.gz`
28+
`https://packages.stepsecurity.io/github-hosted/harden-runner_1.6.3_linux_${variant}.tar.gz`
2929
);
3030
} else {
3131
if (variant === "arm64") {
3232
console.log(ARM64_RUNNER_MESSAGE);
3333
return false;
3434
}
3535
downloadPath = await tc.downloadTool(
36-
"https://github.com/step-security/agent/releases/download/v0.13.7/agent_0.13.7_linux_amd64.tar.gz",
36+
"https://github.com/step-security/agent/releases/download/v0.14.0/agent_0.14.0_linux_amd64.tar.gz",
3737
undefined,
3838
auth
3939
);

src/interfaces.ts

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export interface Configuration {
88
egress_policy: string;
99
disable_telemetry: boolean;
1010
disable_sudo: boolean;
11+
disable_sudo_and_containers: boolean;
1112
disable_file_monitoring: boolean;
1213
is_github_hosted: boolean;
1314
private: string;
@@ -20,6 +21,7 @@ export interface PolicyResponse {
2021
policyName?: string;
2122
allowed_endpoints?: string[];
2223
disable_sudo?: boolean;
24+
disable_sudo_and_containers?: boolean;
2325
disable_file_monitoring?: boolean;
2426
disable_telemetry?: boolean;
2527
egress_policy?: string;

src/policy-utils.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ test("merge configs", async () => {
3636
egress_policy: "audit",
3737
disable_telemetry: false,
3838
disable_sudo: false,
39+
disable_sudo_and_containers: false,
3940
disable_file_monitoring: false,
4041
private: "true",
4142
is_github_hosted: true,
@@ -62,6 +63,7 @@ test("merge configs", async () => {
6263
egress_policy: "audit",
6364
disable_telemetry: false,
6465
disable_sudo: false,
66+
disable_sudo_and_containers: false,
6567
disable_file_monitoring: false,
6668
private: "true",
6769
is_github_hosted: true,

src/policy-utils.ts

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export function mergeConfigs(
5656
localConfig.disable_sudo = remoteConfig.disable_sudo;
5757
}
5858

59+
if (remoteConfig.disable_sudo_and_containers !== undefined) {
60+
localConfig.disable_sudo_and_containers = remoteConfig.disable_sudo_and_containers;
61+
}
62+
5963
if (remoteConfig.disable_file_monitoring !== undefined) {
6064
localConfig.disable_file_monitoring = remoteConfig.disable_file_monitoring;
6165
}

src/setup.ts

+8
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ interface MonitorResponse {
6262
egress_policy: core.getInput("egress-policy"),
6363
disable_telemetry: core.getBooleanInput("disable-telemetry"),
6464
disable_sudo: core.getBooleanInput("disable-sudo"),
65+
disable_sudo_and_containers: core.getBooleanInput("disable-sudo-and-containers"),
6566
disable_file_monitoring: core.getBooleanInput("disable-file-monitoring"),
6667
private: context?.payload?.repository?.private || false,
6768
is_github_hosted: isGithubHosted(),
@@ -92,6 +93,13 @@ interface MonitorResponse {
9293
encoding: "utf8",
9394
}
9495
);
96+
fs.appendFileSync(
97+
process.env.GITHUB_STATE,
98+
`disableSudoAndContainers=${confg.disable_sudo_and_containers}${EOL}`,
99+
{
100+
encoding: "utf8",
101+
}
102+
);
95103
core.info(`[!] Current Configuration: \n${JSON.stringify(confg)}\n`);
96104

97105
if (confg.egress_policy !== "audit" && confg.egress_policy !== "block") {

0 commit comments

Comments
 (0)