Skip to content
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

How to create a sbom for a golang project. #1032

Open
MohammedAziz02 opened this issue May 2, 2024 · 5 comments
Open

How to create a sbom for a golang project. #1032

MohammedAziz02 opened this issue May 2, 2024 · 5 comments

Comments

@MohammedAziz02
Copy link

MohammedAziz02 commented May 2, 2024

@prabhu, I tried to create a sbom for a golang project using : cdxgen -t golang -o sbom.json --spec-version 1.4, but the sbom result have an empty list dependencies. how to fix this issue?
the file go.sum exists.

@prabhu
Copy link
Contributor

prabhu commented May 2, 2024

@MohammedAziz02 questions could be discussions or slack/discord messages. I would always suggest running cdxgen with CDXGEN_DEBUG_MODE=debug environment variable. Depending on the project, the correct build tools have to be installed. You can verify that the environment is working well by attempting to build the projects.

The cdxgen container image which bundles many build tools and libraries can be a bit simpler, but may not work for all cases.

@MohammedAziz02
Copy link
Author

I have all the tools installed also the environment is working well, i tried to build the project, it's works fine, also there is no error message when activate the debug mode. is there any other options ? thank you in advance.

@prabhu
Copy link
Contributor

prabhu commented May 2, 2024

Can you share the output? Do you see the commands go mod graph and go list -deps being executed? Is this on Windows or Linux?

https://github.com/CycloneDX/cdxgen/blob/master/index.js#L3026
https://github.com/CycloneDX/cdxgen/blob/master/index.js#L2982

@MohammedAziz02
Copy link
Author

artifactSBOM.json
I'm using MacOS, and also the commands go mod graph and go list -deps are executed correctly without errors.

@prabhu
Copy link
Contributor

prabhu commented May 2, 2024

Can you reproduce the issue with any public repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants