Every command also accepts
--help for its exhaustive, always-current flag
list: scanoss-cli <command> --help.Global Flags
Available on every command:Authentication & Endpoints
The default endpoint ishttps://api.scanoss.com and requires an API key. A custom endpoint (an on-prem deployment, for example) via --api-url may run keyless.
Targeting the default endpoint without
--api-key fails fast with a
banner, no request is sent. On a 401, the CLI prints an “Unauthorized”
hint.TLS / Certificates
For self-signed or internal endpoints:--proxy overrides HTTP_PROXY/HTTPS_PROXY for one run and honours NO_PROXY. PAC files are not supported. Both flags are available on every command that reaches the API, and can be stored with config set, see Configuration.
wfp
Generate WFP fingerprints without contacting the API.
The size bounds mean the same here as on
scan, see Skipping Files.
scan
Fingerprint a folder or file, upload the WFP to the SCANOSS v3 API, and poll until the scan completes.--chunk-size sets the upload block size in bytes.
wfp command when you need byte-reproducible output to diff or hash.
How it works. Blocks are POSTed to
/v3/wfp/scan as
application/octet-stream with a Content-Range header and a shared
X-Scan-Id. The CLI then polls GET /v3/wfp/scan/<scan-id>. The scan id
is printed as soon as the upload finishes, so an interrupted scan is
resumable, see results.
These persistent flags are shared with
scan wfp.
Skipping Files
Files are filtered before scanning (build dirs, vendored deps, generated/binary files, oversized files). Toggle the sources with flags, or configure project rules inscanoss.json, see scanoss.json Reference.
There is no minimum file size by default. However small a file is, it’s fingerprinted unless another rule skips it. Set a floor with --min-size:
--all-extensions drops the built-in file rules, extensions, name endings, and exact names, and --all-folders the directory ones. They’re separate switches because the two exclude very different amounts: a caller who wants every folder scanned rarely also wants every binary fingerprinted.
--all-hidden includes entries whose name begins with a dot, version-control metadata among them: .git is excluded for being hidden, like any other dotted entry, so asking for every hidden entry gets a scan of the repository objects too.
The size bounds are independent of all three: they’re what you asked for, not a built-in, so they still apply when the built-in skip lists are off.
The two bounds read differently. --min-size is literal: --min-size 0, the default, admits every file, because every file is at least 0 bytes. --max-size can’t work that way, since a literal maximum of 0 would exclude everything, so there 0 means “unlimited”. A negative value, or a --min-size above a non-zero --max-size, is rejected before any file is read.
scanoss.json equivalent (per-project skip rules):
--min-size/--max-size apply to every file, while a skip.sizes rule applies only to the files its patterns match (a rule with no patterns matches nothing and is ignored). Use the flags for a blanket bound, and skip.sizes when one file type deserves different limits from the rest.
BOM Context
Configure a Bill of Materials inscanoss.json (auto-detected in the target, or pass --settings):
bom.remove and bom.replace are applied client-side, after results come
back, and in that order: matching components are dropped, then the
survivors covered by a replace rule are re-pointed at their
replace_with component. An entry may be scoped by purl, by path, or
by both; where several cover the same file the most specific one wins.
bom.include only protects its PURLs from removal and is not yet
honored server-side; identify/ignore are not applied.Output Layers (--include)
By default a scan reports only the components it detected. --include opts into extra output layers, gathered over both detected and declared components:
--include, narrowed to what the chosen --format can render: a layer the format can’t represent is skipped (not gathered) with an up-front Skipping <layer> message. raw renders every layer; cyclonedx drops crypto/geo; spdx drops vulns/crypto/geo.
SBOM Output
raw— the neutral inventory (components tagged byscope, per-component layers inline, and a flat vulnerabilities list) wrapped in a versioned envelope. Default.spdx— SPDX 2.3.cyclonedx— CycloneDX 1.7 (licenses, evidence, vulnerabilities).
package.json and package-lock.json, or detected and also declared, is emitted once; different versions of the same PURL are kept. In SPDX, multiple licenses on a component are combined with AND.
results
Retrieve the results of a scan by the id printed duringscan (works after a Ctrl+C, the uploaded WFP is resumable):
GET /v3/wfp/scan/<scan-id> until complete.
sbom
Produce an SBOM from a scanoss raw inventory, or convert an existing SBOM between formats, offline. The input format is detected from the file content.scan raw output), CycloneDX, or SPDX (JSON), detected from content. Target (-f, --format): cyclonedx or spdx. Conversion is best-effort: data the target can’t represent is dropped, for example SPDX 2.3 has no vulnerability model, so vulnerabilities are omitted (with a warning) when converting to spdx.
enrich
Decorate an existing inventory or SBOM with purl-keyed layers through the SCANOSS API, no source tree, no fingerprinting, no re-scan. Because it’s keyed purely by PURL, it’s re-runnable (weekly, for example) to refresh the layers against the same file.scan raw output), CycloneDX, or SPDX (JSON), detected from the file content. Layers (--include): the purl-keyed layers vulns, licenses, crypto, geo.
deps is not an enrich layer, dependency analysis needs a
manifest/source tree and can’t be derived from a components list, so
--include deps errors on enrich.-f, --format to convert in the same pass. A layer the output format can’t represent is skipped up front with a notice (spdx skips vulns/crypto/geo, cyclonedx skips crypto/geo), the same capability rules as scan. Enrichment is non-fatal: a failed service is logged and skipped, and a partial result is still written.
dependencies
Two modes. Local mode — parse manifest files under a path and query the API:--requirement is optional):
Endpoints: direct →
POST /v3/dependencies/dependencies; transitive → POST /v3/dependencies/transitive.
Decoration Commands
Query the SCANOSS v3 API about components. Each command below is a parent with one subcommand per operation; running it bare uses the default operation. Input is a list of PURLs (repeat--purl, or pass --input), split into chunks and queried concurrently.
Shared flags:
The
--input file is either newline-delimited purl[,requirement], or JSON {"components":[{"purl":"...","requirement":"..."}]}.
vulnerabilities — components (default), cpes
cryptography — algorithms (default), algorithms-range, versions-range, hints, hints-range
The version or range goes in --requirement.
licenses — declared (default), attribution, evidence
geoprovenance — origin (default), countries
copyright — evidence (default), holders
components — search (default), versions, releases, status
search, versions, and releases take their own flags instead of the PURL list.
When a component exists but has no release notes for the resolved
version, the API returns
RELEASE_NOTES_UNAVAILABLE, the command prints a
“no release notes available” notice on stderr, still emits the JSON, and
exits 0 (not an error).scanoss.json Reference
scanoss.json (or settings.json) carries the BOM context and file-skip rules referenced throughout this page. For the full schema, see Declaring Components.