-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create SBOM with CDXGen 11 #1541
Comments
Does it work without |
For me, it runs with
|
Interesting - how are you running it? I'm running in Codebuild on AWS and it looks like it just ends.
I'll try it again. As for the validation error you're getting, is there a way around it? |
From looking at your command I saw what was going on - I was missing the final
Once I did that, it ran but I'm also getting a validation error - different from what you found:
|
That validation error is incorrect. Since Line 937 in 0f1a142
Can you help investigate and find the place that is introducing the authors? |
I can see what I can find and report back. Funny (or not?) enough, my runs are failing the same way as my initial report said - but it’s intermittent. |
I'm not quite at the bottom of what the root cause of either issue but this is what I know so far. For the just stopping with out error issue I'm running into, it has something to do with fetching the license for the For the validation error, it's because the specVersion isn't included in the options sent for that package (it's from a docker image, not sure if that matters). The options passed to the
Since the version is missing, it's not true for the if statement |
I think the below line needs to be improved to retain options such as specVersion. Line 4865 in 0f1a142
|
Changing the above function call this seems to resolve the problem for OCI packages but not for the NPM packages.
Now, I no longer get the for the npm/npm package but now I do for the one you initially found. Where sholud I look to try the same change?
|
I think I found the other part for the validation issue! I think this: Line 4953 in 0f1a142
Should be:
Still have to dig deeper into the license issue |
Well done! Please share a pull request once you are happy. |
Regarding the problem being
|
Signed-off-by: Prabhu Subramanian <[email protected]>
Happy to test this
…On Tue, Jan 14, 2025 at 10:44 AM prabhu ***@***.***> wrote:
@emcfins <https://github.com/emcfins> could you test with the PR branch
#1558 <#1558> ?
—
Reply to this email directly, view it on GitHub
<#1541 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACWKHYI2P6O4RLX3DFAEGH32KUWEFAVCNFSM6AAAAABU2JEGZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJQGI4TCNBXGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you. Since it is merged, please test with the master branch. |
I'm testing this now with a few packages. I'm seeing this message that I'm not sure how to interpret it, any guidance would be great. It's failing on schema validation but is creating an SBOM:
When I look at sbom.components[869], this is the evidence for
In case the path index starts at 1, this is sbom.components[870] for
|
We must be missing the specVersion in another place. evidence.identity is an array in 1.6, but object in 1.5. 870 is unfortunately an array, so would fail in 1.5 spec. This particular line is not executed, so specVersion must be missing. |
Ok - I'll look into it. Thank you! |
Maybe we should refactor and do these upgrades and downgrades in postgen? |
What does that mean for the code? I'll defer to you, I'm just along for the ride |
We have a lot of code in index.js to fix the data for the given spec version. All these things could be moved to postgen. |
Ok - I think I found it. Line 6029 in 459dfe1
Being called from here Line 6093 in 459dfe1
Called from Line 5078 in 459dfe1
What's the intended outcome? |
It looks like it's casting the I was thinking that the boolean value of
Do you think that would accomplish the goal of the logic here or am I missing something that could cause adverse effects elsewhere? |
Checking. |
I forked the repo and have a PR there to run the tests. The |
Don't worry about that test. Possible it might work in CycloneDX org. |
Hello,
I'm attemping to create an SBOM for an open source project (https://github.com/aws-solutions/connected-mobility-solution-on-aws for example) with the latest version of CDXGen and no SBOM is being generated.
When I use version 10 (specific version currently 10.2.6), the SBOM is generated.
Command used:
CDXGEN_DEBUG_MODE=debug FETCH_LICENSE=true cdxgen -t universal --spec-version 1.5 -o bom-1.5.json
No error is output, just returns to a prompt and no file is generated.
The text was updated successfully, but these errors were encountered: