GitHub: Secret scanning schemas
36 GitHub schemas with complete fields and constraints.
← Secret scanning operations · All schemas
Bulk create repository custom patterns — request body — body patterns item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A custom pattern to create in a bulk operation. |
end_delimiter | string | Optional | The end delimiter regex for the custom pattern. Defaults to `\z|[^0-9A-Za-z]` when not specified. Default: \z|[^0-9A-Za-z] |
must_match | array | Optional | List of regexes that the secret must match. |
must_match[] | string | Each item | |
must_not_match | array | Optional | List of regexes that the secret must not match. |
must_not_match[] | string | Each item | |
name | string | Required within parent | The name of the custom pattern. |
pattern | string | Required within parent | The regular expression of the custom pattern. |
start_delimiter | string | Optional | The start delimiter regex for the custom pattern. Defaults to `\A|[^0-9A-Za-z]` when not specified. Default: \A|[^0-9A-Za-z] |
Bulk delete repository custom patterns — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
patterns | array | Required within parent | The list of custom patterns to delete. Maximum items: 500 |
patterns[] | Model | Each item | Expand Bulk delete repository custom patterns — request body — body patterns item |
post_delete_action | string | Optional | What to do with alerts associated with the deleted patterns. `delete_alerts` permanently removes the alerts. `resolve_alerts` resolves the alerts as "pattern deleted". Defaults to `delete_alerts` when not specified. Default: delete_alerts One of: delete_alerts, resolve_alerts |
Referenced models: Bulk delete repository custom patterns — request body — body patterns item
Bulk delete repository custom patterns — request body — body patterns item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A custom pattern to delete in a bulk operation. |
custom_pattern_version | Model | Optional | Expand Update a repository custom pattern — response body — custom pattern version |
pattern_id | integer | Required within parent | The ID of the custom pattern to delete. |
Referenced models: Update a repository custom pattern — response body — custom pattern version
Create a push protection bypass — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
expire_at | JSON | Optional | |
expire_at (anyOf 1) | string | Alternative | The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time |
expire_at (anyOf 2) | null | Alternative | |
reason | string | Optional | The reason for bypassing push protection. Known values: false_positive, used_in_tests, will_fix_later |
token_type | string | Optional | The token type this bypass is for. |
Get a secret scanning alert — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
assigned_to | Model | Optional | Expand Get an issue — response body — user |
closure_request_comment | JSON | Optional | |
closure_request_comment (anyOf 1) | string | Alternative | An optional comment from the closure request author. |
closure_request_comment (anyOf 2) | null | Alternative | |
closure_request_reviewer | Model | Optional | Expand Get an issue — response body — user |
closure_request_reviewer_comment | JSON | Optional | |
closure_request_reviewer_comment (anyOf 1) | string | Alternative | An optional comment from the closure request reviewer. |
closure_request_reviewer_comment (anyOf 2) | null | Alternative | |
created_at | string | Optional | The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time Read only: true |
first_location_detected | Model | Optional | Expand Get a secret scanning alert — response body — first location detected |
has_more_locations | boolean | Optional | A boolean value representing whether or not the token in the alert was detected in more than one location. |
html_url | string | Optional | The GitHub URL of the alert resource. Format: uri Read only: true |
is_base64_encoded | JSON | Optional | |
is_base64_encoded (anyOf 1) | boolean | Alternative | A boolean value representing whether or not alert is base64 encoded |
is_base64_encoded (anyOf 2) | null | Alternative | |
locations_url | string | Optional | The REST API URL of the code locations for this alert. Format: uri |
metadata | Model | Optional | Expand Get a secret scanning alert — response body — metadata |
multi_repo | JSON | Optional | |
multi_repo (anyOf 1) | boolean | Alternative | Whether the detected secret was found in multiple repositories under the same organization or enterprise. |
multi_repo (anyOf 2) | null | Alternative | |
number | Model | Optional | Expand Get a Dependabot alert — response body — number |
provider | JSON | Optional | |
provider (anyOf 1) | string | Alternative | The provider of the secret that was detected. |
provider (anyOf 2) | null | Alternative | |
provider_slug | JSON | Optional | |
provider_slug (anyOf 1) | string | Alternative | The slug identifier for the provider of the secret that was detected. Use this value for filtering by provider with the `providers` or `exclude_providers` parameters. |
provider_slug (anyOf 2) | null | Alternative | |
publicly_leaked | JSON | Optional | |
publicly_leaked (anyOf 1) | boolean | Alternative | Whether the detected secret was publicly leaked. |
publicly_leaked (anyOf 2) | null | Alternative | |
push_protection_bypass_request_comment | JSON | Optional | |
push_protection_bypass_request_comment (anyOf 1) | string | Alternative | An optional comment when requesting a push protection bypass. |
push_protection_bypass_request_comment (anyOf 2) | null | Alternative | |
push_protection_bypass_request_html_url | JSON | Optional | |
push_protection_bypass_request_html_url (anyOf 1) | string | Alternative | The URL to a push protection bypass request. Format: uri |
push_protection_bypass_request_html_url (anyOf 2) | null | Alternative | |
push_protection_bypass_request_reviewer | Model | Optional | Expand Get an issue — response body — user |
push_protection_bypass_request_reviewer_comment | JSON | Optional | |
push_protection_bypass_request_reviewer_comment (anyOf 1) | string | Alternative | An optional comment when reviewing a push protection bypass. |
push_protection_bypass_request_reviewer_comment (anyOf 2) | null | Alternative | |
push_protection_bypassed | JSON | Optional | |
push_protection_bypassed (anyOf 1) | boolean | Alternative | Whether push protection was bypassed for the detected secret. |
push_protection_bypassed (anyOf 2) | null | Alternative | |
push_protection_bypassed_at | JSON | Optional | |
push_protection_bypassed_at (anyOf 1) | string | Alternative | The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time |
push_protection_bypassed_at (anyOf 2) | null | Alternative | |
push_protection_bypassed_by | Model | Optional | Expand Get an issue — response body — user |
resolution | Model | Optional | Expand Get a secret scanning alert — response body — resolution |
resolution_comment | JSON | Optional | |
resolution_comment (anyOf 1) | string | Alternative | An optional comment to resolve an alert. |
resolution_comment (anyOf 2) | null | Alternative | |
resolved_at | JSON | Optional | |
resolved_at (anyOf 1) | string | Alternative | The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time |
resolved_at (anyOf 2) | null | Alternative | |
resolved_by | Model | Optional | Expand Get an issue — response body — user |
secret | string | Optional | The secret that was detected. |
secret_type | string | Optional | The type of secret that secret scanning detected. |
secret_type_display_name | string | Optional | User-friendly name for the detected secret, matching the `secret_type`. For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." |
state | string | Optional | Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. Known values: open, resolved |
updated_at | Model | Optional | Expand Get a secret scanning alert — response body — updated at |
url | string | Optional | The REST API URL of the alert resource. Format: uri Read only: true |
validity | string | Optional | The token status as of the latest validity check. Known values: active, inactive, unknown |
Referenced models: Get a Dependabot alert — response body — number, Get a secret scanning alert — response body — updated at, Get a secret scanning alert — response body — first location detected, Get an issue — response body — user, Get a secret scanning alert — response body — metadata, Get a secret scanning alert — response body — resolution
Get a secret scanning alert — response body — first location detected
Referenced models: List locations for a secret scanning alert — response body — item details blob sha, blob url, commit sha, commit url, end column, end line, html url, path, start column, start line, List locations for a secret scanning alert — response body — item details discussion body url, List locations for a secret scanning alert — response body — item details discussion comment url, List locations for a secret scanning alert — response body — item details discussion title url, List locations for a secret scanning alert — response body — item details html url, issue body url, List locations for a secret scanning alert — response body — item details html url, issue comment url, List locations for a secret scanning alert — response body — item details html url, issue title url, List locations for a secret scanning alert — response body — item details html url, pull request body url, List locations for a secret scanning alert — response body — item details html url, pull request comment url, List locations for a secret scanning alert — response body — item details html url, pull request review url, List locations for a secret scanning alert — response body — item details html url, pull request review comment url, List locations for a secret scanning alert — response body — item details html url, pull request title url, List locations for a secret scanning alert — response body — item details blob sha, commit sha, commit url, end column, end line, page url, path, start column, start line
Get a secret scanning alert — response body — metadata
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | array | Root | A list of metadata key/value pairs associated with the secret scanning alert. Read only: true |
$[] | object | Each item | |
$[].key | string | Required within parent | The metadata key. |
$[].value | string | Required within parent | The metadata value. |
Get a secret scanning alert — response body — resolution
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | **Required when the `state` is `resolved`.** The reason for resolving the alert. Known values: false_positive, wont_fix, revoked, used_in_tests |
$ (anyOf 2) | null | Alternative |
Get a secret scanning alert — response body — updated at
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time Read only: true |
$ (anyOf 2) | null | Alternative |
Get secret scanning scan history for a repository — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
backfill_scans | array | Optional | |
backfill_scans[] | Model | Each item | Expand Get secret scanning scan history for a repository — response body — backfill scans item |
custom_pattern_backfill_scans | array | Optional | |
custom_pattern_backfill_scans[] | JSON | Each item | |
custom_pattern_backfill_scans[] (allOf 1) | Model | All variants apply | Expand Get secret scanning scan history for a repository — response body — backfill scans item |
custom_pattern_backfill_scans[] (allOf 2) | object | All variants apply | |
custom_pattern_backfill_scans[] (allOf 2).pattern_name | string | Optional | Name of the custom pattern for custom pattern scans |
custom_pattern_backfill_scans[] (allOf 2).pattern_scope | string | Optional | Level at which the custom pattern is defined, one of "repository", "organization", or "enterprise" |
generic_secrets_backfill_scans | array | Optional | |
generic_secrets_backfill_scans[] | Model | Each item | Expand Get secret scanning scan history for a repository — response body — backfill scans item |
incremental_scans | array | Optional | |
incremental_scans[] | Model | Each item | Expand Get secret scanning scan history for a repository — response body — backfill scans item |
pattern_update_scans | array | Optional | |
pattern_update_scans[] | Model | Each item | Expand Get secret scanning scan history for a repository — response body — backfill scans item |
Referenced models: Get secret scanning scan history for a repository — response body — backfill scans item
Get secret scanning scan history for a repository — response body — backfill scans item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Information on a single scan performed by secret scanning on the repository |
completed_at | JSON | Optional | |
completed_at (anyOf 1) | string | Alternative | The time that the scan was completed. Empty if the scan is running Format: date-time |
completed_at (anyOf 2) | null | Alternative | |
started_at | JSON | Optional | |
started_at (anyOf 1) | string | Alternative | The time that the scan was started. Empty if the scan is pending Format: date-time |
started_at (anyOf 2) | null | Alternative | |
status | string | Optional | The state of the scan. Either "completed", "running", "pending", "failed", or "unknown". "failed": this scan type has hit its retry limit and has been marked permanently failed. This usually resolves on its own at the next scheduled scan attempt. If "failed" persists, contact Support. "unknown": the scan is in an unrecognized or currently unhandled state. |
type | string | Optional | The type of scan |
List locations for a secret scanning alert — response body — item
Referenced models: List locations for a secret scanning alert — response body — item details blob sha, blob url, commit sha, commit url, end column, end line, html url, path, start column, start line, List locations for a secret scanning alert — response body — item details discussion body url, List locations for a secret scanning alert — response body — item details discussion comment url, List locations for a secret scanning alert — response body — item details discussion title url, List locations for a secret scanning alert — response body — item details html url, issue body url, List locations for a secret scanning alert — response body — item details html url, issue comment url, List locations for a secret scanning alert — response body — item details html url, issue title url, List locations for a secret scanning alert — response body — item details html url, pull request body url, List locations for a secret scanning alert — response body — item details html url, pull request comment url, List locations for a secret scanning alert — response body — item details html url, pull request review url, List locations for a secret scanning alert — response body — item details html url, pull request review comment url, List locations for a secret scanning alert — response body — item details html url, pull request title url, List locations for a secret scanning alert — response body — item details blob sha, commit sha, commit url, end column, end line, page url, path, start column, start line
List locations for a secret scanning alert — response body — item details blob sha, blob url, commit sha, commit url, end column, end line, html url, path, start column, start line
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. |
blob_sha | string | Required within parent | SHA-1 hash ID of the associated blob |
blob_url | string | Required within parent | The API URL to get the associated blob resource |
commit_sha | string | Required within parent | SHA-1 hash ID of the associated commit |
commit_url | string | Required within parent | The API URL to get the associated commit resource |
end_column | JSON | Required within parent | |
end_column (anyOf 1) | number | Alternative | The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII |
end_column (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
end_line | JSON | Required within parent | |
end_line (anyOf 1) | number | Alternative | Line number at which the secret ends in the file |
end_line (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
html_url | string | Optional | The GitHub URL to get the associated commit resource. Format: uri |
path | string | Required within parent | The file path in the repository |
start_column | JSON | Required within parent | |
start_column (anyOf 1) | number | Alternative | The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII |
start_column (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
start_line | JSON | Required within parent | |
start_line (anyOf 1) | number | Alternative | Line number at which the secret starts in the file |
start_line (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
List locations for a secret scanning alert — response body — item details blob sha, commit sha, commit url, end column, end line, page url, path, start column, start line
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki. |
blob_sha | string | Required within parent | SHA-1 hash ID of the associated blob |
commit_sha | string | Required within parent | SHA-1 hash ID of the associated commit |
commit_url | string | Required within parent | The GitHub URL to get the associated wiki commit |
end_column | JSON | Required within parent | |
end_column (anyOf 1) | number | Alternative | The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII. |
end_column (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
end_line | JSON | Required within parent | |
end_line (anyOf 1) | number | Alternative | Line number at which the secret ends in the file |
end_line (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
page_url | string | Required within parent | The GitHub URL to get the associated wiki page |
path | string | Required within parent | The file path of the wiki page |
start_column | JSON | Required within parent | |
start_column (anyOf 1) | number | Alternative | The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII. |
start_column (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
start_line | JSON | Required within parent | |
start_line (anyOf 1) | number | Alternative | Line number at which the secret starts in the file |
start_line (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
List locations for a secret scanning alert — response body — item details discussion body url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'discussion_body' secret scanning location type. This location type shows that a secret was detected in the body of a discussion. |
discussion_body_url | string | Required within parent | The URL to the discussion where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details discussion comment url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'discussion_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion. |
discussion_comment_url | string | Required within parent | The API URL to get the discussion comment where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details discussion title url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'discussion_title' secret scanning location type. This location type shows that a secret was detected in the title of a discussion. |
discussion_title_url | string | Required within parent | The URL to the discussion where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, issue body url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. |
html_url | string | Optional | The GitHub URL for the issue where the secret was detected. Format: uri |
issue_body_url | string | Required within parent | The API URL to get the issue where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, issue comment url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. |
html_url | string | Optional | The GitHub URL for the issue comment where the secret was detected. Format: uri |
issue_comment_url | string | Required within parent | The API URL to get the issue comment where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, issue title url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. |
html_url | string | Optional | The GitHub URL for the issue where the secret was detected. Format: uri |
issue_title_url | string | Required within parent | The API URL to get the issue where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, pull request body url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'pull_request_body' secret scanning location type. This location type shows that a secret was detected in the body of a pull request. |
html_url | string | Optional | The GitHub URL for the pull request where the secret was detected. Format: uri |
pull_request_body_url | string | Required within parent | The API URL to get the pull request where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, pull request comment url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'pull_request_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a pull request. |
html_url | string | Optional | The GitHub URL for the pull request comment where the secret was detected. Format: uri |
pull_request_comment_url | string | Required within parent | The API URL to get the pull request comment where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, pull request review comment url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'pull_request_review_comment' secret scanning location type. This location type shows that a secret was detected in a review comment on a pull request. |
html_url | string | Optional | The GitHub URL for the pull request review comment where the secret was detected. Format: uri |
pull_request_review_comment_url | string | Required within parent | The API URL to get the pull request review comment where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, pull request review url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'pull_request_review' secret scanning location type. This location type shows that a secret was detected in a review on a pull request. |
html_url | string | Optional | The GitHub URL for the pull request review where the secret was detected. Format: uri |
pull_request_review_url | string | Required within parent | The API URL to get the pull request review where the secret was detected. Format: uri |
List locations for a secret scanning alert — response body — item details html url, pull request title url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a 'pull_request_title' secret scanning location type. This location type shows that a secret was detected in the title of a pull request. |
html_url | string | Optional | The GitHub URL for the pull request where the secret was detected. Format: uri |
pull_request_title_url | string | Required within parent | The API URL to get the pull request where the secret was detected. Format: uri |
List organization pattern configurations — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A collection of secret scanning patterns and their settings related to push protection. |
custom_pattern_overrides | array | Optional | Overrides for custom patterns defined by the organization. |
custom_pattern_overrides[] | Model | Each item | Expand List organization pattern configurations — response body — custom pattern overrides item |
pattern_config_version | Model | Optional | Expand Update a repository custom pattern — response body — custom pattern version |
provider_pattern_overrides | array | Optional | Overrides for partner patterns. |
provider_pattern_overrides[] | Model | Each item | Expand List organization pattern configurations — response body — custom pattern overrides item |
Referenced models: List organization pattern configurations — response body — custom pattern overrides item, Update a repository custom pattern — response body — custom pattern version
List organization pattern configurations — response body — custom pattern overrides item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
alert_total | JSON | Optional | |
alert_total (anyOf 1) | integer | Alternative | The total number of alerts generated by this pattern. |
alert_total (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
alert_total_percentage | JSON | Optional | |
alert_total_percentage (anyOf 1) | integer | Alternative | The percentage of all alerts that this pattern represents, rounded to the nearest integer. |
alert_total_percentage (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
bypass_rate | JSON | Optional | |
bypass_rate (anyOf 1) | integer | Alternative | The percentage of blocks for this pattern that were bypassed, rounded to the nearest integer. |
bypass_rate (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
custom_pattern_version | JSON | Optional | |
custom_pattern_version (anyOf 1) | string | Alternative | The version of this pattern if it's a custom pattern. |
custom_pattern_version (anyOf 2) | null | Alternative | |
default_setting | string | Optional | The default push protection setting for this pattern. Known values: disabled, enabled |
display_name | string | Optional | The user-friendly name for the pattern. |
enterprise_setting | JSON | Optional | |
enterprise_setting (anyOf 1) | string | Alternative | The push protection setting for this pattern set at the enterprise level. Only present for partner patterns when the organization has a parent enterprise. Known values: not-set, disabled, enabled |
enterprise_setting (anyOf 2) | null | Alternative | |
false_positive_rate | JSON | Optional | |
false_positive_rate (anyOf 1) | integer | Alternative | The percentage of alerts from this pattern that are false positives, rounded to the nearest integer. |
false_positive_rate (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
false_positives | JSON | Optional | |
false_positives (anyOf 1) | integer | Alternative | The number of false positive alerts generated by this pattern. |
false_positives (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
setting | string | Optional | 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. Known values: not-set, disabled, enabled |
slug | string | Optional | The slug of the pattern. |
token_type | string | Optional | The ID of the pattern. |
List secret scanning alerts for a repository — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
state | string | Optional | One of: open, resolved |
secret_type | string | Optional | |
exclude_secret_types | string | Optional | |
exclude_providers | string | Optional | |
providers | string | Optional | |
resolution | string | Optional | |
assignee | string | Optional | |
sort | string | Optional | Default: created One of: created, updated |
direction | string | Optional | Default: desc One of: asc, desc |
page | integer | Optional | Default: 1 |
per_page | integer | Optional | Default: 30 |
before | string | Optional | |
after | string | Optional | |
validity | string | Optional | |
is_publicly_leaked | boolean | Optional | Default: false |
is_multi_repo | boolean | Optional | Default: false |
hide_secret | boolean | Optional | Default: false |
is_bypassed | boolean | Optional | |
included_metadata | string | Optional | |
owner_email_hash | string | Optional |
List secret scanning alerts for a repository — response body — item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
assigned_to | Model | Optional | Expand Get an issue — response body — user |
closure_request_comment | JSON | Optional | |
closure_request_comment (anyOf 1) | string | Alternative | An optional comment from the closure request author. |
closure_request_comment (anyOf 2) | null | Alternative | |
closure_request_reviewer | Model | Optional | Expand Get an issue — response body — user |
closure_request_reviewer_comment | JSON | Optional | |
closure_request_reviewer_comment (anyOf 1) | string | Alternative | An optional comment from the closure request reviewer. |
closure_request_reviewer_comment (anyOf 2) | null | Alternative | |
created_at | string | Optional | The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time Read only: true |
first_location_detected | Model | Optional | Expand Get a secret scanning alert — response body — first location detected |
has_more_locations | boolean | Optional | A boolean value representing whether or not the token in the alert was detected in more than one location. |
html_url | string | Optional | The GitHub URL of the alert resource. Format: uri Read only: true |
is_base64_encoded | JSON | Optional | |
is_base64_encoded (anyOf 1) | boolean | Alternative | A boolean value representing whether or not alert is base64 encoded |
is_base64_encoded (anyOf 2) | null | Alternative | |
locations_url | string | Optional | The REST API URL of the code locations for this alert. Format: uri |
multi_repo | JSON | Optional | |
multi_repo (anyOf 1) | boolean | Alternative | Whether the detected secret was found in multiple repositories under the same organization or enterprise. |
multi_repo (anyOf 2) | null | Alternative | |
number | Model | Optional | Expand Get a Dependabot alert — response body — number |
provider | JSON | Optional | |
provider (anyOf 1) | string | Alternative | The provider of the secret that was detected. |
provider (anyOf 2) | null | Alternative | |
provider_slug | JSON | Optional | |
provider_slug (anyOf 1) | string | Alternative | The slug identifier for the provider of the secret that was detected. Use this value for filtering by provider with the `providers` or `exclude_providers` parameters. |
provider_slug (anyOf 2) | null | Alternative | |
publicly_leaked | JSON | Optional | |
publicly_leaked (anyOf 1) | boolean | Alternative | Whether the detected secret was publicly leaked. |
publicly_leaked (anyOf 2) | null | Alternative | |
push_protection_bypass_request_comment | JSON | Optional | |
push_protection_bypass_request_comment (anyOf 1) | string | Alternative | An optional comment when requesting a push protection bypass. |
push_protection_bypass_request_comment (anyOf 2) | null | Alternative | |
push_protection_bypass_request_html_url | JSON | Optional | |
push_protection_bypass_request_html_url (anyOf 1) | string | Alternative | The URL to a push protection bypass request. Format: uri |
push_protection_bypass_request_html_url (anyOf 2) | null | Alternative | |
push_protection_bypass_request_reviewer | Model | Optional | Expand Get an issue — response body — user |
push_protection_bypass_request_reviewer_comment | JSON | Optional | |
push_protection_bypass_request_reviewer_comment (anyOf 1) | string | Alternative | An optional comment when reviewing a push protection bypass. |
push_protection_bypass_request_reviewer_comment (anyOf 2) | null | Alternative | |
push_protection_bypassed | JSON | Optional | |
push_protection_bypassed (anyOf 1) | boolean | Alternative | Whether push protection was bypassed for the detected secret. |
push_protection_bypassed (anyOf 2) | null | Alternative | |
push_protection_bypassed_at | JSON | Optional | |
push_protection_bypassed_at (anyOf 1) | string | Alternative | The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time |
push_protection_bypassed_at (anyOf 2) | null | Alternative | |
push_protection_bypassed_by | Model | Optional | Expand Get an issue — response body — user |
resolution | Model | Optional | Expand Get a secret scanning alert — response body — resolution |
resolution_comment | JSON | Optional | |
resolution_comment (anyOf 1) | string | Alternative | An optional comment to resolve an alert. |
resolution_comment (anyOf 2) | null | Alternative | |
resolved_at | JSON | Optional | |
resolved_at (anyOf 1) | string | Alternative | The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time |
resolved_at (anyOf 2) | null | Alternative | |
resolved_by | Model | Optional | Expand Get an issue — response body — user |
secret | string | Optional | The secret that was detected. |
secret_type | string | Optional | The type of secret that secret scanning detected. |
secret_type_display_name | string | Optional | User-friendly name for the detected secret, matching the `secret_type`. For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." |
state | string | Optional | Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. Known values: open, resolved |
updated_at | Model | Optional | Expand Get a secret scanning alert — response body — updated at |
url | string | Optional | The REST API URL of the alert resource. Format: uri Read only: true |
validity | string | Optional | The token status as of the latest validity check. Known values: active, inactive, unknown |
Referenced models: Get a Dependabot alert — response body — number, Get a secret scanning alert — response body — updated at, Get a secret scanning alert — response body — first location detected, Get an issue — response body — user, Get a secret scanning alert — response body — resolution
List secret scanning alerts for an organization — response body — item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
assigned_to | Model | Optional | Expand Get an issue — response body — user |
closure_request_comment | JSON | Optional | |
closure_request_comment (anyOf 1) | string | Alternative | An optional comment from the closure request author. |
closure_request_comment (anyOf 2) | null | Alternative | |
closure_request_reviewer | Model | Optional | Expand Get an issue — response body — user |
closure_request_reviewer_comment | JSON | Optional | |
closure_request_reviewer_comment (anyOf 1) | string | Alternative | An optional comment from the closure request reviewer. |
closure_request_reviewer_comment (anyOf 2) | null | Alternative | |
created_at | string | Optional | The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time Read only: true |
first_location_detected | Model | Optional | Expand Get a secret scanning alert — response body — first location detected |
has_more_locations | boolean | Optional | A boolean value representing whether or not the token in the alert was detected in more than one location. |
html_url | string | Optional | The GitHub URL of the alert resource. Format: uri Read only: true |
is_base64_encoded | JSON | Optional | |
is_base64_encoded (anyOf 1) | boolean | Alternative | A boolean value representing whether or not alert is base64 encoded |
is_base64_encoded (anyOf 2) | null | Alternative | |
locations_url | string | Optional | The REST API URL of the code locations for this alert. Format: uri |
multi_repo | JSON | Optional | |
multi_repo (anyOf 1) | boolean | Alternative | Whether the detected secret was found in multiple repositories in the same organization or enterprise. |
multi_repo (anyOf 2) | null | Alternative | |
number | Model | Optional | Expand Get a Dependabot alert — response body — number |
provider | JSON | Optional | |
provider (anyOf 1) | string | Alternative | The provider of the secret that was detected. |
provider (anyOf 2) | null | Alternative | |
provider_slug | JSON | Optional | |
provider_slug (anyOf 1) | string | Alternative | The slug identifier for the provider of the secret that was detected. Use this value for filtering by provider with the `providers` or `exclude_providers` parameters. |
provider_slug (anyOf 2) | null | Alternative | |
publicly_leaked | JSON | Optional | |
publicly_leaked (anyOf 1) | boolean | Alternative | Whether the secret was publicly leaked. |
publicly_leaked (anyOf 2) | null | Alternative | |
push_protection_bypass_request_comment | JSON | Optional | |
push_protection_bypass_request_comment (anyOf 1) | string | Alternative | An optional comment when requesting a push protection bypass. |
push_protection_bypass_request_comment (anyOf 2) | null | Alternative | |
push_protection_bypass_request_html_url | JSON | Optional | |
push_protection_bypass_request_html_url (anyOf 1) | string | Alternative | The URL to a push protection bypass request. Format: uri |
push_protection_bypass_request_html_url (anyOf 2) | null | Alternative | |
push_protection_bypass_request_reviewer | Model | Optional | Expand Get an issue — response body — user |
push_protection_bypass_request_reviewer_comment | JSON | Optional | |
push_protection_bypass_request_reviewer_comment (anyOf 1) | string | Alternative | An optional comment when reviewing a push protection bypass. |
push_protection_bypass_request_reviewer_comment (anyOf 2) | null | Alternative | |
push_protection_bypassed | JSON | Optional | |
push_protection_bypassed (anyOf 1) | boolean | Alternative | Whether push protection was bypassed for the detected secret. |
push_protection_bypassed (anyOf 2) | null | Alternative | |
push_protection_bypassed_at | JSON | Optional | |
push_protection_bypassed_at (anyOf 1) | string | Alternative | The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time |
push_protection_bypassed_at (anyOf 2) | null | Alternative | |
push_protection_bypassed_by | Model | Optional | Expand Get an issue — response body — user |
repository | Model | Optional | Expand List repositories for a user migration — response body — item |
resolution | Model | Optional | Expand Get a secret scanning alert — response body — resolution |
resolution_comment | JSON | Optional | |
resolution_comment (anyOf 1) | string | Alternative | The comment that was optionally added when this alert was closed |
resolution_comment (anyOf 2) | null | Alternative | |
resolved_at | JSON | Optional | |
resolved_at (anyOf 1) | string | Alternative | The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Format: date-time |
resolved_at (anyOf 2) | null | Alternative | |
resolved_by | Model | Optional | Expand Get an issue — response body — user |
secret | string | Optional | The secret that was detected. |
secret_type | string | Optional | The type of secret that secret scanning detected. |
secret_type_display_name | string | Optional | User-friendly name for the detected secret, matching the `secret_type`. For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." |
state | string | Optional | Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. Known values: open, resolved |
updated_at | Model | Optional | Expand Get a secret scanning alert — response body — updated at |
url | string | Optional | The REST API URL of the alert resource. Format: uri Read only: true |
validity | string | Optional | The token status as of the latest validity check. Known values: active, inactive, unknown |
Referenced models: Get a Dependabot alert — response body — number, Get a secret scanning alert — response body — updated at, Get a secret scanning alert — response body — first location detected, Get an issue — response body — user, Get a secret scanning alert — response body — resolution, List repositories for a user migration — response body — item
Update a repository custom pattern — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | Fields to update on a custom pattern. At least one updatable field (`pattern`, `start_delimiter`, `end_delimiter`, `must_match`, or `must_not_match`) must also be provided. Only provided fields will be updated. |
custom_pattern_version | Model | Required within parent | Expand Update a repository custom pattern — response body — custom pattern version |
end_delimiter | string | Optional | The updated end delimiter regex for the custom pattern. |
must_match | array | Optional | Updated list of regexes that the secret must match. |
must_match[] | string | Each item | |
must_not_match | array | Optional | Updated list of regexes that the secret must not match. |
must_not_match[] | string | Each item | |
pattern | string | Optional | The updated regular expression of the custom pattern. |
start_delimiter | string | Optional | The updated start delimiter regex for the custom pattern. |
$ (anyOf 1) | JSON | Alternative | |
$ (anyOf 2) | JSON | Alternative | |
$ (anyOf 3) | JSON | Alternative | |
$ (anyOf 4) | JSON | Alternative | |
$ (anyOf 5) | JSON | Alternative |
Referenced models: Update a repository custom pattern — response body — custom pattern version
Update a repository custom pattern — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A custom pattern for secret scanning. |
created_at | string | Optional | The date and time the custom pattern was created in ISO 8601 format. Format: date-time |
custom_pattern_version | Model | Optional | Expand Update a repository custom pattern — response body — custom pattern version |
end_delimiter | JSON | Optional | |
end_delimiter (anyOf 1) | string | Alternative | The end delimiter regex for the custom pattern. |
end_delimiter (anyOf 2) | null | Alternative | |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | The ID of the custom pattern. |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
must_match | JSON | Optional | |
must_match (anyOf 1) | array | Alternative | List of regexes that the secret must match. |
must_match (anyOf 1)[] | string | Each item | |
must_match (anyOf 2) | null | Alternative | |
must_not_match | JSON | Optional | |
must_not_match (anyOf 1) | array | Alternative | List of regexes that the secret must not match. |
must_not_match (anyOf 1)[] | string | Each item | |
must_not_match (anyOf 2) | null | Alternative | |
name | string | Required within parent | The name of the custom pattern. |
pattern | string | Required within parent | The regular expression of the custom pattern. |
push_protection_enabled | boolean | Required within parent | Whether push protection is enabled for this custom pattern. |
slug | string | Required within parent | A URL-friendly identifier for the custom pattern, derived from its name. |
start_delimiter | JSON | Optional | |
start_delimiter (anyOf 1) | string | Alternative | The start delimiter regex for the custom pattern. |
start_delimiter (anyOf 2) | null | Alternative | |
state | string | Required within parent | The state of the custom pattern. Known values: published, unpublished |
updated_at | string | Optional | The date and time the custom pattern was last updated in ISO 8601 format. Format: date-time |
Referenced models: Update a repository custom pattern — response body — custom pattern version
Update a repository custom pattern — response body — custom pattern version
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | 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. |
$ (anyOf 2) | null | Alternative |
Update a secret scanning alert — request body — body assignee
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | The username of the user to assign to the alert. Set to `null` to unassign the alert. |
$ (anyOf 2) | null | Alternative |
Update a secret scanning alert — request body — body resolution
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | **Required when the `state` is `resolved`.** The reason for resolving the alert. One of: false_positive, wont_fix, revoked, used_in_tests |
$ (anyOf 2) | null | Alternative |
Update a secret scanning alert — request body — body resolution comment
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | An optional comment when closing or reopening an alert. Cannot be updated or deleted. |
$ (anyOf 2) | null | Alternative |