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

Task #876 - Add license_finder to template #138

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

anamarijabalaban
Copy link

Task: #876

Aim

Add license_finder to the template.

Solution

Added license_finder gem and prepared a list of restricted and permitted licenses. Also, license_finder is added to pre-commit hooks.

template.rb Outdated Show resolved Hide resolved
template.rb Outdated
run 'bundle exec license_finder restrict add GPL-2.0 GPL-3.0'

# add infinum gems to approved gems list because currently their license is UNKNOWN
run 'bundle exec license_finder approvals add enumerations'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't add this by default, only if the project actually depends on enumerations

@vr4b4c
Copy link
Member

vr4b4c commented Jun 2, 2023

Should we also run a license check in CI/CD pipeline?

template.rb Outdated
@@ -605,6 +606,9 @@ def run

create_file '.node-version', node_version

# add infinum gems to approved gems list because currently their license is UNKNOWN
run 'bundle exec license_finder approvals add @infinumrails/stylelint-config-scss @infinumrails/eslint-config-js'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be added as a post install warning (e.g. "you might need to add config-scss and eslint-config-js to the approved list manually with the following command"), I'm not sure it makes sense to always add it

template.rb Show resolved Hide resolved
template.rb Outdated Show resolved Hide resolved
template.rb Outdated Show resolved Hide resolved
@uncoverd
Copy link
Contributor

@anamarijabalaban what are your thoughts on adding this on CI? Historically we used CI as the last line of defense as overcommit is not always installed. Afaik we'd need to add a command to the CI steps and introduce a bin/license file to run the command

@anamarijabalaban
Copy link
Author

@uncoverd I'm just preparing a separate PR that adds a GA workflow file for license scanning on the project that already has configured license_finder gem.

@nikajukic nikajukic changed the title Add license_finder to template Task #876 - Add license_finder to template Oct 31, 2023
@nikajukic
Copy link
Contributor

@vr4b4c @uncoverd please do a final round of review before we merge this.

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

Successfully merging this pull request may close these issues.

5 participants