What's New
Added
components releases— list a component's releases for a PURL (version, date, notes, URL).--requirementnarrows to a version or semver range;--limit/--offsetpaginate.scanoss.SetLogger— one logger for every SDK package.pkg/filteralso reports which rules were applied and every exclusion at Debug, so "why was my file skipped?" is now answerable.wfp.Stream— fingerprint into anio.Writer, writing each file's block as it finishes instead of holding the whole WFP in memory.wfp.StreamFolderisFolder's collection withStream's memory profile.Scan.WFPReader— scan a WFP straight from anio.ReaderAt. Same asScan.WFP, minus the requirement that it fit in memory.sbom.Inventory.Add— one entry per component, merging evidence as it goes. When a component is both detected and declared, detected wins (scope and metadata).
Fixed
- A scan that fingerprinted nothing now fails and names the cause instead of looking like an empty success.
SkipDirsand friends add to the built-in exclusion lists instead of replacing them, and keep applying when the built-in flags are off.- Fingerprint failures are reported — directories handed to
wfp.Filesincluded — and advance the progress callback, sodonefinally reachestotal. scan --include depsno longer applies the scanning folder rules to the manifest stage, so manifests in otherwise-excluded folders are picked up.- Inverted size bounds (
min>max) are warned about and ignored instead of silently excluding every file they matched. DecorationPipeline.Runskips an unsupported service with a warning instead of discarding the whole run.- An unset
Scopecounts as detected on a merge, as the field always documented. wfp.Files/wfp.Folderoutput andResult.Filesare sorted by path, so multi-threaded runs of thewfpcommand are byte-reproducible.- The SDK writes nothing to stderr until you call
SetLogger.
Changed
- An enrichment failure no longer fails the command — it warns, still emits the base inventory, and exits 0.
Scan.FolderandScan.Filesspill the WFP to a temporary file and upload from it, so peak memory no longer grows with the tree you scan. Two consequences: the uploaded WFP's block order is now completion order and varies between runs (scan results are unaffected — only the byte layout), andScan.WFPstill takes the bytes you hand it.- The scan upload reads the WFP from any
io.ReaderAtand chunk requests carry an explicit length, so they can be replayed on a retry. No public API change. - The combined WFP stream is built once, as bytes — the string-to-bytes conversion that duplicated the entire WFP at peak is gone.
Breaking changes
scanpipelinestreams the WFP through a temporary file.Result.WFPis gone — passOptions.WFPWriterto keep the stream as it's generated: a file to save it, abytes.Bufferfor the old behavior. Block order is completion order and varies between runs.- The filter profiles read the project's settings themselves:
filter.Scanning(s),Fingerprinting(s),Dependencies(s).DefaultOptionsis gone. filter.Optionsrenames:FolderDefaults/FileDefaults→BuiltinFolderRules/BuiltinFileRules,PreserveDependencyManifests→KeepManifests,SkipExtensions→SkipExts. New:SkipDirExts,SkipPatterns,SizeRules.pkg/scannerandpkg/fingerprint/wfpmerge intopkg/wfp:Foldercollects and fingerprints;Filesfingerprints a list as-is.scanpipelineAPI:Build/Enrichgive way toEnricher(which returns an error);Options.Filter/DependencySettings→ScanFilters/DependencyFilters;Result.ProcessErrorsis now[]error; newEnrichError.DependencyParser.ParseFilesreturns the per-file errors asmap[string]errorinstead of printing them.- The
ServicevaluesDecorationPipelinerejects are unexported. pkg/outputis nowinternal/outputand no longer part of the public API.
Removed
| Was | Now |
|---|---|
| scanner.GenerateWFP, wfp.GenerateFingerprint, wfp.CombineFingerprints, WorkerPool | wfp.Folder / wfp.Files |
| scanner.CollectFiles(WithOptions) | filter.Collect with a profile |
| the exported filter matcher machinery | the filter profiles above |
| settings.Resolve and the per-operation *Filter helpers | compose Detect(dir) then Load(path) |
| settings.GetSBOMData / SBOMData / FormatSBOMParam | pkg/postprocess, which applies BOM rules in v3 |
| the manifest-format types and string helpers in dependencies/parsers | ParseFile |
| Config.Logger | scanoss.SetLogger |
| parsers.RemoveDuplicates, output.Writer.WriteFormat, DefaultPostSize, GRAM_WFP1, WINDOW_WFP1 | — |
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.