1
0
mirror of synced 2026-01-05 21:04:17 -05:00

Merge pull request #51481 from github/am-stead-14201

Secret scanning: AI-generated custom patterns are generally available - [GA] #14201
This commit is contained in:
Anne-Marie
2024-07-16 19:19:09 +01:00
committed by GitHub
8 changed files with 12 additions and 54 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 182 KiB

View File

@@ -1,5 +1,5 @@
---
title: About the regular expression generator for custom patterns
title: About generating regular expressions with AI
shortTitle: Generate regular expressions with AI
intro: 'You can define your own custom patterns to extend the capabilities of {% data variables.product.prodname_secret_scanning %} by generating one or more regular expressions for each pattern, using the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}.'
product: '{% data reusables.gated-features.secret-scanning %}'
@@ -11,13 +11,13 @@ topics:
- Advanced Security
- Secret scanning
- AI
redirect_from:
- /code-security/secret-scanning/about-the-regular-expression-generator-for-custom-patterns
---
<!--Note on the versioning above ^. This article is visible to free, pro, team users for transparency. They cannot use the feature so `fpt` is not included in the feature definition.-->
{% data reusables.rai.secret-scanning.beta-custom-pattern-regular-expression-generator %}
## About the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}
## About generating regular expressions with AI
{% data variables.product.prodname_secret_scanning_caps %} scans repositories for a predefined set of secrets from our partner program, as well as custom patterns that are user-defined. Custom patterns are formatted as regular expressions.
@@ -37,19 +37,15 @@ Some results may be quite similar, and some results may not find every instance
When you click **Use result** on a regular expression, the expression and any examples inputted will be copied over to the main custom pattern form. There, you can perform a dry run of the pattern to see how it performs across your repository or organization.{% ifversion secret-scanning-custom-pattern-ai-generated %} For more information on how to define a custom pattern for your repository or organization, see "[AUTOTITLE](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." {% endif %}
## Improving performance for the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}
## Improving performance when generating regular expressions with AI
To enhance performance and address some of the limitations of the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}, there are various measures that you can adopt. For more information on the limitations of the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}, see "[Limitations of the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}](#limitations-of-the-regular-expression-generator)."
To enhance performance and address some of the limitations of the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}, there are various measures that you can adopt. For more information on the limitations of the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}, see "[Limitations of generating regular expressions with AI](#limitations-of-generating-regular-expressions-with-ai)."
### Use the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} as a tool, not a replacement
While the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is a powerful tool to create custom patterns without you having to write regular expressions yourself, it is important to use it as a tool rather than a replacement for manual input. You should carefully validate the performance of the results by performing a dry run across your organization or repository. It's a good idea to run the pattern on a repository (or repositories) that are representative of the repositories in your organization. In some cases, it may be beneficial to modify a generated regular expression to more fully meet your needs. You remain ultimately responsible for any custom patterns you decide to use.
### Provide feedback
The {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is currently in beta. If you encounter any issues or limitations with the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}, we recommend that you provide feedback through the **Give feedback** button at the top of the generator, in the UI. This can help the developers to improve the tool and address any concerns or limitations.
## Limitations of the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}
## Limitations of generating regular expressions with AI
Depending on factors such as your input description and examples, you may experience different levels of performance when using the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}. You need to be as specific as possible with your description, and provide different types of examples of tokens that match your pattern, to be sure that the regular expression encompasses all the patterns you want {% data variables.product.prodname_secret_scanning %} to search for.

View File

@@ -45,7 +45,7 @@ For simple tokens you will usually only need to specify a secret format. The oth
### Using the regular expression generator
{% data reusables.secret-scanning.regular-expression-generator-overview %} For more information, see "[AUTOTITLE](/code-security/secret-scanning/about-the-regular-expression-generator-for-custom-patterns)" and "[AUTOTITLE](/code-security/secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai)."
{% data reusables.secret-scanning.regular-expression-generator-overview %} For more information, see "[AUTOTITLE](/code-security/secret-scanning/about-generating-regular-expressions-with-ai)" and "[AUTOTITLE](/code-security/secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai)."
{% endif %}

View File

@@ -11,9 +11,8 @@ topics:
- Secret scanning
- AI
---
{% data reusables.secret-scanning.beta-custom-pattern-regular-expression-generator %}
## Generating a regular expression for a repository using the generator
## Generating a regular expression for a repository with AI
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
@@ -27,7 +26,7 @@ topics:
{% data reusables.secret-scanning.link-to-push-protection %}
## Generating a regular expression for an organization using the generator
## Generating a regular expression for an organization with AI
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
@@ -43,4 +42,4 @@ topics:
## Further reading
* "[AUTOTITLE](/code-security/secret-scanning/about-the-regular-expression-generator-for-custom-patterns)"
* "[AUTOTITLE](/code-security/secret-scanning/about-generating-regular-expressions-with-ai)"

View File

@@ -19,7 +19,7 @@ children:
- /secret-scanning-partner-program
- /configuring-secret-scanning-for-your-repositories
- /defining-custom-patterns-for-secret-scanning
- /about-the-regular-expression-generator-for-custom-patterns
- /about-generating-regular-expressions-with-ai
- /generating-regular-expressions-for-custom-patterns-with-ai
- /managing-alerts-from-secret-scanning
- /secret-scanning-patterns

View File

@@ -1,18 +0,0 @@
<!--This reusable is an intentional duplicate of data/reusables/secret-scanning/beta-custom-pattern-regular-expression-generator.md. The duplicate is necessary to enforce legal review of Responsible AI content. If you are updating this content, you may also want to update data/reusables/secret-scanning/beta-custom-pattern-regular-expression-generator.md. -->
{% ifversion secret-scanning-custom-pattern-ai-generated %}
{% note %}
**Note:** The {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is in beta. Functionality and documentation are subject to change.
{% endnote %}
{% elsif fpt %}
{% note %}
**Note:** The {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is in beta. Functionality and documentation are subject to change. The feature is available for enterprise accounts that use {% data variables.product.prodname_GH_advanced_security %} on {% data variables.product.prodname_ghe_cloud %}.
{% endnote %}
{% endif %}

View File

@@ -1,18 +0,0 @@
<!--This reusable is an intentional duplicate of data/reusables/rai/secret-scanning/beta-custom-pattern-regular-expression-generator.md. The duplicate is necessary to enforce legal review of Responsible AI content. If you are updating this content, you may also want to update data/reusables/rai/secret-scanning/beta-custom-pattern-regular-expression-generator.md. -->
{% ifversion secret-scanning-custom-pattern-ai-generated %}
{% note %}
**Note:** The {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is in beta. Functionality and documentation are subject to change.
{% endnote %}
{% elsif fpt %}
{% note %}
**Note:** The {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is in beta. Functionality and documentation are subject to change. The feature is available for enterprise accounts that use {% data variables.product.prodname_GH_advanced_security %} on {% data variables.product.prodname_ghe_cloud %}.
{% endnote %}
{% endif %}

View File

@@ -9,4 +9,3 @@ user_alerts_caps: >-
alerts: 'secret scanning alerts'
alerts_caps: 'Secret scanning alerts'
custom-pattern-regular-expression-generator: 'regular expression generator'
copilot-secret-scanning: 'Copilot Secret Scanning'