Skip to content

Commit 203c60b

Browse files
authored
Merge pull request #25954 from github/repo-sync
Repo sync
2 parents a380f43 + 5e6890e commit 203c60b

File tree

22 files changed

+193
-7
lines changed

22 files changed

+193
-7
lines changed
Loading
Loading
Loading

content/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,14 @@ Untrusted workflows running on your self-hosted runner pose significant security
284284

285285
For more information about security hardening for self-hosted runners, see "[AUTOTITLE](/actions/security-guides/security-hardening-for-github-actions#hardening-for-self-hosted-runners)."
286286

287+
{% ifversion actions-disable-repo-runners %}
288+
289+
### Restricting the use of self-hosted runners
290+
291+
{% data reusables.actions.disable-selfhosted-runners-crossrefs %}
292+
293+
{% endif %}
294+
287295
{% ifversion ghec or ghes or ghae %}
288296

289297
## Further reading

content/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ You can register ephemeral runners that perform a single job before the registra
5252

5353
You can add self-hosted runners to a single repository. To add a self-hosted runner to a user repository, you must be the repository owner. For an organization repository, you must be an organization owner or have admin access to the repository. For information about how to add a self-hosted runner with the REST API, see "[AUTOTITLE](/rest/actions#self-hosted-runners)."
5454

55+
{% ifversion actions-disable-repo-runners %}
56+
57+
{% note %}
58+
59+
**Note**: {% data reusables.actions.disable-selfhosted-runners-crossrefs %}
60+
61+
{% endnote %}
62+
63+
{% endif %}
64+
5565
{% data reusables.repositories.navigate-to-repo %}
5666
{% data reusables.repositories.sidebar-settings %}
5767
{% data reusables.repositories.settings-sidebar-actions-runners %}

content/actions/hosting-your-own-runners/managing-self-hosted-runners/monitoring-and-troubleshooting-self-hosted-runners.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ shortTitle: Monitor & troubleshoot
1818

1919
{% data reusables.actions.enterprise-github-hosted-runners %}
2020

21+
{% ifversion actions-disable-repo-runners %}
22+
23+
## Using repository-level self-hosted runners
24+
25+
You may not be able to create a self-hosted runner for an organization-owned repository.
26+
27+
{% data reusables.actions.disable-selfhosted-runners-crossrefs %}
28+
29+
{% endif %}
30+
2131
## Checking the status of a self-hosted runner
2232

2333
{% data reusables.actions.self-hosted-runner-management-permissions-required %}

content/actions/security-guides/security-hardening-for-github-actions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ SBOMs are available for Ubuntu, Windows, and macOS runner images. You can locate
307307

308308
{% ifversion fpt or ghec %}As a result, self-hosted runners should almost [never be used for public repositories](/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#self-hosted-runner-security) on {% data variables.product.product_name %}, because any user can open pull requests against the repository and compromise the environment. Similarly, be{% elsif ghes or ghae %}Be{% endif %} cautious when using self-hosted runners on private or internal repositories, as anyone who can fork the repository and open a pull request (generally those with read access to the repository) are able to compromise the self-hosted runner environment, including gaining access to secrets and the `GITHUB_TOKEN` which, depending on its settings, can grant write access to the repository. Although workflows can control access to environment secrets by using environments and required reviews, these workflows are not run in an isolated environment and are still susceptible to the same risks when run on a self-hosted runner.
309309

310+
{% ifversion actions-disable-repo-runners %}
311+
312+
{% data reusables.actions.disable-selfhosted-runners-crossrefs %}
313+
314+
{% endif %}
315+
310316
When a self-hosted runner is defined at the organization or enterprise level, {% data variables.product.product_name %} can schedule workflows from multiple repositories onto the same runner. Consequently, a security compromise of these environments can result in a wide impact. To help reduce the scope of a compromise, you can create boundaries by organizing your self-hosted runners into separate groups. You can restrict what {% ifversion restrict-groups-to-workflows %}workflows, {% endif %}organizations and repositories can access runner groups. For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups)."
311317

312318
You should also consider the environment of the self-hosted runner machines:

