Skip to content

ci(dependency-review): fail only on advisories the base doesn't have - #507

Merged
ixuz merged 1 commit into
mainfrom
ci/carried-over-advisories
Nov 2, 2026
Merged

ixuz merged 1 commit into
mainfrom
ci/carried-over-advisories

Conversation

@ixuz

@ixuz ixuz commented Nov 2, 2026

Copy link
Copy Markdown
Member

What and why

The dependency-review job failed when a pull request added, or moved to, a version with an advisory of moderate severity or worse. It failed even when the version being replaced had the same advisory, so the pull request left main exactly as it was. Renovate's lock file maintenance ran into this (run 41425244611):

  • npm 11.21.0 → 11.21.1 in the NSS 6 test server moves the ip-address that npm bundles from 10.5.0 to 10.7.2.
  • Both versions fall under GHSA-rxp7-6hxx-x8q5, and no npm 11.x bundles a fixed version yet.
  • So every other update in that pull request was blocked.

The job now fails only on advisories the pull request introduces:

  • npm run dependencies:review (renamed from dependencies:summary) checks advisories using the comparison the job already fetches:
    • An advisory on an added version fails the job.
    • The exception is when a removed version of the same package, in the same manifest, has the same GHSA id. That advisory is carried over from the base: it's listed, and the job passes.
  • Matching is per advisory, not per package. A version that fixes one advisory but has another still fails.
  • The run's summary lists the introduced advisories and the carried-over ones above the package tables. When the job fails, the log names each new advisory.
  • dependency-review-action now checks licenses only (vulnerability-check: false).
  • The workflow comments and docs/testing.md say that Dependabot alerts on main report the advisories main already has.

This means an update that stays inside a vulnerable range now passes, even when a fixed version exists. main is no worse than before, and Renovate's vulnerability alerts bring the fix.

Before merging, check that Dependabot alerts are on (Settings › Advanced Security). Once this is merged, re-running the dependency review on the lock file maintenance pull request should pass, with the ip-address advisory shown as carried over.

Closes: #506

The dependency-review job failed on a version a pull request adds or
moves to that has an advisory of moderate severity or worse, even when
the version it replaces had the same advisory. Such a pull request
leaves main as it was. Renovate's lock file maintenance ran into it:
npm 11.21.0 to 11.21.1 in the NSS 6 test server moves the ip-address
that npm bundles from 10.5.0 to 10.7.2, both under GHSA-rxp7-6hxx-x8q5,
and no npm 11.x bundles a fixed one yet, so every other update in the
pull request was held back. The only way through was allow-ghsas, a
waiver for the whole repository that has to be removed by hand.

npm run dependencies:review (dependencies:summary before) now judges
the advisories from the comparison the job already fetches. An advisory
of an added version fails the job unless a removed version of the same
package in the same manifest has the same GHSA id: then it is listed as
carried over from the base, and the job passes. It matches the
advisory, not the package, so a version that fixes one advisory and
has another still fails. The run's summary lists both kinds above the
package tables. dependency-review-action keeps checking the licenses,
with its vulnerability check turned off. Dependabot alerts on main
report the advisories main already has.

Closes: #506
@ixuz ixuz added enhancement New feature or request dependencies Dependency versions, pins and updates ci/cd Countinuous integration and deployment labels Nov 2, 2026
@ixuz
ixuz enabled auto-merge November 2, 2026 10:59
@ixuz
ixuz added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit b8062f9 Nov 2, 2026
51 checks passed
@ixuz
ixuz deleted the ci/carried-over-advisories branch November 2, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd Countinuous integration and deployment dependencies Dependency versions, pins and updates enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI's dependency review fails a pull request over a vulnerability that is already on main

1 participant