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/configure-use-secret-scanning-github-repository/5-exercise.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ title: Exercise
4
4
metadata:
5
5
unitType: exercise
6
6
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.
Copy file name to clipboardExpand all lines: learn-pr/github/configure-use-secret-scanning-github-repository/6-knowledge-check.yml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ metadata:
5
5
unitType: knowledge_check
6
6
title: Module assessment
7
7
description: Knowledge check for configuring and using secret scanning in GitHub.
8
-
ms.date: 04/30/2024
8
+
ms.date: 06/05/2025
9
9
author: rmcmurray
10
10
ms.author: robmcm
11
11
ms.topic: unit
@@ -28,9 +28,9 @@ quiz:
28
28
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."
29
29
- content: "Where can you configure the recipients of secret scanning alerts?"
30
30
choices:
31
-
- content: "In the Code security and analysis settings of a repository"
31
+
- content: "In the Advanced Security settings of a repository"
32
32
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."
34
34
- content: "In the Manage Access settings of a repository"
35
35
isCorrect: false
36
36
explanation: "This answer is incorrect. The Manage Access settings of a repository enable you to manage user permissions over the repository."
Copy file name to clipboardExpand all lines: learn-pr/github/configure-use-secret-scanning-github-repository/includes/1-introduction.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ GitHub's security features help keep code and secrets secure in repositories and
2
2
3
3
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!
4
4
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.
Copy file name to clipboardExpand all lines: learn-pr/github/configure-use-secret-scanning-github-repository/includes/3-configure-secret-scanning.md
+10-19Lines changed: 10 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,29 +6,20 @@ This unit walks you through the necessary steps to enable secret scanning at the
6
6
7
7
Follow these steps to enable secret scanning and push protection on a private repository:
8
8
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.
13
14
1. Select the **Enable** button next to **Push protection**.
14
15
15
16
:::image type="content" source="../media/enable-secret-scanning-repo-settings.png" alt-text="Screenshot of secret scanning enabled in repository settings.":::
16
17
17
18
## Enable secret scanning for an organization
18
19
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).
20
21
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).
32
23
33
24
## Exclude files from being scanned
34
25
@@ -57,17 +48,17 @@ When a new secret is detected, GitHub notifies all users with access to security
57
48
- Organization owners and enterprise owners, if they're administrators of repositories where secrets were leaked
58
49
59
50
> [!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.
61
52
62
53
You'll receive an email notification if:
63
54
64
55
- You're watching the repository.
65
56
- 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.
67
58
68
59
## Configure recipients of secret scanning alerts
69
60
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**:
71
62
72
63
:::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.":::
0 commit comments