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

feat: support json output format #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aschiavon91
Copy link

@aschiavon91 aschiavon91 commented Nov 8, 2023

Hey guys, firstly, thanks for the work!
I did some refactors and implemented a json encoder, I tested the results with sbom-utility, and everything seems fine.
This closes #3
image

Edit:
I don't know if encoding is the best name the option to configure the output format, but the alias -f is already being used by force option.

@aschiavon91 aschiavon91 changed the title feat: json format feat: support json output format Nov 8, 2023
@voltone
Copy link
Owner

voltone commented Nov 13, 2023

Thanks for the PR! The main reason this was not implemented so far was the fact that installing the tool with mix archive.install does not work with dependencies. I would like to retain the ability to install the tool on-the-fly (e.g. inside a CI job) without adding it as a declared dependency to the project, if possible.

Producing XML is easy with just standard library tooling, the question is whether it would be feasible to implement a minimal JSON encoder within the tool. What do you think?

@aschiavon91
Copy link
Author

Thanks for the PR! The main reason this was not implemented so far was the fact that installing the tool with mix archive.install does not work with dependencies. I would like to retain the ability to install the tool on-the-fly (e.g. inside a CI job) without adding it as a declared dependency to the project, if possible.

Producing XML is easy with just standard library tooling, the question is whether it would be feasible to implement a minimal JSON encoder within the tool. What do you think?

Hey @voltone, thanks for the explanation, I didn't know that.
Yeah, I think we can do it!

@aschiavon91
Copy link
Author

the json encoder covers the very basic stuff, but I do think it's enough for now, what do you think @voltone?
Also, I tested it again using sbom-utility and it's worked as expected.
image

@voltone
Copy link
Owner

voltone commented Nov 15, 2023

May I ask where the JSON encoder code is coming from? I found some similar-looking code online, and I want to make sure any re-use of code is allowed by the license under which the original code was released.

@aschiavon91
Copy link
Author

for sure! I only copied the implementation related to binary encoding from here, all the other stuff I have implemented by myself

@voltone
Copy link
Owner

voltone commented Dec 18, 2023

Sorry for ignoring this PR for so long, we've been discussing the best way forward in the EEF SecurityWG. We are considering moving maintenance of this Mix and Rebar3 plugins to the WG. In the process we might change this package to be an escript rather than a Mix archive, which would allow us to use package dependencies. I will keep you posted...

@aschiavon91
Copy link
Author

Sorry for ignoring this PR for so long, we've been discussing the best way forward in the EEF SecurityWG. We are considering moving maintenance of this Mix and Rebar3 plugins to the WG. In the process we might change this package to be an escript rather than a Mix archive, which would allow us to use package dependencies. I will keep you posted...

No problem at all, and thanks for the update, if there's anything i can help, pls let me know

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

Successfully merging this pull request may close these issues.

Support JSON output format
2 participants