@@ -43,16 +43,87 @@ You can create your own knowledgebase with the minr command, available at https:
4343
4444Syntax: scanoss [ parameters] [ TARGET]
4545
46- Configuration:
47- * -w Treats TARGET as a .wfp file regardless of the actual file extension
48- * -s FILE Use assets specified in the provided JSON SBOM (CycloneDX/SPDX2.2 JSON format) as input to identification
49- * -b FILE Ignore matches to assets specified in the provided JSON SBOM (CycloneDX/SPDX2.2 JSON format)
50-
51- Options:
52- * -t Tests engine performance
53- * -v Display version and exit
54- * -h Display this help and exit
55- * -d Enable debugging information
46+ ## Configuration Options
47+
48+ ### Basic Configuration
49+ * ` -w, --wfp ` - Process TARGET as a .wfp file, regardless of its actual extension
50+ * ` -H, --hpsm ` - Enable High Precision Snippet Match mode (requires 'libhpsm.so' in the system)
51+ * ` -M, --max-snippets NUM ` - Search for up to NUM different components in each file (maximum: 9)
52+ * ` -N, --max-components NUM ` - Set maximum number of components (default: 5)
53+ * ` -T, --tolerance NUM ` - Set snippet scanning tolerance percentage (default: 0.1)
54+ * ` -r, --rank NUM ` - Set maximum component rank accepted (default: 11)
55+ * ` --max-files NUM ` - Set maximum number of files to fetch during matching (default: 12000)
56+ * ` --min-match-hits NUM ` - Set minimum snippet ID hits for a match (default: 3, disables auto-adjust)
57+ * ` --min-match-lines NUM ` - Set minimum matched lines for a range (default: 10, disables auto-adjust)
58+ * ` --range-tolerance NUM ` - Set max non-matched lines tolerated in a range (default: 5)
59+ * ` --ignore-file-ext ` - Ignore file extension during snippet matching (default: honor extension)
60+
61+ ### SBOM and Filtering
62+ * ` -s, --sbom FILE ` - Include assets from a JSON SBOM file (CycloneDX/SPDX2.2 format) in identification
63+ * ` -b, --blacklist FILE ` - Exclude matches from assets listed in JSON SBOM file (CycloneDX/SPDX2.2 format)
64+ * ` --force-snippet ` - Same as "-b" but with forced snippet scanning
65+ * ` -c, --component HINT ` - Add a component HINT to guide scan results
66+
67+ ### Attribution and Licenses
68+ * ` -a, --attribution FILE ` - Show attribution notices for the provided SBOM.json file
69+ * ` -k, --key KEY ` - Show contents of the specified KEY file from MZ sources archive
70+ * ` -l, --license LICENSE ` - Display OSADL metadata for the given SPDX license ID
71+ * ` -L, --full-license ` - Enable full license report
72+ * ` -F, --flags FLAGS ` - Set engine scanning flags (see Engine Flags section below)
73+
74+ ### General Options
75+ * ` -t, --test ` - Run engine performance tests
76+ * ` -v, --version ` - Show version information and exit
77+ * ` -n, --name NAME ` - Set database name (default: oss)
78+ * ` -h, --help ` - Display help information and exit
79+ * ` -d, --debug ` - Store debugging information to disk (/tmp)
80+ * ` -q, --quiet ` - Suppress JSON output (show only debugging info via STDERR)
81+
82+ ## Environment Variables
83+
84+ * ` SCANOSS_MATCHMAP_MAX ` - Set the snippet scanning match map size (default: 10000)
85+ * ` SCANOSS_FILE_CONTENTS_URL ` - Define the API URL endpoint for sources. Source URL won't be reported if not defined
86+
87+ ## Engine Scanning Flags
88+
89+ Configure the scanning engine using flags with the ` -F/--flags ` parameter. These settings can also be specified in ` /etc/scanoss_flags.cfg `
90+
91+ | Flag | Setting |
92+ | -------| -------------------------------------------------------|
93+ | 1 | Disable snippet matching (default: enabled) |
94+ | 2 | Enable snippet_ids (default: disabled) |
95+ | 4 | Disable dependencies (default: enabled) |
96+ | 8 | Disable licenses (default: enabled) |
97+ | 16 | Disable copyrights (default: enabled) |
98+ | 32 | Disable vulnerabilities (default: enabled) |
99+ | 64 | Disable quality (default: enabled) |
100+ | 128 | Disable cryptography (default: enabled) |
101+ | 256 | Disable best match only (default: enabled) |
102+ | 512 | Hide identified files (default: disabled) |
103+ | 1024 | Enable download_url (default: disabled) |
104+ | 2048 | Enable "use path hint" logic (default: disabled) |
105+ | 4096 | Disable extended server stats (default: enabled) |
106+ | 8192 | Disable health layer (default: enabled) |
107+ | 16384 | Enable high accuracy, slower scan (default: disabled) |
108+
109+ ### Examples:
110+ ``` bash
111+ # Scan DIRECTORY without license and dependency data
112+ scanoss -F 12 DIRECTORY
113+ scanoss --flags 12 DIRECTORY
114+
115+ # Scan TARGET including SBOM assets
116+ scanoss --sbom my_sbom.json TARGET
117+
118+ # Scan with custom snippet matching parameters
119+ scanoss --min-match-hits 5 --min-match-lines 15 TARGET
120+
121+ # Scan with custom range tolerance
122+ scanoss --range-tolerance 10 TARGET
123+
124+ # Ignore file extensions during matching
125+ scanoss --ignore-file-ext TARGET
126+ ```
56127
57128# File matching logic
58129
0 commit comments