Skip to content

Commit efec762

Browse files
sophiethekinggithub-actionsmchammer01jennifer-ramirez-08erinhav
authored
Alert rules: user-configured dismiss rules for Dependabot alerts [Public Beta] (#39300)
Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com> Co-authored-by: Jennifer Ramirez <101611327+jennifer-ramirez-08@users.noreply.github.com> Co-authored-by: Erin Havens <erinhav@github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com>
1 parent d42e6e9 commit efec762

13 files changed

+112
-30
lines changed
57.4 KB
Loading
46.2 KB
Loading

content/code-security/dependabot/dependabot-alerts/about-dependabot-alerts.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ shortTitle: Dependabot alerts
3434

3535
If your code depends on a package with a security vulnerability, this can cause a range of problems for your project or the people who use it. You should upgrade to a secure version of the package as soon as possible.{% ifversion GH-advisory-db-supports-malware %} If your code uses malware, you need to replace the package with a secure alternative.{% endif %}
3636

37-
{% data reusables.security-advisory.link-browsing-advisory-db %}
38-
3937
{% data reusables.dependabot.quickstart-link %}
4038

4139
## Detection of insecure dependencies
@@ -89,6 +87,12 @@ When {% data variables.product.product_name %} identifies a vulnerable dependenc
8987

9088
{% data reusables.dependabot.dependabot-alert-create-PR %}
9189

90+
{% ifversion dependabot-alert-custom-rules-repo-level %}
91+
92+
{% data reusables.dependabot.dependabot-alert-rules %}
93+
94+
{% endif %}
95+
9296
{% warning %}
9397

9498
**Note**: {% data variables.product.product_name %}'s security features do not claim to catch all vulnerabilities{% ifversion GH-advisory-db-supports-malware %} and malware{% endif %}. We actively maintain {% data variables.product.prodname_advisory_database %} and generate alerts with the most up-to-date information. However, we cannot catch everything or tell you about known vulnerabilities within a guaranteed time frame. These features are not substitutes for human review of each dependency for potential vulnerabilities or any other issues, and we recommend consulting with a security service or conducting a thorough dependency review when necessary.

content/code-security/dependabot/dependabot-alerts/configuring-dependabot-alerts.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ You can enable or disable {% data variables.product.prodname_dependabot_alerts %
3131
- Your organization{% ifversion dependabot-alerts-enterprise-enablement or ghes > 3.8 %}
3232
- Your enterprise{% endif %}
3333

34+
{% ifversion dependabot-alert-custom-rules-repo-level %}
35+
36+
{% data reusables.dependabot.dependabot-alert-rules %}
37+
38+
{% endif %}
39+
3440
## Managing {% data variables.product.prodname_dependabot_alerts %} for your personal account
3541

3642
{% ifversion fpt or ghec %}

content/code-security/dependabot/dependabot-alerts/using-alert-rules-to-prioritize-dependabot-alerts.md

Lines changed: 74 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Using alert rules to prioritize Dependabot alerts
33
intro: 'You can use {% data variables.product.prodname_dependabot %} alert rules to filter out false positive alerts or alerts you''re not interested in.'
4-
permissions: 'People with write permissions to a private repository can enable or disable {% data variables.product.prodname_dependabot %} alert rules for the repository.'
4+
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 %}.'
55
versions:
66
feature: dependabot-alert-rules-auto-dismissal-npm-dev-dependencies
77
type: how_to
@@ -14,53 +14,106 @@ topics:
1414
shortTitle: Alert rules
1515
---
1616

17-
## About {% data variables.product.prodname_dependabot %} alert rules
18-
<!-- will need to review this procedural section for GHES -->
17+
{% data reusables.dependabot.github-alert-rules-beta %}
1918

20-
{% data reusables.dependabot.github-curated-alert-rules-beta %}
19+
## About {% data variables.product.prodname_dependabot %} alert rules
2120

2221
{% 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.
2322

24-
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:
25-
- Are unlikely to be exploitable in a developer (non-production or runtime) environment.
26-
- May relate to resource management, programming and logic, and information disclosure issues.
27-
- At worst, have limited effects like slow builds or long-running tests.
28-
- Are not indicative of issues in production.
23+
{% ifversion dependabot-alert-custom-rules-repo-level %}
24+
There are two types of {% data variables.product.prodname_dependabot %} alert rules:
2925

30-
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)."
26+
- {% data variables.product.company_short %}-curated rules
27+
- User-created custom rules
3128

32-
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.
29+
{% 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 %}
30+
31+
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)."
32+
33+
Additionally, auto-dismissed alerts are still available for reporting and reviewing, and can be auto-reopened if the alert metadata changes, for example:
34+
- If you change the scope of a dependency from development to production.
35+
- If {% data variables.product.company_short %} modifies certain metadata for the related advisory.
36+
37+
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)."
38+
39+
## About {% data variables.product.company_short %}-curated rules
3340

3441
{% note %}
3542

3643
**Note:** Automatic dismissal of low impact development alerts is currently only supported for npm.
3744

3845
{% endnote %}
3946

40-
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)."
47+
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:
4148

42-
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:
43-
- If you change the scope of a dependency from development to production.
44-
- If {% data variables.product.company_short %} modifies certain metadata for the related advisory.
49+
- Are unlikely to be exploitable in a developer (non-production or runtime) environment.
50+
- May relate to resource management, programming and logic, and information disclosure issues.
51+
- At worst, have limited effects like slow builds or long-running tests.
52+
- Are not indicative of issues in production.
4553

46-
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)."
54+
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)."
4755

48-
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)."
56+
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.
57+
58+
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.
4959

