GithubHelp home page GithubHelp logo

pombredanne / license_approval Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ralexander-phi/license_approval

0.0 1.0 0.0 13 KB

Track licenses and approvals

License: MIT License

Dockerfile 12.55% Ruby 21.23% Shell 66.22%

license_approval's Introduction

License Approval

A Github Action that helps you track and approve licenses your project uses.

How it works:

  • You add a new dependency to your project and send it out for review in a pull request
  • License Approval detects the new dependency and finds the license
    • For completeness License Approval checks transitive dependencies as well
  • If License Approval finds any license that isn't on the whitelist, it will block the pull request
  • Your team can review the license or consult with your legal team to determine if the license is acceptable
  • Finally you can add the license to the whitelist or blacklist as needed

This project relies heavily on pivotal/LicenseFinder. Be sure to review their docs as well.

Status

BETA. Working with Ruby/Bundle examples only at the moment.

Setup

First install license_finder locally:

$ gem install license_finder

Run the tool:

$ license_finder

You'll probably see a failure on the first run, with output like:

LicenseFinder::Bundler: is active

Dependencies that need approval:
bundler, 1.17.2, MIT
license_finder, 5.10.2, MIT
parslet, 1.8.2, MIT
rubyzip, 2.0.0, "Simplified BSD"
thor, 0.20.3, MIT
toml, 0.2.0, MIT
with_env, 1.1.0, MIT
xml-simple, 1.1.5, ruby

This indicates that the tool doesn't know if the MIT, Simplified BSD, and ruby licenses are acceptable for your project.

You can mark the MIT license as acceptable by running:

license_finder whitelist add MIT

Now any MIT licensed dependencies will automatically be approved.

If you don't want to fully approve a license you can approve packages individually as well:

license_finder approvals add xml-simple

Now take a look at the doc/dependency_decisions.yml that these commands created. You'll need to add this to source control, so git add it.

Once you've approved everything you need, you can turn on the workflow by adding a file under .github/workflows. See the example this repo uses: https://github.com/ralexander-phi/license_approval/blob/master/.github/workflows/main.yml

Tweak your workflow if needed, then start a pull request with the changes. If everything is working, you should see a new check in the pull request and it should be passing. If so, congratulations, you're done.

Now your team will be able to keep track of software licensing approvals right in your pull request workflow.

Feel free to open an issue if you run into any issues or have suggestions for improvements.

license_approval's People

Contributors

ralexander-phi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.