Skip to content

Commit 53a83c9

Browse files
committed
Update cdxgen snapshots
1 parent 0771cc7 commit 53a83c9

File tree

2 files changed

+56
-52
lines changed

2 files changed

+56
-52
lines changed

src/commands/manifest/cmd-manifest-cdxgen.test.mts

Lines changed: 55 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -17,54 +17,66 @@ describe('socket manifest cdxgen', async () => {
1717
})
1818
expect(stdout).toMatchInlineSnapshot(
1919
`
20-
"cdxgen [command]
20+
"CycloneDX Generator 11.5.0
21+
Runtime: Node.js, Version: 24.5.0"
22+
`,
23+
)
24+
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
25+
"
26+
_____ _ _ /---------------
27+
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
28+
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
29+
|_____|___|___|_,_|___|_|.dev | Command: \`socket manifest cdxgen\`, cwd: <redacted>
30+
31+
cdxgen [command]
2132
2233
Commands:
2334
cdxgen completion Generate bash/zsh completion
2435
2536
Options:
26-
-o, --output Output file. Default bom.json [default: "bom.json"]
27-
-t, --type Project type. Please refer to https://cyclonedx.github.io/cdxgen/#/PROJECT_TYPES for supported languages/platforms. [array]
28-
--exclude-type Project types to exclude. Please refer to https://cyclonedx.github.io/cdxgen/#/PROJECT_TYPES for supported languages/platforms.
29-
-r, --recurse Recurse mode suitable for mono-repos. Defaults to true. Pass --no-recurse to disable. [boolean] [default: true]
30-
-p, --print Print the SBOM as a table with tree. [boolean]
31-
-c, --resolve-class Resolve class names for packages. jars only for now. [boolean]
32-
--deep Perform deep searches for components. Useful while scanning C/C++ apps, live OS and oci images. [boolean]
33-
--server-url Dependency track url. Eg: https://deptrack.cyclonedx.io
34-
--skip-dt-tls-check Skip TLS certificate check when calling Dependency-Track. [boolean] [default: false]
35-
--api-key Dependency track api key
36-
--project-group Dependency track project group
37-
--project-name Dependency track project name. Default use the directory name
38-
--project-version Dependency track project version [string] [default: ""]
39-
--project-id Dependency track project id. Either provide the id or the project name and version together [string]
40-
--parent-project-id Dependency track parent project id [string]
41-
--required-only Include only the packages with required scope on the SBOM. Would set compositions.aggregate to incomplete unless --no-auto-compositions is passed. [boolean]
42-
--fail-on-error Fail if any dependency extractor fails. [boolean]
43-
--no-babel Do not use babel to perform usage analysis for JavaScript/TypeScript projects. [boolean]
44-
--generate-key-and-sign Generate an RSA public/private key pair and then sign the generated SBOM using JSON Web Signatures. [boolean]
45-
--server Run cdxgen as a server [boolean]
46-
--server-host Listen address [default: "127.0.0.1"]
47-
--server-port Listen port [default: "9090"]
48-
--install-deps Install dependencies automatically for some projects. Defaults to true but disabled for containers and oci scans. Use --no-install-deps to disable this feature. [boolean] [default: true]
49-
--validate Validate the generated SBOM using json schema. Defaults to true. Pass --no-validate to disable. [boolean] [default: true]
50-
--evidence Generate SBOM with evidence for supported languages. [boolean] [default: false]
51-
--spec-version CycloneDX Specification version to use. Defaults to 1.6 [number] [choices: 1.4, 1.5, 1.6, 1.7] [default: 1.6]
52-
--filter Filter components containing this word in purl or component.properties.value. Multiple values allowed. [array]
53-
--only Include components only containing this word in purl. Useful to generate BOM with first party components alone. Multiple values allowed. [array]
54-
--author The person(s) who created the BOM. Set this value if you're intending the modify the BOM and claim authorship. [array] [default: "OWASP Foundation"]
55-
--profile BOM profile to use for generation. Default generic. [choices: "appsec", "research", "operational", "threat-modeling", "license-compliance", "generic", "machine-learning", "ml", "deep-learning", "ml-deep", "ml-tiny"] [default: "generic"]
56-
--exclude Additional glob pattern(s) to ignore [array]
57-
--export-proto Serialize and export BOM as protobuf binary. [boolean] [default: false]
58-
--proto-bin-file Path for the serialized protobuf binary. [default: "bom.cdx"]
59-
--include-formulation Generate formulation section with git metadata and build tools. Defaults to false. [boolean] [default: false]
60-
--include-crypto Include crypto libraries as components. [boolean] [default: false]
61-
--standard The list of standards which may consist of regulations, industry or organizational-specific standards, maturity models, best practices, or any other requirements which can be evaluated against or attested to. [array] [choices: "asvs-5.0", "asvs-4.0.3", "bsimm-v13", "masvs-2.0.0", "nist_ssdf-1.1", "pcissc-secure-slc-1.1", "scvs-1.0.0", "ssaf-DRAFT-2023-11"]
62-
--json-pretty Pretty-print the generated BOM json. [boolean] [default: false]
63-
--min-confidence Minimum confidence needed for the identity of a component from 0 - 1, where 1 is 100% confidence. [number] [default: 0]
64-
--technique Analysis technique to use [array] [choices: "auto", "source-code-analysis", "binary-analysis", "manifest-analysis", "hash-comparison", "instrumentation", "filename"]
65-
--auto-compositions Automatically set compositions when the BOM was filtered. Defaults to true [boolean] [default: true]
66-
-h, --help Show help [boolean]
67-
-v, --version Show version number [boolean]
37+
-o, --output Output file. Default bom.json [default: "bom.json"]
38+
-t, --type Project type. Please refer to https://cyclonedx.github.io/cdxgen/#/PROJECT_TYPES for supported languages/platforms. [array]
39+
--exclude-type Project types to exclude. Please refer to https://cyclonedx.github.io/cdxgen/#/PROJECT_TYPES for supported languages/platforms.
40+
-r, --recurse Recurse mode suitable for mono-repos. Defaults to true. Pass --no-recurse to disable. [boolean] [default: true]
41+
-p, --print Print the SBOM as a table with tree. [boolean]
42+
-c, --resolve-class Resolve class names for packages. jars only for now. [boolean]
43+
--deep Perform deep searches for components. Useful while scanning C/C++ apps, live OS and oci images. [boolean]
44+
--server-url Dependency track url. Eg: https://deptrack.cyclonedx.io
45+
--skip-dt-tls-check Skip TLS certificate check when calling Dependency-Track. [boolean] [default: false]
46+
--api-key Dependency track api key
47+
--project-group Dependency track project group
48+
--project-name Dependency track project name. Default use the directory name
49+
--project-version Dependency track project version [string] [default: ""]
50+
--project-id Dependency track project id. Either provide the id or the project name and version together [string]
51+
--parent-project-id Dependency track parent project id [string]
52+
--required-only Include only the packages with required scope on the SBOM. Would set compositions.aggregate to incomplete unless --no-auto-compositions is passed. [boolean]
53+
--fail-on-error Fail if any dependency extractor fails. [boolean]
54+
--no-babel Do not use babel to perform usage analysis for JavaScript/TypeScript projects. [boolean]
55+
--generate-key-and-sign Generate an RSA public/private key pair and then sign the generated SBOM using JSON Web Signatures. [boolean]
56+
--server Run cdxgen as a server [boolean]
57+
--server-host Listen address [default: "127.0.0.1"]
58+
--server-port Listen port [default: "9090"]
59+
--install-deps Install dependencies automatically for some projects. Defaults to true but disabled for containers and oci scans. Use --no-install-deps to disable this feature. [boolean] [default: true]
60+
--validate Validate the generated SBOM using json schema. Defaults to true. Pass --no-validate to disable. [boolean] [default: true]
61+
--evidence Generate SBOM with evidence for supported languages. [boolean] [default: false]
62+
--spec-version CycloneDX Specification version to use. Defaults to 1.6 [number] [choices: 1.4, 1.5, 1.6, 1.7] [default: 1.6]
63+
--filter Filter components containing this word in purl or component.properties.value. Multiple values allowed. [array]
64+
--only Include components only containing this word in purl. Useful to generate BOM with first party components alone. Multiple values allowed. [array]
65+
--author The person(s) who created the BOM. Set this value if you're intending the modify the BOM and claim authorship. [array] [default: "OWASP Foundation"]
66+
--profile BOM profile to use for generation. Default generic. [choices: "appsec", "research", "operational", "threat-modeling", "license-compliance", "generic", "machine-learning", "ml", "deep-learning", "ml-deep", "ml-tiny"] [default: "generic"]
67+
--include-regex glob pattern to include. This overrides the default pattern used during auto-detection. [string]
68+
--exclude, --exclude-regex Additional glob pattern(s) to ignore [array]
69+
--export-proto Serialize and export BOM as protobuf binary. [boolean] [default: false]
70+
--proto-bin-file Path for the serialized protobuf binary. [default: "bom.cdx"]
71+
--include-formulation Generate formulation section with git metadata and build tools. Defaults to false. [boolean] [default: false]
72+
--include-crypto Include crypto libraries as components. [boolean] [default: false]
73+
--standard The list of standards which may consist of regulations, industry or organizational-specific standards, maturity models, best practices, or any other requirements which can be evaluated against or attested to. [array] [choices: "asvs-5.0", "asvs-4.0.3", "bsimm-v13", "masvs-2.0.0", "nist_ssdf-1.1", "pcissc-secure-slc-1.1", "scvs-1.0.0", "ssaf-DRAFT-2023-11"]
74+
--json-pretty Pretty-print the generated BOM json. [boolean] [default: false]
75+
--min-confidence Minimum confidence needed for the identity of a component from 0 - 1, where 1 is 100% confidence. [number] [default: 0]
76+
--technique Analysis technique to use [array] [choices: "auto", "source-code-analysis", "binary-analysis", "manifest-analysis", "hash-comparison", "instrumentation", "filename"]
77+
--auto-compositions Automatically set compositions when the BOM was filtered. Defaults to true [boolean] [default: true]
78+
-h, --help Show help [boolean]
79+
-v, --version Show version number [boolean]
6880
6981
Examples:
7082
cdxgen -t java . Generate a Java SBOM for the current directory
@@ -74,14 +86,6 @@ describe('socket manifest cdxgen', async () => {
7486
cdxgen --server Run cdxgen as a server
7587
7688
for documentation, visit https://cyclonedx.github.io/cdxgen"
77-
`,
78-
)
79-
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
80-
"
81-
_____ _ _ /---------------
82-
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
83-
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
84-
|_____|___|___|_,_|___|_|.dev | Command: \`socket manifest cdxgen\`, cwd: <redacted>"
8589
`)
8690

8791
// expect(code, 'explicit help should exit with code 0').toBe(0)

test/socket-cdxgen.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('Socket manifest cdxgen command', async () => {
4949
spawnOpts,
5050
)
5151
expect(
52-
output.stdout.includes('cdxgen'),
52+
output.stdout.includes('CycloneDX Generator'),
5353
'forwards commands to cdxgen',
5454
).toBe(true)
5555
}

0 commit comments

Comments
 (0)