Skip to content

Commit 7e91cc8

Browse files
authored
[EDI] Make "Resolving alerts from secret scanning" a how-to article (#59242)
1 parent b06dbb6 commit 7e91cc8

File tree

1 file changed

+6
-25
lines changed
  • content/code-security/how-tos/manage-security-alerts/manage-secret-scanning-alerts

1 file changed

+6
-25
lines changed

content/code-security/how-tos/manage-security-alerts/manage-secret-scanning-alerts/resolving-alerts.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,18 @@ redirect_from:
2222

2323
Once a secret has been committed to a repository, you should consider the secret compromised. {% data variables.product.github %} recommends the following actions for compromised secrets:
2424

25-
* Verify that the secret committed to {% data variables.product.github %} is valid. {% ifversion fpt or ghec %}**Applies to {% data variables.product.github %} tokens only**. See [Checking a secret's validity](/code-security/secret-scanning/managing-alerts-from-secret-scanning/evaluating-alerts#checking-a-secrets-validity).{% endif %}{% ifversion secret-scanning-validity-check-partner-patterns %}See [Performing an on-demand validity check](/code-security/secret-scanning/managing-alerts-from-secret-scanning/evaluating-alerts#performing-an-on-demand-validity-check).{% endif %}{% ifversion secret-scanning-report-secret-github-pat %}
26-
* For secrets detected in private repositories, report the leaked secret to {% data variables.product.github %}, who will treat it like any publicly leaked secret and revoke it. **Applies to {% data variables.product.github %} {% data variables.product.pat_generic %}s only**. See [Reporting a leaked secret](#reporting-a-leaked-secret). {% endif %}
27-
* Review and update any services that use the old token. For {% data variables.product.github %} {% data variables.product.pat_generic %}s, delete the compromised token and create a new token. See [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
28-
* Depending on the secret provider, check your security logs for any unauthorized activity.
25+
1. Verify that the secret committed to {% data variables.product.github %} is valid. {% ifversion fpt or ghec %}**Applies to {% data variables.product.github %} tokens only**. See [Checking a secret's validity](/code-security/secret-scanning/managing-alerts-from-secret-scanning/evaluating-alerts#checking-a-secrets-validity) and [Performing an on-demand validity check](/code-security/secret-scanning/managing-alerts-from-secret-scanning/evaluating-alerts#performing-an-on-demand-validity-check).{% endif %}{% ifversion secret-scanning-report-secret-github-pat %}
26+
1. For secrets detected in private repositories, report the leaked secret to {% data variables.product.github %}, who will treat it like any publicly leaked secret and revoke it. **Applies to active or unconfirmed {% data variables.product.github %} {% data variables.product.pat_generic %}s only**. See [Reporting a leaked secret in a private repository](#reporting-a-leaked-secret-in-a-private-repository). {% endif %}
27+
1. Review and update any services that use the old token. For {% data variables.product.github %} {% data variables.product.pat_generic %}s, delete the compromised token and create a new token. See [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
28+
1. Depending on the secret provider, check your security logs for any unauthorized activity.
2929

3030
{% ifversion secret-scanning-report-secret-github-pat %}
3131

32-
### Reporting a leaked secret
32+
### Reporting a leaked secret in a private repository
3333

3434
> [!NOTE]
3535
> {% data reusables.secret-scanning.report-secret-pat-beta-note %} The feature is currently only available for {% data variables.product.github %} {% data variables.product.pat_generic %}s (v1 and v2).
3636
37-
{% endif %}
38-
39-
{% ifversion fpt or ghec %}
40-
41-
If a secret is detected in a **public** repository on {% data variables.product.github %} and the secret also matches a supported partner pattern, the potential secret is **automatically reported** to the service provider. For details of all supported partner patterns, see [AUTOTITLE](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets).
42-
43-
{% endif %}
44-
45-
{% ifversion secret-scanning-report-secret-github-pat %}
46-
47-
For secrets detected in **private** repositories, anyone who can view {% data variables.secret-scanning.alerts %} for a repository can choose to report the privately exposed secret directly to {% data variables.product.github %}.
48-
49-
By reporting the secret, the token provider will treat the privately exposed secret as if it had been publicly leaked. This means the token provider may revoke the secret, so you should first consider reviewing and updating any services that use the secret. If possible, you should also consider notifying the token owner before reporting the token, so that the token owner is aware that the secret may get revoked.
50-
51-
You will only see the option to report a privately exposed secret to {% data variables.product.github %} if the following conditions are met:
52-
53-
* The secret is a {% data variables.product.github %} {% data variables.product.pat_generic %}.
54-
* The secret's validity has not been confirmed, or the secret's validity has been confirmed as `active`.
55-
5637
{% data reusables.repositories.navigate-to-repo %}
5738
{% data reusables.repositories.sidebar-security %}
5839
1. In the left sidebar, under "Vulnerability alerts", click **{% data variables.product.prodname_secret_scanning_caps %}**.
@@ -78,7 +59,7 @@ You will only see the option to report a privately exposed secret to {% data var
7859

7960
![Screenshot of a {% data variables.product.prodname_secret_scanning %} alert. A dropdown menu, titled "Close as", is expanded and highlighted in a dark orange outline.](/assets/images/help/repository/secret-scanning-dismiss-alert-web-ui-link-partner-documentation.png)
8061

81-
1. 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 {% data variables.product.prodname_secret_scanning_caps %} API. The comment is contained in the `resolution_comment` field. For more information, see [AUTOTITLE](/rest/secret-scanning#update-a-secret-scanning-alert) in the REST API documentation.
62+
1. 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.
8263
1. Click **Close alert**.
8364

8465
## Next steps

0 commit comments

Comments
 (0)