rules_license icon indicating copy to clipboard operation
rules_license copied to clipboard

License text in json

Open mering opened this issue 1 year ago • 4 comments

Add tool to expand the JSON with the actual license text.

This allows copying a self-containing JSON with all relevant information to some other machine or tool without access to Bazel for further processing (e.g. embedding it into an app or other frontend, posting it to legal for review, ...).

This is currently based on top of #116

mering avatar Sep 14 '23 13:09 mering

Can you put a high level overview of the intent in the PR description. It seems this is on the right track, but it's hard to say without a clear goal.

aiuto avatar Oct 17 '23 03:10 aiuto

Can you put a high level overview of the intent in the PR description. It seems this is on the right track, but it's hard to say without a clear goal.

Sure, done.

mering avatar Oct 17 '23 08:10 mering

I like the general idea, but I think we should tweak it a bit and not do it early, but rather do it at SBOM generation time. That is,

  • produce raw graph data with paths in it
  • sbom generator pulls in raw package data and adds license text while generating the SBOM

I've got to run for a while, but I'll take a deeper look tonight.

aiuto avatar Oct 19 '23 18:10 aiuto

Isn't what you are describing already the case currently?

Maybe rules_license should provide different SBOM formats out of the box (txt, json, html, ...)? Maybe all of them could use the same SBOM generator but providing different templates?

mering avatar Nov 13 '23 13:11 mering