Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 21:07
· 37 commits to main since this release
426d7d5

Added

  • pkg/dependencies/resolve, a dependency graph with edges: nodes are purl@version, and
    each manifest is a root with its members, its edges and a status (complete, partial or
    unknown) with a reason. Member.Direct tells declared packages from those only in the
    lockfile. Node.Local marks the project's own packages, such as a workspace, path crate or
    PATH gem 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.Dev and Root.DevKnown tell 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. DevKnown is false when the manifests do not say which direct dependencies
    are dev, and then no member is dev. package-lock.json, yarn.lock and pnpm-lock.yaml
    read devDependencies, Cargo.lock the member manifests' [dev-dependencies],
    Gemfile.lock the development and test groups of the Gemfile, which it now reads,
    poetry.lock the dev groups of pyproject.toml, uv.lock each root's dev-dependencies
    groups, and composer.lock require-dev.
  • pkg/dependencies/resolve/lockfile builds that graph from package-lock.json (v2 and v3,
    including nested node_modules versions and workspaces), yarn.lock (v1 with package.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
    (with pyproject.toml) and composer.lock (with composer.json). It runs no process, and
    caps the bytes, nodes and edges it accepts from a lockfile.
  • npm-shrinkwrap.json, uv.lock and NuGet packages.lock.json are resolved too. uv.lock
    gives a root per workspace member at its pyproject.toml. packages.lock.json merges 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.lock and go.mod are resolved as module lists. They pin
    every package but record no edges, so their roots are partial with the new reason
    edges_unknown. Pipfile.lock reads the Pipfile for direct and dev dependencies, and
    go.mod marks requirements without // indirect as direct and applies replace.
  • dependencies --extract-local --graph prints 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|spdx renders a project's dependencies
    as the same inventory scan --include deps writes, with no API call. Without --format the
    command prints the flat per-file list it always did.
  • The dependency graph in every output format. raw (schema_version 2.1) adds a
    dependencies list with one root per resolved manifest (lockfile, ecosystem, status, reason,
    dev_known, direct, edges), marks the components a root pulls in transitively with the transitive
    match type, and marks the project's own packages with local. CycloneDX adds an
    application component per root, a dependencies
    entry for every component and a compositions entry per root (complete, incomplete or
    unknown), and a scanoss:local property. SPDX adds a project package the document
    DESCRIBES, a package per root and DEPENDS_ON relationships, and a scanoss:local comment.
  • pkg/sbom/depsource builds an sbom.Inventory from a project's dependency files: the
    lockfile graph with dev members pruned, plus the manifests no lockfile covers parsed flat. It
    is what scan --include deps and dependencies --format share.

Changed

  • scan --include deps lists the lockfile-resolved versions in place of the manifests' range
    entries.
    Where package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock,
    Gemfile.lock, poetry.lock or composer.lock covers a manifest, the output lists every
    runtime package the lockfile resolved, direct and transitive, with its edges, instead of
    entries such as pkg:npm/left@^1.0.0. Dev dependencies are left out of every format. A
    lockfile that cannot be read gives an unknown root with no packages. Manifests no lockfile
    covers (pom.xml, go.mod, requirements.txt, …) keep their flat declared entries.
  • github.com/pelletier/go-toml/v2 updated to v2.4.3; v2.2.4 panics on some malformed TOML.
  • CycloneDX metadata.component always carries a bom-ref (the project name), so the
    dependency graph has something to hang from and a consumer can address the project.
  • sbom and enrich skip the project and root placeholders when reading a CycloneDX or
    SPDX document, so an application component without a purl no longer becomes a component
    named after a manifest. The graph itself round-trips through raw only.

The dependencies --graph JSON 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.txt

Go:

go install github.com/scanoss/scanoss.go/cmd/scanoss-cli@latest

See the README and
CLIENT_HELP.md
to get started.