|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
---
|
|
|
|
|
title: Using alert rules to prioritize Dependabot alerts
|
|
|
|
|
intro: 'You can use {% data variables.product.prodname_dependabot %} alert rules to filter out false positive alerts or alerts you''re not interested in.'
|
|
|
|
|
permissions: 'People with write permissions to a private repository can enable or disable {% data variables.product.prodname_dependabot %} alert rules for the repository.'
|
|
|
|
|
permissions: 'People with write permissions can view {% data variables.product.prodname_dependabot %} alert rules for the repository. People with with admin permissions to a repository, or the security manager role for the repository, can enable or disable {% data variables.product.prodname_dependabot %} alert rules for the repository{% ifversion dependabot-alert-custom-rules-repo-level %}, as well as create custom alert rules{% endif %}.'
|
|
|
|
|
versions:
|
|
|
|
|
feature: dependabot-alert-rules-auto-dismissal-npm-dev-dependencies
|
|
|
|
|
type: how_to
|
|
|
|
|
@@ -14,22 +14,29 @@ topics:
|
|
|
|
|
shortTitle: Alert rules
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## About {% data variables.product.prodname_dependabot %} alert rules
|
|
|
|
|
<!-- will need to review this procedural section for GHES -->
|
|
|
|
|
{% data reusables.dependabot.github-alert-rules-beta %}
|
|
|
|
|
|
|
|
|
|
{% data reusables.dependabot.github-curated-alert-rules-beta %}
|
|
|
|
|
## About {% data variables.product.prodname_dependabot %} alert rules
|
|
|
|
|
|
|
|
|
|
{% data variables.product.prodname_dependabot %} alert rules allow you to instruct {% data variables.product.prodname_dependabot %} to automatically dismiss or reopen certain alerts, based on complex logic from a variety of contextual criteria.
|
|
|
|
|
|
|
|
|
|
When enabled, the built-in `Dismiss low impact alerts` rule auto-dismisses certain types of vulnerabilities that are found in npm dependencies used in development. These alerts cover cases that feel like false alarms to most developers as the associated vulnerabilities:
|
|
|
|
|
- Are unlikely to be exploitable in a developer (non-production or runtime) environment.
|
|
|
|
|
- May relate to resource management, programming and logic, and information disclosure issues.
|
|
|
|
|
- At worst, have limited effects like slow builds or long-running tests.
|
|
|
|
|
- Are not indicative of issues in production.
|
|
|
|
|
{% ifversion dependabot-alert-custom-rules-repo-level %}
|
|
|
|
|
There are two types of {% data variables.product.prodname_dependabot %} alert rules:
|
|
|
|
|
|
|
|
|
|
This {% data variables.product.company_short %}-curated `Dismiss low impact alerts` rule includes vulnerabilities relating to resource management, programming and logic, and information disclosure issues. For more information, see "[Publicly disclosed CWEs used by the Dismiss low impact rule](#publicly-disclosed-cwes-used-by-the-dismiss-low-impact-rule)."
|
|
|
|
|
- {% data variables.product.company_short %}-curated rules
|
|
|
|
|
- User-created custom rules
|
|
|
|
|
|
|
|
|
|
Filtering out these low impact alerts allows you to focus on alerts that matter to you, without having to worry about missing potentially high-risk development-scoped alerts.
|
|
|
|
|
{% data variables.product.company_short %}-curated rules are enabled by default for public repositories and can be opted into for private repositories. However, it's important to note that you cannot modify the {% data variables.product.company_short %}-curated rules. With user-created custom rules, you can create your own rules to automatically dismiss or reopen alerts based on your own criteria.{% endif %}
|
|
|
|
|
|
|
|
|
|
Whilst you may find it useful to auto-dismiss low impact alerts, you can still reopen auto-dismissed alerts and filter to see which alerts have been auto-dismissed. For more information, see "[Managing automatically dismissed alerts](#managing-automatically-dismissed-alerts)."
|
|
|
|
|
|
|
|
|
|
Additionally, auto-dismissed alerts are still available for reporting and reviewing, and can be auto-reopened if the alert metadata changes, for example:
|
|
|
|
|
- If you change the scope of a dependency from development to production.
|
|
|
|
|
- If {% data variables.product.company_short %} modifies certain metadata for the related advisory.
|
|
|
|
|
|
|
|
|
|
Auto-dismissed alerts are defined by the `resolution:auto-dismiss` close reason. Automatic dismissal activity is included in alert webhooks, REST and GraphQL APIs, and the audit log. For more information, see "[AUTOTITLE](/rest/dependabot/alerts)" in the REST API documentation, and the "`repository_vulnerability_alert` " section in "[AUTOTITLE](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_vulnerability_alert-category-actions)."
|
|
|
|
|
|
|
|
|
|
## About {% data variables.product.company_short %}-curated rules
|
|
|
|
|
|
|
|
|
|
{% note %}
|
|
|
|
|
|
|
|
|
|
@@ -37,30 +44,76 @@ Filtering out these low impact alerts allows you to focus on alerts that matter
|
|
|
|
|
|
|
|
|
|
{% endnote %}
|
|
|
|
|
|
|
|
|
|
Whilst you may find it useful to auto-dismiss low impact alerts, you can still reopen auto-dismissed alerts, and filter to see which alerts have been auto-dismissed. For more information, see "[Managing automatically dismissed alerts](#managing-automatically-dismissed-alerts)."
|
|
|
|
|
When enabled, the built-in `Dismiss low impact alerts` rule auto-dismisses certain types of vulnerabilities that are found in npm dependencies used in development. These alerts cover cases that feel like false alarms to most developers as the associated vulnerabilities:
|
|
|
|
|
|
|
|
|
|
Additionally, auto-dismissed alerts are still available for reporting and reviewing, and can be re-introduced as not having been dismissed if the alert metadata changes, for example:
|
|
|
|
|
- If you change the scope of a dependency from development to production.
|
|
|
|
|
- If {% data variables.product.company_short %} modifies certain metadata for the related advisory.
|
|
|
|
|
- Are unlikely to be exploitable in a developer (non-production or runtime) environment.
|
|
|
|
|
- May relate to resource management, programming and logic, and information disclosure issues.
|
|
|
|
|
- At worst, have limited effects like slow builds or long-running tests.
|
|
|
|
|
- Are not indicative of issues in production.
|
|
|
|
|
|
|
|
|
|
Auto-dismissed alerts are defined by the `resolution:auto-dismiss` close reason. Automatic dismissal activity is included in alert webhooks, REST and GraphQL APIs, and the audit log. For more information, see "[AUTOTITLE](/rest/dependabot/alerts)" in the REST API documentation, and the "`repository_vulnerability_alert` " section in "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_vulnerability_alert-category-actions)."
|
|
|
|
|
This {% data variables.product.company_short %}-curated `Dismiss low impact alerts` rule includes vulnerabilities relating to resource management, programming and logic, and information disclosure issues. For more information, see "[Publicly disclosed CWEs used by the `Dismiss low impact alerts` rule](#publicly-disclosed-cwes-used-by-the-dismiss-low-impact-alerts-rule)."
|
|
|
|
|
|
|
|
|
|
By default, {% data variables.product.company_short %}-curated {% data variables.product.prodname_dependabot %} alert rules are enabled on public repositories and disabled for private repositories. Administrators of private repositories can opt in by enabling alert rules for their repository. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} alert rules for your private repository](#enabling-dependabot-alert-rules-for-your-private-repository)."
|
|
|
|
|
Filtering out these low impact alerts allows you to focus on alerts that matter to you, without having to worry about missing potentially high-risk development-scoped alerts.
|
|
|
|
|
|
|
|
|
|
## Enabling {% data variables.product.prodname_dependabot %} alert rules for your private repository
|
|
|
|
|
By default, {% data variables.product.company_short %}-curated {% data variables.product.prodname_dependabot %} alert rules are enabled on public repositories and disabled for private repositories. Administrators of private repositories can opt in by enabling alert rules for their repository.
|
|
|
|
|
|
|
|
|
|
### Enabling the `Dismiss low impact alerts` rule for your private repository
|
|
|
|
|
|
|
|
|
|
{% ifversion fpt or ghec %}You first need to enable {% data variables.product.prodname_dependabot_alerts %} for the repository. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-alerts/configuring-dependabot-alerts#managing-dependabot-alerts-for-your-repository)."{% elsif ghes %}{% data variables.product.prodname_dependabot_alerts %} for your repository can be enabled or disabled by your enterprise owner. For more information, see "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."{% endif %}
|
|
|
|
|
|
|
|
|
|
{% ifversion fpt or ghec %}
|
|
|
|
|
{% data reusables.repositories.navigate-to-repo %}
|
|
|
|
|
{% data reusables.repositories.sidebar-settings %}
|
|
|
|
|
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
|
|
|
|
|
{% ifversion dependabot-alert-custom-rules-repo-level %}
|
|
|
|
|
1. Under "{% data variables.product.prodname_dependabot_alerts %}", click {% octicon "gear" aria-label="The Gear icon" %} close to "{% data variables.product.prodname_dependabot %} rules".
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
1. Select **Dismiss low impact alerts**.
|
|
|
|
|
1. Click **Save rules**.
|
|
|
|
|
{% else %}
|
|
|
|
|
1. Under "{% data variables.product.prodname_dependabot_alerts %}", click **Dismiss low impact alerts**.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% ifversion dependabot-alert-custom-rules-repo-level %}
|
|
|
|
|
## About user-created custom rules
|
|
|
|
|
|
|
|
|
|
You can create your own {% data variables.product.prodname_dependabot %} alert rules based on alert criteria.
|
|
|
|
|
|
|
|
|
|
- Dependency scope (`devDependency` or `runtime`)
|
|
|
|
|
- Package name
|
|
|
|
|
- CWE
|
|
|
|
|
- Severity
|
|
|
|
|
- Patch availability
|
|
|
|
|
- Manifest path
|
|
|
|
|
- Ecosystem
|
|
|
|
|
|
|
|
|
|
### Adding a custom rule to your repository
|
|
|
|
|
|
|
|
|
|
You can add a custom rule to your {% ifversion fpt %}public and private{% elsif ghec or ghes %}public, private, and internal{% endif %} repositories.
|
|
|
|
|
|
|
|
|
|
{% data reusables.repositories.navigate-to-repo %}
|
|
|
|
|
{% data reusables.repositories.sidebar-settings %}
|
|
|
|
|
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
|
|
|
|
|
1. Under "{% data variables.product.prodname_dependabot_alerts %}", click {% octicon "gear" aria-label="The Gear icon" %} close to "{% data variables.product.prodname_dependabot %} rules".
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
1. Click **New ruleset**.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
1. Under "Name", describe what this rule will do.
|
|
|
|
|
1. Under "Alert criteria", select the criteria you want to use to filter alerts.
|
|
|
|
|
1. Under "Rules", select the action you want to take on alerts that match the criteria.
|
|
|
|
|
1. Click **Create rule**.
|
|
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
## Managing automatically dismissed alerts
|
|
|
|
|
<!-- will need to review this procedural section for GHES -->
|
|
|
|
|
|
|
|
|
|
You can filter to see which alerts have been auto-dismissed, and you can reopen dismissed alerts.
|
|
|
|
|
|
|
|
|
|
@@ -84,7 +137,7 @@ You can filter to see which alerts have been auto-dismissed, and you can reopen
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## Publicly disclosed CWEs used by the Dismiss low impact rule
|
|
|
|
|
## Publicly disclosed CWEs used by the `Dismiss low impact alerts` rule
|
|
|
|
|
|
|
|
|
|
Along with the `ecosystem:npm` and `scope:development` alert metadata, we use the following {% data variables.product.company_short %}-curated Common Weakness Enumerations (CWEs) to filter out low impact alerts for the `Dismiss low impact alerts` rule. We regularly improve this list and vulnerability patterns covered by built-in rules.
|
|
|
|
|
|
|
|
|
|
|