You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/github/manage-github-actions-enterprise/includes/manage-runners.md
+43-24Lines changed: 43 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
In this section, you'll explore the different tools and strategies available to you in GitHub Enterprise Cloud and GitHub Enterprise Server to manage the use of GitHub Actions runners in your enterprise.
1
+
In this section, you explore the different tools and strategies available to you in GitHub Enterprise Cloud and GitHub Enterprise Server to manage the use of GitHub Actions runners in your enterprise.
2
2
3
3
## Choose an appropriate runner for your workload
4
4
@@ -20,13 +20,13 @@ The following table compares GitHub-hosted runners versus self-hosted runners. U
20
20
21
21
## Manage runners for the enterprise
22
22
23
-
Managing runners for the enterprise involves configuring and securing both GitHub-hosted and self-hosted runners to ensure efficient and secure CI/CD workflows. This includes setting up IP allowlists to control access, enhancing security by restricting runner access to specific IP addresses, and ensuring compliance with organizational policies. Proper configuration of IP allowlists for both GitHub-hosted and self-hosted runners is crucial for maintaining secure and reliable interactions between internal applications and GitHub Actions runners. Regular updates and reviews of these configurations are necessary to adapt to changes in IP address ranges and maintain optimal security.
23
+
Managing runners for the enterprise involves configuring and securing both GitHub-hosted and self-hosted runners to ensure efficient and secure CI/CD workflows. This management includes setting up IP allowlists to control access, enhancing security by restricting runner access to specific IP addresses, and ensuring compliance with organizational policies. Proper configuration of IP allowlists for both GitHub-hosted and self-hosted runners is crucial for maintaining secure and reliable interactions between internal applications and GitHub Actions runners. Regular updates and reviews of these configurations are necessary to adapt to changes in IP address ranges and maintain optimal security.
24
24
25
25
### Configuring IP allowlists on GitHub-hosted and self-hosted runners
26
26
27
-
Configuring IP allowlists helps control access to runners by restricting them to specific IP addresses. This enhances security by preventing unauthorized access but may require additional network configurations.
27
+
Configuring IP allowlists helps control access to runners by restricting them to specific IP addresses. This configuration enhances security by preventing unauthorized access but might require further network configurations.
28
28
29
-
|**This guide provides a detailed explanation of how**|**Self-hosted runners**|
| GitHub-hosted runners use dynamic IP addresses, making it difficult to configure precise IP allowlists. | Use static or controlled IPs, allowing precise IP allowlisting or IP-based access control. |
32
32
| Organizations must allow GitHub’s published IP ranges. | Can be placed behind firewalls or VPNs for added security. |
@@ -35,44 +35,49 @@ Configuring IP allowlists helps control access to runners by restricting them to
35
35
36
36
#### Allowed IP list
37
37
38
-
An **allowed IP list** is a security feature that restricts access to services or resources based on predefined IP addresses. By configuring an IP allowlist, organizations can:
38
+
An **allowed IP list** is a security feature that restricts access to services or resources based on predefined IP addresses. When organizations configure an IP allowlist, they can:
39
39
40
40
-**Enhance security:** Prevent unauthorized access by allowing only trusted IP addresses.
41
41
-**Control network Traffic:** Restrict inbound and outbound requests to known and verified IPs.
42
42
-**Improve compliance:** Ensure regulatory compliance by limiting access to authorized networks.
43
43
44
-
|**This guide provides a detailed explanation of how**|**Self-hosted runners**|
| Organizations must allow GitHub's published IP ranges, which change periodically. | Admins can define specific IP addresses that are allowed to access the runners. |
47
47
| GitHub-hosted runners can be configured via GitHub’s security settings. | Self-hosted runners work well with firewalls, VPNs, or cloud security groups. |
48
48
49
-
50
49
### Configuring IP allowlists for internal applications to interact with GitHub-Hosted Runners
51
50
52
51
To configure IP allowlists for internal applications and systems to interact with GitHub-hosted runners, you can refer to the following official GitHub documentation:
53
52
54
53
#### 1. Understand GitHub's IP address ranges
55
-
GitHub-hosted runners operate within specific IP address ranges. To ensure your internal applications can communicate with these runners, you need to allow these IP ranges through your firewall. GitHub provides a meta API endpoint https://api.github.com/meta that lists all current IP address ranges used by GitHub services, including those for Actions runners. Regularly updating your allowlists based on this information is essential, as IP ranges can change.
54
+
55
+
GitHub-hosted runners operate within specific IP address ranges. To ensure your internal applications can communicate with these runners, you need to allow these IP ranges through your firewall. GitHub provides a meta API endpoint https://api.github.com/meta that lists all current IP address ranges used by GitHub services, including IP ranges for Actions runners. Regularly updating your allowlists based on this information is essential, as IP ranges can change.
56
56
57
57
#### 2. Configure your firewall
58
58
59
59
##### a. Obtain GitHub's IP ranges:
60
+
60
61
- Use the meta API endpoint to retrieve the latest IP address ranges used by GitHub Actions runners.
61
62
62
63
##### b. Update firewall rules:
63
-
- Add rules to your firewall to permit inbound and outbound traffic to and from these IP ranges. This ensures that your internal systems can interact with GitHub-hosted runners without connectivity issues.
64
+
65
+
- Add rules to your firewall to permit inbound and outbound traffic to and from these IP ranges. This configuration ensures that your internal systems can interact with GitHub-hosted runners without connectivity issues.
64
66
65
67
#### 3. Consider using self-hosted runners
66
-
If maintaining an IP allowlist for GitHub-hosted runners is challenging due to frequent changes in IP ranges, consider setting up self-hosted runners within your network. This approach allows you to have more control over the runner environment and network configurations. However, be aware that using self-hosted runners requires additional maintenance and infrastructure management.
68
+
69
+
If maintaining an IP allowlist for GitHub-hosted runners is challenging due to frequent changes in IP ranges, consider setting up self-hosted runners within your network. This approach allows you to have more control over the runner environment and network configurations. However, using self-hosted runners requires more maintenance and infrastructure management.
67
70
68
71
:::image type="content" source="../media/github-self-hosted-runners.png" alt-text="Screenshot of an empty runners screen.":::
69
72
70
73
#### 4. Regularly review and update allowlists
74
+
71
75
Since GitHub's IP address ranges can change, it's crucial to periodically review and update your firewall's IP allowlists. Automating this process by scripting the retrieval of IP ranges from GitHub's meta API can help ensure your allowlists remain current without manual intervention.
72
76
73
77
### Effects and potential abuse vectors of enabling self-hosted runners on public repositories
74
78
75
79
#### Effects of enabling self-hosted runners
80
+
76
81
1.**Customization & performance optimization**
77
82
- Self-hosted runners allow control over hardware, installed software, and environment settings.
78
83
- Workflows can be optimized for performance by using dedicated, high-performance machines.
@@ -82,21 +87,22 @@ Since GitHub's IP address ranges can change, it's crucial to periodically review
82
87
83
88
3.**State persistence**
84
89
- Self-hosted runners do **not** reset between jobs like GitHub-hosted runners.
85
-
-This allows**caching dependencies**, reusing large datasets, and maintaining persistent states.
90
+
-Allows**caching dependencies**, reusing large datasets, and maintaining persistent states.
86
91
87
92
4.**Security & maintenance responsibility**
88
93
-**Security patches, dependency updates, and system monitoring** become the runner owner's responsibility.
89
94
- Misconfigurations could expose the runner to external threats.
90
95
91
96
#### Potential abuse vectors of self-hosted runners
97
+
92
98
Enabling self-hosted runners on public repositories introduces significant security risks. Since **anyone** can trigger workflows by submitting a pull request, attackers can exploit this feature in various ways:
93
99
94
100
1.**Arbitrary Code Execution (RCE) by malicious actors**
95
101
- Attackers can submit pull requests containing **malicious scripts**, which the self-hosted runner executes automatically.
96
102
- If the runner has **elevated privileges**, the attacker gains **full system access**.
-**Self-hosted runners** need **manual installation, configuration, updates, and security management**.
213
227
214
228
##### 2. Security risks
229
+
215
230
- GitHub-hosted runners **run in isolated virtual machines** that reset after each job, minimizing attack surfaces.
216
231
- Self-hosted runners **persist across jobs**, meaning a compromised runner can be exploited across multiple workflow runs.
217
232
218
233
##### 3. Performance & cost considerations
219
-
- GitHub-hosted runners **provide a standard environment** but have **usage limits** (e.g., free minutes per month for private repositories).
220
-
- Self-hosted runners **allow better performance tuning** (e.g., running on high-end servers) but require **infrastructure and maintenance costs**.
234
+
235
+
- GitHub-hosted runners **provide a standard environment** but have **usage limits** (for example, free minutes per month for private repositories).
236
+
- Self-hosted runners **allow better performance tuning** (for example, running on high-end servers) but require **infrastructure and maintenance costs**.
221
237
222
238
##### 4. Networking & access
223
-
- GitHub-hosted runners **cannot access private/internal resources** without additional configurations.
239
+
240
+
- GitHub-hosted runners **cannot access private/internal resources** without further configurations.
224
241
- Self-hosted runners **can access internal systems**, making them ideal for **private repositories, internal tools, and on-premises deployments**.
225
242
226
243
#### When to use each runner?
227
244
228
245
**Use GitHub-hosted runners if:**
246
+
229
247
- You need a **quick and easy setup** without infrastructure management.
230
-
- Your workflow **doesn’t require custom dependencies** beyond the pre-installed tools.
248
+
- Your workflow **doesn’t require custom dependencies** beyond the preinstalled tools.
231
249
- You're working on an **open-source or public repository** with **free hosted runner minutes**.
232
250
233
251
**Use Self-hosted runners if:**
252
+
234
253
- Your workflow requires **specific dependencies, configurations, or persistent states**.
235
-
- You need to **access private network resources** (e.g., on-premises databases, internal services).
254
+
- You need to **access private network resources** (for example, on-premises databases, internal services).
236
255
- You require **higher performance machines** for **large-scale CI/CD pipelines**.
0 commit comments