Repository navigation
v0.12.0
Added
pkg/dependencies/resolve, a dependency graph with edges: nodes arepurl@version, and
each manifest is a root with its members, its edges and a status (complete,partialor
unknown) with a reason.Member.Directtells declared packages from those only in the
lockfile.Node.Localmarks the project's own packages, such as a workspace, path crate or
PATHgem that another package depends on; they keep their edges, so consumers skip them to list third-party
packages without losing what they pull in.Member.DevandRoot.DevKnowntell dev dependencies from runtime ones, per root: a
member is dev when the root reaches it only through its dev dependencies, so it can be left
out of an SBOM.DevKnownis false when the manifests do not say which direct dependencies
are dev, and then no member is dev.package-lock.json,yarn.lockandpnpm-lock.yaml
readdevDependencies,Cargo.lockthe member manifests'[dev-dependencies],
Gemfile.lockthedevelopmentandtestgroups of theGemfile, which it now reads,
poetry.lockthe dev groups ofpyproject.toml,uv.lockeach root'sdev-dependencies
groups, andcomposer.lockrequire-dev.pkg/dependencies/resolve/lockfilebuilds that graph frompackage-lock.json(v2 and v3,
including nestednode_modulesversions and workspaces),yarn.lock(v1 withpackage.json,
and berry with workspaces),pnpm-lock.yaml(5.x, 6.x and 9.x),Cargo.lock(with a root
per workspace member when the member manifests are available),Gemfile.lock,poetry.lock
(withpyproject.toml) andcomposer.lock(withcomposer.json). It runs no process, and
caps the bytes, nodes and edges it accepts from a lockfile.npm-shrinkwrap.json,uv.lockand NuGetpackages.lock.jsonare resolved too.uv.lock
gives a root per workspace member at itspyproject.toml.packages.lock.jsonmerges every
target framework into one root named after the project file beside it, with the solution's
other projects as local nodes; it does not record dev dependencies.gradle.lockfile,Pipfile.lockandgo.modare resolved as module lists. They pin
every package but record no edges, so their roots arepartialwith the new reason
edges_unknown.Pipfile.lockreads thePipfilefor direct and dev dependencies, and
go.modmarks requirements without// indirectas direct and appliesreplace.dependencies --extract-local --graphprints the dependency graph resolved from every
lockfile under the path, merged into one JSON document, so the resolver can be tried on a
real project.dependencies --extract-local --format raw|cyclonedx|spdxrenders a project's dependencies
as the same inventoryscan --include depswrites, with no API call. Without--formatthe
command prints the flat per-file list it always did.- The dependency graph in every output format.
raw(schema_version2.1) adds a
dependencieslist with one root per resolved manifest (lockfile, ecosystem, status, reason,
dev_known,direct, edges), marks the components a root pulls in transitively with thetransitive
match type, and marks the project's own packages withlocal. CycloneDX adds an
applicationcomponent per root, adependencies
entry for every component and acompositionsentry per root (complete,incompleteor
unknown), and ascanoss:localproperty. SPDX adds a project package the document
DESCRIBES, a package per root andDEPENDS_ONrelationships, and ascanoss:localcomment. pkg/sbom/depsourcebuilds ansbom.Inventoryfrom a project's dependency files: the
lockfile graph with dev members pruned, plus the manifests no lockfile covers parsed flat. It
is whatscan --include depsanddependencies --formatshare.
Changed
scan --include depslists the lockfile-resolved versions in place of the manifests' range
entries. Wherepackage-lock.json,yarn.lock,pnpm-lock.yaml,Cargo.lock,
Gemfile.lock,poetry.lockorcomposer.lockcovers a manifest, the output lists every
runtime package the lockfile resolved, direct and transitive, with its edges, instead of
entries such aspkg:npm/left@^1.0.0. Dev dependencies are left out of every format. A
lockfile that cannot be read gives anunknownroot with no packages. Manifests no lockfile
covers (pom.xml,go.mod,requirements.txt, …) keep their flat declared entries.github.com/pelletier/go-toml/v2updated to v2.4.3; v2.2.4 panics on some malformed TOML.- CycloneDX
metadata.componentalways carries abom-ref(the project name), so the
dependency graph has something to hang from and a consumer can address the project. sbomandenrichskip the project and root placeholders when reading a CycloneDX or
SPDX document, so anapplicationcomponent without a purl no longer becomes a component
named after a manifest. The graph itself round-trips throughrawonly.
The
dependencies --graphJSON output is new and experimental: its shape may change in a minor release.
Install
Prebuilt binary: download the archive for your platform below, extract it,
and move scanoss-cli onto your PATH. On Linux (amd64):
tar xzf scanoss-cli-linux-amd64.tar.gz
sudo mv scanoss-cli /usr/local/bin/Verify a download against checksums.txt:
sha256sum -c --ignore-missing checksums.txtGo:
go install github.com/scanoss/scanoss.go/cmd/scanoss-cli@latestSee the README and
CLIENT_HELP.md
to get started.