Skip to content

Commit 5a9faf7

Browse files
authored
pull base content,head:MicrosoftDocs:main,into:wwlpublishsync
2 parents 458a825 + 4978153 commit 5a9faf7

File tree

43 files changed

+141
-148
lines changed

Some content is hidden

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

43 files changed

+141
-148
lines changed

learn-pr/github/configure-use-secret-scanning-github-repository/1-introduction.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction
44
metadata:
55
title: Introduction
66
description: An introduction to the topics you'll learn about in this module.
7-
ms.date: 04/30/2024
7+
ms.date: 06/05/2025
88
author: rmcmurray
99
ms.author: robmcm
1010
ms.topic: unit

learn-pr/github/configure-use-secret-scanning-github-repository/2-what-is-secret-scanning.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: What is secret scanning?
44
metadata:
55
title: What is secret scanning?
66
description: Overview of how secret scanning works and who it available to
7-
ms.date: 04/30/2024
7+
ms.date: 06/05/2025
88
author: rmcmurray
99
ms.author: robmcm
1010
ms.topic: unit

learn-pr/github/configure-use-secret-scanning-github-repository/3-configure-secret-scanning.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Configure secret scanning
44
metadata:
55
title: Configure secret scanning
66
description: Overview of how to enable and configure secret scanning
7-
ms.date: 04/30/2024
7+
ms.date: 06/05/2025
88
author: rmcmurray
99
ms.author: robmcm
1010
ms.topic: unit

learn-pr/github/configure-use-secret-scanning-github-repository/4-use-secret-scanning.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Use secret scanning
44
metadata:
55
title: Use secret scanning
66
description: Overview of how to respond to an alert and create a custom pattern
7-
ms.date: 04/30/2024
7+
ms.date: 06/05/2025
88
author: rmcmurray
99
ms.author: robmcm
1010
ms.topic: unit

learn-pr/github/configure-use-secret-scanning-github-repository/5-exercise.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: Exercise
44
metadata:
55
unitType: exercise
66
title: Exercise - Exclude files from secret scanning
7-
description: This exercise checks your knowledge on excluding files from being scanned by secret scanning. It's automatically graded via a workflow once you have completed the instructions.
8-
ms.date: 04/30/2024
7+
description: This exercise checks your knowledge on excluding files from secret scanning. It's automatically graded via a workflow once you have completed the instructions.
8+
ms.date: 06/05/2025
99
author: rmcmurray
1010
ms.author: robmcm
1111
ms.topic: unit

learn-pr/github/configure-use-secret-scanning-github-repository/6-knowledge-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
unitType: knowledge_check
66
title: Module assessment
77
description: Knowledge check for configuring and using secret scanning in GitHub.
8-
ms.date: 04/30/2024
8+
ms.date: 06/05/2025
99
author: rmcmurray
1010
ms.author: robmcm
1111
ms.topic: unit
@@ -28,9 +28,9 @@ quiz:
2828
explanation: "This answer is incorrect. Secret scanning is automatically enabled with default settings on public repositories. You can't change secret scanning settings on a public repository no matter what permissions you have on the repository."
2929
- content: "Where can you configure the recipients of secret scanning alerts?"
3030
choices:
31-
- content: "In the Code security and analysis settings of a repository"
31+
- content: "In the Advanced Security settings of a repository"
3232
isCorrect: true
33-
explanation: "Correct! You can configure the recipients of secret scanning alerts in the Access to alerts section of repository Code security and analysis settings."
33+
explanation: "Correct! You can configure the recipients of secret scanning alerts in the Access to alerts section of repository Advanced Security settings."
3434
- content: "In the Manage Access settings of a repository"
3535
isCorrect: false
3636
explanation: "This answer is incorrect. The Manage Access settings of a repository enable you to manage user permissions over the repository."

