-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add license-is-osi-or-fsf-approved
rule type.
#261
base: main
Are you sure you want to change the base?
Conversation
86cc91a
to
c9cf8ec
Compare
This rule type checks that the license detected by GitHub is approved by either OSI or FSF. It uses two data sources, one to call GitHub API to get the SPDX identifier of the license, and another one to get the updated list of licenses approved by from SPDX repository. This rule can be used to implement `OSPS-LE-02`.
c9cf8ec
to
5280188
Compare
in_entity: repository | ||
rule_schema: {} | ||
ingest: | ||
type: git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Why not use the REST ingest directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While addressing your comments I found out that mindev ruletype test
does not execute ingest phase, which is a bit of a limitation that we should address somehow since it makes it harder to locally test rules.
eval: | ||
type: rego | ||
data_sources: | ||
- name: ghapi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage of this data source seems unnecessary, you could simply use the REST ingest.
This rule type checks that the license detected by GitHub is approved by either OSI or FSF. It uses two data sources, one to call GitHub API to get the SPDX identifier of the license, and another one to get the updated list of licenses approved by from SPDX repository.
This rule can be used to implement
OSPS-LE-02
.P.S.: the name is ugly, please advise. 😅