Improvement

June 24, 20251 Minute Read

Secret scanning REST API responses including first_location_detected and has_more_locations are now generally available

The secret scanning REST API now returns additional metadata to help you triage alerts more effectively. The new first_location_detected object provides structured location data for the first detected instance of the secret, without requiring a separate call to the token locations API.

The has_more_locations object indicates whether the same secret appears in multiple locations in the repository, offering a lightweight signal that additional locations exist without returning the full set.

These fields are returned from the following endpoints:

List secret scanning alerts for a repository
List secret scanning alerts for an organization
List secret scanning alerts for an enterprise

Learn more from the secret scanning REST API product documentation.

Subscribe to our developer newsletter

Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.

By submitting, I agree to let GitHub and its affiliates use my information for personalized communications, targeted advertising, and campaign effectiveness. See the GitHub Privacy Statement for more details.

Secret scanning REST API responses including first_location_detected and has_more_locations are now generally available - GitHub Changelog