CLI Overview
Runningscanoss-js without arguments lists all available subcommands:
Subcommands
scan
Scans a folder or file against the SCANOSS API and Engine. This is the primary command for
open source identification. The following capabilities are available when invoked with the
appropriate flags:
- Standard scanning — identify open source components in a source folder or file
- API token scanning — use an API token and custom API URL for enhanced scanning capabilities
- Dependency detection — include dependency manifest scanning alongside code scanning
- Cryptography detection — detect cryptographic algorithms and libraries. When an API token is provided, component-level cryptography scanning is performed via the SCANOSS API; otherwise, only local cryptography detection is performed
dep
Scans a folder exclusively for dependency manifest files without performing code
identification. This command parses dependency manifest files from your project to extract
declared dependencies.
The dependency manifest files recognised during the scanning process are:
| Ecosystem | Files |
|---|---|
| Python | requirements.txt, pip_requirements_lock.txt, *-requirements.txt, requirements-*.txt, pyproject.toml |
| Java | pom.xml |
| JavaScript | package.json, package-lock.json, yarn.lock, pnpm-lock.yaml |
| Ruby | Gemfile, Gemfile.lock |
| Golang | go.mod, go.sum |
| .NET / NuGet | *.csproj, packages.config |
| Gradle | build.gradle, build.gradle.kts, libs.versions.toml |
wfp
Generates WFP (Winnowing FingerPrint) hashes for a folder or file without performing any
analysis or API calls. The resulting .wfp file can be stored and passed as input to scan
at a later time, using the appropriate source argument.
This is useful for separating the fingerprinting step from the scanning step — for example,
in batch or deferred workflows.
Note: The--dependenciesflag is not applicable when scanning a previously generated.wfpfingerprint file, as dependency manifest files are not captured by the fingerprint hashes.
crypto
Scans a folder or file exclusively for local cryptography detection — identifying
cryptographic algorithms and libraries — without performing open source identification.
Custom detection rules for algorithms and libraries can be provided via JSON rule files.
Note: Custom rules for algorithms and libraries are applied to local cryptography detection regardless of which other flags are provided.