Skip to content

Commit 157f4a4

Browse files
authored
Add folder decisions to settings export
* feat:SP-1929 Includes src folder on settings export * chore:SP-1943 Add unit tests for settings export * chore:SP-1944 Adds integration tests * chore:SP-1951 Adds glob patterns to settings export * feat:SP-1987 Ingest SCANOSS settings * chore:SP-1997 Adds SCANOSS Settings documentation * Upgrades app version to v1.15.5 * chore:SP-2005 Hides API Key on ProjectSettings screen * bug:SP-2006 Fixes bug on venv indexing * Upgrades scanoss version to v0.15.5
1 parent ae67b2d commit 157f4a4

34 files changed

+1221
-500
lines changed

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,115 @@ Example structure of the file:
119119
}
120120
]
121121
```
122+
# SCANOSS Settings File
123+
SCANOSS provides a settings file to customize the scanning process. The settings file is a JSON file that 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.
124+
125+
### Settings
126+
The ``scanoss.json`` object allows you to configure various aspects of the scanning process. Currently, it provides control over which files should be skipped during scanning through the ``skip`` property.
127+
128+
129+
### BOM Rules
130+
131+
The ``bom`` section defines rules for modifying the BOM before and after scanning. It contains three main operations:
132+
133+
### 1. Include Rules
134+
135+
Rules for adding context when scanning. These rules will be sent to the SCANOSS API meaning they have more chance of being considered part of the resulting scan.
136+
137+
138+
139+
{
140+
"bom": {
141+
"include": [
142+
{
143+
"path": "/path/to/file",
144+
"purl": "pkg:npm/[email protected]",
145+
"comment": "Optional comment"
146+
}
147+
]
148+
}
149+
}
150+
151+
### 2. Remove Rules
152+
153+
Rules for removing files from results after scanning. These rules will be applied to the results file after scanning. The post processing happens on the client side.
154+
155+
156+
{
157+
"bom": {
158+
"remove": [
159+
{
160+
"path": "/path/to/file",
161+
"purl": "pkg:npm/[email protected]",
162+
"comment": "Optional comment"
163+
}
164+
]
165+
}
166+
}
167+
168+
### 3. Replace Rules
169+
170+
Rules for replacing components after scanning. These rules will be applied to the results file after scanning. The post processing happens on the client side.
171+
172+
{
173+
"bom": {
174+
"replace": [
175+
{
176+
"path": "/path/to/file",
177+
"purl": "pkg:npm/[email protected]",
178+
"replace_with": "pkg:npm/[email protected]",
179+
"license": "MIT",
180+
"comment": "Optional comment"
181+
}
182+
]
183+
}
184+
}
185+
186+
187+
# Matching Rules
188+
189+
190+
1. **Full Match**: Requires both PATH and PURL to match. It means the rule will be applied ONLY to the specific file with the matching PURL and PATH.
191+
2. **Partial Match**: Matches based on either:
192+
- PURL only (PATH is optional). It means the rule will be applied to all files with the matching PURL.
193+
194+
Example Configuration
195+
---------------------
196+
197+
Here's a complete example showing all sections:
198+
199+
200+
{
201+
"bom": {
202+
"include": [
203+
{
204+
"path": "src/lib/component.js",
205+
"purl": "pkg:npm/[email protected]",
206+
"comment": "Include lodash dependency"
207+
}
208+
],
209+
"remove": [
210+
{
211+
"purl": "pkg:npm/[email protected]",
212+
"comment": "Remove deprecated package"
213+
}
214+
],
215+
"replace": [
216+
{
217+
"path": "src/utils/helper.js",
218+
"purl": "pkg:npm/[email protected]",
219+
"replace_with": "pkg:npm/[email protected]",
220+
"license": "MIT",
221+
"comment": "Upgrade to newer version"
222+
}
223+
]
224+
}
225+
}
226+
227+
Usage
228+
-----
229+
230+
You can add your 'scanoss.json' on the root of your project
122231

123232

124233
## [Collaborative Workspace](COLLAB_WORKSPACE.md)

package-lock.json

Lines changed: 44 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"react-virtualized-tree": "^3.4.1",
153153
"reflect-metadata": "^0.1.13",
154154
"regenerator-runtime": "^0.13.5",
155-
"scanoss": "^0.15.2",
155+
"scanoss": "^0.15.5",
156156
"sort-paths": "^1.1.1",
157157
"source-map-support": "^0.5.19",
158158
"translation-check": "^1.0.2",

release/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scanoss-workbench",
3-
"version": "1.15.4",
3+
"version": "1.15.5",
44
"description": "Desktop version to use SCANOSS OSS in your projects",
55
"license": "GPL-2.0-only",
66
"author": {

0 commit comments

Comments
 (0)