Improvement

May 20, 20251 Minute Read

Secret scanning alerts API now supports hiding secret literals

You can now request secret scanning alerts through the API without exposing the actual secret literals. This new hide_secret query parameter helps reduce risk when working with secret scanning alert data for analytics, dashboards, or integrations.

This parameter is available on the following API endpoints:

  • GET /enterprises/{enterprise}/secret-scanning/alerts
  • GET /orgs/{org}/secret-scanning/alerts
  • GET /repos/{owner}/{repo}/secret-scanning/alerts
  • GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}

To use this feature, add the hide_secret=true query parameter to any secret scanning alerts API request. When this value is set to true, the API response will omit the secret literal value. The default value is false, maintaining backward compatibility with existing integrations.

For more information, visit our secret scanning API 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 alerts API now supports hiding secret literals - GitHub Changelog