Skip to content

Commit 433e09b

Browse files
authored
Merge pull request #37926 from github/repo-sync
Repo sync
2 parents 886c2ad + 5862cad commit 433e09b

File tree

39 files changed

+707
-63
lines changed

39 files changed

+707
-63
lines changed
Loading
Loading

content/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ You should delete a {% data variables.product.pat_generic %} if it is no longer
145145
1. In the left sidebar, under **{% octicon "key" aria-hidden="true" %} {% data variables.product.pat_generic_caps %}s**, click either **Fine-grained tokens** or **Tokens (classic)**, depending on which type of {% data variables.product.pat_generic %} you'd like to delete.
146146
1. To the right of the {% data variables.product.pat_generic %} you want to delete, click **Delete**.
147147

148+
{% ifversion ghec or fpt %}> [!NOTE] If you find a leaked {% data variables.product.pat_generic %} belonging to someone else, you can submit a revocation request through the REST API. See [AUTOTITLE](/code-security/getting-started/best-practices-for-preventing-data-leaks-in-your-organization#mitigate-data-leaks).
149+
{% endif %}
150+
148151
## Using a {% data variables.product.pat_generic %} on the command line
149152

150153
Once you have a {% data variables.product.pat_generic %}, you can enter it instead of your password when performing Git operations over HTTPS.

content/authentication/keeping-your-account-and-data-secure/token-expiration-and-revocation.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ You can revoke your authorization of a {% data variables.product.prodname_github
4545

4646
Once an authorization is revoked, any tokens associated with the authorization will be revoked as well. To reauthorize an application, follow the instructions from the third-party application or website to connect your account on {% data variables.product.prodname_dotcom %} again.
4747

48+
{% ifversion fpt or ghec %}
49+
50+
## Token revoked by a third party
51+
52+
To prevent unauthorized access using exposed tokens, {% data variables.product.github %} recommends token revocation to ensure that a token can no longer be used to authenticate to {% data variables.product.github %}. If you find another user's {% data variables.product.pat_generic %} leaked on {% data variables.product.github %} or elsewhere, you can submit a revocation request through the REST API. See [AUTOTITLE](/rest/credentials/revoke#revoke-a-list-of-credentials).
53+
54+
If a valid {% data variables.product.pat_generic %} is submitted to {% data variables.product.github %}'s credential revocation API, the token will be automatically revoked. This API allows a third party to revoke a token they do not own and helps protect the data associated with this token from unauthorized access, limiting the impact of exposed tokens.
55+
56+
To encourage reports and ensure that exposed tokens can be quickly and easily revoked, we do not require authentication for the revocation requests submitted through the API. As a result, {% data variables.product.github %} is unable to provide further information about the source of the reported token.
57+
58+
{% endif %}
59+
4860
## Token revoked by the {% data variables.product.prodname_oauth_app %}
4961

5062
The owner of an {% data variables.product.prodname_oauth_app %} can revoke an account's authorization of their app, this will also revoke any tokens associated with the authorization. For more information about revoking authorizations of your {% data variables.product.prodname_oauth_app %}, see [AUTOTITLE](/rest/apps/oauth-applications#delete-an-app-authorization).

content/code-security/dependabot/working-with-dependabot/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ children:
2121
- /configuring-access-to-private-registries-for-dependabot
2222
- /guidance-for-the-configuration-of-private-registries-for-dependabot
2323
- /dependabot-options-reference
24+
- /setting-dependabot-to-run-on-self-hosted-runners-using-arc
2425
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
---
2+
title: Setting up Dependabot to run on self-hosted action runners using the Actions Runner Controller
3+
intro: You can configure the {% data variables.product.prodname_actions_runner_controller %} to run {% data variables.product.prodname_dependabot %} on self-hosted runners.
4+
versions:
5+
feature: dependabot-arc-support
6+
permissions: '{% data reusables.permissions.dependabot-various-tasks %}'
7+
topics:
8+
- Repositories
9+
- Dependabot
10+
- Version updates
11+
- Security updates
12+
- Dependencies
13+
- Pull requests
14+
allowTitleToDifferFromFilename: true
15+
shortTitle: Configure ARC
16+
---
17+
18+
## Working with the {% data variables.product.prodname_actions_runner_controller %} (ARC)
19+
20+
{% data reusables.dependabot.arc-support-private-preview-note %}
21+
22+
This article provides step-by-step instructions for setting up ARC on a Kubernetes cluster and configuring {% data variables.product.prodname_dependabot %} to run on self-hosted action runners. The article:
23+
24+
* Contains an overview of the ARC and {% data variables.product.prodname_dependabot %} integration.
25+
* Provides detailed installation and configuration steps using helm scripts.
26+
27+
## What is ARC?
28+
29+
The {% data variables.product.prodname_actions_runner_controller %} is a Kubernetes controller that manages self-hosted {% data variables.product.prodname_actions %} as Kubernetes pods. It allows you to dynamically scale and orchestrate runners based on your workflows, providing better resource utilization and integration with Kubernetes environments. See [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/about-actions-runner-controller).
30+
31+
## {% data variables.product.prodname_dependabot %} on ARC
32+
33+
You can run {% data variables.product.prodname_dependabot %} on self-hosted {% data variables.product.prodname_actions %} runners managed within a Kubernetes cluster via ARC. This enables auto-scaling, workload isolation, and better resource management for {% data variables.product.prodname_dependabot %} jobs, ensuring that dependency updates can run efficiently within an organization's controlled infrastructure while integrating seamlessly with {% data variables.product.prodname_actions %}.
34+
35+
## Setting up ARC for {% data variables.product.prodname_dependabot %} on your Local environment
36+
37+
### Prerequisites
38+
39+
* A Kubernetes cluster
40+
* For a managed cloud environment, you can use Azure Kubernetes Service (AKS).
41+
* For a local setup, you can use minikube.
42+
* Helm
43+
* A package manager for Kubernetes.
44+
45+
### Setting up ARC
46+
47+
1. Install ARC. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller).
48+
1. Create a work directory for the ARC setup and create a shell script file (for example, `helm_install_arc.sh`) to install the latest ARC version.
49+
50+
```bash copy
51+
mkdir ARC
52+
touch helm_install_arc.sh
53+
chmod 755 helm_install_arc.sh
54+
```
55+
56+
1. Edit `helm_install_arc.sh` with this bash script for installing ARC.
57+
58+
```text copy
59+
NAMESPACE="arc-systems"
60+
helm install arc \
61+
--namespace "${NAMESPACE}" \
62+
--create-namespace \
63+
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller
64+
```
65+
66+
1. Execute the `helm_install_arc.sh` script file.
67+
68+
```bash
69+
./helm_install_arc.sh
70+
```
71+
72+
1. Now, you need to configure the runner scale set. For this, let's start by creating and editing a file with the following bash script.
73+
74+
```bash copy
75+
touch arc-runner-set.sh
76+
chmod 755 arc-runner-set.sh
77+
```
78+
79+
```text copy
80+
INSTALLATION_NAME="dependabot"
81+
NAMESPACE="arc-runners"
82+
GITHUB_CONFIG_URL=REPO_URL
83+
GITHUB_PAT=PAT
84+
helm install "${INSTALLATION_NAME}" \
85+
--namespace "${NAMESPACE}" \
86+
--create-namespace \
87+
--set githubConfigUrl="${GITHUB_CONFIG_URL}" \
88+
--set githubConfigSecret.github_token="${GITHUB_PAT}" \
89+
--set containerMode.type="dind" \
90+
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set
91+
```
92+
93+
1. Execute the `arc-runner-set.sh` script file.
94+
95+
```bash copy
96+
./arc-runner-set.sh
97+
```
98+
99+
> [!NOTE]
100+
>
101+
> * The installation name of the runner scale set has to be `dependabot` in order to target the dependabot job to the runner.
102+
> * The `containerMode.type="dind"` configuration is required to allow the runner to connect to the Docker daemon.
103+
> * If an organization-level or enterprise-level runner is created, then the appropriate scopes should be provided to the {% data variables.product.pat_generic_title_case %} (PAT).
104+
> * A {% data variables.product.pat_v1 %} (PAT) can be created. The token should have the following scopes based on whether you are creating a repository, organization or enterprise level runner scale set.
105+
> * Repository level: **repo**
106+
> * Organization level: **admin:org**
107+
> * Enterprise level: **admin:enterprise**\
108+
> For information about creating a {% data variables.product.pat_v1 %}, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).
109+
110+
### Adding runner groups
111+
112+
Runner groups are used to control which organizations or repositories have access to runner scale sets. To add a runner scale set to a runner group, you must already have a runner group created.
113+
114+
For information about creating runner groups, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups#creating-a-self-hosted-runner-group-for-an-organization).
115+
116+
Don't forget to add the following setting to the runner scale set configuration in the helm chart.
117+
118+
```text copy
119+
--set runnerGroup="<Runner group name>" \
120+
```
121+
122+
### Checking your installation
123+
124+
1. Check your installation.
125+
126+
```bash copy
127+
helm list -A
128+
```
129+
130+
Output:
131+
132+
```text
133+
➜ ARC git:(master) ✗ helm list -A
134+
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
135+
arc arc-systems 1 2025-04-11 14:41:53.70893 -0500 CDT deployed gha-runner-scale-set-controller-0.11.0 0.11.0
136+
arc-runner-set arc-runners 1 2025-04-11 15:08:12.58119 -0500 CDT deployed gha-runner-scale-set-0.11.0 0.11.0
137+
dependabot arc-runners 1 2025-04-16 21:53:40.080772 -0500 CDT deployed gha-runner-scale-set-0.11.0
138+
```
139+
140+
1. Check the manager pod using this command.
141+
142+
```bash copy
143+
kubectl get pods -n arc-systems
144+
```
145+
146+
Output:
147+
148+
```text
149+
➜ ARC git:(master) ✗ kubectl get pods -n arc-systems
150+
151+
NAME READY STATUS RESTARTS AGE
152+
arc-gha-rs-controller-57c67d4c7-zjmw2 1/1 Running 8 (36h ago) 6d9h
153+
arc-runner-set-754b578d-listener 1/1 Running 0 11h
154+
dependabot-754b578d-listener 1/1 Running 0 14h
155+
```
156+
157+
### Setting up {% data variables.product.prodname_dependabot %}
158+
159+
{% ifversion fpt or ghec %}
160+
161+
{% data reusables.repositories.navigate-to-repo %}
162+
{% data reusables.repositories.sidebar-settings %}
163+
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
164+
165+
1. Under "{% data variables.product.prodname_dependabot %}", scroll to "{% data variables.product.prodname_dependabot %} on Action Runners", and select **Enable** for "{% data variables.product.prodname_dependabot %} on self-hosted runners".
166+
167+
{% elsif ghes %}
168+
169+
1. Create an organization on {% data variables.product.prodname_ghe_server %}. For more information, see [AUTOTITLE](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch).
170+
1. Create a runner group. See [Adding runner groups](#adding-runner-groups).
171+
1. Enable the dependency graph from the {% data variables.enterprise.management_console %}. See [AUTOTITLE](/admin/managing-code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise#enabling-the-dependency-graph-via-the-management-console).
172+
1. Enable {% data variables.product.prodname_github_connect %} for your enterprise. See [AUTOTITLE](/admin/configuring-settings/configuring-github-connect/enabling-github-connect-for-githubcom#enabling-github-connect).
173+
1. Enable {% data variables.product.prodname_dependabot_alerts %} for the enterprise. See [AUTOTITLE](/admin/configuring-settings/configuring-github-connect/enabling-dependabot-for-your-enterprise#enabling-dependabot-alerts).
174+
175+
{% endif %}
176+
177+
## Triggering a {% data variables.product.prodname_dependabot %} run
178+
179+
Now that you've set up ARC, you can start a {% data variables.product.prodname_dependabot %} run.
180+
181+
{% data reusables.repositories.navigate-to-repo %}
182+
{% data reusables.repositories.navigate-to-insights %}
183+
{% data reusables.repositories.click-dependency-graph %}
184+
185+
1. Under "Dependency graph", click **{% data variables.product.prodname_dependabot %}**.
186+
1. To the right of the name of manifest file you're interested in, click **Recent update jobs**.
187+
1. If there are no recent update jobs for the manifest file, click **Check for updates** to re-run a {% data variables.product.prodname_dependabot %} version updates'job and check for new updates to dependencies for that ecosystem.
188+
189+
## Viewing the generated ARC runners
190+
191+
You can the ARC runners that have been created for the {% data variables.product.prodname_dependabot %} job.
192+
193+
{% data reusables.repositories.navigate-to-repo %}
194+
{% data reusables.repositories.actions-tab %}
195+
196+
1. On the left sidebar, click **Runners**.
197+
1. Under "Runners", click **Self-hosted runners** to view the list of all the runners available in the repository. You can see the ephemeral dependabot runner that has been created.
198+
![Screenshot showing a dependabot runner in the list of available runners. The runner is highlighted with an orange outline.](/assets/images/help/dependabot/dependabot-self-hosted-runner.png)
199+
200+
You can also view the same dependabot runner pod created in your kubernetes cluster from the terminal by executing this command.
201+
202+
```text copy
203+
➜ ARC git:(master) ✗ kubectl get pods -n arc-runners
204+
NAME READY STATUS RESTARTS AGE
205+
dependabot-sw8zn-runner-4mbc7 2/2 Running 0 46s
206+
```
207+
208+
Additionally, you can verify:
209+
210+
* The logs, by checking the runner and machine name. See [AUTOTITLE](/code-security/dependabot/troubleshooting-dependabot/viewing-dependabot-job-logs).
211+
212+
![Example of log for a dependabot self hosted runner.](/assets/images/help/dependabot/dependabot-self-hosted-runner-log.png)
213+
214+
* The version update pull requests created by the dependabot job in the **Pull requests** tab of the repository.

content/code-security/getting-started/best-practices-for-preventing-data-leaks-in-your-organization.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ If you're unable to coordinate directly with the repository owner to remove data
116116
> If one of your repositories has been taken down due to a false claim, you should fill out a DMCA
117117
counter notice form and alert GitHub Support. For more information, see [DMCA counter notice](https://support.github.com/contact/dmca-counter-notice).
118118

119+
{% ifversion ghec or fpt %}
120+
121+
### Revoke exposed tokens
122+
123+
If a {% data variables.product.pat_generic_plural %} has been exposed in a {% data variables.product.github %} repository, {% data variables.product.github %} {% data variables.product.prodname_secret_scanning %} can be used to report and revoke the token. For more information, see [AUTOTITLE](/code-security/secret-scanning/managing-alerts-from-secret-scanning/resolving-alerts#reporting-a-leaked-secret).
124+
125+
You can also revoke {% data variables.product.pat_generic_plural %} that you do not own and have been exposed outside of {% data variables.product.github %} repositories. By doing this, you are contributing to the overall security of the {% data variables.product.github %} community and can quickly limit the impact of these tokens. If you find exposed {% data variables.product.pat_generic_plural %} either on {% data variables.product.github %} or elsewhere, you can submit a revocation request using the REST API. See [AUTOTITLE](/rest/credentials/revoke#revoke-a-list-of-credentials).
126+
127+
{% endif %}
128+
119129
## Next steps
120130

121131
* [AUTOTITLE](/code-security/supply-chain-security/end-to-end-supply-chain/securing-code)

content/rest/authentication/keeping-your-api-credentials-secure.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ If you're creating a {% data variables.product.prodname_actions %} workflow that
5353

5454
Never hardcode authentication credentials like tokens, keys, or app-related secrets into your code. Instead, consider using a secret manager such as [Azure Key Vault](https://azure.microsoft.com/products/key-vault) or [HashiCorp Vault](https://www.hashicorp.com/products/vault). For more information about securing {% data variables.product.prodname_github_app %} credentials, see [AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/best-practices-for-creating-a-github-app).
5555

56+
{% ifversion fpt or ghec %}
57+
58+
If you find another user's {% data variables.product.pat_generic %} exposed on {% data variables.product.github %} or elsewhere, you can submit a revocation request through the REST API. See [AUTOTITLE](/rest/credentials/revoke#revoke-a-list-of-credentials).
59+
60+
{% endif %}
61+
5662
When using a {% data variables.product.pat_generic %} in a script, consider storing your token as a {% data variables.product.prodname_actions %} secret and running your script through {% data variables.product.prodname_actions %}.{% ifversion fpt or ghec %} You can also store your token as a Codespaces secret and run your script in Codespaces.{% endif %} For more information, see [AUTOTITLE](/actions/security-guides/encrypted-secrets){% ifversion fpt or ghec %} and [AUTOTITLE](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces){% endif %}.
5763

5864
If none of these options are possible, you can store authentication credentials in a `.env` file. Make sure to encrypt your `.env` file, and never push it to any repository.

content/rest/credentials/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Credentials
3+
topics:
4+
- API
5+
autogenerated: rest
6+
allowTitleToDifferFromFilename: true
7+
children:
8+
- /revoke
9+
versions:
10+
fpt: '*'
11+
ghec: '*'
12+
---
13+

content/rest/credentials/revoke.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Revocation
3+
shortTitle: Revocation
4+
intro: Use the REST API to revoke credentials that you have found exposed on {% data variables.product.github %} or elsewhere.
5+
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
6+
fpt: '*'
7+
ghec: '*'
8+
topics:
9+
- API
10+
autogenerated: rest
11+
allowTitleToDifferFromFilename: true
12+
---
13+
14+
<!-- Content after this section is automatically generated -->

content/rest/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ children:
5656
- /collaborators
5757
- /commits
5858
- /copilot
59+
- /credentials
5960
- /dependabot
6061
- /dependency-graph
6162
- /deploy-keys
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# References:
2+
# Issue #17954 - Dependabot adds ARC (Actions Runner Controller) support for security and version updates
3+
4+
versions:
5+
fpt: '*'
6+
ghec: '*'
7+
ghes: '>3.17'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> [!NOTE]
2+
> ARC support for {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %} is currently in {% data variables.release-phases.public_preview %} and subject to change.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
{% ifversion dependabot-arc-support %}
2+
3+
> [!WARNING] Private networking is currently unsupported with an Azure Virtual Network (VNET) for {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %}. By using VNET, you do so at your own risk, and {% data variables.product.github %} cannot currently support you if problems arise. Private networking is supported for the {% data variables.product.prodname_actions_runner_controller %}. See [AUTOTITLE](/code-security/dependabot/working-with-dependabot/setting-dependabot-to-run-on-self-hosted-runners-using-arc).
4+
5+
{% else %}
6+
17
> [!WARNING] Private networking is currently unsupported with either an Azure Virtual Network (VNET) or the Actions Runner Controller (ARC) for {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %}. By using VNET or ARC, you do so at your own risk, and {% data variables.product.github %} cannot currently support you if problems arise.
8+
9+
{% endif %}

0 commit comments

Comments
 (0)