Skip to content

Commit 80b2fcb

Browse files
Clarify ARC details in README (#339)
1 parent 394d78e commit 80b2fcb

1 file changed

Lines changed: 43 additions & 10 deletions

File tree

README.md

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## GitHub Actions Runtime Security
1717

18-
Harden-Runner GitHub Action provides Runtime Security for GitHub-Hosted runners and self-hosted Actions Runner Controller (ARC) environments.
18+
Harden-Runner provides Runtime Security for GitHub-Hosted runners and self-hosted Actions Runner Controller (ARC) environments.
1919

2020
[![Harden Runner Demo](images/RuntimeSecurityDemo.gif)](https://youtu.be/fpdwX5hYACo)
2121

@@ -29,19 +29,21 @@ Harden-Runner GitHub Action provides Runtime Security for GitHub-Hosted runners
2929

3030
Compromised workflows, dependencies, and build tools typically make outbound calls to exfiltrate credentials, or may tamper source code, dependencies, or artifacts during the build.
3131

32-
Harden-Runner GitHub Action monitors process, file, and network activity to:
32+
Harden-Runner monitors process, file, and network activity to:
3333

3434
| | Countermeasure | Prevent Security Breach |
3535
| --- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36-
| 1. | Block egress traffic at the DNS (Layer 7) and network layers (Layers 3 and 4) to prevent exfiltration of credentials | To prevent [Codecov breach](https://github.com/step-security/github-actions-goat/blob/main/docs/Vulnerabilities/ExfiltratingCICDSecrets.md) scenario |
37-
| 2. | Detect if source code is being overwritten during the build process to inject a backdoor | To detect [SolarWinds incident](https://github.com/step-security/github-actions-goat/blob/main/docs/Vulnerabilities/TamperingDuringBuild.md) scenario |
36+
| 1. | Block egress traffic at the DNS (Layer 7) and network layers (Layers 3 and 4) to prevent exfiltration of code and CI/CD credentials | To prevent [Codecov breach](https://github.com/step-security/github-actions-goat/blob/main/docs/Vulnerabilities/ExfiltratingCICDSecrets.md) scenario |
37+
| 2. | Detect if source code is being tampered during the build process to inject a backdoor | To detect [SolarWinds incident](https://github.com/step-security/github-actions-goat/blob/main/docs/Vulnerabilities/TamperingDuringBuild.md) scenario |
3838
| 3. | Detect poisoned workflows and compromised dependencies | To detect [Dependency confusion](https://github.com/step-security/github-actions-goat/blob/main/docs/Vulnerabilities/ExfiltratingCICDSecrets.md#dependency-confusion-attacks) and [Malicious dependencies](https://github.com/step-security/github-actions-goat/blob/main/docs/Vulnerabilities/ExfiltratingCICDSecrets.md#compromised-dependencies) |
3939

4040
Read this [case study](https://infosecwriteups.com/detecting-malware-packages-in-github-actions-7b93a9985635) on how Harden-Runner detected malicious packages in the NPM registry.
4141

4242
## How
4343

44-
1. Add `step-security/harden-runner` to your GitHub Actions workflow file as the first step in each job.
44+
### GitHub-Hosted Runners
45+
46+
1. Add `step-security/harden-runner` GitHub Action to your GitHub Actions workflow file as the first step in each job.
4547

4648
```yaml
4749
steps:
@@ -68,6 +70,14 @@ Read this [case study](https://infosecwriteups.com/detecting-malware-packages-in
6870
<img src="images/rec-policy1.png" alt="Policy recommended by harden-runner" >
6971
</p>
7072
73+
### Actions Runner Controller (ARC) Runners
74+
75+
- Rather than incorporating the Harden-Runner GitHub Action into each workflow, you'll need to install the ARC Harden Runner daemonset on your Kubernetes cluster.
76+
- Upon deployment, the ARC Harden Runner daemonset constantly monitors each workflow run; you do NOT need to add the Harden-Runner GitHub Action to each job for `audit` mode.
77+
- You can access security insights and runtime detections under the Runtime Security tab in your dashboard.
78+
- You do need to add the Harden-Runner GitHub Action for `block` mode.
79+
- Explore demo workflows using self-hosted ARC Runner and ARC Harden Runner here: https://docs.stepsecurity.io/harden-runner/how-tos/enable-runtime-security-arc
80+
7181
## Support for ARC and Private Repositories
7282

7383
Actions Runner Controller (ARC) and Private repositories are supported with a commercial license. Check out the [documentation](https://docs.stepsecurity.io/stepsecurity-platform/billing) for more details.
@@ -86,11 +96,12 @@ For details, check out the documentation at https://docs.stepsecurity.io
8696

8797
### 🚦 Restrict egress traffic to allowed endpoints
8898

99+
> Applies to both GitHub-Hosted and self-hosted ARC Runners
100+
89101
Once allowed endpoints are set in the policy in the workflow file, or in the [Policy Store](https://docs.stepsecurity.io/harden-runner/how-tos/block-egress-traffic#2-add-the-policy-using-the-policy-store)
90102

91103
- Harden-Runner blocks egress traffic at the DNS (Layer 7) and network layers (Layers 3 and 4).
92104
- It blocks DNS exfiltration, where attacker tries to send data out using DNS resolution
93-
- Blocks outbound traffic using IP tables
94105
- Wildcard domains are supported, e.g. you can add `*.data.mcr.microsoft.com:443` to the allowed list, and egress traffic will be allowed to `eastus.data.mcr.microsoft.com:443` and `westus.data.mcr.microsoft.com:443`.
95106

96107
<p align="left">
@@ -99,6 +110,8 @@ Once allowed endpoints are set in the policy in the workflow file, or in the [Po
99110

100111
### 🕵️ Detect tampering of source code during build
101112

113+
> Applies to both GitHub-Hosted and self-hosted ARC Runners
114+
102115
Harden-Runner monitors file writes and can detect if a file is overwritten.
103116

104117
- Source code overwrite is not expected in a release build
@@ -111,15 +124,19 @@ Harden-Runner monitors file writes and can detect if a file is overwritten.
111124

112125
### 🚫 Run your job without sudo access
113126

127+
> Applies to GitHub-Hosted Runners
128+
114129
GitHub-hosted runner uses passwordless sudo for running jobs.
115130

116131
- This means compromised build tools or dependencies can install attack tools
117132
- If your job does not need sudo access, you see a policy
118133
recommendation to disable sudo in the insights page
119-
- When you set `disable-sudo` to `true`, the job steps run without sudo access to the Ubuntu VM
134+
- When you set `disable-sudo` to `true`, the job steps run without sudo access to the GitHub-hosted Ubuntu VM
120135

121136
### 🔔 Get security alerts
122137

138+
> Applies to both GitHub-Hosted and self-hosted ARC Runners
139+
123140
Install the [StepSecurity Actions Security GitHub App](https://github.com/apps/stepsecurity-actions-security) to get security alerts.
124141

125142
- Email and Slack notifications are supported
@@ -128,17 +145,33 @@ Install the [StepSecurity Actions Security GitHub App](https://github.com/apps/s
128145

129146
## Discussions
130147

131-
If you have questions or ideas, please use [discussions](https://github.com/step-security/harden-runner/discussions). For support for ARC and Private repositories, email info@stepsecurity.io.
148+
- If you have questions or ideas, please use [discussions](https://github.com/step-security/harden-runner/discussions).
149+
- For support for ARC and Private repositories, email support@stepsecurity.io.
150+
- If you use a different CI/CD Provider (e.g. Jenkins, Gitlab CI, etc), and would like to use Harden Runner in your environment, please email interest@stepsecurity.io
132151

133152
## How does it work?
134153

154+
### GitHub-Hosted Runners
155+
135156
For GitHub-hosted runners, Harden-Runner GitHub Action downloads and installs the StepSecurity Agent.
136157

137158
- The code to monitor file, process, and network activity is in the Agent.
138159
- The agent is written in Go and is open source at https://github.com/step-security/agent
139160
- The agent's build is reproducible. You can view the steps to reproduce the build [here](http://app.stepsecurity.io/github/step-security/agent/releases/latest)
140161

141-
## Limitations for GitHub-Hosted Runners
162+
### Actions Runner Controller (ARC) Runners
163+
164+
- ARC Harden Runner daemonset uses eBPF
165+
- You can find more details in this blog post: https://www.stepsecurity.io/blog/introducing-harden-runner-for-kubernetes-based-self-hosted-actions-runners
166+
- ARC Harden Runner is NOT open source.
167+
168+
## Limitations
169+
170+
### GitHub-Hosted Runners
142171

143172
1. Only Ubuntu VM is supported. Windows and MacOS GitHub-hosted runners are not supported. There is a discussion about that [here](https://github.com/step-security/harden-runner/discussions/121).
144-
2. 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) as it needs sudo access on the Ubuntu VM to run. It can be used to monitor jobs that use containers to run steps. The limitation is if the entire job is run in a container. That is not common for GitHub Actions workflows, as most of them run directly on `ubuntu-latest`.
173+
2. 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) as it needs sudo access on the Ubuntu VM to run. It can be used to monitor jobs that use containers to run steps. The limitation is if the entire job is run in a container. That is not common for GitHub Actions workflows, as most of them run directly on `ubuntu-latest`. Note: This is not a limitation for ARC Harden Runner. With ARC Harden Runner, you can monitor jobs that run in a container.
174+
175+
### Actions Runner Controller (ARC) Runners
176+
177+
1. Since ARC Harden Runner uses eBPF, only Linux jobs are supported. Windows and MacOS jobs are not supported.

0 commit comments

Comments
 (0)