@soos-io/soos-sbom 0.1.1 → 0.1.3-pre.1

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.
Files changed (3) hide show
  1. package/README.md +42 -42
  2. package/bin/index.js +8 -7
  3. package/package.json +35 -36
package/README.md CHANGED
@@ -1,42 +1,42 @@
1
- # [SOOS SBOM](https://soos.io/products/sbom-manager)
2
-
3
- SOOS is an independent software security company, located in Winooski, VT USA, building security software for your team. [SOOS, Software security, simplified](https://soos.io).
4
-
5
- Use SOOS to scan your software for [vulnerabilities](https://app.soos.io/research/vulnerabilities) and [open source license](https://app.soos.io/research/licenses) issues with [SOOS Core SCA](https://soos.io/sca-product). [Generate SBOMs](https://kb.soos.io/help/generating-a-software-bill-of-materials-sbom). Govern your open source dependencies. Run the [SOOS DAST vulnerability scanner](https://soos.io/dast-product) against your web apps or APIs.
6
-
7
- [Demo SOOS](https://app.soos.io/demo) or [Register for a Free Trial](https://app.soos.io/register).
8
-
9
- If you maintain an Open Source project, sign up for the Free as in Beer [SOOS Community Edition](https://soos.io/products/community-edition).
10
-
11
- ## Requirements
12
- - [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
13
-
14
- ## Installation
15
- run `npm i -g @soos-io/soos-sbom@latest`
16
-
17
- ## Usage
18
- Run `soos-sbom` from any terminal and add the parameters you want.
19
-
20
- ## Parameters
21
-
22
-
23
- | Argument | Default | Description |
24
- | ----------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
25
- | `--apiKey` | `getEnvVariable(CONSTANTS.SOOS.API_KEY_ENV_VAR)` | SOOS API Key - get yours from [SOOS Integration](https://app.soos.io/integrate/sbom). |
26
- | `--apiURL` | `"https://api.soos.io/api/"` | SOOS API URL - Intended for internal use only, do not modify. |
27
- | `--appVersion` | N/A | App Version - Intended for internal use only. |
28
- | `--branchName` | `null` | The name of the branch from the SCM System. |
29
- | `--branchURI` | `null` | The URI to the branch from the SCM System. |
30
- | `--buildURI` | `null` | URI to CI build info. |
31
- | `--buildVersion` | `null` | Version of application build artifacts. |
32
- | `--clientId` | `getEnvVariable(CONSTANTS.SOOS.CLIENT_ID_ENV_VAR)` | SOOS Client ID - get yours from [SOOS Integration](https://app.soos.io/integrate/sbom). |
33
- | `--commitHash` | `null` | The commit hash value from the SCM System. |
34
- | `--integrationName` | N/A | Integration Name - Intended for internal use only. |
35
- | `--integrationType` | N/A | Integration Type - Intended for internal use only. |
36
- | `--logLevel` | `LogLevel.INFO` | Minimum level to show logs: PASS, IGNORE, INFO, WARN, or FAIL. |
37
- | `--operatingEnvironment`| `null` | Set Operating environment for information purposes only. |
38
- | `--otherOptions` | `null` | Other Options to pass to syft. |
39
- | `--projectName` | N/A | Project Name - this is what will be displayed in the SOOS app. |
40
- | `--scriptVersion` | N/A | Script Version - Intended for internal use only. |
41
- | `--verbose` | `false` | Enable verbose logging. |
42
- | `sbomPath` | N/A | 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. |
1
+ # [SOOS SBOM](https://soos.io/products/sbom-manager)
2
+
3
+ SOOS is an independent software security company, located in Winooski, VT USA, building security software for your team. [SOOS, Software security, simplified](https://soos.io).
4
+
5
+ Use SOOS to scan your software for [vulnerabilities](https://app.soos.io/research/vulnerabilities) and [open source license](https://app.soos.io/research/licenses) issues with [SOOS Core SCA](https://soos.io/sca-product). [Generate SBOMs](https://kb.soos.io/help/generating-a-software-bill-of-materials-sbom). Govern your open source dependencies. Run the [SOOS DAST vulnerability scanner](https://soos.io/dast-product) against your web apps or APIs.
6
+
7
+ [Demo SOOS](https://app.soos.io/demo) or [Register for a Free Trial](https://app.soos.io/register).
8
+
9
+ If you maintain an Open Source project, sign up for the Free as in Beer [SOOS Community Edition](https://soos.io/products/community-edition).
10
+
11
+ ## Requirements
12
+ - [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
13
+
14
+ ## Installation
15
+ run `npm i -g @soos-io/soos-sbom@latest`
16
+
17
+ ## Usage
18
+ Run `soos-sbom` from any terminal and add the parameters you want.
19
+
20
+ ## Parameters
21
+
22
+
23
+ | Argument | Default | Description |
24
+ | ----------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
25
+ | `--apiKey` | `getEnvVariable(CONSTANTS.SOOS.API_KEY_ENV_VAR)` | SOOS API Key - get yours from [SOOS Integration](https://app.soos.io/integrate/sbom). |
26
+ | `--apiURL` | `"https://api.soos.io/api/"` | SOOS API URL - Intended for internal use only, do not modify. |
27
+ | `--appVersion` | N/A | App Version - Intended for internal use only. |
28
+ | `--branchName` | `null` | The name of the branch from the SCM System. |
29
+ | `--branchURI` | `null` | The URI to the branch from the SCM System. |
30
+ | `--buildURI` | `null` | URI to CI build info. |
31
+ | `--buildVersion` | `null` | Version of application build artifacts. |
32
+ | `--clientId` | `getEnvVariable(CONSTANTS.SOOS.CLIENT_ID_ENV_VAR)` | SOOS Client ID - get yours from [SOOS Integration](https://app.soos.io/integrate/sbom). |
33
+ | `--commitHash` | `null` | The commit hash value from the SCM System. |
34
+ | `--integrationName` | N/A | Integration Name - Intended for internal use only. |
35
+ | `--integrationType` | N/A | Integration Type - Intended for internal use only. |
36
+ | `--logLevel` | `LogLevel.INFO` | Minimum level to show logs: PASS, IGNORE, INFO, WARN, or FAIL. |
37
+ | `--operatingEnvironment`| `null` | Set Operating environment for information purposes only. |
38
+ | `--otherOptions` | `null` | Other Options to pass to syft. |
39
+ | `--projectName` | N/A | Project Name - this is what will be displayed in the SOOS app. |
40
+ | `--scriptVersion` | N/A | Script Version - Intended for internal use only. |
41
+ | `--verbose` | `false` | Enable verbose logging. |
42
+ | `sbomPath` | N/A | 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. |
package/bin/index.js CHANGED
@@ -26,6 +26,9 @@ class SOOSSBOMAnalysis {
26
26
  help: "SOOS API URL - Intended for internal use only, do not modify.",
27
27
  default: "https://api.soos.io/api/",
28
28
  required: false,
29
+ type: (value) => {
30
+ return (0, utilities_1.ensureNonEmptyValue)(value, "apiURL");
31
+ },
29
32
  });
30
33
  parser.add_argument("--appVersion", {
31
34
  help: "App Version - Intended for internal use only.",
@@ -83,14 +86,12 @@ class SOOSSBOMAnalysis {
83
86
  default: null,
84
87
  required: false,
85
88
  });
86
- parser.add_argument("--otherOptions", {
87
- help: "Other Options to pass to syft.",
88
- default: null,
89
- required: false,
90
- });
91
89
  parser.add_argument("--projectName", {
92
90
  help: "Project Name - this is what will be displayed in the SOOS app.",
93
91
  required: true,
92
+ type: (value) => {
93
+ return (0, utilities_1.ensureNonEmptyValue)(value, "projectName");
94
+ },
94
95
  });
95
96
  parser.add_argument("--scriptVersion", {
96
97
  help: "Script Version - Intended for internal use only.",
@@ -218,8 +219,8 @@ class SOOSSBOMAnalysis {
218
219
  api_client_1.soosLogger.setVerbose(args.verbose);
219
220
  api_client_1.soosLogger.info("Configuration read");
220
221
  api_client_1.soosLogger.verboseDebug(JSON.stringify((0, utilities_1.obfuscateProperties)(args, ["apiKey"]), null, 2));
221
- (0, utilities_1.ensureValue)(args.clientId, "clientId");
222
- (0, utilities_1.ensureValue)(args.apiKey, "apiKey");
222
+ (0, utilities_1.ensureNonEmptyValue)(args.clientId, "clientId");
223
+ (0, utilities_1.ensureNonEmptyValue)(args.apiKey, "apiKey");
223
224
  api_client_1.soosLogger.logLineSeparator();
224
225
  const soosSBOMAnalysis = new SOOSSBOMAnalysis(args);
225
226
  await soosSBOMAnalysis.runAnalysis();
package/package.json CHANGED
@@ -1,36 +1,35 @@
1
- {
2
- "name": "@soos-io/soos-sbom",
3
- "version": "0.1.1",
4
- "description": "SOOS wrapper script to upload sboms.",
5
- "main": "bin/index.js",
6
- "scripts": {
7
- "setup:install": "npm install",
8
- "setup:clean-install": "npm ci",
9
- "setup:update": "npx npm-check -u",
10
- "setup:clean": "npx rimraf node_modules && npx rimraf package-lock.json",
11
- "build": "tsc",
12
- "build:clean": "npx rimraf build",
13
- "format": "prettier ./src --check",
14
- "format:fix": "prettier ./src --write",
15
- "typecheck": "tsc --noEmit",
16
- "check": "npm run format && npm run typecheck && npm outdated"
17
- },
18
- "dependencies": {
19
- "@soos-io/api-client": "0.1.7",
20
- "argparse": "^2.0.1",
21
- "axios": "^0.27.2",
22
- "tslib": "^2.6.2"
23
- },
24
- "devDependencies": {
25
- "@types/argparse": "^2.0.11",
26
- "@types/glob": "^8.1.0",
27
- "@types/node": "^20.6.3",
28
- "prettier": "^2.8.8",
29
- "typescript": "^5.2.2"
30
- },
31
- "bin": {
32
- "soos-sbom": "bin/index.js"
33
- },
34
- "author": "SOOS",
35
- "license": "MIT"
36
- }
1
+ {
2
+ "name": "@soos-io/soos-sbom",
3
+ "version": "0.1.3-pre.1",
4
+ "description": "SOOS wrapper script to upload sboms.",
5
+ "main": "bin/index.js",
6
+ "scripts": {
7
+ "setup:install": "npm install",
8
+ "setup:clean-install": "npm ci",
9
+ "setup:update": "npx npm-check -u",
10
+ "setup:clean": "npx rimraf node_modules && npx rimraf package-lock.json",
11
+ "build": "tsc",
12
+ "build:clean": "npx rimraf build",
13
+ "format": "prettier ./src --check",
14
+ "format:fix": "prettier ./src --write",
15
+ "typecheck": "tsc --noEmit",
16
+ "check": "npm run format && npm run typecheck && npm outdated"
17
+ },
18
+ "dependencies": {
19
+ "@soos-io/api-client": "0.1.8",
20
+ "argparse": "^2.0.1",
21
+ "tslib": "^2.6.2"
22
+ },
23
+ "devDependencies": {
24
+ "@types/argparse": "^2.0.11",
25
+ "@types/glob": "^8.1.0",
26
+ "@types/node": "^20.6.3",
27
+ "prettier": "^2.8.8",
28
+ "typescript": "^5.2.2"
29
+ },
30
+ "bin": {
31
+ "soos-sbom": "bin/index.js"
32
+ },
33
+ "author": "SOOS",
34
+ "license": "MIT"
35
+ }