Opens in a new tab
PexLens logo
PexLens logo
Pricing
Add your offcanvas content in here
Add your offcanvas content in here

Version changes

How to read what changed between releases, especially when a trusted package grows a payload.

The package you already depend on is a common place to hide an attack, because you stopped reviewing it. Attackers publish a clean version, wait for it to spread, and add the payload in a later release. A vulnerability scanner may have nothing new to say. The files do. A version comparison shows that change so you do not have to read the whole tree to find the new part.

What you are looking for

Read the comparison for the version you are about to adopt. Read the latest comparison when a package you already trust publishes suddenly. The changes that deserve a stop are specific.

  • A new install or publish script, especially in a package that never had one.
  • A new network call, download, or obfuscated block that was not in the previous release.
  • A burst of publishes, or a maintainer change sitting next to a risky diff.

A large honest release can also be large. Size is not the signal. A date-formatting library that grows a network client is the signal. Compare the change with the purpose of the package, not with the number of lines.

How it affects the verdict

A suspicious change can raise the score. It cannot, alone, push a clean package into the malicious band. The diff is a reason to look, and a contribution to the score. If the change itself is classified as malicious, the version is not labeled safe. That is the case of the install script that downloads a payload: the comparison shows it is new, and the static finding says what it is. Together they are the review.

A written explanation of the same change is available for Python and JavaScript packages when that review is enabled. Read it as a map of the diff, then confirm it against the comparison. See Written reviews.

How to use it in a dependency bump

For a routine bump of a package you maintain a relationship with, the comparison is the review. If the diff is a bugfix inside the feature you already use, and the verdict stays safe, say that in the pull request. If the diff adds lifecycle behavior, stop the bump even when the tests pass. Tests call the feature. The attack runs before the tests do.