Skip to content

Commit 1b80c9a

Browse files
authored
Merge branch 'main' into gha-hardening-pull-request-target
2 parents 2c9ec56 + 26d6672 commit 1b80c9a

File tree

156 files changed

+1475
-1184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+1475
-1184
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ registries:
55
type: docker-registry
66
url: ghcr.io
77
username: PAT
8-
password: ${{secrets.CONTAINER_BUILDER_TOKEN}}
8+
password: ${{secrets.BASE_CONTAINER_IMAGE_READER_DEPENDABOT}}
99

1010
updates:
1111
- package-ecosystem: npm

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# ---------------------------------------------------------------
99
# To update the sha:
1010
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
11-
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250709-201453-g6a417ef5f AS base
11+
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250711-151843-g9ff1d29c5 AS base
1212

1313
# Install curl for Node install and determining the early access branch
1414
# Install git for cloning docs-early-access & translations repos

content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ If you select the "Busy" option, when people @mention your username, assign you
149149

150150
![Screenshot of a draft comment. "@octocat" is written in the text field, and "The Octocat (busy)" is suggested.](/assets/images/help/profile/username-with-limited-availability-text.png)
151151

152-
1. In the top right corner of {% data variables.product.prodname_dotcom %}, select your profile photo, then click **{% octicon "smiley" aria-hidden="true" aria-label="smiley" %} Set status** or, if you already have a status set, click your current status.
152+
1. In the top right corner of {% data variables.product.prodname_dotcom %}, click your profile picture, then click **{% octicon "smiley" aria-hidden="true" aria-label="smiley" %} Set status** or, if you already have a status set, click your current status.
153153