content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ You may need to upgrade the CPU and memory resources for {% data variables.locat
8787

8888
{% ifversion ghec %}If you are using self-hosted runners, you have to decide whether you want to use physical machines, virtual machines, or containers.{% else %}Decide whether you want to use physical machines, virtual machines, or containers for your self-hosted runners.{% endif %} Physical machines will retain remnants of previous jobs, and so will virtual machines unless you use a fresh image for each job or clean up the machines after each job run. If you choose containers, you should be aware that the runner auto-updating will shut down the container, which can cause workflows to fail. You should come up with a solution for this by preventing auto-updates or skipping the command to kill the container.
8989

90-
You also have to decide where to add each runner. You can add a self-hosted runner to an individual repository, or you can make the runner available to an entire organization or your entire enterprise. Adding runners at the organization or enterprise levels allows sharing of runners, which might reduce the size of your runner infrastructure. You can use policies to limit access to self-hosted runners at the organization and enterprise levels by assigning groups of runners to specific repositories or organizations. For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners)" and "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups)."
90+
You also have to decide where to add each runner. You can add a self-hosted runner to an individual repository, or you can make the runner available to an entire organization or your entire enterprise. Adding runners at the organization or enterprise levels allows sharing of runners, which might reduce the size of your runner infrastructure. You can use policies to limit access to self-hosted runners at the organization and enterprise levels by assigning groups of runners to specific repositories or organizations. For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners)" and "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups)." {% ifversion actions-disable-repo-runners %}You can also use policies to prevent people using repository-level self-hosted runners. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#disabling-repository-level-self-hosted-runners)."{% endif %}
9191

9292
{% ifversion ghec or ghes %}
9393
You should consider using autoscaling to automatically increase or decrease the number of available self-hosted runners. For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners)."

content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,8 @@ Before you'll see `git` category actions, you must enable Git events in the audi
10861086

10871087
| Action | Description
10881088
|--------|-------------
1089-
| `repo.access` | The visibility of a repository changed.
1089+
| `repo.access` | The visibility of a repository changed.{% ifversion emu-owned-repos %}
1090+
| `repo.temporary_access_granted` | Triggered when an enterprise owner temporarily enables access to a repository. For more information, see "[AUTOTITLE](/admin/user-management/managing-repositories-in-your-enterprise/accessing-user-owned-repositories-in-your-enterprise)."{% endif %}
10901091
| `repo.actions_enabled` | {% data variables.product.prodname_actions %} was enabled for a repository.
10911092
| `repo.add_member` | A collaborator was added to a repository.
10921093
| `repo.add_topic` | A topic was added to a repository.

content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,32 @@ You can choose to disable {% data variables.product.prodname_actions %} for all
5959
{% data reusables.enterprise-accounts.actions-tab %}
6060
1. Under "Policies", select {% data reusables.actions.policy-label-for-select-actions-workflows %} and add your required actions{% ifversion actions-workflow-policy %} and reusable workflows{% endif %} to the list.
6161

62+
{% ifversion actions-disable-repo-runners %}
63+
64+
## Disabling repository-level self-hosted runners
65+
66+
{% data reusables.actions.disable-selfhosted-runners-overview %} For more information on creating self-hosted runners at the repository level, see "[AUTOTITLE](/enterprise-cloud@latest/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository)."
67+
68+
By default anyone with admin access to a repository can add a self-hosted runner for the repository. The enterprise settings allow you to disable the use of repository-level self-hosted runners across all repositories in your enterprise. If you allow repository-level self-hosted runners for your enterprise, organization owners can choose to allow or prevent creation of repository-level self-hosted runners for some or all repositories in their organization. For more information see, "[AUTOTITLE](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization)."
69+
70+
{% data reusables.actions.disable-selfhosted-runners-note %}
71+
72+
{% data reusables.enterprise-accounts.access-enterprise %}
73+
{% data reusables.enterprise-accounts.policies-tab %}
74+
{% data reusables.enterprise-accounts.actions-tab %}
75+
1. In the "Runners" section, select **Disable for all organizations**.{% ifversion ghec %}
76+
77+
{% note %}
78+
79+
**Note**: Owners of an {% data variables.enterprise.prodname_emu_enterprise %} can also choose to select **Disable in all Enterprise Managed User (EMU) repositories** to restrict runner creation for repositories that are owned by managed user accounts.
80+
81+
{% endnote %}
82+
83+
{% endif %}
84+
1. Click **Save** to apply the change.
85+
86+
{% endif %}
87+
6288
## Enforcing a policy for artifact and log retention in your enterprise
6389

6490
{% data variables.product.prodname_actions %} can store artifact and log files. For more information, see "[AUTOTITLE](/actions/managing-workflow-runs/downloading-workflow-artifacts)."

0 commit comments

Comments
 (0)