Thanks to visit codestin.com
Credit goes to github.com

Skip to content

python cataloger: adding a support additionally to classify licenses by License-File field in metadata file #2923

@Annamikhlin

Description

@Annamikhlin

What would you like to be added:
Today the metadata cataloger will look for licenses by searching for declarations within packaging manifests locally in the following files in License field only.:

"**/*dist-info/METADATA",
"**/*egg-info/PKG-INFO",
"**/*DIST-INFO/METADATA",
"**/*EGG-INFO/PKG-INFO",

The python cataloger does have the ability to look in additional sibling files that the metadata file might reference too.
Adding a support additionally to classify licenses by License-File field as well.

Why is this needed:
in our case, in the SBOM scan report (cyclonedx-json format) the license shown as "UNKNOWN"

{
      "bom-ref": "pkg:pypi/[email protected]?package-id=c14a69f4da463c44",
      "type": "library",
      "author": "ScyllaDB",
      "name": "scylla-api-client",
      "version": "1.0",
      "licenses": [
        {
          "license": {
            "name": "UNKNOWN"
          }
        }
      ],

according to cat ./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/METADATA | grep License

The license declaration shown under License-File filed

License: UNKNOWN
License-File: LICENSE.AGPL

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlicenserelating to software licensing

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions