Skip to content

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

FieldTypePresenceDescription and constraints
$objectRootA custom pattern to create in a bulk operation.
end_delimiterstringOptionalThe end delimiter regex for the custom pattern.
Defaults to `\z|[^0-9A-Za-z]` when not specified.
Default: \z|[^0-9A-Za-z]
must_matcharrayOptionalList of regexes that the secret must match.
must_match[]stringEach item
must_not_matcharrayOptionalList of regexes that the secret must not match.
must_not_match[]stringEach item
namestringRequired within parentThe name of the custom pattern.
patternstringRequired within parentThe regular expression of the custom pattern.
start_delimiterstringOptionalThe 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

FieldTypePresenceDescription and constraints
$objectRoot
patternsarrayRequired within parentThe list of custom patterns to delete.
Maximum items: 500
patterns[]ModelEach itemExpand Bulk delete repository custom patterns — request body — body patterns item
post_delete_actionstringOptionalWhat 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

FieldTypePresenceDescription and constraints
$objectRootA custom pattern to delete in a bulk operation.
custom_pattern_versionModelOptionalExpand Update a repository custom pattern — response body — custom pattern version
pattern_idintegerRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRoot
expire_atJSONOptional
expire_at (anyOf 1)stringAlternativeThe time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
expire_at (anyOf 2)nullAlternative
reasonstringOptionalThe reason for bypassing push protection.
Known values: false_positive, used_in_tests, will_fix_later
token_typestringOptionalThe token type this bypass is for.

Get a secret scanning alert — response body

