GET /enterprises/{enterprise}/secret-scanning/alerts

Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.

Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a security manager.

The authenticated user must be a member of the enterprise in order to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the repo scope or security_events scope to use this endpoint.

Servers

Path parameters

Name Type Required Description
enterprise String Yes

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Query parameters

Name Type Required Description
resolution String No

A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests.

is_multi_repo Boolean No

A boolean value representing whether or not to filter alerts by the multi-repo tag being present.

Default value: false

direction String No

The direction to sort the results by.

Possible values:

  • "desc"
  • "asc"

Default value: "desc"

secret_type String No

A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "Supported secret scanning patterns" for a complete list of secret types.

sort String No

The property to sort the results by. created means when the alert was created. updated means when the alert was updated or resolved.

Possible values:

  • "updated"
  • "created"

Default value: "created"

per_page Integer No

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

Default value: 30

after String No

A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."

state String No

Set to open or resolved to only list secret scanning alerts in a specific state.

Possible values:

  • "open"
  • "resolved"
before String No

A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."

validity String No

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

is_publicly_leaked Boolean No

A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present.

Default value: false

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.