Skip to content

Latest commit

 

History

History
51 lines (42 loc) · 2.77 KB

generating-regular-expressions-for-custom-patterns-with-ai.md

File metadata and controls

51 lines (42 loc) · 2.77 KB
title shortTitle intro permissions versions type topics redirect_from
Generating regular expressions for custom patterns with AI
Use the regular expression generator
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.
{% data reusables.permissions.security-repo-enable %}
feature
secret-scanning-custom-pattern-ai-generated
how_to
Advanced Security
Secret scanning
AI
Copilot
/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

Generating a regular expression for a repository with AI

{% data reusables.secret-scanning.copilot-secret-scanning-expression-generator-subscription-note %}

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %} {% data reusables.repositories.navigate-to-ghas-settings %} {% data reusables.advanced-security.secret-scanning-new-custom-pattern %} {% data reusables.advanced-security.secret-scanning-generate-regular-expression-custom-pattern %}

  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. {% data reusables.advanced-security.secret-scanning-dry-run-results %} {% data reusables.advanced-security.secret-scanning-create-custom-pattern %}

{% data reusables.secret-scanning.link-to-push-protection %}

Generating a regular expression for an organization with AI

{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %}

  1. In the "Security" section of the sidebar, click {% octicon "codescan" aria-hidden="true" %} Code security then Global settings. {% data reusables.advanced-security.secret-scanning-new-custom-pattern-org %} {% data reusables.advanced-security.secret-scanning-generate-regular-expression-custom-pattern %}
  2. When you're ready to test your new custom pattern, to identify matches in selected repositories without creating alerts, click Save and dry run. {% data reusables.advanced-security.secret-scanning-dry-run-select-repos %} {% data reusables.advanced-security.secret-scanning-dry-run-results %} {% data reusables.advanced-security.secret-scanning-create-custom-pattern %}

{% data reusables.secret-scanning.link-to-push-protection %}

Further reading