Skip to content

List organization pattern configurations

GET
/orgs/{org}/secret-scanning/pattern-configurations

Lists the secret scanning pattern configurations for an organization.

Personal access tokens (classic) need the read:org scope to use this endpoint.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

Response

Media type application/json
Secret scanning pattern configuration

A collection of secret scanning patterns and their settings related to push protection.

object
pattern_config_version

The version of the entity. This is used to confirm you’re updating the current version of the entity and mitigate unintentionally overriding someone else’s update.

string
nullable
provider_pattern_overrides

Overrides for partner patterns.

Array<object>
object
token_type

The ID of the pattern.

string
custom_pattern_version

The version of this pattern if it’s a custom pattern.

string
nullable
slug

The slug of the pattern.

string
display_name

The user-friendly name for the pattern.

string
alert_total

The total number of alerts generated by this pattern.

integer
alert_total_percentage

The percentage of all alerts that this pattern represents, rounded to the nearest integer.

integer
false_positives

The number of false positive alerts generated by this pattern.

integer
false_positive_rate

The percentage of alerts from this pattern that are false positives, rounded to the nearest integer.

integer
bypass_rate

The percentage of blocks for this pattern that were bypassed, rounded to the nearest integer.

integer
default_setting

The default push protection setting for this pattern.

string
Allowed values: disabled enabled
enterprise_setting

The push protection setting for this pattern set at the enterprise level. Only present for partner patterns when the organization has a parent enterprise.

string
nullable
Allowed values: not-set disabled enabled
setting

The current push protection setting for this pattern. If this is not-set, then it inherits either the enterprise setting if it exists or the default setting.

string
Allowed values: not-set disabled enabled
custom_pattern_overrides

Overrides for custom patterns defined by the organization.

Array<object>
object
token_type

The ID of the pattern.

string
custom_pattern_version

The version of this pattern if it’s a custom pattern.

string
nullable
slug

The slug of the pattern.

string
display_name

The user-friendly name for the pattern.

string
alert_total

The total number of alerts generated by this pattern.

integer
alert_total_percentage

The percentage of all alerts that this pattern represents, rounded to the nearest integer.

integer
false_positives

The number of false positive alerts generated by this pattern.

integer
false_positive_rate

The percentage of alerts from this pattern that are false positives, rounded to the nearest integer.

integer
bypass_rate

The percentage of blocks for this pattern that were bypassed, rounded to the nearest integer.

integer
default_setting

The default push protection setting for this pattern.

string
Allowed values: disabled enabled
enterprise_setting

The push protection setting for this pattern set at the enterprise level. Only present for partner patterns when the organization has a parent enterprise.

string
nullable
Allowed values: not-set disabled enabled
setting

The current push protection setting for this pattern. If this is not-set, then it inherits either the enterprise setting if it exists or the default setting.

string
Allowed values: not-set disabled enabled
Examples
Example default
{
"pattern_config_version": "0ujsswThIGTUYm2K8FjOOfXtY1K",
"provider_pattern_overrides": [
{
"token_type": "GITHUB_PERSONAL_ACCESS_TOKEN",
"slug": "github_personal_access_token_legacy_v2",
"display_name": "GitHub Personal Access Token (Legacy v2)",
"alert_total": 15,
"alert_total_percentage": 36,
"false_positives": 2,
"false_positive_rate": 13,
"bypass_rate": 13,
"default_setting": "enabled",
"setting": "enabled",
"enterprise_setting": "enabled"
}
],
"custom_pattern_overrides": [
{
"token_type": "cp_2",
"custom_pattern_version": "0ujsswThIGTUYm2K8FjOOfXtY1K",
"slug": "custom-api-key",
"display_name": "Custom API Key",
"alert_total": 15,
"alert_total_percentage": 36,
"false_positives": 3,
"false_positive_rate": 20,
"bypass_rate": 20,
"default_setting": "disabled",
"setting": "enabled"
}
]
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}