Skip to content

Commit bb241c4

Browse files
felickzCopilotsophiethekingmchammer01
authored
Clarify that NuGet (not just npm) supports parent/transitive dependency updates for security fixes (#63639)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent df54ded commit bb241c4

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎content/code-security/concepts/supply-chain-security/dependabot-security-updates.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ You can add a `dependabot.yml` configuration file to your repository to customiz
4949
The {% data variables.product.prodname_dependabot_security_updates %} feature is available for repositories where you have enabled the dependency graph and {% data variables.product.prodname_dependabot_alerts %}. You will see a {% data variables.product.prodname_dependabot %} alert for every vulnerable dependency identified in your full dependency graph. However, security updates are triggered only for dependencies that are specified in a manifest or lock file. For more information, see [AUTOTITLE](/code-security/concepts/supply-chain-security/dependency-graph).
5050

5151
> [!NOTE]
52-
> For npm, {% data variables.product.prodname_dependabot %} will raise a pull request to update an explicitly defined dependency to a secure version, even if it means updating the parent dependency or dependencies, or even removing a sub-dependency that is no longer needed by the parent. For other ecosystems, {% data variables.product.prodname_dependabot %} is unable to update an indirect or transitive dependency if it would also require an update to the parent dependency. For more information, see [AUTOTITLE](/code-security/reference/supply-chain-security/troubleshoot-dependabot/dependabot-errors#updates-dependencies-without-an-alert).
52+
> {% data variables.product.prodname_dependabot %} can update an indirect (transitive) dependency to a secure version, but how it does so depends on your ecosystem:
53+
>
54+
> * **npm:** {% data variables.product.prodname_dependabot %} raises a pull request to update an explicitly defined dependency to a secure version. This may mean updating the parent dependency or dependencies, or removing a sub-dependency that the parent no longer needs.
55+
> * **NuGet projects that use `PackageReference`:** {% data variables.product.prodname_dependabot %} tries to update the parent dependency to a version that resolves to a secure version of the transitive dependency. If no compatible parent update is available, it adds a direct reference that pins the transitive dependency to the secure version.
56+
> * **Other ecosystems, and NuGet projects that use `packages.config`:** {% data variables.product.prodname_dependabot %} can't update an indirect or transitive dependency if doing so would also require updating the parent dependency.
57+
>
58+
> For more information, see [AUTOTITLE](/code-security/reference/supply-chain-security/troubleshoot-dependabot/dependabot-errors#updates-dependencies-without-an-alert).
5359
5460
You can enable a related feature, {% data variables.product.prodname_dependabot_version_updates %}, so that {% data variables.product.prodname_dependabot %} raises pull requests to update the manifest to the latest version of the dependency, whenever it detects an outdated dependency. For more information, see [AUTOTITLE](/code-security/concepts/supply-chain-security/dependabot-version-updates).
5561

‎content/code-security/reference/supply-chain-security/troubleshoot-dependabot/dependabot-errors.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Every application that has dependencies has a dependency graph, that is, a direc
7070

7171
**Error message:** `{% data variables.product.prodname_dependabot %} tries to update dependencies without an alert`
7272

73-
{% data variables.product.prodname_dependabot %} updates explicitly defined transitive dependencies that are vulnerable for all ecosystems. For npm, {% data variables.product.prodname_dependabot %} will raise a pull request that also updates the parent dependency if it's the only way to fix the transitive dependency.
73+
{% data variables.product.prodname_dependabot %} updates explicitly defined transitive dependencies that are vulnerable for all ecosystems. For npm, {% data variables.product.prodname_dependabot %} will raise a pull request that also updates the parent dependency if it's the only way to fix the transitive dependency. For NuGet projects that use `PackageReference`, {% data variables.product.prodname_dependabot %} first tries to update the parent dependency. If no compatible parent update is available, it adds a direct reference that pins the transitive dependency to the secure version.
7474

7575
For example, a project with a dependency on `A` version `~2.0.0` which has a transitive dependency on `B` version `~1.0.0` which has resolved to `1.0.1`.
7676

0 commit comments

Comments
 (0)