scanoss.json file contains project information and
BOM (Bill of Materials) rules. It allows you to include, remove, or replace components in the
BOM before and after scanning.
For an interactive, browsable view of the schema with detailed field descriptions and examples,
visit the SCANOSS Schema Documentation.
Overview
Thescanoss.json settings file controls the behaviour of the SCANOSS scanner for your project.
It allows you to:
- Define scan scope — specify which files are included in or excluded from scanning and fingerprinting.
- Configure detection behaviour — tune how components and snippets are identified in your codebase.
- Set proxy and HTTP options — configure network settings for SCANOSS API requests.
- Manage BOM rules — include, remove, or replace components in scan results before or after scanning.
Schema Overview
You can explore the complete schema interactively at scanoss.github.io/schema, which provides detailed field descriptions, validation rules, and examples. Download a sample settings file here: scanoss-settings-schema.json The settings file consists of two main sections:Project Information
Theself section contains basic information about your project:
Settings
Thesettings object configures various aspects of the scanning process. It includes file
filtering, network configuration, and snippet matching tuning parameters.
Settings Structure:
Skip Configuration
Theskip object defines rules for excluding files from scanning or fingerprinting. This can
improve scan performance and avoid unnecessary processing.
Note: Patterns use the same syntax as .gitignore files. For details, refer to the
gitignore pattern documentation.
Properties
skip.patterns.scanning — A list of file patterns to exclude from scanning.
| Property | Description |
|---|---|
| Type | Array of strings |
| Required | No |
skip.patterns.fingerprinting — A list of patterns specifying which files should be
skipped during fingerprinting.
| Property | Description |
|---|---|
| Type | Array of strings |
| Required | No |
skip.sizes.scanning — Rules for skipping files based on their size during scanning.
| Property | Description |
|---|---|
| Type | Object |
| Required | No |
patterns(array of strings) — List of glob patterns to which the size rule applies.min(integer) — Minimum file size in bytes.max(integer, required) — Maximum file size in bytes.
skip.sizes.fingerprinting — Rules for skipping files based on their size during
fingerprinting.
| Property | Description |
|---|---|
| Type | Object |
| Required | No |
patterns(array of strings) — List of glob patterns to which the size rule applies.min(integer) — Minimum file size in bytes.max(integer, required) — Maximum file size in bytes.
Pattern Format Rules
- Patterns are matched relative to the scan root directory.
- A trailing slash indicates a directory (e.g.,
path/matches only directories). - A single asterisk
*matches any character except a slash. - Two asterisks
**match zero or more path segments (e.g.,path/**/file.jsmatchespath/file.js,path/to/file.js, andpath/to/nested/file.js). - Range notation such as
[0-9]matches any single character within the specified range. - A question mark
?matches any single character except a slash.
Complete Skip Example
A comprehensive example combining pattern-based and size-based skip rules:Proxy Configuration
Root-level proxy configuration applied to all SCANOSS API requests. This can be overridden at the snippet level usingfile_snippet.proxy.
settings.proxy
| Property | Description |
|---|---|
| Type | Object |
| Required | No |
host(string, required) — Proxy server URL, including protocol and port.
HTTP Configuration
Root-level HTTP configuration applied to all SCANOSS API requests. This can be overridden at the snippet level usingfile_snippet.http_config.
settings.http_config
| Property | Description |
|---|---|
| Type | Object |
| Required | No |
base_uri(string) — Base API endpoint URL.ignore_cert_errors(boolean) — When set totrue, SSL certificate validation errors are ignored. Use with caution — this should not be enabled in production environments.
Snippet Matching Tuning
Thefile_snippet section provides fine-grained control over snippet matching behaviour.
These settings allow you to reduce false positives and improve match accuracy for your codebase.
file_snippet.min_snippet_hits
Minimum number of snippet hits required for a match to be considered valid. Higher values
reduce false positives by requiring more evidence before a match is reported.
Example:
file_snippet.min_snippet_lines
Minimum number of lines a snippet must span to be considered a valid match. Filters out
short matches that are unlikely to be meaningful, such as single-line imports or common
boilerplate.
Example:
file_snippet.ranking_enabled
Controls whether origin project score quality is taken into account during matching.
Example:
file_snippet.ranking_threshold
Sets the minimum ranking score (0–10) required for a match to be reported. Higher values
return only higher-confidence matches. Set to -1 to use the server’s default threshold.
Example:
file_snippet.honour_file_exts
Controls whether file extensions are taken into account during matching. Set to false when
files have been renamed or use non-standard extensions.
Example:
file_snippet.skip_headers
Skips licence headers, comments, and imports at the beginning of files. Helps avoid false
matches on standard boilerplate that appears across many files.
Example:
file_snippet.skip_headers_limit
Maximum number of lines to skip when skip_headers is enabled. Controls how much of the
beginning of each file is excluded from matching.
Example:
file_snippet.dependency_analysis
Enables dependency analysis during scanning. When set to true, the scanner analyses and
reports on dependencies declared in manifest files.
Example:
file_snippet.proxy
Snippet-specific proxy configuration that overrides the root-level settings.proxy. Use
this when snippet scanning requires a different proxy than other API operations.
Example:
file_snippet.http_config
Snippet-specific HTTP configuration that overrides the root-level settings.http_config.
Use this when snippet scanning requires different API endpoints or certificate handling.
Example:
High Precision Folder Matching (HPFM)
HPFM settings control matching behaviour for entire folder structures rather than individual files. This is useful for detecting when large portions of a codebase match known components.hpfm.ranking_enabled
Enables ranking for folder-level matching operations. When set to true, folder matches are
ranked by confidence score.
Example:
hpfm.ranking_threshold
Specifies the minimum ranking score (0–10) required for a folder-level match to be included
in results. Set to -1 to use the server’s default threshold.
Example:
BOM
Thebom section defines rules for modifying the Bill of Materials before and after scanning.
It supports three operations: include, remove, and replace.
Include Rules
Specifies components to be passed to the SCANOSS API as additional context during scanning. These hints inform the API of expected components, increasing the likelihood that they appear in scan results.Remove Rules
Specifies components to be removed from scan results during post-processing. These rules are applied client-side after scanning is complete.Replace Rules
Specifies components to be replaced in scan results during post-processing. These rules are applied client-side after scanning is complete.Important Notes
Matching Rules- Full match — Requires both
pathandpurlto match. The rule applies only to the specific file at the given path with the matching PURL. - Partial match — Matches on either:
pathonly (purlis omitted) — the rule applies to all files at the matching path.purlonly (pathis omitted) — the rule applies to all files with the matching PURL.
- All paths must be specified relative to the scanned directory.
- Use forward slashes (
/) as path separators.
/project/src, then:
component.jsis a valid path.lib/utils.pyis an invalid path and will not match any files.
/project, then:
src/component.jsis a valid path.lib/utils.pyis a valid path.
- Format:
pkg:<type>/<namespace>/<name>@<version> - Examples:
pkg:npm/vue@2.6.12pkg:golang/github.com/golang/go@1.17.3
- Must be valid and include all required components.
- A version is strongly recommended but is optional.