@soos-io/soos-sbom 1.0.1-pre.3 → 1.0.1-pre.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/constants.d.ts +1 -0
- package/bin/constants.js +1 -0
- package/bin/index.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,4 +40,4 @@ Then run from the same terminal `node ./soos/node_modules/@soos-io/soos-sbom/bin
|
|
|
40
40
|
| `--projectName` | | Project Name - this is what will be displayed in the SOOS app. |
|
|
41
41
|
| `--directoriesToExclude` | `**/node_modules/**, "**/bin/**", "**/obj/**", "**/lib/**` | Listing of directories or patterns to exclude from the search for SBOM files. eg: **bin/start/**, **/start/** |
|
|
42
42
|
| `--filesToExclude` | | Listing of files or patterns patterns to exclude from the search for SBOM files. eg: **/int**.cdx.json/, **/internal.cdx.json |
|
|
43
|
-
| `sbomPath` | | The SBOM
|
|
43
|
+
| `sbomPath` | | The SBOM file or folder to scan. When a folder is specified all SBOMs found in the folder and sub-folders will be scanned. |
|
package/bin/constants.d.ts
CHANGED
package/bin/constants.js
CHANGED
package/bin/index.js
CHANGED
|
@@ -36,7 +36,7 @@ class SOOSSBOMAnalysis {
|
|
|
36
36
|
required: false,
|
|
37
37
|
});
|
|
38
38
|
analysisArgumentParser.argumentParser.add_argument("sbomPath", {
|
|
39
|
-
help: "The SBOM
|
|
39
|
+
help: "The SBOM file or folder to scan. When a folder is specified all SBOMs found in the folder and sub-folders will be scanned.",
|
|
40
40
|
});
|
|
41
41
|
api_client_1.soosLogger.info("Parsing arguments");
|
|
42
42
|
return analysisArgumentParser.parseArguments();
|
|
@@ -149,7 +149,11 @@ class SOOSSBOMAnalysis {
|
|
|
149
149
|
? `${this.args.sbomPath}${constants_1.SOOS_SBOM_CONSTANTS.FileSyncPattern}`
|
|
150
150
|
: `${this.args.sbomPath}/${constants_1.SOOS_SBOM_CONSTANTS.FileSyncPattern}`;
|
|
151
151
|
const sbomFiles = Glob.sync(searchPattern, {
|
|
152
|
-
ignore: [
|
|
152
|
+
ignore: [
|
|
153
|
+
...(this.args.filesToExclude || []),
|
|
154
|
+
...(this.args.directoriesToExclude || []),
|
|
155
|
+
constants_1.SOOS_SBOM_CONSTANTS.SoosDirectoryToExclude,
|
|
156
|
+
],
|
|
153
157
|
nocase: true,
|
|
154
158
|
});
|
|
155
159
|
if (!sbomFiles || sbomFiles.length == 0) {
|