learn-pr/github/configure-use-secret-scanning-github-repository/7-summary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Summary
44
metadata:
55
title: Summary
66
description: A recap on what you learned about secret scanning in this module.
7-
ms.date: 04/30/2024
7+
ms.date: 06/05/2025
88
author: rmcmurray
99
ms.author: robmcm
1010
ms.topic: unit

learn-pr/github/configure-use-secret-scanning-github-repository/includes/1-introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ GitHub's security features help keep code and secrets secure in repositories and
22

33
Imagine that you're the administrator of a GitHub project involving several repositories that communicate with multiple external services. You'd like to make sure that no authentication credentials for these services get committed in the repositories of the project. Luckily, your company just purchased a GitHub Advanced Security license that includes secret scanning, a GitHub feature that does just that!
44

5-
To configure and use secret scanning for your project, you really need to understand what secret scanning is, how it works and the options available to you according to your use case.
5+
To configure and use secret scanning for your project, you really need to understand what secret scanning is, how it works, and the options available to you according to your use case.
66

77
In this module, you'll learn about:
88

learn-pr/github/configure-use-secret-scanning-github-repository/includes/3-configure-secret-scanning.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,20 @@ This unit walks you through the necessary steps to enable secret scanning at the
66

77
Follow these steps to enable secret scanning and push protection on a private repository:
88

9-
1. In your repository, navigate to **Settings > Code security and analysis**.
10-
1. Select the **Enable** button next to **GitHub Advanced Security**
11-
1. Review the impact of enabling Advanced Security and select **Enable GitHub Advanced Security for this repository**.
12-
1. Select the **Enable** button next to **Secret scanning**. If you see a **Disable** button, it means that secret scanning was already enabled at organization level.
9+
1. In your repository, navigate to **Settings**.
10+
1. In the **Security** section, select **Advanced Security**.
11+
1. Select the **Enable** button next to **Secret Protection**
12+
1. Review the impact of enabling and select **Enable Secret Protection**.
13+
1. If you see a **Disable** button, it means that secret scanning was already enabled at organization level.
1314
1. Select the **Enable** button next to **Push protection**.
1415

1516
:::image type="content" source="../media/enable-secret-scanning-repo-settings.png" alt-text="Screenshot of secret scanning enabled in repository settings.":::
1617

1718
## Enable secret scanning for an organization
1819

19-
Enabling secret scanning at the organization level ensures that secret scanning is enabled by default on all private repositories where GitHub Advanced Security is enabled.
20+
Enabling secret scanning at the organization level ensures that secret scanning is enabled by default on all private repositories where GitHub Advanced Security is enabled. In order to configure, you'll need to set up [GitHub Advanced Security](https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security).
2021

