Skip to content

Support license names in License metadata #770

Description

@mykter

Is your feature request related to a problem? Please describe.

I think the fix to #692 led to a regression in our license detection experience. With the latest cycloned-python many of our dependencies now have licenses that look like this:

        {
          "license": {
            "name": "declared license of 'package'",
            "text": {
              "content": "MIT License",
              "contentType": "text/plain"
            }
          }
        }

My reading of #692 is that this is an issue with these packages not using this field correctly?

Describe the solution you'd like

Support libraries that use the field in this way, as there are a lot of them. Specifically, check if the declared license is a license name, and if it is, use it as the name (or better yet convert it to a license ID if it's an exact match).

Some example packages include: google, google-cloud, boto3, beautifulsoup4, pyarrow. There are many more.

Describe alternatives you've considered

Post-processing to make the same change on the sbom after cyclonedx-python has generated it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions