Replies: 2 comments 6 replies
-
Looks like some kind of edge case. The below fix needs to be added here } else if (l && Object.keys(l).length) { Could you kindly try with this change and send a PR? |
Beta Was this translation helpful? Give feedback.
5 replies
-
This change seems to fix it but I have not tested much yet...
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are receiving the error shown below when trying to generate SBOMs for our Android (Java) project with the below command. If we downgrade to version 10.4.3 it works as expected.
Command:
cdxgen -t java -o example-bom.json --spec-version 1.4
Error:
`
file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/utils.js:534
} else if (Object.keys(l).length) {
^
TypeError: Cannot convert undefined or null to object
at Function.keys ()
at file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/utils.js:534:27
at Array.map ()
at getLicenses (file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/utils.js:507:15)
at addComponent (file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/index.js:814:38)
at file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/index.js:771:7
at Array.forEach ()
at listComponents (file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/index.js:770:9)
at buildBomNSData (file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/index.js:1080:22)
at createJavaBom (file:///opt/homebrew/Cellar/cdxgen/10.8.1/libexec/lib/node_modules/@cyclonedx/cdxgen/index.js:2204:10)
Node.js v20.15.1
`
Beta Was this translation helpful? Give feedback.
All reactions