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 %} |
|
how_to |
|
|
{% 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 %}
- 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 %}
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %}
- 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 %}
- 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 %}