Giter VIP home page Giter VIP logo

sonarqube-licensecheck's Introduction

SonarQube License-Check

Build Status

This SonarQube plugin ensures that projects in an organization adhere to a set of standard libraries and versions. This enables the governance of the used libraries and licences.

License

This software is licensed under the Apache Software License, Version 2.0

Compatibility

This plugin is compatible:

  • 1.x versions with SonarQube >= 5.3 and < 6.
  • 2.x version with SonarQube >= 6.5.

Installation

Put the pre-built jar-file (from release downloads) in the directory $SONARQUBE_HOME/extensions/plugins and restart the server to install the plugin. Activate the rules of this plugin ("License is not allowed", "Dependency has unknown license") in your SonarQube quality profiles - otherwise the plugin is not executed.

Execution

Maven

When a project is analyzed using the mvn sonar:sonar in command line the extension is started automatically.

Gradle

When a project is analyzed using the official gradle sonarqube plugin via gradlew sonarqube extension is started automatically.

Configuration

After booting the SonarQube Server with the License-Check Plugin two new options can be found in the tab Administration.

  • Within the general settings the plugin can be manually enabled or disabled. By default it is enabled.
  • All other configuration is under License-Check specific settings (Configuration > License Check).
    • Under "Licenses" you can allow or disallow licenses globally and add/edit the list of known licenses.
    • Under "Project Licenses" you can allow and disallow licenses for a specific project.
    • Under "Maven Dependencies" you can map the Maven key (groupId:artifactId) to licenses using regular expressions. E.g. ^asm:asm$ to "BSD-3-Clause"
    • Under "Maven Licenses" you can map Maven license texts to licenses using regular expressions, e.g. .*Apache.*2.* to "Apache-2.0".

License configuration

Features

Analysis

The plugin scans for dependencies defined in your project including all transitive dependencies.

Currently supported formats are:

  • Maven POM files - all dependencies with scope "compile" and "runtime" are checked
  • Gradle dependencies - all dependencies in all configurations are being checked
  • NPM package.json files - all dependencies (except "devDependencies") are checked

Project Dashboard

The plugin contains a project dashboard showing a list of dependencies with version and a list of all used licences. Each table shows the status of the license (allowed, not allowed, not found). You can also export the data to Excel.

Example for "Dependencies" table:

NameVersionLicenseStatus
org.springframework.boot:spring-boot1.4.0.RELEASEApache-2.0Allowed
core-js2.4.0MITAllowed
dk.brics.automaton:automaton1.11-8BSD-3-ClauseNot Allowed
saxon:saxon9.1.0.8jUnknwon

Example for "Licenses" table:

IdentifierNameAllowed
Apache-2.0Apache License 2.0true
MITMIT Licensetrue
BSD-3-ClauseBSD 3-clause New or Revised Licensefalse

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.