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

🔌 Plugin Idea - Enforce License #145

Open
GantMan opened this issue Dec 19, 2017 · 12 comments
Open

🔌 Plugin Idea - Enforce License #145

GantMan opened this issue Dec 19, 2017 · 12 comments

Comments

@GantMan
Copy link
Member

GantMan commented Dec 19, 2017

Lots of people are building projects and those projects end up using dependencies of various licenses, or sometimes no license at all.

Would be cool if there was a license rule (maybe via plugin) that would check all packages and ensure that the licenses of the included modueles were either of a status or even more lenient.

So if I set my license rule to BSD-2 it would accept MIT, WTFPL etc., unless exact is set to true.

Feedback plz: @skellock and @jamonholmgren

@jamonholmgren
Copy link
Member

That's an interesting idea for sure. I like it!

@skellock
Copy link
Contributor

I like it. I never think to check this.

@jamonholmgren
Copy link
Member

I'm not sure we want to determine which licenses are "even more lenient" though. We may just want a default list of acceptable licenses that people can then customize.

@GantMan
Copy link
Member Author

GantMan commented Dec 21, 2017

I like this. So when you add the rule, there's a list with delineations on obligations it puts on the consumer of the licensed code. "Must include attribution" etc.

@jamonholmgren
Copy link
Member

This is a killer use case for solidarity, btw.

@GantMan GantMan changed the title Enforce License 🔌 Plugin Idea - Enforce License Jan 6, 2018
@GantMan
Copy link
Member Author

GantMan commented Feb 7, 2018

To check: Build around this
https://github.com/davglass/license-checker

@tabrindle
Copy link
Contributor

tabrindle commented Feb 7, 2018 via email

@GantMan
Copy link
Member Author

GantMan commented Feb 7, 2018

Example API:

enforce licenses rule whitelist

"License Stuff": {
  {"rule": "custom", "plugin":"license", "name": "enforceLicenses", "whitelist": [
      "MIT", "ISC", "BSD-3*", "BSD-2*", "Unlicense", "Public Domain", "Apache", "WTFPL", "CC*"
    ], 
    "ignore": ['dumb-node-module', 'module-cuasing-failure-but-license-known']
  }
}

succeeds as long as all modules and sub-modules (not explicitly ignored) fit the given whitelist.

enforce licenses rule blacklist

"License Stuff": {
  {"rule": "custom", "plugin":"license", "name": "enforceLicenses", "blacklist": [
      "BSD-2*", "Apache*"
    ],
    "ignore": ['dumb-node-module', 'module-cuasing-failure-but-license-known']
  }
}

succeeds as long as all modules and sub-modules (not explicitly ignored) do not have a license identified with the blacklist.


Add the feature where the rule only pertains to production or development.

"License Stuff": {
  {"rule": "custom", "plugin":"license", "name": "enforceLicenses", "whitelist": [
      "MIT", "ISC", "BSD-3*", "BSD-2*", "Unlicense", "Public Domain", "Apache", "WTFPL", "CC*"
    ], 
    "ignore": ['dumb-node-module', 'module-cuasing-failure-but-license-known'],
    "scope": "production"
  }
}

scope can be "production" | "prod" | "development" | "dev" | "all" (default is all)

@GantMan
Copy link
Member Author

GantMan commented Feb 8, 2018

Can use this in reports:

https://tldrlegal.com/

@jamonholmgren
Copy link
Member

I like the API @GantMan. 👍 👍

@skellock
Copy link
Contributor

skellock commented Feb 9, 2018

Legit. I want this. Hurry! They're coming!!!

@GantMan
Copy link
Member Author

GantMan commented Mar 15, 2018

Possible plugin game changer.
https://github.com/fossas/fossa-cli

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

No branches or pull requests

4 participants