Repository navigation
Upgrade note. Python scanning is no longer experimental: findings from
--pythonnow count toward--fail-onand--ratchet. Three changes can affect an existing setup.
- Scans run with
--pythoncan now fail where they passed before. Python findings at or above the--fail-onlevel exit 1, and a new Python finding above a ratchet baseline fails the run.- A multi-folder scan now names the folders it could not read: a lockfile that resolved no packages, or a
package.jsonthat declares dependencies but has no lockfile, including one at the root. The run exits 3 unless--allow-emptyis set, where it used to exit 0. A folder that--prod-onlyemptied is still a skip and exits 0, unless another folder went unread.- A folder with JavaScript and Python together now writes
--sbomand--cdxoutput instead of refusing.
Added
--pythonscans are no longer experimental. Python findings count toward--fail-onand--ratchetlike npm ones, in single-folder, mixed and multi-folder scans, and the note that said they did not affect the exit code is gone.--pythonis still the switch that turns Python on.--fixand--create-prstill refuse Python; with--offlinethe Python files are reported as not scanned, since the offline database holds npm advisories only; and--sarifon a folder with both JavaScript and Python is still refused.- A folder with JavaScript and Python together gets SBOMs:
--sbomand--cdxwrite one document per requested format holding both ecosystems, withpkg:npm/andpkg:pypi/identifiers side by side. - CycloneDX output carries the dependency graph: each component, and the project itself, lists what it depends on, from the same relationships the SPDX output uses, for npm, pnpm, Yarn, Bun and Python. When a folder's graph cannot be read, the file has no dependency section rather than one saying nothing depends on anything.
- When a scan finds no lockfile or requirements file at all, it says if one sits below
--search-depthand names the depth to rerun with, in the terminal and in the--allow-emptyJSON notes.
Changed
- A multi-folder scan names the folders it could not read instead of leaving them out of "Scanned N folders": a subfolder whose lockfile resolved no packages, and a folder whose
package.jsondeclares dependencies but has no lockfile, including the root, a folder above a lockfile folder, and a folder inside another such folder. The run exits 3 unless--allow-emptyis set, and the JSON lists them underunscannedFolders. Without--allow-emptythe JSON also marks the run partial. Apackage.jsonthat declares no dependencies of its own, such as a root that only lists workspaces, stays quiet.
Fixed
- Python SBOMs: a pin that every requirements file only inherits from another is linked to the project instead of left without a relationship, quoted
"name"and"version"keys inpyproject.tomlare read, and the CycloneDX file records advisories accepted by a ratchet baseline. - SPDX output no longer gives two packages the same SPDXID when one package's name matches another's disambiguated id, which made the document invalid.
- A
package-lock.jsonlicence written in the old{ type, url }object form is read, so the SPDX SBOM and the licence check no longer drop it. - For a vulnerable package more than one level deep, the within-range advice names the parent whose range already allows the safe version, instead of naming the vulnerable package itself, in the terminal and the HTML report.
- Advisories whose own id is a CVE get an EPSS score. Before, only CVE numbers listed among an advisory's aliases were looked up.
- When the fix plan merges two parent upgrades into one higher version, it re-checks that version before warning it may not fix a finding, and the chain details printed with it come from the version the merged command actually installs.
- A transitive finding whose advisory names no fixed version no longer gets a within-range update or parent upgrade to a newer release that is still affected. It says no known safe version exists instead.
- The update notice treats pre-releases correctly: a stable release counts as newer than its release candidate, and a pre-release is not offered to stable users. An unreadable last-checked time no longer stops update checks for good.
overrides --fixkeepspackage.json's indentation and line endings, such as tabs and CRLF, instead of rewriting the whole file in a different style.- In a Yarn Classic workspace, a dependency that resolves to a local workspace package, which Yarn links and leaves out of
yarn.lock, is no longer treated as a registry package, so fix commands no longer replace the local link with a registry install. - In a pnpm workspace, the fix command for a dependency the workspace root declares carries
-w, so pnpm runs it instead of refusing. - OA009 only suggests removing an override when every parent's whole declared range, upper bound and pre-release rules included, fits inside the override, and no longer offers removal when a parent's range admits no version at all.
- When a source file is too large for the phantom-dependency import scan, PD001 and PD002 say they were checked but incomplete and name the skipped file, in JSON, SARIF, the terminal and HTML, instead of being listed among rules that did not run.
- A pinned
requirements.txtline that carries pip options such as--no-binary,--only-binaryor--config-settingsis read instead of being skipped as unpinned and marking the scan partial. - Multi-folder
--jsonoutput lists the folders--prod-onlyleft with no packages, matching the terminal. --outputhelp, docs and errors say which file extensions make it a file path rather than a folder.
Docs
- The docs website loads faster on phones: fonts are bundled with the site instead of fetched from Google Fonts, so visitors no longer contact Google, and homepage images are smaller.
- The CLI reference says a package with a malicious-code (
MAL-) advisory fails--fail-onat every level.
Validation
- npm test
- npm run build
Contributors
Thank you to everyone whose work is in this release: @2648782102, @aseel-707, @CodeWith-sakib, @Darshan3690, @GandotraDiya, @immHarshitt, @mateuscmtropical, @Medhansh-741, @Mugunth007, @muntasir-396, @Nachiket-Roy, @nios-x, @noor-ulhassan, @prx-my, @sarankumar1325, @Skeletor-Pirate, @WadekarPrashant and @YK-03. Thanks also to @vianmangal for reporting issues fixed here.