Skip to content

Commit 9b2f0aa

Browse files
sabrowning1Copilotisaacmbrowncarlincherry
authored
Add content on Dependabot malware alerts (#60259)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Co-authored-by: Carlin Cherry <61124041+carlincherry@users.noreply.github.com>
1 parent 3d9a035 commit 9b2f0aa

File tree

26 files changed

+271
-37
lines changed

26 files changed

+271
-37
lines changed

content/admin/configuring-settings/configuring-github-connect/enabling-dependabot-for-your-enterprise.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ When {% data variables.product.prodname_ghe_server %} receives information about
4343

4444
For repositories with {% data variables.product.prodname_dependabot_alerts %} enabled, scanning is triggered on any push to the default branch that contains a manifest file or lock file. Additionally, when a new vulnerability record is added, {% data variables.product.prodname_ghe_server %} scans all existing repositories and generates alerts for any repository that is vulnerable. For more information, see [AUTOTITLE](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).
4545

46+
{% ifversion dependabot-malware-alerts %}
47+
48+
#### {% data variables.product.prodname_dependabot_malware_alerts %}
49+
50+
{% data variables.product.prodname_dependabot %} can also use data from the {% data variables.product.prodname_advisory_database %} to raise alerts for malicious packages. These packages are identified using data from {% data variables.product.company_short %}-reviewed advisories, which sync to your instance every hour. {% data variables.product.prodname_dependabot %} scans for malicious packages:
51+
* When the {% data variables.product.prodname_advisory_database %} syncs to your instance
52+
* When a push to the default branch contains a manifest file or lock file
53+
54+
> [!NOTE]
55+
> When you enable {% data variables.product.prodname_dependabot_malware_alerts %}, no code or information about code from {% data variables.product.prodname_ghe_server %} is uploaded to {% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %}.
56+
57+
{% endif %}
58+
4659
### About {% data variables.product.prodname_dependabot_updates %}
4760

4861
After you enable {% data variables.product.prodname_dependabot_alerts %}, you can choose to enable {% data variables.product.prodname_dependabot_updates %}. When {% data variables.product.prodname_dependabot_updates %} are enabled for {% data variables.product.prodname_ghe_server %}, users can configure repositories so that their dependencies are updated and kept secure automatically.

content/code-security/concepts/supply-chain-security/about-dependabot-alerts.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ Alternatively, you can opt into the weekly email digest, or even completely turn
7272
* Alerts can't catch every security issue. Always review your dependencies and keep manifest and lock files up to date for accurate detection.
7373
* New vulnerabilities may take time to appear in the {% data variables.product.prodname_advisory_database %} and trigger alerts.
7474
* Only advisories reviewed by {% data variables.product.github %} trigger alerts.
75-
* {% data variables.product.prodname_dependabot %} doesn't scan archived repositories.
76-
* {% data variables.product.prodname_dependabot %} doesn't generate alerts for malware.
75+
* {% data variables.product.prodname_dependabot %} doesn't scan archived repositories.{% ifversion dependabot-malware-alerts %}{% else %}
76+
* {% data variables.product.prodname_dependabot %} doesn't generate alerts for malware.{% endif %}
7777
* {% data reusables.dependabot.dependabot-alert-actions-semver %}
7878

7979
{% ifversion fpt or ghec %}{% data variables.product.github %} never publicly discloses vulnerabilities for any repository. {% endif %}
@@ -88,6 +88,8 @@ With a {% data variables.copilot.copilot_enterprise %} license, you can ask {% d
8888

8989
## Further reading
9090

91+
{% ifversion dependabot-malware-alerts %}
92+
* [AUTOTITLE](/code-security/concepts/supply-chain-security/dependabot-malware-alerts){% endif %}
9193
* [AUTOTITLE](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts)
9294
* [AUTOTITLE](/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)
9395
* [AUTOTITLE](/code-security/getting-started/auditing-security-alerts)

content/code-security/concepts/supply-chain-security/about-dependabot-auto-triage-rules.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ contentType: concepts
1717

1818
## About {% data variables.dependabot.auto_triage_rules %}
1919

20-
{% data variables.dependabot.auto_triage_rules %} allow you to instruct {% data variables.product.prodname_dependabot %} to automatically triage {% data variables.product.prodname_dependabot_alerts %}. You can use {% data variables.dependabot.auto_triage_rules_short %} to automatically dismiss or snooze certain alerts, or specify the alerts you want {% data variables.product.prodname_dependabot %} to open pull requests for. Rules are applied before alert notifications are sent, so enabling rules that auto-dismiss low-risk alerts will prevent notification noise from future matching alerts.
20+
{% data variables.dependabot.auto_triage_rules %} allow you to instruct {% data variables.product.prodname_dependabot %} to automatically triage {% data variables.product.prodname_dependabot_alerts %}{% ifversion dependabot-malware-alerts %} and {% data variables.product.prodname_dependabot_malware_alerts %}{% endif %}. You can use {% data variables.dependabot.auto_triage_rules_short %} to:
21+
* Automatically dismiss or snooze certain alerts
22+
* Specify the {% data variables.product.prodname_dependabot_alerts %} you want {% data variables.product.prodname_dependabot %} to open pull requests for
23+
24+
Rules are applied before alert notifications are sent, so enabling rules that auto-dismiss low-risk alerts will help reduce notification noise.
2125

2226
There are two types of {% data variables.dependabot.auto_triage_rules %}:
2327

@@ -26,10 +30,9 @@ There are two types of {% data variables.dependabot.auto_triage_rules %}:
2630

2731
### About {% data variables.dependabot.github_presets %}
2832

29-
> [!NOTE]
30-
> {% data reusables.dependabot.dependabot-github-preset-auto-triage-rules %}
33+
{% data variables.dependabot.github_presets %} are rules curated by {% data variables.product.company_short %} that are available for all repositories.
3134

32-
{% data variables.dependabot.github_presets %} are rules curated by {% data variables.product.company_short %}.
35+
#### Dismiss low impact issues for development-scoped dependencies
3336

3437
{% data reusables.dependabot.dismiss-low-impact-rule %} These alerts cover cases that feel like false alarms to most developers as the associated vulnerabilities:
3538

@@ -42,12 +45,25 @@ The rule is enabled by default for public repositories and can be opted into for
4245

4346
For more information about the criteria used by the rule, see [AUTOTITLE](/code-security/reference/supply-chain-security/criteria-for-preset-rules).
4447

48+
{% ifversion dependabot-malware-alerts %}
49+
50+
#### Dismiss package malware alerts
51+
52+
The `Dismiss package malware alerts` rule is a {% data variables.product.company_short %} preset that auto-dismisses alerts that flag all versions of a package as malicious. If your project depends on an **internal** package with the same ecosystem and name as a malicious **public** package, {% data variables.product.prodname_dependabot %} can generate a false positive alert, which the rule then auto-dismisses.
53+
54+
> [!IMPORTANT]
55+
> Be aware that if a contributor adds a dependency that is truly malicious across all versions, this rule will auto-dismiss the related alert.
56+
57+
The `Dismiss package malware alerts` rule is disabled by default, but can be enabled for any repository using {% data variables.product.prodname_dependabot_malware_alerts %}.
58+
59+
{% endif %}
60+
4561
### About {% data variables.dependabot.custom_rules %}
4662

4763
> [!NOTE]
4864
> {% data reusables.gated-features.dependabot-custom-auto-triage-rules %}
4965
50-
With {% data variables.dependabot.custom_rules %}, you can create your own rules to automatically dismiss or reopen alerts based on targeted metadata, such as severity, package name, CWE, and more. You can also specify which alerts you want {% data variables.product.prodname_dependabot %} to open pull requests for. For more information, see [AUTOTITLE](/code-security/dependabot/dependabot-auto-triage-rules/customizing-auto-triage-rules-to-prioritize-dependabot-alerts).
66+
With {% data variables.dependabot.custom_rules %}, you can create your own rules to automatically dismiss or reopen alerts based on targeted metadata, such as severity, package name, CWE, and more. You can also specify which {% data variables.product.prodname_dependabot_alerts %} you want {% data variables.product.prodname_dependabot %} to open pull requests for. For more information, see [AUTOTITLE](/code-security/dependabot/dependabot-auto-triage-rules/customizing-auto-triage-rules-to-prioritize-dependabot-alerts).
5167

5268
You can create custom rules from the **Settings** tab of the repository, provided the repository belongs to an organization that has a license for {% data variables.product.prodname_GHAS_or_code_security %}. For more information, see [Adding custom auto-triage rules to your repository](/code-security/dependabot/dependabot-auto-triage-rules/customizing-auto-triage-rules-to-prioritize-dependabot-alerts#adding-custom-auto-triage-rules-to-your-repository).
5369

@@ -61,7 +77,8 @@ Additionally, auto-dismissed alerts are still available for reporting and review
6177

6278
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), 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).
6379

64-
## Further reading
80+
## Next steps
81+
82+
To get started with {% data variables.dependabot.auto_triage_rules %}, see [AUTOTITLE](/code-security/dependabot/dependabot-auto-triage-rules/using-github-preset-rules-to-prioritize-dependabot-alerts).
6583

66-
* [AUTOTITLE](/code-security/dependabot/dependabot-auto-triage-rules/using-github-preset-rules-to-prioritize-dependabot-alerts)
67-
* [AUTOTITLE](/code-security/dependabot/dependabot-auto-triage-rules/customizing-auto-triage-rules-to-prioritize-dependabot-alerts)
84+
To customize your auto-triage experience, see [AUTOTITLE](/code-security/dependabot/dependabot-auto-triage-rules/customizing-auto-triage-rules-to-prioritize-dependabot-alerts).

content/code-security/concepts/supply-chain-security/about-supply-chain-security.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ You add dependencies directly to your supply chain when you specify them in a ma
2727
The supply chain features on {% data variables.product.github %} are:
2828
* **Dependency graph**
2929
* **Dependency review**
30-
* **{% data variables.product.prodname_dependabot_alerts %}**
30+
* **{% data variables.product.prodname_dependabot_alerts %}**{% ifversion dependabot-malware-alerts %}
31+
* **{% data variables.product.prodname_dependabot_malware_alerts %}**{% endif %}
3132
* **{% data variables.product.prodname_dependabot_updates %}**
3233
* **{% data variables.product.prodname_dependabot_security_updates %}**
3334
* **{% data variables.product.prodname_dependabot_version_updates %}**
@@ -107,13 +108,32 @@ For more information, see [AUTOTITLE](/code-security/dependabot/working-with-dep
107108

108109
* {% data variables.product.prodname_dependabot %} performs a scan to detect insecure dependencies and sends {% data variables.product.prodname_dependabot_alerts %} when:
109110
{% ifversion fpt or ghec %}
110-
* A new advisory is added to the {% data variables.product.prodname_advisory_database %}.{% else %}
111+
* A new advisory is added to the {% data variables.product.prodname_advisory_database %}{% else %}
111112
* New advisory data is synchronized to your instance each hour from {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
112-
* The dependency graph for the repository changes.
113+
* The dependency graph for the repository changes
113114
* {% data variables.product.prodname_dependabot_alerts %} are displayed on the **Security** tab for the repository and in the repository's dependency graph. The alert includes a link to the affected file in the project, and information about a fixed version.
114115

115116
For more information, see [AUTOTITLE](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).
116117

118+
{% ifversion dependabot-malware-alerts %}
119+
120+
##### What are {% data variables.product.prodname_dependabot_malware_alerts %}?
121+
122+
{% data variables.product.prodname_dependabot_malware_alerts %} flag malicious dependencies in your repositories. {% data variables.product.prodname_dependabot %} generates alerts using the {% data variables.product.prodname_advisory_database %}, which contains advisories for known vulnerabilities and malicious packages.
123+
124+
{% data variables.product.prodname_dependabot %} scans for malicious packages and sends alerts when:{% ifversion fpt or ghec %}
125+
* A new advisory is added to the {% data variables.product.prodname_advisory_database %}{% else %}
126+
* New advisory data is synchronized to your instance each hour from {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
127+
* The dependency graph for a repository changes
128+
129+
You can view {% data variables.product.prodname_dependabot_malware_alerts_short %} for a repository:
130+
* From the **Security** tab
131+
* In the dependency graph
132+
133+
Each alert includes a link to the affected file in the project, as well as the patch version number for the package (if available).
134+
135+
{% endif %}
136+
117137
#### What are Dependabot updates?
118138

119139
There are two types of {% data variables.product.prodname_dependabot_updates %}: {% data variables.product.prodname_dependabot %} _security_ updates and _version_ updates. {% data variables.product.prodname_dependabot %} generates automatic pull requests to update your dependencies in both cases, but there are several differences.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Dependabot malware alerts
3+
intro: '{% data variables.product.prodname_dependabot_malware_alerts %} help you identify malware in your dependencies to protect your project and its users.'
4+
product: '{% data reusables.gated-features.dependabot-malware-alerts %}'
5+
versions:
6+
feature: dependabot-malware-alerts
7+
contentType: concepts
8+
---
9+
10+
Software often relies on packages from various sources, creating dependency relationships that can threaten your project's security. For example, bad actors can use malicious packages to execute malware attacks, gaining access to your code, data, users, and contributors.
11+
12+
To help keep your project secure, {% data variables.product.prodname_dependabot %} can check your dependencies for known malicious packages, then create alerts with suggested remediation steps.
13+
14+
## When {% data variables.product.prodname_dependabot %} sends {% data variables.product.prodname_dependabot_malware_alerts_short %}
15+
16+
{% data variables.product.prodname_dependabot %} sends {% data variables.product.prodname_dependabot_malware_alerts_short %} when a package in your repository's default branch is flagged as malicious. Alerts for existing dependencies are generated{% ifversion fpt or ghec %} as soon as the package is flagged on the {% data variables.product.prodname_advisory_database %}{% else %} when new advisory data arrives from {% data variables.product.prodname_dotcom_the_website %} (synced to your instance every hour){% endif %}.
17+
18+
Alerts are also generated when you push commits that add a known malicious package or update a package to a known malicious version.
19+
20+
> [!NOTE]
21+
> If the ecosystem, name, and version of an internal package match those of a malicious public package, {% data variables.product.prodname_dependabot %} may generate a false positive alert.
22+
23+
## Alert contents
24+
25+
When {% data variables.product.prodname_dependabot %} detects a malicious dependency, a {% data variables.product.prodname_dependabot_malware_alert_short %} appears on the repository's **Security** tab. Each alert includes:
26+
27+
* A link to the affected file
28+
* Details about the malicious package, including the package name, affected versions, and the patched version (when available)
29+
* Remediation steps
30+
31+
## Availability
32+
33+
Currently, {% data variables.product.prodname_dependabot_malware_alerts %} are available for packages in the `npm` ecosystem.
34+
35+
## Alert notifications
36+
37+
By default, {% data variables.product.github %} sends email notifications about new alerts to people who both:
38+
39+
* Have write, maintain, or admin permissions to a repository
40+
* Are watching the repository and have enabled notifications for security alerts or for all activity on the repository
41+
42+
{% ifversion fpt or ghec %}
43+
On {% data variables.product.prodname_dotcom_the_website %}, you can override the default behavior by choosing the type of notifications you want to receive, or switching notifications off altogether in the settings page for your user notifications at [https://github.com/settings/notifications](https://github.com/settings/notifications).
44+
{% endif %}
45+
46+
If you are concerned about receiving too many notifications, we recommend leveraging {% data variables.dependabot.auto_triage_rules %} to auto-dismiss low-risk alerts. See [AUTOTITLE](/code-security/dependabot/dependabot-auto-triage-rules/about-dependabot-auto-triage-rules).
47+
48+
## Limitations
49+
50+
{% data variables.product.prodname_dependabot_malware_alerts %} have some limitations:
51+
52+
* Alerts can't catch every security issue. Always review your dependencies and keep manifest and lock files up to date for accurate detection.
53+
* New malware may take time to appear in the {% data variables.product.prodname_advisory_database %} and trigger alerts.
54+
* Only advisories reviewed by {% data variables.product.github %} trigger alerts.
55+
* {% data variables.product.prodname_dependabot %} doesn't scan archived repositories.
56+
* {% data reusables.dependabot.dependabot-alert-actions-semver %}
57+
58+
{% data variables.product.github %} never publicly discloses malicious dependencies for any repository.
59+
60+
## Next steps
61+
62+
To start protecting your project from malicious dependencies, see [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/configure-malware-alerts).

content/code-security/concepts/supply-chain-security/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ children:
1515
- dependency-graph-data
1616
- about-dependency-review
1717
- about-dependabot-alerts
18+
- dependabot-malware-alerts
1819
- about-metrics-for-dependabot-alerts
1920
- about-dependabot-security-updates
2021
- about-dependabot-version-updates

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ You can also use default {% data variables.dependabot.auto_triage_rules %} curat
7373

7474
{% data reusables.dependabot.quickstart-link %}
7575

76+
{% ifversion dependabot-malware-alerts %}
77+
78+
#### {% data variables.product.prodname_dependabot_malware_alerts %}
79+
80+
On {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_ghe_server %} 3.22+, you can view alerts for malicious dependencies in your repository. See [AUTOTITLE](/code-security/concepts/supply-chain-security/dependabot-malware-alerts).
81+
82+
{% endif %}
83+
7684
### {% data variables.product.prodname_dependabot_version_updates %}
7785

7886
Use {% data variables.product.prodname_dependabot %} to automatically raise pull requests to keep your dependencies up-to-date. This helps reduce your exposure to older versions of dependencies. Using newer versions makes it easier to apply patches if security vulnerabilities are discovered, and also makes it easier for {% data variables.product.prodname_dependabot_security_updates %} to successfully raise pull requests to upgrade vulnerable dependencies. You can also customize {% data variables.product.prodname_dependabot_version_updates %} to streamline their integration into your repositories. For more information, see [AUTOTITLE](/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates).

content/code-security/how-tos/manage-security-alerts/manage-dependabot-alerts/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ versions:
99
contentType: how-tos
1010
children:
1111
- viewing-and-updating-dependabot-alerts
12+
- manage-malware-alerts
1213
- managing-automatically-dismissed-alerts
1314
- enable-delegated-alert-dismissal
1415
---

0 commit comments

Comments
 (0)