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

scylla-apiclient is missing license #237

Closed
mykaul opened this issue May 8, 2024 · 10 comments
Closed

scylla-apiclient is missing license #237

mykaul opened this issue May 8, 2024 · 10 comments
Assignees

Comments

@mykaul
Copy link
Contributor

mykaul commented May 8, 2024

From https://s3.amazonaws.com/downloads.scylladb.com/downloads/scylla-enterprise/relocatable/scylladb-branch-2024.1/scylladb_sbom_report_2024.1.3.txt :

Package Name: scylla-api-client
Version: 1.0
Type: python
License: UNKNOWN

@mykaul
Copy link
Contributor Author

mykaul commented May 8, 2024

2024.1.4 CSV, still not OK:

type	name	version	licenses
library	scylla-api-client	1	[{'license': {'name': 'UNKNOWN'}}]
library	scylla-apiclient	1	

@yaronkaikov yaronkaikov removed their assignment May 8, 2024
@Annamikhlin
Copy link

@benipeled - could you please take a look? seems it is related to - https://pypi.org/project/scylla-api-client/ or https://github.com/scylladb/scylla-api-client
The license info is not recognized by syft. Maybe something is missing in the license definition?

@benipeled
Copy link

  • scylla-apiclient is a typo I'm not sure where it comes from
  • scylla-api-client the repo has license, we need to figure out how syft is looking for licensees and check what is missing in this check

@mykaul
Copy link
Contributor Author

mykaul commented May 30, 2024

@benipeled
Copy link

scylla-apiclient

https://github.com/scylladb/scylla-jmx/tree/master/scylla-apiclient

What's this product? Is the old api used by nodetool?
The pom.xml under this folder has no license attribute, we can try adding it but again - we need to figure out based on what syft recognizes/looking for a license

@mykaul
Copy link
Contributor Author

mykaul commented May 30, 2024

scylla-apiclient

https://github.com/scylladb/scylla-jmx/tree/master/scylla-apiclient

What's this product? Is the old api used by nodetool? The pom.xml under this folder has no license attribute, we can try adding it but again - we need to figure out based on what syft recognizes/looking for a license

Before my time. If I had to guess - just a library. We can run syft just on that JAR, I reckon.

@Annamikhlin
Copy link

Annamikhlin commented Jun 3, 2024

accoding to syft tool the metadata cataloger will look for licenses by searching for declarations within packaging manifests locally in the following files in License field:
https://github.com/anchore/syft/blob/fe0b78b7fe73b92ad76deed288d3b9b091a14d27/syft/pkg/cataloger/python/cataloger.go#L39-L42 (thanks to syft support for helping to find it)

in our case the files are:

find . | grep dist-info | grep scylla
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/RECORD
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/WHEEL
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/entry_points.txt
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/LICENSE.AGPL
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/top_level.txt
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/REQUESTED
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/INSTALLER
./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/METADATA

and the License field is shown as UNKNOWN

❯ cat ./venv/lib/python3.11/site-packages/scylla_api_client-1.0.dist-info/METADATA | grep License
License: UNKNOWN
License-File: LICENSE.AGPL

Now we need somehow to update this field in ...dist-info/METADATA file :)

@mykaul
Copy link
Contributor Author

mykaul commented Jun 3, 2024

@Annamikhlin - compare it to cqlsh which is also Python based.

@Annamikhlin
Copy link

@Annamikhlin - compare it to cqlsh which is also Python based.

By comparing scylla-cqlsh - https://github.com/scylladb/scylla-cqlsh/blob/master/pylib/setup.py
and scylla-api-client - https://github.com/scylladb/scylla-api-client/blob/master/setup.py

https://github.com/scylladb/scylla-cqlsh/blob/55aff236a924c65b64cab8a11da4b0b1d2356ae3/pylib/setup.py#L45
seem that the license=".." field is missing in scylla-api-client

benipeled added a commit to scylladb/scylla-api-client that referenced this issue Jun 6, 2024
The SBOM report generated for ScyllaDB doesn't recognize the license of
scylla-api-client. This addition of the license keyword to the setup.py
should add the information to the SBOM report

Ref scylladb/scylla-jmx#237
bhalevy pushed a commit to scylladb/scylla-api-client that referenced this issue Jun 13, 2024
The SBOM report generated for ScyllaDB doesn't recognize the license of
scylla-api-client. This addition of the license keyword to the setup.py
should add the information to the SBOM report

Ref scylladb/scylla-jmx#237
yaronkaikov added a commit to yaronkaikov/scylla that referenced this issue Jun 16, 2024
a new Scylla-api-client was released to get a proper license information
in our SBOM report,

Refs: scylladb/scylla-jmx#237
denesb pushed a commit to scylladb/scylladb that referenced this issue Jun 17, 2024
a new Scylla-api-client was released to get a proper license information
in our SBOM report,

Refs: scylladb/scylla-jmx#237

Closes #19324
yaronkaikov added a commit to yaronkaikov/scylla-jmx that referenced this issue Jun 18, 2024
SBOM report display empty license,
```
type	name	version	licenses
library	scylla-apiclient	1
Since jmx was removed from OSS master, applying this change directly on release branch
```

Fixes: scylladb#237
@denesb denesb closed this as completed in 3328a22 Jun 18, 2024
@Annamikhlin
Copy link

Verification passed on master for scylla-api-client (python package):
library,scylla-api-client,1.1,[{'license': {'name': 'GNU AGPL 3.0'}}],pkg:pypi/[email protected]

for scylla-apiclient (java package) waiting for merge to 2024.1 for final verification

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

Successfully merging a pull request may close this issue.

4 participants