Skip to content

Commit 044285a

Browse files
authored
[2022-06-16]: Secret scanning dry runs on custom pattern edits - [Public Beta] (github#28390)
1 parent 9d0cdee commit 044285a

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

content/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ topics:
2828
You can define custom patterns to identify secrets that are not detected by the default patterns supported by {% data variables.product.prodname_secret_scanning %}. For example, you might have a secret pattern that is internal to your organization. For details of the supported secrets and service providers, see "[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns)."
2929

3030
You can define custom patterns for your enterprise, organization, or repository. {% data variables.product.prodname_secret_scanning_caps %} supports up to
31-
{%- ifversion fpt or ghec or ghes > 3.3 %} 500 custom patterns for each organization or enterprise account, and up to 100 custom patterns per repository.
32-
{%- elsif ghes = 3.3 %} 100 custom patterns for each organization or enterprise account, and 20 per repository.
33-
{%- else %} 20 custom patterns for each organization or enterprise account, and per repository.
31+
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-7297 %} 500 custom patterns for each organization or enterprise account, and up to 100 custom patterns per repository.
32+
{%- elsif ghes = 3.2 %} 20 custom patterns for each organization or enterprise account, and per repository.
33+
{%- else %} 100 custom patterns for each organization or enterprise account, and 20 per repository.
3434
{%- endif %}
3535

3636
{% ifversion ghes < 3.3 %}
@@ -67,7 +67,7 @@ Before defining a custom pattern, you must ensure that {% data variables.product
6767
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
6868
{% data reusables.repositories.navigate-to-ghas-settings %}
6969
{% data reusables.advanced-security.secret-scanning-new-custom-pattern %}
70-
{% data reusables.advanced-security.secret-scanning-add-custom-pattern-details %}{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5499 %}
70+
{% data reusables.advanced-security.secret-scanning-add-custom-pattern-details %}{% ifversion secret-scanning-custom-enterprise-35 %}
7171
1. When you're ready to test your new custom pattern, to identify matches in the repository without creating alerts, click **Save and dry run**.
7272
{% data reusables.advanced-security.secret-scanning-dry-run-results %}
7373
{% endif %}
@@ -122,7 +122,7 @@ Before defining a custom pattern, you must ensure that you enable {% data variab
122122
{% data reusables.repositories.navigate-to-ghas-settings %}
123123
{% data reusables.advanced-security.secret-scanning-new-custom-pattern %}
124124
{% data reusables.advanced-security.secret-scanning-add-custom-pattern-details %}
125-
{%- ifversion secret-scanning-org-dry-runs %}
125+
{%- ifversion secret-scanning-custom-enterprise-35 %}
126126
1. When you're ready to test your new custom pattern, to identify matches in select repositories without creating alerts, click **Save and dry run**.
127127
{% data reusables.advanced-security.secret-scanning-dry-run-select-repos %}
128128
{% data reusables.advanced-security.secret-scanning-dry-run-results %}
@@ -141,7 +141,7 @@ Before defining a custom pattern, you must ensure that you enable secret scannin
141141

142142
{% note %}
143143

144-
{% ifversion secret-scanning-enterprise-dry-runs %}
144+
{% ifversion secret-scanning-custom-enterprise-36 %}
145145
**Notes:**
146146
- At the enterprise level, only the creator of a custom pattern can edit the pattern, and use it in a dry run.
147147
- Enterprise owners can only make use of dry runs on repositories that they have access to, and enterprise owners do not necessarily have access to all the organizations or repositories within the enterprise.
@@ -158,8 +158,8 @@ Before defining a custom pattern, you must ensure that you enable secret scannin
158158
{% data reusables.enterprise-accounts.advanced-security-security-features %}
159159
1. Under "Secret scanning custom patterns", click {% ifversion ghes = 3.2 %}**New custom pattern**{% else %}**New pattern**{% endif %}.
160160
{% data reusables.advanced-security.secret-scanning-add-custom-pattern-details %}
161-
{%- ifversion secret-scanning-enterprise-dry-runs %}
162-
1. When you're ready to test your new custom pattern, to identify matches in the repository without creating alerts, click **Save and dry run**.
161+
{%- ifversion secret-scanning-custom-enterprise-36 %}
162+
1. When you're ready to test your new custom pattern, to identify matches in the enterprise without creating alerts, click **Save and dry run**.
163163
{% data reusables.advanced-security.secret-scanning-dry-run-select-repos %}
164164
{% data reusables.advanced-security.secret-scanning-dry-run-results %}
165165
{%- endif %}
@@ -175,7 +175,10 @@ When you save a change to a custom pattern, this closes all the {% data variable
175175
* For a repository or organization, display the "Security & analysis" settings for the repository or organization where the custom pattern was created. For more information, see "[Defining a custom pattern for a repository](#defining-a-custom-pattern-for-a-repository)" or "[Defining a custom pattern for an organization](#defining-a-custom-pattern-for-an-organization)" above.
176176
* For an enterprise, under "Policies" display the "Advanced Security" area, and then click **Security features**. For more information, see "[Defining a custom pattern for an enterprise account](#defining-a-custom-pattern-for-an-enterprise-account)" above.
177177
2. Under "{% data variables.product.prodname_secret_scanning_caps %}", to the right of the custom pattern you want to edit, click {% octicon "pencil" aria-label="The edit icon" %}.
178-
3. When you have reviewed and tested your changes, click **Save changes**.
178+
{%- ifversion secret-scanning-custom-enterprise-36 %}
179+
3. When you're ready to test your edited custom pattern, to identify matches without creating alerts, click **Save and dry run**.
180+
{%- endif %}
181+
4. When you have reviewed and tested your changes, click **Save changes**.
179182
{% endif %}
180183

181184
## Removing a custom pattern
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Issues: changes to custom patterns for secret scanning
2+
# #6367: updates for the "organization level dry runs (Public Beta)"
3+
# #5499: updates for the "repository level dry runs (Public Beta)"
4+
versions:
5+
ghec: '*'
6+
ghes: '>3.4'
7+
ghae: 'issue-6367'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Issues: changes to custom patterns for secret scanning
2+
# #6904: updates for "enterprise account level dry runs (Public Beta)"
3+
# #7297: updates for dry runs on editing patterns (Public Beta)
4+
versions:
5+
ghec: '*'
6+
ghes: '>3.5'
7+
ghae: 'issue-6904'

data/features/secret-scanning-enterprise-dry-runs.yml

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

data/features/secret-scanning-org-dry-runs.yml

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

0 commit comments

Comments
 (0)