FieldTypePresenceDescription and constraints
$objectRoot
assigned_toModelOptionalExpand Get an issue — response body — user
closure_request_commentJSONOptional
closure_request_comment (anyOf 1)stringAlternativeAn optional comment from the closure request author.
closure_request_comment (anyOf 2)nullAlternative
closure_request_reviewerModelOptionalExpand Get an issue — response body — user
closure_request_reviewer_commentJSONOptional
closure_request_reviewer_comment (anyOf 1)stringAlternativeAn optional comment from the closure request reviewer.
closure_request_reviewer_comment (anyOf 2)nullAlternative
created_atstringOptionalThe time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
first_location_detectedModelOptionalExpand Get a secret scanning alert — response body — first location detected
has_more_locationsbooleanOptionalA boolean value representing whether or not the token in the alert was detected in more than one location.
html_urlstringOptionalThe GitHub URL of the alert resource.
Format: uri
Read only: true
is_base64_encodedJSONOptional
is_base64_encoded (anyOf 1)booleanAlternativeA boolean value representing whether or not alert is base64 encoded
is_base64_encoded (anyOf 2)nullAlternative
locations_urlstringOptionalThe REST API URL of the code locations for this alert.
Format: uri
metadataModelOptionalExpand Get a secret scanning alert — response body — metadata
multi_repoJSONOptional
multi_repo (anyOf 1)booleanAlternativeWhether the detected secret was found in multiple repositories under the same organization or enterprise.
multi_repo (anyOf 2)nullAlternative
numberModelOptionalExpand Get a Dependabot alert — response body — number
providerJSONOptional
provider (anyOf 1)stringAlternativeThe provider of the secret that was detected.
provider (anyOf 2)nullAlternative
provider_slugJSONOptional
provider_slug (anyOf 1)stringAlternativeThe 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)nullAlternative
publicly_leakedJSONOptional
publicly_leaked (anyOf 1)booleanAlternativeWhether the detected secret was publicly leaked.
publicly_leaked (anyOf 2)nullAlternative
push_protection_bypass_request_commentJSONOptional
push_protection_bypass_request_comment (anyOf 1)stringAlternativeAn optional comment when requesting a push protection bypass.
push_protection_bypass_request_comment (anyOf 2)nullAlternative
push_protection_bypass_request_html_urlJSONOptional
push_protection_bypass_request_html_url (anyOf 1)stringAlternativeThe URL to a push protection bypass request.
Format: uri
push_protection_bypass_request_html_url (anyOf 2)nullAlternative
push_protection_bypass_request_reviewerModelOptionalExpand Get an issue — response body — user
push_protection_bypass_request_reviewer_commentJSONOptional
push_protection_bypass_request_reviewer_comment (anyOf 1)stringAlternativeAn optional comment when reviewing a push protection bypass.
push_protection_bypass_request_reviewer_comment (anyOf 2)nullAlternative
push_protection_bypassedJSONOptional
push_protection_bypassed (anyOf 1)booleanAlternativeWhether push protection was bypassed for the detected secret.
push_protection_bypassed (anyOf 2)nullAlternative
push_protection_bypassed_atJSONOptional
push_protection_bypassed_at (anyOf 1)stringAlternativeThe time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
push_protection_bypassed_at (anyOf 2)nullAlternative
push_protection_bypassed_byModelOptionalExpand Get an issue — response body — user
resolutionModelOptionalExpand Get a secret scanning alert — response body — resolution
resolution_commentJSONOptional
resolution_comment (anyOf 1)stringAlternativeAn optional comment to resolve an alert.
resolution_comment (anyOf 2)nullAlternative
resolved_atJSONOptional
resolved_at (anyOf 1)stringAlternativeThe time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
resolved_at (anyOf 2)nullAlternative
resolved_byModelOptionalExpand Get an issue — response body — user
secretstringOptionalThe secret that was detected.
secret_typestringOptionalThe type of secret that secret scanning detected.
secret_type_display_namestringOptionalUser-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)."
statestringOptionalSets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.
Known values: open, resolved
updated_atModelOptionalExpand Get a secret scanning alert — response body — updated at
urlstringOptionalThe REST API URL of the alert resource.
Format: uri
Read only: true
validitystringOptionalThe 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

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)JSONAlternativeDetails on the location where the token was initially detected. This can be a commit, wiki commit, issue, discussion, pull request.
$ (anyOf 1) (anyOf 1)ModelAlternativeExpand 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
$ (anyOf 1) (anyOf 2)ModelAlternativeExpand 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
$ (anyOf 1) (anyOf 3)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, issue title url
$ (anyOf 1) (anyOf 4)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, issue body url
$ (anyOf 1) (anyOf 5)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, issue comment url
$ (anyOf 1) (anyOf 6)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details discussion title url
$ (anyOf 1) (anyOf 7)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details discussion body url
$ (anyOf 1) (anyOf 8)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details discussion comment url
$ (anyOf 1) (anyOf 9)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request title url
$ (anyOf 1) (anyOf 10)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request body url
$ (anyOf 1) (anyOf 11)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request comment url
$ (anyOf 1) (anyOf 12)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request review url
$ (anyOf 1) (anyOf 13)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request review comment url
$ (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$arrayRootA list of metadata key/value pairs associated with the secret scanning alert.
Read only: true
$[]objectEach item
$[].keystringRequired within parentThe metadata key.
$[].valuestringRequired within parentThe metadata value.

Get a secret scanning alert — response body — resolution

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternative**Required when the `state` is `resolved`.** The reason for resolving the alert.
Known values: false_positive, wont_fix, revoked, used_in_tests
$ (anyOf 2)nullAlternative

Get a secret scanning alert — response body — updated at

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeThe time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
$ (anyOf 2)nullAlternative

Get secret scanning scan history for a repository — response body

FieldTypePresenceDescription and constraints
$objectRoot
backfill_scansarrayOptional
backfill_scans[]ModelEach itemExpand Get secret scanning scan history for a repository — response body — backfill scans item
custom_pattern_backfill_scansarrayOptional
custom_pattern_backfill_scans[]JSONEach item
custom_pattern_backfill_scans[] (allOf 1)ModelAll variants applyExpand Get secret scanning scan history for a repository — response body — backfill scans item
custom_pattern_backfill_scans[] (allOf 2)objectAll variants apply
custom_pattern_backfill_scans[] (allOf 2).pattern_namestringOptionalName of the custom pattern for custom pattern scans
custom_pattern_backfill_scans[] (allOf 2).pattern_scopestringOptionalLevel at which the custom pattern is defined, one of "repository", "organization", or "enterprise"
generic_secrets_backfill_scansarrayOptional
generic_secrets_backfill_scans[]ModelEach itemExpand Get secret scanning scan history for a repository — response body — backfill scans item
incremental_scansarrayOptional
incremental_scans[]ModelEach itemExpand Get secret scanning scan history for a repository — response body — backfill scans item
pattern_update_scansarrayOptional
pattern_update_scans[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootInformation on a single scan performed by secret scanning on the repository
completed_atJSONOptional
completed_at (anyOf 1)stringAlternativeThe time that the scan was completed. Empty if the scan is running
Format: date-time
completed_at (anyOf 2)nullAlternative
started_atJSONOptional
started_at (anyOf 1)stringAlternativeThe time that the scan was started. Empty if the scan is pending
Format: date-time
started_at (anyOf 2)nullAlternative
statusstringOptionalThe 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.
typestringOptionalThe type of scan

List locations for a secret scanning alert — response body — item

FieldTypePresenceDescription and constraints
$objectRoot
detailsJSONOptional
details (anyOf 1)ModelAlternativeExpand 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
details (anyOf 2)ModelAlternativeExpand 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
details (anyOf 3)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, issue title url
details (anyOf 4)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, issue body url
details (anyOf 5)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, issue comment url
details (anyOf 6)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details discussion title url
details (anyOf 7)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details discussion body url
details (anyOf 8)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details discussion comment url
details (anyOf 9)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request title url
details (anyOf 10)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request body url
details (anyOf 11)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request comment url
details (anyOf 12)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request review url
details (anyOf 13)ModelAlternativeExpand List locations for a secret scanning alert — response body — item details html url, pull request review comment url
typestringOptionalThe location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found.
Known values: commit, wiki_commit, issue_title, issue_body, issue_comment, discussion_title, discussion_body, discussion_comment, pull_request_title, pull_request_body, pull_request_comment, pull_request_review, pull_request_review_comment

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

FieldTypePresenceDescription and constraints
$objectRootRepresents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository.
blob_shastringRequired within parentSHA-1 hash ID of the associated blob
blob_urlstringRequired within parentThe API URL to get the associated blob resource
commit_shastringRequired within parentSHA-1 hash ID of the associated commit
commit_urlstringRequired within parentThe API URL to get the associated commit resource
end_columnJSONRequired within parent
end_column (anyOf 1)numberAlternativeThe column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII
end_column (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
end_lineJSONRequired within parent
end_line (anyOf 1)numberAlternativeLine number at which the secret ends in the file
end_line (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
html_urlstringOptionalThe GitHub URL to get the associated commit resource.
Format: uri
pathstringRequired within parentThe file path in the repository
start_columnJSONRequired within parent
start_column (anyOf 1)numberAlternativeThe column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII
start_column (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
start_lineJSONRequired within parent
start_line (anyOf 1)numberAlternativeLine number at which the secret starts in the file
start_line (anyOf 2)stringAlternativePattern: ^-?[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

FieldTypePresenceDescription and constraints
$objectRootRepresents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki.
blob_shastringRequired within parentSHA-1 hash ID of the associated blob
commit_shastringRequired within parentSHA-1 hash ID of the associated commit
commit_urlstringRequired within parentThe GitHub URL to get the associated wiki commit
end_columnJSONRequired within parent
end_column (anyOf 1)numberAlternativeThe column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII.
end_column (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
end_lineJSONRequired within parent
end_line (anyOf 1)numberAlternativeLine number at which the secret ends in the file
end_line (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
page_urlstringRequired within parentThe GitHub URL to get the associated wiki page
pathstringRequired within parentThe file path of the wiki page
start_columnJSONRequired within parent
start_column (anyOf 1)numberAlternativeThe column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII.
start_column (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
start_lineJSONRequired within parent
start_line (anyOf 1)numberAlternativeLine number at which the secret starts in the file
start_line (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

List locations for a secret scanning alert — response body — item details discussion body url

FieldTypePresenceDescription and constraints
$objectRootRepresents a 'discussion_body' secret scanning location type. This location type shows that a secret was detected in the body of a discussion.
discussion_body_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents a 'discussion_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion.
discussion_comment_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents a 'discussion_title' secret scanning location type. This location type shows that a secret was detected in the title of a discussion.
discussion_title_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue.
html_urlstringOptionalThe GitHub URL for the issue where the secret was detected.
Format: uri
issue_body_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue.
html_urlstringOptionalThe GitHub URL for the issue comment where the secret was detected.
Format: uri
issue_comment_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue.
html_urlstringOptionalThe GitHub URL for the issue where the secret was detected.
Format: uri
issue_title_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents 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_urlstringOptionalThe GitHub URL for the pull request where the secret was detected.
Format: uri
pull_request_body_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents 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_urlstringOptionalThe GitHub URL for the pull request comment where the secret was detected.
Format: uri
pull_request_comment_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents 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_urlstringOptionalThe GitHub URL for the pull request review comment where the secret was detected.
Format: uri
pull_request_review_comment_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents 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_urlstringOptionalThe GitHub URL for the pull request review where the secret was detected.
Format: uri
pull_request_review_urlstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootRepresents 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_urlstringOptionalThe GitHub URL for the pull request where the secret was detected.
Format: uri
pull_request_title_urlstringRequired within parentThe API URL to get the pull request where the secret was detected.
Format: uri

List organization pattern configurations — response body

FieldTypePresenceDescription and constraints
$objectRootA collection of secret scanning patterns and their settings related to push protection.
custom_pattern_overridesarrayOptionalOverrides for custom patterns defined by the organization.
custom_pattern_overrides[]ModelEach itemExpand List organization pattern configurations — response body — custom pattern overrides item
pattern_config_versionModelOptionalExpand Update a repository custom pattern — response body — custom pattern version
provider_pattern_overridesarrayOptionalOverrides for partner patterns.
provider_pattern_overrides[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRoot
alert_totalJSONOptional
alert_total (anyOf 1)integerAlternativeThe total number of alerts generated by this pattern.
alert_total (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
alert_total_percentageJSONOptional
alert_total_percentage (anyOf 1)integerAlternativeThe percentage of all alerts that this pattern represents, rounded to the nearest integer.
alert_total_percentage (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
bypass_rateJSONOptional
bypass_rate (anyOf 1)integerAlternativeThe percentage of blocks for this pattern that were bypassed, rounded to the nearest integer.
bypass_rate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
custom_pattern_versionJSONOptional
custom_pattern_version (anyOf 1)stringAlternativeThe version of this pattern if it's a custom pattern.
custom_pattern_version (anyOf 2)nullAlternative
default_settingstringOptionalThe default push protection setting for this pattern.
Known values: disabled, enabled
display_namestringOptionalThe user-friendly name for the pattern.
enterprise_settingJSONOptional
enterprise_setting (anyOf 1)stringAlternativeThe 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)nullAlternative
false_positive_rateJSONOptional
false_positive_rate (anyOf 1)integerAlternativeThe percentage of alerts from this pattern that are false positives, rounded to the nearest integer.
false_positive_rate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
false_positivesJSONOptional
false_positives (anyOf 1)integerAlternativeThe number of false positive alerts generated by this pattern.
false_positives (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
settingstringOptionalThe 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
slugstringOptionalThe slug of the pattern.
token_typestringOptionalThe ID of the pattern.

List secret scanning alerts for a repository — request body — query

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
statestringOptionalOne of: open, resolved
secret_typestringOptional
exclude_secret_typesstringOptional
exclude_providersstringOptional
providersstringOptional
resolutionstringOptional
assigneestringOptional
sortstringOptionalDefault: created
One of: created, updated
directionstringOptionalDefault: desc
One of: asc, desc
pageintegerOptionalDefault: 1
per_pageintegerOptionalDefault: 30
beforestringOptional
afterstringOptional
validitystringOptional
is_publicly_leakedbooleanOptionalDefault: false
is_multi_repobooleanOptionalDefault: false
hide_secretbooleanOptionalDefault: false
is_bypassedbooleanOptional
included_metadatastringOptional
owner_email_hashstringOptional

List secret scanning alerts for a repository — response body — item

FieldTypePresenceDescription and constraints
$objectRoot
assigned_toModelOptionalExpand Get an issue — response body — user
closure_request_commentJSONOptional
closure_request_comment (anyOf 1)stringAlternativeAn optional comment from the closure request author.
closure_request_comment (anyOf 2)nullAlternative
closure_request_reviewerModelOptionalExpand Get an issue — response body — user
closure_request_reviewer_commentJSONOptional
closure_request_reviewer_comment (anyOf 1)stringAlternativeAn optional comment from the closure request reviewer.
closure_request_reviewer_comment (anyOf 2)nullAlternative
created_atstringOptionalThe time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
first_location_detectedModelOptionalExpand Get a secret scanning alert — response body — first location detected
has_more_locationsbooleanOptionalA boolean value representing whether or not the token in the alert was detected in more than one location.
html_urlstringOptionalThe GitHub URL of the alert resource.
Format: uri
Read only: true
is_base64_encodedJSONOptional
is_base64_encoded (anyOf 1)booleanAlternativeA boolean value representing whether or not alert is base64 encoded
is_base64_encoded (anyOf 2)nullAlternative
locations_urlstringOptionalThe REST API URL of the code locations for this alert.
Format: uri
multi_repoJSONOptional
multi_repo (anyOf 1)booleanAlternativeWhether the detected secret was found in multiple repositories under the same organization or enterprise.
multi_repo (anyOf 2)nullAlternative
numberModelOptionalExpand Get a Dependabot alert — response body — number
providerJSONOptional
provider (anyOf 1)stringAlternativeThe provider of the secret that was detected.
provider (anyOf 2)nullAlternative
provider_slugJSONOptional
provider_slug (anyOf 1)stringAlternativeThe 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)nullAlternative
publicly_leakedJSONOptional
publicly_leaked (anyOf 1)booleanAlternativeWhether the detected secret was publicly leaked.
publicly_leaked (anyOf 2)nullAlternative
push_protection_bypass_request_commentJSONOptional
push_protection_bypass_request_comment (anyOf 1)stringAlternativeAn optional comment when requesting a push protection bypass.
push_protection_bypass_request_comment (anyOf 2)nullAlternative
push_protection_bypass_request_html_urlJSONOptional
push_protection_bypass_request_html_url (anyOf 1)stringAlternativeThe URL to a push protection bypass request.
Format: uri
push_protection_bypass_request_html_url (anyOf 2)nullAlternative
push_protection_bypass_request_reviewerModelOptionalExpand Get an issue — response body — user
push_protection_bypass_request_reviewer_commentJSONOptional
push_protection_bypass_request_reviewer_comment (anyOf 1)stringAlternativeAn optional comment when reviewing a push protection bypass.
push_protection_bypass_request_reviewer_comment (anyOf 2)nullAlternative
push_protection_bypassedJSONOptional
push_protection_bypassed (anyOf 1)booleanAlternativeWhether push protection was bypassed for the detected secret.
push_protection_bypassed (anyOf 2)nullAlternative
push_protection_bypassed_atJSONOptional
push_protection_bypassed_at (anyOf 1)stringAlternativeThe time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
push_protection_bypassed_at (anyOf 2)nullAlternative
push_protection_bypassed_byModelOptionalExpand Get an issue — response body — user
resolutionModelOptionalExpand Get a secret scanning alert — response body — resolution
resolution_commentJSONOptional
resolution_comment (anyOf 1)stringAlternativeAn optional comment to resolve an alert.
resolution_comment (anyOf 2)nullAlternative
resolved_atJSONOptional
resolved_at (anyOf 1)stringAlternativeThe time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
resolved_at (anyOf 2)nullAlternative
resolved_byModelOptionalExpand Get an issue — response body — user
secretstringOptionalThe secret that was detected.
secret_typestringOptionalThe type of secret that secret scanning detected.
secret_type_display_namestringOptionalUser-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)."
statestringOptionalSets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.
Known values: open, resolved
updated_atModelOptionalExpand Get a secret scanning alert — response body — updated at
urlstringOptionalThe REST API URL of the alert resource.
Format: uri
Read only: true
validitystringOptionalThe 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

FieldTypePresenceDescription and constraints
$objectRoot
assigned_toModelOptionalExpand Get an issue — response body — user
closure_request_commentJSONOptional
closure_request_comment (anyOf 1)stringAlternativeAn optional comment from the closure request author.
closure_request_comment (anyOf 2)nullAlternative
closure_request_reviewerModelOptionalExpand Get an issue — response body — user
closure_request_reviewer_commentJSONOptional
closure_request_reviewer_comment (anyOf 1)stringAlternativeAn optional comment from the closure request reviewer.
closure_request_reviewer_comment (anyOf 2)nullAlternative
created_atstringOptionalThe time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
first_location_detectedModelOptionalExpand Get a secret scanning alert — response body — first location detected
has_more_locationsbooleanOptionalA boolean value representing whether or not the token in the alert was detected in more than one location.
html_urlstringOptionalThe GitHub URL of the alert resource.
Format: uri
Read only: true
is_base64_encodedJSONOptional
is_base64_encoded (anyOf 1)booleanAlternativeA boolean value representing whether or not alert is base64 encoded
is_base64_encoded (anyOf 2)nullAlternative
locations_urlstringOptionalThe REST API URL of the code locations for this alert.
Format: uri
multi_repoJSONOptional
multi_repo (anyOf 1)booleanAlternativeWhether the detected secret was found in multiple repositories in the same organization or enterprise.
multi_repo (anyOf 2)nullAlternative
numberModelOptionalExpand Get a Dependabot alert — response body — number
providerJSONOptional
provider (anyOf 1)stringAlternativeThe provider of the secret that was detected.
provider (anyOf 2)nullAlternative
provider_slugJSONOptional
provider_slug (anyOf 1)stringAlternativeThe 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)nullAlternative
publicly_leakedJSONOptional
publicly_leaked (anyOf 1)booleanAlternativeWhether the secret was publicly leaked.
publicly_leaked (anyOf 2)nullAlternative
push_protection_bypass_request_commentJSONOptional
push_protection_bypass_request_comment (anyOf 1)stringAlternativeAn optional comment when requesting a push protection bypass.
push_protection_bypass_request_comment (anyOf 2)nullAlternative
push_protection_bypass_request_html_urlJSONOptional
push_protection_bypass_request_html_url (anyOf 1)stringAlternativeThe URL to a push protection bypass request.
Format: uri
push_protection_bypass_request_html_url (anyOf 2)nullAlternative
push_protection_bypass_request_reviewerModelOptionalExpand Get an issue — response body — user
push_protection_bypass_request_reviewer_commentJSONOptional
push_protection_bypass_request_reviewer_comment (anyOf 1)stringAlternativeAn optional comment when reviewing a push protection bypass.
push_protection_bypass_request_reviewer_comment (anyOf 2)nullAlternative
push_protection_bypassedJSONOptional
push_protection_bypassed (anyOf 1)booleanAlternativeWhether push protection was bypassed for the detected secret.
push_protection_bypassed (anyOf 2)nullAlternative
push_protection_bypassed_atJSONOptional
push_protection_bypassed_at (anyOf 1)stringAlternativeThe time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
push_protection_bypassed_at (anyOf 2)nullAlternative
push_protection_bypassed_byModelOptionalExpand Get an issue — response body — user
repositoryModelOptionalExpand List repositories for a user migration — response body — item
resolutionModelOptionalExpand Get a secret scanning alert — response body — resolution
resolution_commentJSONOptional
resolution_comment (anyOf 1)stringAlternativeThe comment that was optionally added when this alert was closed
resolution_comment (anyOf 2)nullAlternative
resolved_atJSONOptional
resolved_at (anyOf 1)stringAlternativeThe time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
resolved_at (anyOf 2)nullAlternative
resolved_byModelOptionalExpand Get an issue — response body — user
secretstringOptionalThe secret that was detected.
secret_typestringOptionalThe type of secret that secret scanning detected.
secret_type_display_namestringOptionalUser-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)."
statestringOptionalSets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.
Known values: open, resolved
updated_atModelOptionalExpand Get a secret scanning alert — response body — updated at
urlstringOptionalThe REST API URL of the alert resource.
Format: uri
Read only: true
validitystringOptionalThe 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

FieldTypePresenceDescription and constraints
$JSONRootFields 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_versionModelRequired within parentExpand Update a repository custom pattern — response body — custom pattern version
end_delimiterstringOptionalThe updated end delimiter regex for the custom pattern.
must_matcharrayOptionalUpdated list of regexes that the secret must match.
must_match[]stringEach item
must_not_matcharrayOptionalUpdated list of regexes that the secret must not match.
must_not_match[]stringEach item
patternstringOptionalThe updated regular expression of the custom pattern.
start_delimiterstringOptionalThe updated start delimiter regex for the custom pattern.
$ (anyOf 1)JSONAlternative
$ (anyOf 2)JSONAlternative
$ (anyOf 3)JSONAlternative
$ (anyOf 4)JSONAlternative
$ (anyOf 5)JSONAlternative

Referenced models: Update a repository custom pattern — response body — custom pattern version

Update a repository custom pattern — response body

FieldTypePresenceDescription and constraints
$objectRootA custom pattern for secret scanning.
created_atstringOptionalThe date and time the custom pattern was created in ISO 8601 format.
Format: date-time
custom_pattern_versionModelOptionalExpand Update a repository custom pattern — response body — custom pattern version
end_delimiterJSONOptional
end_delimiter (anyOf 1)stringAlternativeThe end delimiter regex for the custom pattern.
end_delimiter (anyOf 2)nullAlternative
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe ID of the custom pattern.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
must_matchJSONOptional
must_match (anyOf 1)arrayAlternativeList of regexes that the secret must match.
must_match (anyOf 1)[]stringEach item
must_match (anyOf 2)nullAlternative
must_not_matchJSONOptional
must_not_match (anyOf 1)arrayAlternativeList of regexes that the secret must not match.
must_not_match (anyOf 1)[]stringEach item
must_not_match (anyOf 2)nullAlternative
namestringRequired within parentThe name of the custom pattern.
patternstringRequired within parentThe regular expression of the custom pattern.
push_protection_enabledbooleanRequired within parentWhether push protection is enabled for this custom pattern.
slugstringRequired within parentA URL-friendly identifier for the custom pattern, derived from its name.
start_delimiterJSONOptional
start_delimiter (anyOf 1)stringAlternativeThe start delimiter regex for the custom pattern.
start_delimiter (anyOf 2)nullAlternative
statestringRequired within parentThe state of the custom pattern.
Known values: published, unpublished
updated_atstringOptionalThe 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

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeThe 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)nullAlternative

Update a secret scanning alert — request body — body assignee

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeThe username of the user to assign to the alert. Set to `null` to unassign the alert.
$ (anyOf 2)nullAlternative

Update a secret scanning alert — request body — body resolution

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternative**Required when the `state` is `resolved`.** The reason for resolving the alert.
One of: false_positive, wont_fix, revoked, used_in_tests
$ (anyOf 2)nullAlternative

Update a secret scanning alert — request body — body resolution comment

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeAn optional comment when closing or reopening an alert. Cannot be updated or deleted.
$ (anyOf 2)nullAlternative

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.