@cyclonedx/cdxgen 9.2.0 → 9.2.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.
- package/README.md +8 -3
- package/bin/cdxgen.js +5 -3
- package/index.js +0 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,7 +118,9 @@ Options:
|
|
|
118
118
|
-o, --output Output file for bom.xml or bom.json. Default bom.
|
|
119
119
|
json
|
|
120
120
|
-t, --type Project type
|
|
121
|
-
-r, --recurse Recurse mode suitable for mono-repos
|
|
121
|
+
-r, --recurse Recurse mode suitable for mono-repos. Defaults to
|
|
122
|
+
true. Pass --no-recurse to disable.
|
|
123
|
+
[boolean] [default: true]
|
|
122
124
|
-p, --print Print the SBoM as a table with tree. Defaults to
|
|
123
125
|
true if output file is not specified with -o
|
|
124
126
|
[boolean]
|
|
@@ -151,13 +153,16 @@ Options:
|
|
|
151
153
|
and oci scans. Use --no-install-deps to disable
|
|
152
154
|
this feature. [boolean] [default: true]
|
|
153
155
|
--validate Validate the generated SBoM using json schema. De
|
|
154
|
-
faults to true.
|
|
156
|
+
faults to true. Pass --no-validate to disable.
|
|
157
|
+
[boolean] [default: true]
|
|
155
158
|
--spec-version CycloneDX Specification version to use. Defaults
|
|
156
|
-
to 1.5
|
|
159
|
+
to 1.5 [default: 1.5]
|
|
157
160
|
--version Show version number [boolean]
|
|
158
161
|
-h Show help [boolean]
|
|
159
162
|
```
|
|
160
163
|
|
|
164
|
+
All boolean arguments accepts `--no` prefix to toggle the behavior.
|
|
165
|
+
|
|
161
166
|
## Example
|
|
162
167
|
|
|
163
168
|
Minimal example.
|
package/bin/cdxgen.js
CHANGED
|
@@ -34,7 +34,9 @@ const args = yargs(hideBin(process.argv))
|
|
|
34
34
|
.option("recurse", {
|
|
35
35
|
alias: "r",
|
|
36
36
|
type: "boolean",
|
|
37
|
-
|
|
37
|
+
default: true,
|
|
38
|
+
description:
|
|
39
|
+
"Recurse mode suitable for mono-repos. Defaults to true. Pass --no-recurse to disable."
|
|
38
40
|
})
|
|
39
41
|
.option("print", {
|
|
40
42
|
alias: "p",
|
|
@@ -112,11 +114,11 @@ const args = yargs(hideBin(process.argv))
|
|
|
112
114
|
type: "boolean",
|
|
113
115
|
default: true,
|
|
114
116
|
description:
|
|
115
|
-
"Validate the generated SBoM using json schema. Defaults to true."
|
|
117
|
+
"Validate the generated SBoM using json schema. Defaults to true. Pass --no-validate to disable."
|
|
116
118
|
})
|
|
117
119
|
.option("spec-version", {
|
|
118
120
|
description: "CycloneDX Specification version to use. Defaults to 1.5",
|
|
119
|
-
default:
|
|
121
|
+
default: 1.5
|
|
120
122
|
})
|
|
121
123
|
.scriptName("cdxgen")
|
|
122
124
|
.version()
|
package/index.js
CHANGED
|
@@ -4581,23 +4581,18 @@ export const createBom = async (path, options) => {
|
|
|
4581
4581
|
case "mvn":
|
|
4582
4582
|
case "maven":
|
|
4583
4583
|
case "sbt":
|
|
4584
|
-
options.multiProject = true;
|
|
4585
4584
|
return await createJavaBom(path, options);
|
|
4586
4585
|
case "jar":
|
|
4587
|
-
options.multiProject = true;
|
|
4588
4586
|
return createJarBom(path, options);
|
|
4589
4587
|
case "gradle-index":
|
|
4590
4588
|
case "gradle-cache":
|
|
4591
|
-
options.multiProject = true;
|
|
4592
4589
|
return createJarBom(GRADLE_CACHE_DIR, options);
|
|
4593
4590
|
case "sbt-index":
|
|
4594
4591
|
case "sbt-cache":
|
|
4595
|
-
options.multiProject = true;
|
|
4596
4592
|
return createJarBom(SBT_CACHE_DIR, options);
|
|
4597
4593
|
case "maven-index":
|
|
4598
4594
|
case "maven-cache":
|
|
4599
4595
|
case "maven-repo":
|
|
4600
|
-
options.multiProject = true;
|
|
4601
4596
|
return createJarBom(join(homedir(), ".m2", "repository"), options);
|
|
4602
4597
|
case "nodejs":
|
|
4603
4598
|
case "js":
|
|
@@ -4605,78 +4600,61 @@ export const createBom = async (path, options) => {
|
|
|
4605
4600
|
case "typescript":
|
|
4606
4601
|
case "ts":
|
|
4607
4602
|
case "tsx":
|
|
4608
|
-
options.multiProject = true;
|
|
4609
4603
|
return await createNodejsBom(path, options);
|
|
4610
4604
|
case "python":
|
|
4611
4605
|
case "py":
|
|
4612
|
-
options.multiProject = true;
|
|
4613
4606
|
return await createPythonBom(path, options);
|
|
4614
4607
|
case "go":
|
|
4615
4608
|
case "golang":
|
|
4616
|
-
options.multiProject = true;
|
|
4617
4609
|
return await createGoBom(path, options);
|
|
4618
4610
|
case "rust":
|
|
4619
4611
|
case "rust-lang":
|
|
4620
|
-
options.multiProject = true;
|
|
4621
4612
|
return await createRustBom(path, options);
|
|
4622
4613
|
case "php":
|
|
4623
|
-
options.multiProject = true;
|
|
4624
4614
|
return createPHPBom(path, options);
|
|
4625
4615
|
case "ruby":
|
|
4626
|
-
options.multiProject = true;
|
|
4627
4616
|
return await createRubyBom(path, options);
|
|
4628
4617
|
case "csharp":
|
|
4629
4618
|
case "netcore":
|
|
4630
4619
|
case "dotnet":
|
|
4631
|
-
options.multiProject = true;
|
|
4632
4620
|
return await createCsharpBom(path, options);
|
|
4633
4621
|
case "dart":
|
|
4634
4622
|
case "flutter":
|
|
4635
4623
|
case "pub":
|
|
4636
|
-
options.multiProject = true;
|
|
4637
4624
|
return await createDartBom(path, options);
|
|
4638
4625
|
case "haskell":
|
|
4639
4626
|
case "hackage":
|
|
4640
4627
|
case "cabal":
|
|
4641
|
-
options.multiProject = true;
|
|
4642
4628
|
return createHaskellBom(path, options);
|
|
4643
4629
|
case "elixir":
|
|
4644
4630
|
case "hex":
|
|
4645
4631
|
case "mix":
|
|
4646
|
-
options.multiProject = true;
|
|
4647
4632
|
return createElixirBom(path, options);
|
|
4648
4633
|
case "c":
|
|
4649
4634
|
case "cpp":
|
|
4650
4635
|
case "c++":
|
|
4651
4636
|
case "conan":
|
|
4652
|
-
options.multiProject = true;
|
|
4653
4637
|
return createCppBom(path, options);
|
|
4654
4638
|
case "clojure":
|
|
4655
4639
|
case "edn":
|
|
4656
4640
|
case "clj":
|
|
4657
4641
|
case "leiningen":
|
|
4658
|
-
options.multiProject = true;
|
|
4659
4642
|
return createClojureBom(path, options);
|
|
4660
4643
|
case "github":
|
|
4661
4644
|
case "actions":
|
|
4662
|
-
options.multiProject = true;
|
|
4663
4645
|
return createGitHubBom(path, options);
|
|
4664
4646
|
case "os":
|
|
4665
4647
|
case "osquery":
|
|
4666
4648
|
case "windows":
|
|
4667
4649
|
case "linux":
|
|
4668
|
-
options.multiProject = true;
|
|
4669
4650
|
return await createOSBom(path, options);
|
|
4670
4651
|
case "jenkins":
|
|
4671
|
-
options.multiProject = true;
|
|
4672
4652
|
return await createJenkinsBom(path, options);
|
|
4673
4653
|
case "helm":
|
|
4674
4654
|
case "charts":
|
|
4675
|
-
options.multiProject = true;
|
|
4676
4655
|
return createHelmBom(path, options);
|
|
4677
4656
|
case "helm-index":
|
|
4678
4657
|
case "helm-repo":
|
|
4679
|
-
options.multiProject = true;
|
|
4680
4658
|
return createHelmBom(
|
|
4681
4659
|
join(homedir(), ".cache", "helm", "repository"),
|
|
4682
4660
|
options
|
|
@@ -4691,13 +4669,10 @@ export const createBom = async (path, options) => {
|
|
|
4691
4669
|
case "kubernetes":
|
|
4692
4670
|
case "openshift":
|
|
4693
4671
|
case "yaml-manifest":
|
|
4694
|
-
options.multiProject = true;
|
|
4695
4672
|
return await createContainerSpecLikeBom(path, options);
|
|
4696
4673
|
case "cloudbuild":
|
|
4697
|
-
options.multiProject = true;
|
|
4698
4674
|
return createCloudBuildBom(path, options);
|
|
4699
4675
|
case "swift":
|
|
4700
|
-
options.multiProject = true;
|
|
4701
4676
|
return createSwiftBom(path, options);
|
|
4702
4677
|
default:
|
|
4703
4678
|
// In recurse mode return multi-language Bom
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclonedx/cdxgen",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"description": "Creates CycloneDX Software Bill-of-Materials (SBOM) from source or container image",
|
|
5
5
|
"homepage": "http://github.com/cyclonedx/cdxgen",
|
|
6
6
|
"author": "Prabhu Subramanian <prabhu@appthreat.com>",
|