Skip to main content
This guide covers advanced SCANOSS-PY features for power users who need fine-grained control over scanning, performance optimisation, and custom workflows.

Settings File (scanoss.json)

The scanoss.json settings file provides declarative configuration for project scanning, Bill of Materials (BOM) management, and file filtering.

Quick Start

Create scanoss.json in your project root:
Scan with settings:

High Precision Snippet Matching (HPSM)

HPSM is an alternative scanning mode that increases the precision of snippet detection by applying stricter matching criteria. Use it when you need to reduce false positives in snippet results.

Enable HPSM

Header Filtering

Skip detected licence headers, comments, and import blocks at the beginning of files to prevent them from influencing snippet matching results.

Basic Header Filtering

Limit Header Lines

Control the maximum number of lines to skip from the beginning of each file:

Fingerprint Obfuscation

Obfuscate fingerprints before submission to the SCANOSS API, for privacy or security purposes:

Advanced File Filtering

Skip by Extension

Skip by Folder

Skip by File Size

Include All Files

Override default exclusions:

Scan Specific Files

Trace Mode

Quiet Mode

Snippet Tuning

Snippet tuning allows you to configure detection thresholds and matching behaviour to suit your project’s requirements. The parameters below control how many snippet matches are required and how results are ranked before being reported.

When to Use CLI vs scanoss.json

Use CLI parameters when:
  • Testing different configurations
  • Running one-off scans with specific requirements
  • Overriding baseline settings for a particular scan
  • Running automated scans with varying sensitivity levels
Use scanoss.json when:
  • Establishing baseline scanning behaviour for your project
  • Ensuring consistent scans across all team members
  • Defining project-wide detection policies
  • Version-controlling your scanning configuration

Parameter Reference

min_snippet_hits

Sets the minimum number of snippet matches required before reporting a match. CLI:
scanoss.json:

min_snippet_lines

Sets the minimum number of lines a code snippet must span to be considered a match. CLI:
scanoss.json:

ranking_enabled

Controls whether the origin project’s quality score is taken into account during matching. CLI:
scanoss.json:

ranking_threshold

Sets the minimum ranking score required for matches to be reported. Accepts an integer from 0 (lowest) to 10 (highest confidence). Use -1 to apply the server default. CLI:
scanoss.json:

honour_file_exts

Controls whether file extensions are taken into account during matching. CLI:
scanoss.json: