@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 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 File to scan, it could be the location of the file or the file itself. When location is specified only the first file found will be scanned. |
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. |
@@ -4,4 +4,5 @@ export declare const SOOS_SBOM_CONSTANTS: {
4
4
  MaxSbomsPerScan: number;
5
5
  UploadBatchSize: number;
6
6
  DefaultDirectoriesToExclude: string[];
7
+ SoosDirectoryToExclude: string;
7
8
  };
package/bin/constants.js CHANGED
@@ -7,4 +7,5 @@ exports.SOOS_SBOM_CONSTANTS = {
7
7
  MaxSbomsPerScan: 50,
8
8
  UploadBatchSize: 10,
9
9
  DefaultDirectoriesToExclude: ["**/node_modules/**", "**/bin/**", "**/obj/**", "**/lib/**"],
10
+ SoosDirectoryToExclude: "**/soos/**",
10
11
  };
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 File to scan, it could be the location of the file or the file itself. When location is specified only the first file found will be scanned.",
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: [...(this.args.filesToExclude || []), ...(this.args.directoriesToExclude || [])],
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soos-io/soos-sbom",
3
- "version": "1.0.1-pre.3",
3
+ "version": "1.0.1-pre.4",
4
4
  "description": "SOOS wrapper script to upload SBOMs.",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {