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

error creating SBOM, err: writing serialized document: json: error calling MarshalJSON for type *common.Supplier #76

Open
williamfzc opened this issue Aug 27, 2023 · 0 comments

Comments

@williamfzc
Copy link

➜  lsif-node git:(main) ✗ ./sbomgen -o . -f JSON
INFO[2023-08-27T14:53:17+08:00] Starting to generate SPDX ...                
INFO[2023-08-27T14:53:18+08:00] Using npm, current Language Version 6.14.11  
INFO[2023-08-27T14:53:18+08:00] Global Setting File path                     
INFO[2023-08-27T14:53:18+08:00] Parsing . for packages                       
FATA[2023-08-27T14:53:29+08:00] error creating SBOM, err: writing serialized document: json: error calling MarshalJSON for type *common.Supplier: failed to marshal invalid Supplier: {Supplier: SupplierType:Organization} 

The process will break if either the SupplierType or Supplier field is empty.
Maybe we need some default values (both name and type) for avoiding this, not only assign a name. Like:

mod.Supplier = meta.Supplier{

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

1 participant