21-
Follow these steps to enable secret scanning and push protection for an organization:
22-
23-
1. In your organization, navigate to **Settings > Code security and analysis**.
24-
2. Select the **Enable all** button next to **GitHub Advanced Security**.
25-
3. Review the impact of enabling Advanced Security on all repositories and select **Enable all**.
26-
4. Select the **Enable all** button next to **Secret scanning** and select **Enable for eligible repositories**.
27-
- (Optional) Select **Automatically enable for new public repositories and repositories with GitHub Advanced Security enabled**.
28-
5. Select the **Enable all** button next to **Push protection** and select **Enable for eligible repositories**.
29-
- (Optional) Select **Automatically enable for repositories added to secret scanning**.
30-
31-
:::image type="content" source="../media/enable-secret-scanning-org-settings.png" alt-text="Screenshot of enabling secret scanning in organization settings.":::
22+
Once set up, you can configure [Global Secret Scanning settings](https://docs.github.com/en/code-security/securing-your-organization/enabling-security-features-in-your-organization/configuring-global-security-settings-for-your-organization#configuring-global-secret-scanning-settings).
3223

3324
## Exclude files from being scanned
3425

@@ -57,17 +48,17 @@ When a new secret is detected, GitHub notifies all users with access to security
5748
- Organization owners and enterprise owners, if they're administrators of repositories where secrets were leaked
5849

5950
> [!NOTE]
60-
> Commit authors who've accidentally committed secrets will be notified, regardless of their notification preferences.
51+
> Commit authors who have accidentally committed secrets will be notified, regardless of their notification preferences.
6152

6253
You'll receive an email notification if:
6354

6455
- You're watching the repository.
6556
- You've enabled notifications for **All Activity** or for custom **Security alerts** on the repository.
66-
- In your notification settings, under "Subscriptions", then under "Watching", you have selected to receive notifications by email.
57+
- In your notification settings, under "Subscriptions," then under "Watching," you have selected to receive notifications by email.
6758

6859
## Configure recipients of secret scanning alerts
6960

70-
Repository and organization administrators can give view access to security alerts to people or teams who have write access to the repository under **Settings > Code security and analysis > Access to alerts**:
61+
Repository and organization administrators can give view access to security alerts to people or teams who have write access to the repository under **Settings > Security > Advanced Security > Access to Alerts**:
7162

7263
:::image type="content" source="../media/access-to-alerts.png" alt-text="Screenshot of Access to alerts section with Search for people or teams field highlighted.":::
7364

learn-pr/github/configure-use-secret-scanning-github-repository/includes/4-use-secret-scanning.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ The following sections cover how to create custom patterns for organizations and
3838

3939
Follow these steps to create a custom pattern for a private repository:
4040

41-
1. In your repository, navigate to **Settings > Code security and analysis**.
42-
1. Under **Secret scanning > Custom patterns**, select **New pattern**.
41+
1. In your repository, navigate to **Settings > Advanced Security**.
42+
1. Under **Secret protection**, select **New pattern**.
4343
1. Provide the following details for your custom pattern:
44-
- The name of the pattern
45-
- The pattern of the secret specified as Hyperscan regex
46-
- (Optional) **More options** provide other surrounding content or additional match requirements for the secret format
47-
- A sample test string to make sure your configuration is matching the patterns you expect
44+
- The name of the pattern.
45+
- The pattern of the secret specified as Hyperscan regex.
46+
- (Optional) **More options** provide other surrounding content or additional match requirements for the secret format.
47+
- A sample test string to make sure your configuration is matching the patterns you expect.
4848

4949
:::image type="content" source="../media/new-custom-pattern-octocat.png" alt-text="Screenshot of creating a new custom pattern for octocat token.":::
5050

@@ -55,15 +55,15 @@ Follow these steps to create a custom pattern for a private repository:
5555

5656
### For an organization
5757

58-
Follow the steps below to create a custom pattern for an organization:
58+
Follow the steps listed to create a custom pattern for an organization:
5959

60-
1. In your organization, navigate to **Settings > Code security and analysis**.
61-
1. Under **Secret scanning > Custom patterns**, select **New pattern**.
60+
1. In your organization, navigate to **Settings > Advanced Security > Global Settings**.
61+
1. Under **Custom patterns**, select **New pattern**.
6262
1. Provide the following details for your custom pattern:
63-
- The name of the pattern
64-
- The pattern of the secret specified as Hyperscan regex
65-
- (Optional) **More options** provide other surrounding content or additional match requirements for the secret format
66-
- A sample test string to make sure your configuration is matching the patterns you expect
63+
- The name of the pattern.
64+
- The pattern of the secret specified as Hyperscan regex.
65+
- (Optional) **More options** provide other surrounding content or additional match requirements for the secret format.
66+
- A sample test string to make sure your configuration is matching the patterns you expect.
6767
1. When you're ready to test your new custom pattern, to identify matches in the repository without creating alerts, select **Save and dry run**.
6868
1. Select the repositories where you want to perform the dry run.
6969
- To perform the dry run across the entire organization, select **All repositories in the organization**.

0 commit comments

Comments
 (0)