---
title: "Fix vulnerabilities by package upgrade"
description: "See the open backlog as upgrades: the smallest version of each package that clears its known vulnerabilities, whether it crosses a major version, the change."
---

A package with five CVEs is one upgrade, not five tickets. **Findings → By
package upgrade** (`/findings/upgrades`) groups the open vulnerability
backlog by package and gives, for each:

- the **target version**: the smallest version that clears every open
  finding on the package that has a recorded fix;
- whether it **crosses a major version** (marked **Major**: expect breaking
  changes, and test the upgrade);
- how many findings it **fixes**, and which advisories have **no fix yet**
  (no upgrade clears those; they are listed, never counted);
- the **manifest change**: the file to edit, the exact line to set, and the
  package-manager command, chosen from the file the package was found in
  (`package-lock.json` gives `package.json` and `npm install`, `go.mod` gives
  `go get`, an OS package gives a Dockerfile line, and so on).

Upgrades are ordered riskiest first. Narrow them with `asset_id` or `owner`
in the URL, the same way as the findings list.

## The API

```bash
curl -H "Authorization: Bearer $TRUSTIVAN_API_KEY" \
  "https://app.trustivan.com/api/v1/findings/upgrades?owner=payments-team"
```

Each item is one package copy (asset, ecosystem, package, installed version
and manifest), with `target_version`, `crosses_major`, `fixes`,
`fixed_advisories`, `unfixed_advisories` and `manifest_change`. The response
also says how many findings were considered and fixable. It reads at most
20,000 findings, riskiest first, and sets `truncated` when there were more.

## How the target is chosen

The target is one of the fixed versions the advisories record, ordered with
the ecosystem's own version rules (npm semver, PEP 440, RubyGems, Maven, Go,
Debian, RPM, Alpine), so `1.2.10` ranks above `1.2.9`. When an advisory lists
a fix per release line (`3.10.2, 4.17.21`), a fix on your installed major
line is preferred over jumping to the next major.

**Limits.** The package registry is never consulted: the target is always a
version some advisory names, so a newer release that also fixes everything
is not considered, and a target can in principle be a release that was later
withdrawn. A transitive dependency may need an override (`overrides`,
`resolutions`, `<dependencyManagement>`) rather than a direct version; the
manifest change says so where it applies.
