Skip to main content

Enterprise Server 3.15 is currently available as a release candidate.

Resolving alerts from secret scanning

After reviewing the details of a secret scanning alert, you should fix and then close the alert.

Who can use this feature?

Repository owners, organization owners, security managers, and users with the admin role

Fixing alerts

Once a secret has been committed to a repository, you should consider the secret compromised. GitHub recommends the following actions for compromised secrets:

  • Verify that the secret committed to GitHub is valid. Applies to GitHub tokens only. See "Checking a secret's validity."
  • Review and update any services that use the old token. For GitHub personal access tokens, delete the compromised token and create a new token. See "Managing your personal access tokens."
  • Depending on the secret provider, check your security logs for any unauthorized activity.

Closing alerts

Note

Secret scanning doesn't automatically close alerts when the corresponding token has been removed from the repository. You must manually close these alerts in the alert list on GitHub.

  1. On GitHub, navigate to the main page of the repository.

  2. Under the repository name, click Security. If you cannot see the "Security" tab, select the dropdown menu, and then click Security.

    Screenshot of a repository header showing the tabs. The "Security" tab is highlighted by a dark orange outline.

  3. In the left sidebar, under "Vulnerability alerts", click Secret scanning.

  4. Under "Secret scanning", click the alert you want to view.

  5. To dismiss an alert, select the "Close as" dropdown menu and click a reason for resolving an alert.

    Screenshot of a secret scanning alert. A dropdown menu, titled "Close as", is expanded and highlighted in a dark orange outline.

  6. Optionally, in the "Comment" field, add a dismissal comment. The dismissal comment will be added to the alert timeline and can be used as justification during auditing and reporting. You can view the history of all dismissed alerts and dismissal comments in the alert timeline. You can also retrieve or set a comment by using the Secret scanning API. The comment is contained in the resolution_comment field. For more information, see "REST API endpoints for secret scanning" in the REST API documentation.

  7. Click Close alert.

Next steps