github OWASP/cve-lite-cli v1.44.0
v1.44.0 - Seven security fixes for lockfile parsing

latest release: v1
2 hours ago

Upgrade note. This release fixes seven security issues, each of which could make a vulnerable package scan clean. Upgrade if you rely on --fail-on in CI. Six changes can affect an existing setup.

  • The first scan after upgrading runs with a cold OSV cache, because the cache format changed. Cached results are now kept per --osv-url endpoint.
  • When the npm bulk advisory lookup fails or returns data that cannot be read, the scan is marked partial instead of reporting no findings from that source. Under --incomplete-policy error it exits 3.
  • --prod-only on a pnpm v9 lockfile now leaves out packages reached only through devDependencies. Before, it kept them, so these scans report fewer findings than before, and only production findings.
  • A Yarn Berry yarn.lock that is not valid YAML or repeats an entry, and a bun.lock that repeats a key in the same object, now stop the scan with an error instead of being read in part.
  • A lockfile entry is scanned as the package its registry tarball URL actually installs, whatever name or version label the entry carries. A private fork published at a registry-style URL that names a real public package is now scanned as that public package.
  • JSON diagnostics can carry a packages field naming the packages a diagnostic is about.

Security

  • A lockfile entry whose name or version label does not match the registry tarball in its resolved URL is now scanned as the package the tarball actually installs, so a forged name, alias, folder name or version can no longer make a vulnerable package scan clean. This covers npm lockfile v1, v2 and v3 and Yarn v1; Yarn Berry was not affected (GHSA-w2rf-6p3j-6c4g). Reported and fixed by @prx-my.
  • In offline mode, a lockfile version the scanner could not read (a leading v or =, surrounding whitespace, a fourth segment, or a URL label on a registry tarball) was reported as having no known vulnerabilities, even under --incomplete-policy error. Readable variants are now normalised and matched, and anything still unreadable marks the scan partial with a diagnostic naming the packages. Git and tarball URL dependencies that do not come from a registry stay exempt (GHSA-6vpc-jw4c-rg79). Reported and fixed by @prx-my.
  • Yarn Berry yarn.lock files are now read as YAML, the way Yarn reads them. An entry with no blank line before it, an unquoted or single-quoted resolution, or a resolution: line nested under another key could hide a package or change its reported version (GHSA-fw45-h82c-hcc9, GHSA-53v5-7fh7-wc6f). Berry lockfiles with Windows (CRLF) line endings, which used to parse to nothing, now scan too. Dependency paths are also more complete: a dependency whose name was repeated under bin: used to lose its link to its parent. Reported and fixed by @prx-my.
  • Under --prod-only, a dev: true field added to a pnpm v9 snapshot no longer drops a production dependency from the scan. pnpm ignores that field, so dev and production are now decided only by which dependencies and devDependencies reach the package (GHSA-c59v-cf27-j6xv). Reported and fixed by @prx-my.
  • EXPERIMENTAL --python: requirements.txt lines are split wherever pip splits them, including a lone carriage return, vertical tab, form feed and Unicode line separators. A package placed after one of those used to be read as part of a comment and left out of the scan (GHSA-p3pr-h4x6-3qpw). Reported and fixed by @prx-my.
  • A bun.lock that repeats a key in the same object, such as a second top-level "packages" list, now stops the scan. Bun uses the first copy, while the scanner read the last, so a decoy list could hide what Bun installs (GHSA-pm82-pvjx-wgfx). Reported and fixed by @prx-my.

Changed

  • The pull request rules check now fails a pull request that breaks a contribution rule, instead of only warning. Maintainers, bots and pull requests opened before the rules took effect are exempt.
  • A daily workflow reminds pull request authors when their branch has merge conflicts. Drafts, bot and maintainer pull requests are skipped.

Fixed

  • A failed or unreadable npm bulk advisory lookup (an HTTP error, a network error, invalid JSON, the wrong response shape or malformed records) no longer reports the scan as clean or caches the empty result. The scan is marked partial, valid advisories in a mixed reply are kept, and the next scan tries again. An empty vulnerable_versions still covers every version.
  • OSV query and advisory-detail caches are kept per OSV endpoint, so a scan against a custom --osv-url no longer reuses results cached from another endpoint.
  • cve-lite overrides --fix --rule OA003 can move an override to the right section again. OA003 no longer offers a move the destination cannot hold: **/ globs or Yarn parent/child keys into npm or Bun overrides, nested values or name@range keys into Yarn resolutions, and pnpm projects with a pnpm-workspace.yaml.
  • EXPERIMENTAL --python: requirements lines that put a space instead of = before a hash (urllib3==1.26.4 --hash sha256:...), including quoted hashes, are read and scanned instead of being skipped as unpinned. Package names ending in --hash keep their pin.
  • EXPERIMENTAL --python: scanning a folder named requirements directly now reads every .txt file in it, as it already did when that folder was found inside a project.

Docs

  • CONTRIBUTING spells out how AI assistance may be used: contributors must be able to explain their change and answer review questions themselves, and automated bursts of pull requests or claims are closed.

Validation

  • npm test
  • npm run build

Contributors

Don't miss a new cve-lite-cli release

NewReleases is sending notifications on new releases.