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

Implement license checks in Macaron #729

Open
vinkris01 opened this issue May 3, 2024 · 2 comments
Open

Implement license checks in Macaron #729

vinkris01 opened this issue May 3, 2024 · 2 comments
Labels
checks The issues related to Macaron checks good first issue Good for newcomers

Comments

@vinkris01
Copy link
Member

Implement license filtering in Macaron against a configurable, pre defined set of licenses. Macaron pulls down code and metadata today from GH repositories for performing various analyses. With this feature, the users would have a certain degree of control over the code and data being fetched and can make it conditional on specific licenses that the code and data are subject to.

Expected outcome:
Set of licenses (as per SPDX identifier format) that are user configurable in a .ini file of similar
Macaron produces suitable log messages while performing the license checks
Macaron fetches code and data subject to license checks

@behnazh-w behnazh-w added the checks The issues related to Macaron checks label May 3, 2024
@behnazh-w
Copy link
Member

@vinkris01 Thanks for the opening this issue. We can also add a check to report whether the license complies with the allowed licenses and the user can enforce policies based on the check result.

One thing that we might need to do is to clone the repository to check the license. So, it might not be possible to totally avoid pulling down the source code.

@behnazh-w behnazh-w added the good first issue Good for newcomers label May 3, 2024
@tromai
Copy link
Member

tromai commented Sep 2, 2024

One thing that we might need to do is to clone the repository to check the license.

We could obtain the content of the LICENSE from a github repository using GitHub API - https://docs.github.com/en/rest/licenses/licenses?apiVersion=2022-11-28#get-the-license-for-a-repository without cloning it. I'm not sure how much extra overhead it would introduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checks The issues related to Macaron checks good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants