From 7a818fcf70c3a04ebaf3637856004d9b4f64719e Mon Sep 17 00:00:00 2001 From: Ganesh Sittampalam Date: Thu, 21 Nov 2024 09:48:42 +0000 Subject: [PATCH 1/2] Make content exclusions carveout a bit clearer (#53223) Co-authored-by: hubwriter --- data/reusables/copilot/content-exclusion-limitations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/copilot/content-exclusion-limitations.md b/data/reusables/copilot/content-exclusion-limitations.md index 23198e717179..d86b19458f71 100644 --- a/data/reusables/copilot/content-exclusion-limitations.md +++ b/data/reusables/copilot/content-exclusion-limitations.md @@ -1 +1 @@ -It's possible that {% data variables.product.prodname_copilot_short %} may use semantic information from an excluded file if the information is provided by the IDE in a non-excluded file. Examples of such content include type information and hover-over definitions for symbols used in code. +It's possible that {% data variables.product.prodname_copilot_short %} may use semantic information from an excluded file if the information is provided by the IDE indirectly. Examples of such content include type information and hover-over definitions for symbols used in code, as well as general project properties such as build configuration information. From c37617c098a050743657222cc3ced56168b342d9 Mon Sep 17 00:00:00 2001 From: mc <42146119+mchammer01@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:05:20 +0000 Subject: [PATCH 2/2] Secret scanning: review feature name and language in secret scanning - regular expression generator articles (#53137) Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> --- ...-patterns-with-copilot-secret-scanning.md} | 14 ++++++++------ .../copilot-secret-scanning/index.md | 5 +++-- ...r.md => responsible-ai-regex-generator.md} | 19 ++++++++++--------- .../introduction/about-secret-scanning.md | 2 +- ...ing-custom-patterns-for-secret-scanning.md | 6 +++--- ...ret-scanning-add-custom-pattern-details.md | 2 +- .../regular-expression-generator-overview.md | 2 +- 7 files changed, 27 insertions(+), 23 deletions(-) rename content/code-security/secret-scanning/copilot-secret-scanning/{generating-regular-expressions-for-custom-patterns-with-ai.md => generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning.md} (72%) rename content/code-security/secret-scanning/copilot-secret-scanning/{responsible-use-ai-regex-generator.md => responsible-ai-regex-generator.md} (65%) diff --git a/content/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai.md b/content/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning.md similarity index 72% rename from content/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai.md rename to content/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning.md index fa3f4072df90..878725023b6a 100644 --- a/content/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai.md +++ b/content/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning.md @@ -1,8 +1,9 @@ --- -title: Generating regular expressions for custom patterns with AI -shortTitle: Use the regular expression generator -intro: 'You can use the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} to generate regular expressions for custom patterns. The generator uses an AI model to generate expressions that match your input, and optionally example strings.' +title: Generating regular expressions for custom patterns with Copilot secret scanning +shortTitle: Regular expression generator +intro: 'You can use {% data variables.secret-scanning.copilot-secret-scanning %}''s {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} to write regular expressions for custom patterns. The generator uses an AI model to generate expressions that match your input, and optionally example strings.' permissions: '{% data reusables.permissions.security-repo-enable %}' +allowTitleToDifferFromFilename: true versions: feature: secret-scanning-custom-pattern-ai-generated type: how_to @@ -14,9 +15,10 @@ topics: redirect_from: - /code-security/secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai - /code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/generating-regular-expressions-for-custom-patterns-with-ai + - /code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai --- -## Generating a regular expression for a repository with AI +## Generating a regular expression for a repository with {% data variables.secret-scanning.copilot-secret-scanning %} {% data reusables.secret-scanning.copilot-secret-scanning-expression-generator-subscription-note %} @@ -32,7 +34,7 @@ redirect_from: {% data reusables.secret-scanning.link-to-push-protection %} -## Generating a regular expression for an organization with AI +## Generating a regular expression for an organization with {% data variables.secret-scanning.copilot-secret-scanning %} {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} @@ -48,4 +50,4 @@ redirect_from: ## Further reading -* "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/responsible-use-ai-regex-generator)" +* "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/responsible-ai-regex-generator)" diff --git a/content/code-security/secret-scanning/copilot-secret-scanning/index.md b/content/code-security/secret-scanning/copilot-secret-scanning/index.md index 0faba154b80c..02a38b43faa5 100644 --- a/content/code-security/secret-scanning/copilot-secret-scanning/index.md +++ b/content/code-security/secret-scanning/copilot-secret-scanning/index.md @@ -14,8 +14,9 @@ topics: children: - /responsible-ai-generic-secrets - /enabling-ai-powered-generic-secret-detection - - /responsible-use-ai-regex-generator - - /generating-regular-expressions-for-custom-patterns-with-ai + - /responsible-ai-regex-generator + - /generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning redirect_from: - /code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/generic-secret-detection --- + diff --git a/content/code-security/secret-scanning/copilot-secret-scanning/responsible-use-ai-regex-generator.md b/content/code-security/secret-scanning/copilot-secret-scanning/responsible-ai-regex-generator.md similarity index 65% rename from content/code-security/secret-scanning/copilot-secret-scanning/responsible-use-ai-regex-generator.md rename to content/code-security/secret-scanning/copilot-secret-scanning/responsible-ai-regex-generator.md index 8a595b4045b7..1886f3514ecc 100644 --- a/content/code-security/secret-scanning/copilot-secret-scanning/responsible-use-ai-regex-generator.md +++ b/content/code-security/secret-scanning/copilot-secret-scanning/responsible-ai-regex-generator.md @@ -1,5 +1,5 @@ --- -title: Responsible use of AI to define regular expressions +title: Responsible generation of regular expressions with Copilot secret scanning shortTitle: Generate regular expressions with AI intro: 'Learn about the capabilities and limitations of the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} in helping you to define custom patterns to extend the capabilities of {% data variables.product.prodname_secret_scanning %}.' product: '{% data reusables.gated-features.copilot-secret-scanning %}' @@ -18,17 +18,18 @@ redirect_from: - /code-security/secret-scanning/about-generating-regular-expressions-with-ai - /code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/about-generating-regular-expressions-with-ai - /code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/responsible-use-ai-regex-generator + - /code-security/secret-scanning/copilot-secret-scanning/responsible-use-ai-regex-generator --- -## About generating regular expressions with AI +## About generating regular expressions with {% data variables.secret-scanning.copilot-secret-scanning %} {% 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. {% data reusables.rai.secret-scanning.copilot-secret-scanning-expression-generator-subscription-note %} -Regular expressions can be challenging for people to write. The {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} makes it possible for you to define your custom patterns without knowledge of regular expressions. Within the existing custom pattern page, you can launch a generative AI experience where you input a text description of what pattern you would like to detect, include optional example strings that should be detected, and get matching regular expressions in return. +Regular expressions can be challenging for people to write. {% data variables.secret-scanning.copilot-secret-scanning %}'s {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} makes it possible for you to define your custom patterns without knowledge of regular expressions. Within the existing custom pattern page, you can launch a generative AI experience where you input a text description of what pattern you would like to detect, include optional example strings that should be detected, and get matching regular expressions in return. ### Input processing @@ -36,7 +37,7 @@ Users input a text description of what they would like to detect, and optional e ### Response generation and output formatting -The {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} uses GPT-3.5-Turbo and the {% data variables.product.prodname_copilot %} API to generate regular expressions that match your input. +{% data variables.secret-scanning.copilot-secret-scanning %}'s {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} uses GPT-3.5-Turbo and the {% data variables.product.prodname_copilot %} API to generate regular expressions that match your input. The model returns up to three regular expressions for you to review. You can click on the regular expression to get an AI-generated plain language description of the regular expression. @@ -46,25 +47,25 @@ When you click **Use result** on a regular expression, the expression and any ex ## 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 generating regular expressions with AI](#limitations-of-generating-regular-expressions-with-ai)." +To enhance performance and address some of the limitations of {% data variables.secret-scanning.copilot-secret-scanning %}'s {% 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 +### Use {% data variables.secret-scanning.copilot-secret-scanning %}'s {% 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. ## 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. +Depending on factors such as your input description and examples, you may experience different levels of performance when using {% data variables.secret-scanning.copilot-secret-scanning %}'s {% 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. Also, the model used by the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} has been trained on natural language content written predominantly in English. As a result, you may notice differing performance when providing the generator with natural language input prompts in languages other than English. -Note that the {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is only suitable for creating regular expressions to detect structured patterns. +Note that {% data variables.secret-scanning.copilot-secret-scanning %}'s {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} is only suitable for creating regular expressions to detect structured patterns. {% ifversion secret-scanning-custom-pattern-ai-generated %} ## Next steps -* [AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai) +* [AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning) * [AUTOTITLE](/code-security/secret-scanning/managing-alerts-from-secret-scanning) {% endif %} diff --git a/content/code-security/secret-scanning/introduction/about-secret-scanning.md b/content/code-security/secret-scanning/introduction/about-secret-scanning.md index e78e04c421e9..37bdb1a8eb94 100644 --- a/content/code-security/secret-scanning/introduction/about-secret-scanning.md +++ b/content/code-security/secret-scanning/introduction/about-secret-scanning.md @@ -121,7 +121,7 @@ Define your own patterns for secrets used by your organization that {% data vari ### {% data variables.secret-scanning.copilot-secret-scanning %} * **{% data variables.secret-scanning.generic-secret-detection-caps %}**: Leverage {% data variables.product.prodname_secret_scanning %}'s AI capabilities to detect unstructured secrets, such as passwords, in your repository. For more information, see "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/responsible-ai-generic-secrets)."{% ifversion secret-scanning-custom-pattern-ai-generated %} -* **{% data variables.secret-scanning.custom-pattern-regular-expression-generator-caps %}**: Leverage {% data variables.product.prodname_secret_scanning %}'s AI capabilities to generate regular expressions that will capture all your custom patterns. For more information, see "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/responsible-use-ai-regex-generator).{% endif %} +* **{% data variables.secret-scanning.custom-pattern-regular-expression-generator-caps %}**: Leverage {% data variables.product.prodname_secret_scanning %}'s AI capabilities to generate regular expressions that will capture all your custom patterns. For more information, see "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/responsible-ai-regex-generator).{% endif %} {% endif %} diff --git a/content/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/defining-custom-patterns-for-secret-scanning.md b/content/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/defining-custom-patterns-for-secret-scanning.md index efc601953068..f4b2074b8e48 100644 --- a/content/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/defining-custom-patterns-for-secret-scanning.md +++ b/content/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/defining-custom-patterns-for-secret-scanning.md @@ -30,7 +30,7 @@ You can specify custom patterns for {% data variables.product.prodname_secret_sc {% data variables.product.prodname_secret_scanning_caps %} uses the [Hyperscan library](https://github.com/intel/hyperscan) and only supports Hyperscan regex constructs, which are a subset of PCRE syntax. Hyperscan option modifiers are not supported. For more information on Hyperscan pattern constructs, see "[Pattern support](http://intel.github.io/hyperscan/dev-reference/compilation.html#pattern-support)" in the Hyperscan documentation. -{% ifversion secret-scanning-custom-pattern-ai-generated %}Regular expressions can be entered manually or generated using the regular expression generator. +{% ifversion secret-scanning-custom-pattern-ai-generated %}Regular expressions can be entered manually or generated using {% data variables.secret-scanning.copilot-secret-scanning %}'s {% data variables.secret-scanning.custom-pattern-regular-expression-generator %}. ### Regular expression syntax for manually defining custom patterns {% endif %} @@ -45,9 +45,9 @@ For simple tokens you will usually only need to specify a secret format. The oth {% ifversion secret-scanning-custom-pattern-ai-generated %} -### Using the regular expression generator +### Using {% data variables.secret-scanning.copilot-secret-scanning %}'s {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} -{% data reusables.secret-scanning.regular-expression-generator-overview %} For more information, see "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/responsible-use-ai-regex-generator)" and "[AUTOTITLE](/code-security/secret-scanning/copilot-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/copilot-secret-scanning/responsible-ai-regex-generator)" and "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning)." {% endif %} diff --git a/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md b/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md index 82e5c7999e08..2a6883520a83 100644 --- a/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md +++ b/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md @@ -1,6 +1,6 @@ 1. Enter the details for your new custom pattern. You must at least provide the name for your pattern, and a regular expression for the format of your secret pattern. 1. In the "Pattern name" field, type a name for your pattern. - 1. In the "Secret format" field, type a regular expression for the format of your secret pattern.{% ifversion secret-scanning-custom-pattern-ai-generated %} Alternatively, you can use the generator to generate a regular expression for you. For more information, see "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-ai)."{% endif %} + 1. In the "Secret format" field, type a regular expression for the format of your secret pattern.{% ifversion secret-scanning-custom-pattern-ai-generated %} Alternatively, you can use the generator to generate a regular expression for you. For more information, see "[AUTOTITLE](/code-security/secret-scanning/copilot-secret-scanning/generating-regular-expressions-for-custom-patterns-with-copilot-secret-scanning)."{% endif %} 1. You can click **More options {% octicon "chevron-down" aria-label="down" %}** to provide other surrounding content or additional match requirements for the secret format. 1. Provide a sample test string to make sure your configuration is matching the patterns you expect. diff --git a/data/reusables/secret-scanning/regular-expression-generator-overview.md b/data/reusables/secret-scanning/regular-expression-generator-overview.md index 9256124a4a33..6659f4177ec0 100644 --- a/data/reusables/secret-scanning/regular-expression-generator-overview.md +++ b/data/reusables/secret-scanning/regular-expression-generator-overview.md @@ -1 +1 @@ -The generator uses a generative AI model where you input a text description of the type of pattern you would like to detect, including optional example strings that should be detected. The model returns up to three regular expressions for you to review. +{% data variables.secret-scanning.copilot-secret-scanning %}'s {% data variables.secret-scanning.custom-pattern-regular-expression-generator %} uses a generative AI model where you input a text description of the type of pattern you would like to detect, including optional example strings that should be detected. The model returns up to three regular expressions for you to review.