Skip to main content

SCANOSS

SCANOSS

A wrapper for the SCANOSS snippet scanner.

Configuration

Example

Use the following syntax to configure this plugin globally as part of config.yml:

ort:
scanner:
scanners:
SCANOSS:
options:
apiUrl: "https://api.osskb.org"
writeToStorage: true
enablePathObfuscation: false
minSnippetHits: 5
minSnippetLines: 3
honourFileExts: true
rankingEnabled: false
rankingThreshold: 0
skipHeaders: false
skipHeadersLimit: 0
secrets:
apiKey: ""

Options

apiUrl

STRING Default

The URL of the SCANOSS server.

apiKey

SECRET Default

The API key used to authenticate with the SCANOSS server.

writeToStorage

BOOLEAN Default

Whether to write scan results to the storage.

enablePathObfuscation

BOOLEAN Default

Whether to enable path obfuscation when sending file paths to the SCANOSS server. When enabled, the actual file paths will be obfuscated in the requests to protect sensitive information.

minSnippetHits

INTEGER Default

The minimum number of snippet matches required to report a snippet finding. This parameter controls the quality filter for snippet detection results. A higher value reduces false positives but may miss some legitimate matches.

minSnippetLines

INTEGER Default

The minimum number of lines required in a snippet match to report a finding. This parameter controls the minimum length threshold for snippet detections. Snippets shorter than this will be filtered out.

honourFileExts

BOOLEAN Default

Whether to honour file extension matching when detecting snippets. If enabled, snippet matches must be within files with matching extension to the source file. Set to false to allow matches across different file types.

rankingEnabled

BOOLEAN Default

Whether to enable ranking-based filtering for snippet results. When enabled, snippets are filtered based on the ranking threshold value. Set to false to disable ranking-based filtering.

rankingThreshold

INTEGER Default

The ranking threshold used to filter snippet results when ranking is enabled. Snippets with a ranking score below this threshold will be filtered out. This value is typically between 0 and 100. Only used when rankingEnabled is true.

skipHeaders

BOOLEAN Default

Whether to skip header files (files with common header extensions) when detecting snippets. When enabled, files matching standard header patterns will be excluded from snippet matching. Set to false to include header files in snippet detection.

skipHeadersLimit

INTEGER Default

The maximum number of lines to skip in header files when skipHeaders is enabled. This limits how many lines at the beginning of a file are considered "headers" for skipping. Set to 0 to skip the entire header file if skipHeaders is enabled.