50-
## Enabling {% data variables.product.prodname_dependabot %} alert rules for your private repository
60+
### Enabling the `Dismiss low impact alerts` rule for your private repository
5161

5262
{% 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 %}
5363

54-
{% ifversion fpt or ghec %}
5564
{% data reusables.repositories.navigate-to-repo %}
5665
{% data reusables.repositories.sidebar-settings %}
5766
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
67+
{% ifversion dependabot-alert-custom-rules-repo-level %}
68+
1. Under "{% data variables.product.prodname_dependabot_alerts %}", click {% octicon "gear" aria-label="The Gear icon" %} close to "{% data variables.product.prodname_dependabot %} rules".
69+
70+
![Screenshot of the "Code security and analysis" page for a repository. The gear icon is highlighted with an orange outline.](/assets/images/help/repository/dependabot-rules-page.png)
71+
72+
1. Select **Dismiss low impact alerts**.
73+
1. Click **Save rules**.
74+
{% else %}
5875
1. Under "{% data variables.product.prodname_dependabot_alerts %}", click **Dismiss low impact alerts**.
76+
5977
![Screenshot of the "Code security and analysis" page for a repository. The "Dismiss low impact alerts" option is highlighted with an orange outline.](/assets/images/help/repository/enable-autodismissal-low-impact-dependabot-alerts.png)
78+
79+
{% endif %}
80+
81+
{% ifversion dependabot-alert-custom-rules-repo-level %}
82+
## About user-created custom rules
83+
84+
You can create your own {% data variables.product.prodname_dependabot %} alert rules based on alert criteria.
85+
86+
- Dependency scope (`devDependency` or `runtime`)
87+
- Package name
88+
- CWE
89+
- Severity
90+
- Patch availability
91+
- Manifest path
92+
- Ecosystem
93+
94+
### Adding a custom rule to your repository
95+
96+
You can add a custom rule to your {% ifversion fpt %}public and private{% elsif ghec or ghes %}public, private, and internal{% endif %} repositories.
97+
98+
{% data reusables.repositories.navigate-to-repo %}
99+
{% data reusables.repositories.sidebar-settings %}
100+
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
101+
1. Under "{% data variables.product.prodname_dependabot_alerts %}", click {% octicon "gear" aria-label="The Gear icon" %} close to "{% data variables.product.prodname_dependabot %} rules".
102+
103+
![Screenshot of the "Code security and analysis" page for a repository. The gear icon is highlighted with an orange outline.](/assets/images/help/repository/dependabot-rules-page.png)
104+
105+
1. Click **New ruleset**.
106+
107+
![Screenshot of the "Code security and analysis" page for a repository. The gear icon is highlighted with an orange outline.](/assets/images/help/repository/dependabot-rules-new-ruleset.png)
108+
109+
1. Under "Name", describe what this rule will do.
110+
1. Under "Alert criteria", select the criteria you want to use to filter alerts.
111+
1. Under "Rules", select the action you want to take on alerts that match the criteria.
112+
1. Click **Create rule**.
113+
60114
{% endif %}
61115

62116
## Managing automatically dismissed alerts
63-
<!-- will need to review this procedural section for GHES -->
64117

65118
You can filter to see which alerts have been auto-dismissed, and you can reopen dismissed alerts.
66119

@@ -84,7 +137,7 @@ You can filter to see which alerts have been auto-dismissed, and you can reopen
84137

85138
![Screenshot of an alert title on the "Dependabot Alerts" page. To the left of the alert, a checkbox is highlighted in an orange outline.](/assets/images/help/repository/dependabot-reopen-closed-alert.png)
86139

87-
## Publicly disclosed CWEs used by the Dismiss low impact rule
140+
## Publicly disclosed CWEs used by the `Dismiss low impact alerts` rule
88141

89142
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.
90143

content/code-security/getting-started/github-security-features.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ View alerts about dependencies that are known to contain security vulnerabilitie
4141
and "[AUTOTITLE](/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)."
4242
{% endif %}
4343

44+
{% ifversion dependabot-alert-custom-rules-repo-level %}
45+
46+
{% data reusables.dependabot.dependabot-alert-rules %}
47+
48+
{% endif %}
49+
4450
{% data reusables.dependabot.quickstart-link %}
4551

4652
{% ifversion ghae %}

content/code-security/getting-started/securing-your-repository.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ For more information, see "[AUTOTITLE](/code-security/supply-chain-security/unde
5454

5555
{% data variables.product.prodname_dependabot_alerts %} are generated when {% data variables.product.prodname_dotcom %} identifies a dependency in the dependency graph with a vulnerability. {% ifversion fpt or ghec %}You can enable {% data variables.product.prodname_dependabot_alerts %} for any repository.{% endif %}
5656

57+
{% ifversion dependabot-alert-custom-rules-repo-level %}
58+
59+
{% data reusables.dependabot.dependabot-alert-rules %}
60+
61+
{% endif %}
62+
5763
{% data reusables.dependabot.quickstart-link %}
5864

5965
{% ifversion fpt or ghec %}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reference: Issue #10089 - Alert rules: user-configured dismiss rules for Dependabot alerts
2+
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>3.10'

data/features/dependabot-alert-rules-auto-dismissal-npm-dev-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
versions:
44
fpt: '*'
55
ghec: '*'
6-
ghes: '>3.9'
6+
ghes: '>3.10'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Additionally, you can use {% data variables.product.prodname_dependabot %} alert rules to filter out false positive alerts or alerts you're not interested in, based on complex logic from a variety of contextual criteria. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-alerts/using-alert-rules-to-prioritize-dependabot-alerts)."

0 commit comments

Comments
 (0)