154154
![Screenshot of the dropdown menu under @octocat's profile picture. A smiley icon and "Set status" are outlined in dark orange.](/assets/images/help/profile/set-status-on-profile-global-nav-update.png)
155155

content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/setting-your-profile-to-private.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ When your profile is private, the following content is hidden from your profile
2929
* Your pronouns
3030

3131
> [!NOTE]
32-
> When your profile is private, some optional fields are still publicly visible, such as the README, biography, and profile photo.
32+
> When your profile is private, some optional fields are still publicly visible, such as the README, biography, and profile picture.
3333
3434
## Changes to reporting on your activities
3535

content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/sharing-contributions-from-github-enterprise-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To share contributions from {% data variables.product.prodname_ghe_server %}, vi
4040
{% elsif ghes %}
4141

4242
1. Sign in to both your user account on {% data variables.product.prodname_ghe_cloud %} **and** your user account on {% data variables.product.prodname_ghe_cloud %} ({% data variables.product.prodname_dotcom_the_website %}{% ifversion ghecom-github-connect %} or {% data variables.enterprise.data_residency_site %}{% endif %}).
43-
1. On {% data variables.product.prodname_ghe_server %}, in the upper-right corner of any page, click your profile photo, then click **Settings**.
43+
1. On {% data variables.product.prodname_ghe_server %}, in the upper-right corner of any page, click your profile picture, then click **Settings**.
4444

4545
![Screenshot of a user's account menu on {% data variables.product.prodname_dotcom %}. The menu item "Settings" is outlined in dark orange.](/assets/images/help/settings/userbar-account-settings-global-nav-update.png)
4646

content/actions/concepts/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ children:
1111
- /workflows-and-actions
1212
- /runners
1313
- /security
14-
- /use-cases
1514
- /about-github-actions-metrics
15+
redirect_from:
16+
- /actions/concepts/use-cases
1617
---

content/actions/concepts/security/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ versions:
99
children:
1010
- /secrets
1111
- /github_token
12-
- /about-security-hardening-with-openid-connect
12+
- /openid-connect
1313
---
1414

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: OpenID Connect
3+
shortTitle: OpenID Connect
4+
intro: OpenID Connect allows your workflows to exchange short-lived tokens directly from your cloud provider.
5+
versions:
6+
fpt: '*'
7+
ghec: '*'
8+
ghes: '*'
9+
type: tutorial
10+
topics:
11+
- Security
12+
redirect_from:
13+
- /actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect
14+
- /actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect
15+
- /actions/concepts/security/about-security-hardening-with-openid-connect
16+
---
17+
18+
## Overview of OpenID Connect (OIDC)
19+
20+
{% data variables.product.prodname_actions %} workflows are often designed to access a cloud provider (such as AWS, Azure, GCP, HashiCorp Vault, and others) in order to deploy software or use the cloud's services. Before the workflow can access these resources, it will supply credentials, such as a password or token, to the cloud provider. These credentials are usually stored as a secret in {% data variables.product.prodname_dotcom %}, and the workflow presents this secret to the cloud provider every time it runs.
21+
22+
However, using hardcoded secrets requires you to create credentials in the cloud provider and then duplicate them in {% data variables.product.prodname_dotcom %} as a secret.
23+
24+
After you have established a trust connection with a cloud provider that supports OIDC, you can you can configure your workflow to request a short-lived access token directly from the cloud provider.
25+
26+
## Benefits of using OIDC
27+
28+
By updating your workflows to use OIDC tokens, you can adopt the following good security practices:
29+
30+
* **No cloud secrets:** You won't need to duplicate your cloud credentials as long-lived {% data variables.product.github %} secrets. Instead, you can configure the OIDC trust on your cloud provider, and then update your workflows to request a short-lived access token from the cloud provider through OIDC.
31+
* **Authentication and authorization management:** You have more granular control over how workflows can use credentials, using your cloud provider's authentication (authN) and authorization (authZ) tools to control access to cloud resources.
32+
* **Rotating credentials:** With OIDC, your cloud provider issues a short-lived access token that is only valid for a single job, and then automatically expires.
33+
34+
## How OIDC integrates with {% data variables.product.prodname_actions %}
35+
36+
The following diagram gives an overview of how {% data variables.product.github %}'s OIDC provider integrates with your workflows and cloud provider:
37+
38+
![Diagram of how a cloud provider integrates with {% data variables.product.prodname_actions %} through access tokens and JSON web token cloud role IDs.](/assets/images/help/actions/oidc-architecture.png)
39+
40+
1. You establish an OIDC trust relationship in the cloud provider, allowing specific {% data variables.product.github %} workflows to request cloud access tokens on behalf of a defined cloud role.
41+
1. Every time your job runs, {% data variables.product.prodname_dotcom %}'s OIDC provider auto-generates an OIDC token. This token contains multiple claims to establish a security-hardened and verifiable identity about the specific workflow that is trying to authenticate.
42+
1. A step or action in the workflow job can request a token from {% data variables.product.github %}’s OIDC provider, which can then be presented to the cloud provider as proof of the workflow’s identity.
43+
1. Once the cloud provider successfully validates the claims presented in the token, it then provides a short-lived cloud access token that is available only for the duration of the job.
44+
45+
## Understanding the OIDC token
46+
47+
Each job requests an OIDC token from {% data variables.product.prodname_dotcom %}'s OIDC provider, which responds with an automatically generated JSON web token (JWT) that is unique for each workflow job where it is generated. When the job runs, the OIDC token is presented to the cloud provider. To validate the token, the cloud provider checks if the OIDC token's subject and other claims are a match for the conditions that were preconfigured on the cloud role's OIDC trust definition.
48+
49+
The following example OIDC token uses a subject (`sub`) that references a job environment named `prod` in the `octo-org/octo-repo` repository.
50+
51+
```yaml
52+
{
53+
"typ": "JWT",
54+
"alg": "RS256",
55+
"x5t": "example-thumbprint",
56+
"kid": "example-key-id"
57+
}
58+
{
59+
"jti": "example-id",
60+
"sub": "repo:octo-org/octo-repo:environment:prod",
61+
"environment": "prod",
62+
"aud": "{% ifversion ghes %}https://HOSTNAME{% else %}https://github.com{% endif %}/octo-org",
63+
"ref": "refs/heads/main",
64+
"sha": "example-sha",
65+
"repository": "octo-org/octo-repo",
66+
"repository_owner": "octo-org",
67+
"actor_id": "12",
68+
"repository_visibility": "private",
69+
"repository_id": "74",
70+
"repository_owner_id": "65",
71+
"run_id": "example-run-id",
72+
"run_number": "10",
73+
"run_attempt": "2",
74+
"runner_environment": "github-hosted",
75+
"actor": "octocat",
76+
"workflow": "example-workflow",
77+
"head_ref": "",
78+
"base_ref": "",
79+
"event_name": "workflow_dispatch",{% ifversion actions-OIDC-custom-claim-enterprise %}
80+
"enterprise": "avocado-corp",{% endif %}{% ifversion actions-OIDC-enterprise_id-claim %}
81+
"enterprise_id": "2",{% endif %}
82+
"ref_type": "branch",
83+
"job_workflow_ref": "octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main",
84+
"iss": "{% ifversion ghes %}https://HOSTNAME/_services/token{% else %}https://token.actions.githubusercontent.com{% endif %}",
85+
"nbf": 1632492967,
86+
"exp": 1632493867,
87+
"iat": 1632493567
88+
}
89+
```
90+
91+
{% ifversion ghec %}
92+
93+
## Establishing OIDC trust with your cloud provider
94+
95+
To use OIDC in your workflows, you must establish a trust relationship between {% data variables.product.github %} and your cloud provider. This trust relationship ensures that only authorized workflows can request access tokens for your cloud resources.
96+
97+
Before granting an access token, your cloud provider checks that the [`subject`](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) and any other claims used to set conditions in its trust settings match those in the request's JSON Web Token (JWT). If the trust configuration matches, your cloud provider issues a temporary access token to the workflow.
98+
99+
For steps and syntax for configuring OIDC trust and setting conditions for cloud providers, see [AUTOTITLE](/actions/reference/openid-connect-reference#oidc-claims-used-to-define-trust-conditions-on-cloud-roles).
100+
101+
## Configuring OIDC on {% data variables.enterprise.data_residency_site %}
102+
103+
If you are part of an enterprise that uses {% data variables.enterprise.data_residency %} and you're setting up OIDC on {% data variables.enterprise.data_residency_site %}, you must **substitute certain values** while configuring OIDC.
104+
105+
For more information, see [AUTOTITLE](/enterprise-cloud@latest/actions/reference/openid-connect-reference#substituted-values-on-ghecom).
106+
107+
{% endif %}
108+
109+
## Authenticating custom actions using OIDC
110+
111+
Custom actions use the `getIDToken()` method from the Actions toolkit or a `curl` command to authenticate using OIDC.
112+
113+
For more information, see [AUTOTITLE](/actions/reference/openid-connect-reference#methods-for-requesting-the-oidc-token).
114+
115+
## Updating your workflows for OIDC
116+
117+
{% data variables.product.prodname_actions %} workflows can use OIDC tokens instead of secrets to authenticate with cloud providers. Many popular cloud providers offer official login actions that simplify the process of using OIDC in your workflows. For more information about updating your workflows with specific cloud providers, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-hardening-your-deployments).
118+
119+
## Next steps
120+
121+
For more information about configuring OIDC, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-hardening-your-deployments).
122+
123+
For reference information about OIDC, see [AUTOTITLE](/actions/reference/openid-connect-reference).

content/actions/concepts/use-cases/about-packaging-with-github-actions.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

content/actions/concepts/use-cases/index.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)