license_finder 6.5.0 → 6.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +65 -0
- data/CONTRIBUTING.md +5 -4
- data/Dockerfile +26 -9
- data/README.md +53 -15
- data/Rakefile +1 -10
- data/VERSION +1 -1
- data/ci/pipelines/pull-request.yml.erb +2 -0
- data/ci/pipelines/release.yml.erb +16 -4
- data/ci/tasks/rubocop.yml +2 -0
- data/ci/tasks/update-changelog.yml +2 -0
- data/examples/Gemfile +4 -0
- data/examples/custom_erb_template.rb +24 -0
- data/examples/extract_license_data.rb +63 -0
- data/examples/sample_template.erb +7 -0
- data/lib/license_finder/cli/base.rb +8 -1
- data/lib/license_finder/cli/inherited_decisions.rb +18 -0
- data/lib/license_finder/cli/main.rb +5 -1
- data/lib/license_finder/configuration.rb +13 -1
- data/lib/license_finder/core.rb +5 -2
- data/lib/license_finder/decisions.rb +58 -10
- data/lib/license_finder/license.rb +45 -1
- data/lib/license_finder/license/definitions.rb +49 -2
- data/lib/license_finder/license/header_matcher.rb +7 -2
- data/lib/license_finder/license/templates/0BSD.txt +10 -0
- data/lib/license_finder/license/templates/MPL1_1.txt +469 -0
- data/lib/license_finder/license/text.rb +2 -2
- data/lib/license_finder/logger.rb +2 -0
- data/lib/license_finder/package.rb +2 -0
- data/lib/license_finder/package_manager.rb +15 -5
- data/lib/license_finder/package_managers/composer.rb +8 -4
- data/lib/license_finder/package_managers/conda.rb +131 -0
- data/lib/license_finder/package_managers/dep.rb +6 -1
- data/lib/license_finder/package_managers/dotnet.rb +2 -1
- data/lib/license_finder/package_managers/erlangmk.rb +50 -0
- data/lib/license_finder/package_managers/go_15vendorexperiment.rb +6 -1
- data/lib/license_finder/package_managers/go_dep.rb +15 -8
- data/lib/license_finder/package_managers/go_modules.rb +43 -15
- data/lib/license_finder/package_managers/mix.rb +1 -1
- data/lib/license_finder/package_managers/npm.rb +1 -1
- data/lib/license_finder/package_managers/nuget.rb +36 -1
- data/lib/license_finder/package_managers/pipenv.rb +1 -1
- data/lib/license_finder/package_managers/rebar.rb +29 -8
- data/lib/license_finder/package_managers/trash.rb +6 -1
- data/lib/license_finder/package_managers/yarn.rb +1 -1
- data/lib/license_finder/packages/conda_package.rb +74 -0
- data/lib/license_finder/packages/erlangmk_package.rb +114 -0
- data/lib/license_finder/packages/pip_package.rb +9 -2
- data/lib/license_finder/report.rb +1 -0
- data/lib/license_finder/reports/junit_report.rb +19 -0
- data/lib/license_finder/reports/templates/junit_report.erb +41 -0
- data/lib/license_finder/scanner.rb +25 -2
- data/license_finder.gemspec +3 -2
- metadata +41 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31f62a57c61b8458c29a79cd89f1a3bbabc43ae91d97a2cdb9587b7fecc4f8c0
|
4
|
+
data.tar.gz: ad37f722e0d798fe005e2e27adae55e9b85c85077387deb4320c30f976ce7bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05df4438e2faf5c8dfaa6b0b8c9019e40122ac73acb07fcfb2a18902698b03a1d81c100bf3bbf8b9ec7bca6356cffd1b089d6e3cc179ec7311cd9399d67c1cf5
|
7
|
+
data.tar.gz: 3cc7fa8bba6784884708a23725852bc1305c505bd279f4da6433e06f0da861d165bc6b77a228487c277cbec6904d36f155cda889ed8bedde2535b5ee3ed7e102
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,56 @@
|
|
1
|
+
# [6.12.0] / 2021-03-05
|
2
|
+
|
3
|
+
### Added
|
4
|
+
* Provide homepage information for GoDep and Go15Vendor package managers - [bae1bda9](https://github.com/pivotal/LicenseFinder/commit/bae1bda9d76cb922405d7efca9c67e2583db70d4) - Jeff Jun
|
5
|
+
|
6
|
+
# [6.11.0] / 2021-03-04
|
7
|
+
|
8
|
+
### Added
|
9
|
+
* Add homepage for go_modules package manager - [912394a8](https://github.com/pivotal/LicenseFinder/commit/912394a8a6ab4c31b6918a21da9f37d5b368ed6b)
|
10
|
+
|
11
|
+
# [6.10.1] / 2021-01-08
|
12
|
+
|
13
|
+
# [6.10.0] / 2020-11-27
|
14
|
+
|
15
|
+
# [6.9.0] / 2020-10-05
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
* to recognize permitted licenses with AND in the name [#173997648] - [eab14250](https://github.com/pivotal/LicenseFinder/commit/eab14250d188153f8c2b0b5c0191fec19bcddf55) - Raymond Lee
|
19
|
+
|
20
|
+
# [6.8.2] / 2020-09-08
|
21
|
+
|
22
|
+
# [6.8.1] / 2020-08-13
|
23
|
+
|
24
|
+
# [6.8.0] / 2020-08-06
|
25
|
+
|
26
|
+
# [6.7.0] / 2020-07-23
|
27
|
+
|
28
|
+
# [6.6.2] / 2020-07-09
|
29
|
+
|
30
|
+
### Added
|
31
|
+
* support for rebar3 - [b20e7444](https://github.com/pivotal/LicenseFinder/commit/b20e7444c147d8dbfa46eb4e8e549e03be751e02) - Jeff Jun
|
32
|
+
* Support for Go modules projects outside of the current working directory - [56b3bec6](https://github.com/pivotal/LicenseFinder/commit/56b3bec632b3884ce4cad538742b4a13c55fd7c5)
|
33
|
+
|
34
|
+
### Changed
|
35
|
+
* Change Go modules to only report imported packages (as with other Go package managers) - [34361fda](https://github.com/pivotal/LicenseFinder/commit/34361fdab2dc3f197f7aec6408175018dee3b453) and [dffae4ab](https://github.com/pivotal/LicenseFinder/commit/dffae4ab95e34115b6a54bf681fc0966a8611f01)
|
36
|
+
* Detect Go modules based on `go.mod` (instead of `go.sum`) - [667f6be7](https://github.com/pivotal/LicenseFinder/commit/667f6be716504a53ccc2824daae08af085566546)
|
37
|
+
|
38
|
+
### Fixed
|
39
|
+
* handle empty case for mix dependencies [#173637843] - [fc34b281](https://github.com/pivotal/LicenseFinder/commit/fc34b2813925a709addde675849e199b05fc4a23) - Jeff Jun
|
40
|
+
|
41
|
+
### Removed
|
42
|
+
* support for rebar2 [#173637980] - [b20e7444](https://github.com/pivotal/LicenseFinder/commit/b20e7444c147d8dbfa46eb4e8e549e03be751e02) - Jeff Jun
|
43
|
+
* Removed the unnecessary prepare command for Go modules - [284cc5c8](https://github.com/pivotal/LicenseFinder/commit/284cc5c821270a6e56275e32bac836a3e451f46b)
|
44
|
+
|
45
|
+
# [6.6.1] / 2020-06-30
|
46
|
+
|
47
|
+
### Changed
|
48
|
+
* Handle multiple solution files for nuget [#173021333] - [040d9559](https://github.com/pivotal/LicenseFinder/commit/040d9559a4bda07490255cc34c1a7891081bc511)
|
49
|
+
* matches license names from pypi api call with known licenses to avoid returning misformatted licenses [#173421573] - [6b96d746](https://github.com/pivotal/LicenseFinder/commit/6b96d74600034abcacee6ed2b322aa3abfaa0992) - Jeff Jun
|
50
|
+
* Update Nuget Package Manager prepare command - [6ac07066](https://github.com/pivotal/LicenseFinder/commit/6ac070668955bc034da1647658440ce5bb0d9bd2) - Jason Smith
|
51
|
+
|
52
|
+
# [6.6.0] / 2020-06-22
|
53
|
+
|
1
54
|
# [6.5.0] / 2020-06-01
|
2
55
|
|
3
56
|
### Added
|
@@ -874,3 +927,15 @@ Bugfixes:
|
|
874
927
|
[6.3.0]: https://github.com/pivotal/LicenseFinder/compare/v6.2.0...v6.3.0
|
875
928
|
[6.4.0]: https://github.com/pivotal/LicenseFinder/compare/v6.3.0...v6.4.0
|
876
929
|
[6.5.0]: https://github.com/pivotal/LicenseFinder/compare/v6.4.0...v6.5.0
|
930
|
+
[6.6.0]: https://github.com/pivotal/LicenseFinder/compare/v6.5.0...v6.6.0
|
931
|
+
[6.6.1]: https://github.com/pivotal/LicenseFinder/compare/v6.6.0...v6.6.1
|
932
|
+
[6.6.2]: https://github.com/pivotal/LicenseFinder/compare/v6.6.1...v6.6.2
|
933
|
+
[6.7.0]: https://github.com/pivotal/LicenseFinder/compare/v6.6.2...v6.7.0
|
934
|
+
[6.8.0]: https://github.com/pivotal/LicenseFinder/compare/v6.7.0...v6.8.0
|
935
|
+
[6.8.1]: https://github.com/pivotal/LicenseFinder/compare/v6.8.0...v6.8.1
|
936
|
+
[6.8.2]: https://github.com/pivotal/LicenseFinder/compare/v6.8.1...v6.8.2
|
937
|
+
[6.9.0]: https://github.com/pivotal/LicenseFinder/compare/v6.8.2...v6.9.0
|
938
|
+
[6.10.0]: https://github.com/pivotal/LicenseFinder/compare/v6.9.0...v6.10.0
|
939
|
+
[6.10.1]: https://github.com/pivotal/LicenseFinder/compare/v6.10.0...v6.10.1
|
940
|
+
[6.11.0]: https://github.com/pivotal/LicenseFinder/compare/v6.10.1...v6.11.0
|
941
|
+
[6.12.0]: https://github.com/pivotal/LicenseFinder/compare/v6.11.0...v6.12.0
|
data/CONTRIBUTING.md
CHANGED
@@ -24,8 +24,8 @@ will use the gem version installed inside the docker image.
|
|
24
24
|
|
25
25
|
## Useful Tips
|
26
26
|
|
27
|
-
To build the docker image simply call `docker build .` or explicitly pass the `Dockerfile`. Prebuilt versions of the
|
28
|
-
dockerfile can also be found on [Dockerhub](https://hub.docker.com/r/licensefinder/license_finder/tags/).
|
27
|
+
To build the docker image simply call `docker build .` or explicitly pass the `Dockerfile`. Prebuilt versions of the
|
28
|
+
dockerfile can also be found on [Dockerhub](https://hub.docker.com/r/licensefinder/license_finder/tags/).
|
29
29
|
|
30
30
|
To launch the docker image and interact with it via bash:
|
31
31
|
```
|
@@ -60,13 +60,13 @@ submitting a pull request which adds new columns to
|
|
60
60
|
`lib/license_finder/reports/csv_report.rb`.
|
61
61
|
|
62
62
|
It is also possible to generate a custom report from an ERB template. Use this
|
63
|
-
[example](https://
|
63
|
+
[example](https://github.com/pivotal/LicenseFinder/blob/master/examples/custom_erb_template.rb) as a starting
|
64
64
|
point. These reports will have access to the helpers in
|
65
65
|
[`LicenseFinder::ErbReport`](https://github.com/pivotal/LicenseFinder/blob/master/lib/license_finder/reports/erb_report.rb).
|
66
66
|
|
67
67
|
If you need a report with more detailed data or in a different format, we
|
68
68
|
recommend writing a custom ruby script. This
|
69
|
-
[example](https://
|
69
|
+
[example](https://github.com/pivotal/LicenseFinder/blob/master/examples/extract_license_data.rb) will get you
|
70
70
|
started.
|
71
71
|
|
72
72
|
If you come up with something useful, consider posting it to the Google Group
|
@@ -91,6 +91,7 @@ To successfully run the test suite, you will need the following installed:
|
|
91
91
|
- Conan
|
92
92
|
- NuGet
|
93
93
|
- dotnet
|
94
|
+
- Conda (requires python)
|
94
95
|
|
95
96
|
The [LicenseFinder docker image](https://hub.docker.com/r/licensefinder/license_finder/) already contains these dependencies.
|
96
97
|
|
data/Dockerfile
CHANGED
@@ -2,7 +2,7 @@ FROM ubuntu:xenial
|
|
2
2
|
|
3
3
|
# Versioning
|
4
4
|
ENV PIP_INSTALL_VERSION 19.0.2
|
5
|
-
ENV PIP3_INSTALL_VERSION
|
5
|
+
ENV PIP3_INSTALL_VERSION 20.0.2
|
6
6
|
ENV GO_LANG_VERSION 1.14.3
|
7
7
|
ENV MAVEN_VERSION 3.6.0
|
8
8
|
ENV SBT_VERSION 1.3.3
|
@@ -25,7 +25,7 @@ RUN apt-get update && apt-get install -y \
|
|
25
25
|
RUN add-apt-repository ppa:git-core/ppa && apt-get update && apt-get install -y git
|
26
26
|
|
27
27
|
# nodejs seems to be required for the one of the gems
|
28
|
-
RUN curl -sL https://deb.nodesource.com/
|
28
|
+
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
29
29
|
apt-get -y install nodejs
|
30
30
|
|
31
31
|
# install yarn
|
@@ -48,13 +48,15 @@ ENV JAVA_HOME=/opt/jdk-12.0.2
|
|
48
48
|
ENV PATH=$PATH:$JAVA_HOME/bin
|
49
49
|
RUN java -version
|
50
50
|
|
51
|
-
# install
|
52
|
-
RUN
|
51
|
+
# install rebar3
|
52
|
+
RUN curl -o rebar3 https://s3.amazonaws.com/rebar3/rebar3 && \
|
53
|
+
sudo chmod +x rebar3 && \
|
54
|
+
sudo mv rebar3 /usr/local/bin/rebar3
|
53
55
|
|
54
|
-
# install and update python-pip
|
55
|
-
RUN apt-get install -y python-pip python3-pip && \
|
56
|
-
|
57
|
-
|
56
|
+
# install and update python and python-pip
|
57
|
+
RUN apt-get install -y python python-pip python3-pip && \
|
58
|
+
python3 -m pip install pip==$PIP3_INSTALL_VERSION --upgrade && \
|
59
|
+
python -m pip install pip==$PIP_INSTALL_VERSION --upgrade --force
|
58
60
|
|
59
61
|
# install maven
|
60
62
|
RUN curl -O https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \
|
@@ -152,16 +154,31 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsof
|
|
152
154
|
sudo apt-get update &&\
|
153
155
|
sudo apt-get install -y dotnet-runtime-2.1 dotnet-sdk-2.1 dotnet-sdk-2.2 dotnet-sdk-3.0 dotnet-sdk-3.1
|
154
156
|
|
157
|
+
# install Composer
|
155
158
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5267A6C &&\
|
156
159
|
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/php.list &&\
|
157
160
|
apt-get update &&\
|
158
161
|
apt-get install -y php7.4-cli &&\
|
162
|
+
EXPECTED_COMPOSER_INSTALLER_CHECKSUM="$(curl --silent https://composer.github.io/installer.sig)" &&\
|
159
163
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&\
|
160
|
-
php -r "
|
164
|
+
ACTUAL_COMPOSER_INSTALLER_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" &&\
|
165
|
+
test "${ACTUAL_COMPOSER_INSTALLER_CHECKSUM}" = "${EXPECTED_COMPOSER_INSTALLER_CHECKSUM}" || (echo "ERROR: Invalid installer checksum" >&2; false) &&\
|
161
166
|
php composer-setup.php &&\
|
162
167
|
php -r "unlink('composer-setup.php');" &&\
|
163
168
|
mv composer.phar /usr/bin/composer
|
164
169
|
|
170
|
+
# install miniconda
|
171
|
+
# See https://docs.conda.io/en/latest/miniconda_hashes.html
|
172
|
+
# for latest versions and SHAs.
|
173
|
+
WORKDIR /tmp
|
174
|
+
RUN \
|
175
|
+
conda_installer=Miniconda3-py38_4.9.2-Linux-x86_64.sh &&\
|
176
|
+
ref='1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7' &&\
|
177
|
+
wget -q https://repo.anaconda.com/miniconda/${conda_installer} &&\
|
178
|
+
sha=`openssl sha256 "${conda_installer}" | cut -d' ' -f2` &&\
|
179
|
+
([ "$sha" = "${ref}" ] || (echo "Verification failed: ${sha} != ${ref}"; false)) &&\
|
180
|
+
(echo; echo "yes") | sh "${conda_installer}"
|
181
|
+
|
165
182
|
# install license_finder
|
166
183
|
COPY . /LicenseFinder
|
167
184
|
RUN bash -lc "cd /LicenseFinder && bundle config set no-cache 'true' && bundle install -j4 && rake install"
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ and give you an actionable exception report.
|
|
43
43
|
|
44
44
|
### Experimental project types
|
45
45
|
|
46
|
-
* Erlang (via `rebar`)
|
46
|
+
* Erlang (via `rebar` and `Erlang.mk`)
|
47
47
|
* Objective-C, Swift (via Carthage or CocoaPods \[0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/)\])
|
48
48
|
* Objective-C (+ CocoaPods 0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/))
|
49
49
|
* Elixir (via `mix`)
|
@@ -54,6 +54,7 @@ and give you an actionable exception report.
|
|
54
54
|
* Rust (via `cargo`)
|
55
55
|
* Go Modules (via `go mod`)
|
56
56
|
* PHP (via `composer`)
|
57
|
+
* Python (via Conda [Conda 4.8.3, Python 3.7, Bash; requires an `environment.yml` or `environment.yaml`])
|
57
58
|
|
58
59
|
## Installation
|
59
60
|
|
@@ -121,9 +122,9 @@ be useful when you need to track down an unexpected package or
|
|
121
122
|
license.
|
122
123
|
|
123
124
|
If you do not want to manually run an individual package manager's prepare
|
124
|
-
command (ex: `bundle install`, `npm install`, etc) to ensure your project
|
125
|
+
command (ex: `bundle install`, `npm install`, etc) to ensure your project
|
125
126
|
is fully prepared to be scanned, use the `--prepare` or `-p` option which will run
|
126
|
-
each active package manager's prepare command for you. If you would like to continue
|
127
|
+
each active package manager's prepare command for you. If you would like to continue
|
127
128
|
running `license_finder` even if there is an issue with a prepare step, use the
|
128
129
|
`--prepare-no-fail` option which prepares but carries on despite any potential failures.
|
129
130
|
|
@@ -135,7 +136,7 @@ command.
|
|
135
136
|
|
136
137
|
If you have docker installed, try using the included `dlf` script (potentially
|
137
138
|
symlinked to be in your path via `ln -s LicenseFinder/dlf /usr/local/bin` or
|
138
|
-
whatever method you prefer). This will run any
|
139
|
+
whatever method you prefer). This will run any commands passed to it inside a
|
139
140
|
pre-provisioned Docker container to maintain consistent versions of all the
|
140
141
|
package managers. For example,
|
141
142
|
|
@@ -156,10 +157,10 @@ You can better understand the way this script works by looking at its source, bu
|
|
156
157
|
reference it will mount your current directory at the path `/scan` and run any commands
|
157
158
|
passed to it from that directory.
|
158
159
|
|
159
|
-
Note that the docker image will run the gem which is installed within it.
|
160
|
+
Note that the docker image will run the gem which is installed within it.
|
160
161
|
So the docker image tagged `4.0.2` will run *License Finder Version 4.0.2*
|
161
162
|
|
162
|
-
See the [
|
163
|
+
See the [contributing guide](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md) for information on development.
|
163
164
|
|
164
165
|
### Activation
|
165
166
|
|
@@ -176,6 +177,7 @@ languages, as long as that language has a package definition in the project dire
|
|
176
177
|
* `Podfile` (for `pod`)
|
177
178
|
* `Cartfile` (for `carthage`)
|
178
179
|
* `rebar.config` (for `rebar`)
|
180
|
+
* `Erlang.mk` or `erlang.mk` file (for `Erlang.mk`)
|
179
181
|
* `mix.exs` (for `mix`)
|
180
182
|
* `packages/` directory (for `nuget`)
|
181
183
|
* `*.csproj` (for `dotnet`)
|
@@ -183,7 +185,7 @@ languages, as long as that language has a package definition in the project dire
|
|
183
185
|
* `glide.lock` file (for `glide`)
|
184
186
|
* `vendor/vendor.json` file (for `govendor`)
|
185
187
|
* `Gopkg.lock` file (for `dep`)
|
186
|
-
* `go.
|
188
|
+
* `go.mod` file (for `go mod`)
|
187
189
|
* `vendor.conf` file (for `trash`)
|
188
190
|
* `yarn.lock` file (for `yarn`)
|
189
191
|
* `conanfile.txt` file (for `conan`)
|
@@ -309,7 +311,7 @@ be approved. The project name at the top of the report can be set with
|
|
309
311
|
`license_finder project_name add`.
|
310
312
|
|
311
313
|
### Note:
|
312
|
-
When using the yarn package manager, when a node_module's package.json doesn't
|
314
|
+
When using the yarn package manager, when a node_module's package.json doesn't
|
313
315
|
explicitly declare a license, yarn indicates that it has inferred the license based
|
314
316
|
on some keywords in other files by appending an asterisk to the license name. If you
|
315
317
|
see a * at the end of the license name, this is intended.
|
@@ -327,11 +329,11 @@ you should manually research what the actual license is. When you
|
|
327
329
|
have established the real license, you can record it with:
|
328
330
|
|
329
331
|
```sh
|
330
|
-
$ license_finder
|
332
|
+
$ license_finder licenses add my_unknown_dependency MIT --homepage="www.unknown-code.org"
|
331
333
|
```
|
332
334
|
|
333
335
|
This command would assign the MIT license to the dependency
|
334
|
-
`my_unknown_dependency`. It will also set its homepage to `
|
336
|
+
`my_unknown_dependency`. It will also set its homepage to `www.unknown-code.org`.
|
335
337
|
|
336
338
|
|
337
339
|
### Adding Hidden Dependencies
|
@@ -379,6 +381,26 @@ items, even if someone attempts to manually approve or permit it. However,
|
|
379
381
|
if a dependency has even one license that is not restricted, it can still be
|
380
382
|
manually approved or permitted.
|
381
383
|
|
384
|
+
## Decision inheritance
|
385
|
+
|
386
|
+
Add or remove decision files you want to inherit from - see `license_finder inherited_decisions help` for more information.
|
387
|
+
|
388
|
+
This allows you to have a centralized decision file for approved/restricted licenses. If you have multiple projects it's way easier to have one single place where you approved or restricted licenses defined.
|
389
|
+
|
390
|
+
Add one or more decision files to the inherited decisions
|
391
|
+
```bash
|
392
|
+
license_finder inherited_decisions add DECISION_FILE
|
393
|
+
```
|
394
|
+
|
395
|
+
Remove one or more decision files from the inherited decisions
|
396
|
+
```bash
|
397
|
+
license_finder inherited_decisions remove DECISION_FILE
|
398
|
+
```
|
399
|
+
|
400
|
+
List all the inherited decision files
|
401
|
+
```bash
|
402
|
+
license_finder inherited_decisions list
|
403
|
+
```
|
382
404
|
|
383
405
|
## Configuration
|
384
406
|
|
@@ -392,13 +414,22 @@ If you have a gradle project, you can invoke gradle with a custom script by
|
|
392
414
|
passing (for example) `--gradle_command gradlew` to `license_finder` or
|
393
415
|
`license_finder report`.
|
394
416
|
|
395
|
-
Similarly you can invoke a custom rebar script with `--rebar_command
|
417
|
+
Similarly you can invoke a custom rebar script with `--rebar_command rebar`.
|
396
418
|
If you store rebar dependencies in a custom directory (by setting `deps_dir` in
|
397
419
|
`rebar.config`), set `--rebar_deps_dir`.
|
398
420
|
|
399
421
|
You can also invoke a custom Mix script `remix` with `--mix_command remix` and
|
400
422
|
set `--mix_deps_dir` to fetch Mix dependencies from a custom directory.
|
401
423
|
|
424
|
+
### Narrow down Package Manager
|
425
|
+
|
426
|
+
By default, license_finder will check for all supported package managers,
|
427
|
+
but you can narrow it down to use only those you pass to `--enabled-package-managers`.
|
428
|
+
For example,
|
429
|
+
|
430
|
+
```
|
431
|
+
$ license_finder --enabled-package-managers bundler npm
|
432
|
+
```
|
402
433
|
|
403
434
|
### Saving Configuration
|
404
435
|
|
@@ -416,6 +447,11 @@ rebar_command: './rebarw'
|
|
416
447
|
rebar_deps_dir: './rebar_deps'
|
417
448
|
mix_command: './mixw'
|
418
449
|
mix_deps_dir: './mix_deps'
|
450
|
+
enabled_package_managers:
|
451
|
+
- bundler
|
452
|
+
- gradle
|
453
|
+
- rebar
|
454
|
+
- mix
|
419
455
|
```
|
420
456
|
|
421
457
|
### Gradle Projects
|
@@ -440,9 +476,9 @@ downloadLicenses {
|
|
440
476
|
### Conan Projects
|
441
477
|
|
442
478
|
`license_finder` supports Conan. You need to have the following lines in your conanfile.txt for `license_finder` to retrieve dependencies' licenses.
|
443
|
-
Ensure that `conan install` does not generate an error.
|
479
|
+
Ensure that `conan install` does not generate an error.
|
444
480
|
|
445
|
-
```
|
481
|
+
```
|
446
482
|
[imports]
|
447
483
|
., license* -> ./licenses @ folder=True, ignore_case=True
|
448
484
|
```
|
@@ -467,6 +503,8 @@ licenseConfigurations := Set("compile", "provided")
|
|
467
503
|
|
468
504
|
## Upgrading
|
469
505
|
|
506
|
+
To upgrade to `license_finder` version >= 6.0, you have to replace the terminology `whitelist` with `permit` and `blacklist` with `restrict` in your `dependency_decisions.yml`. See [Changelog](https://github.com/pivotal/LicenseFinder/blob/master/CHANGELOG.md#600--2020-01-22) for more details.
|
507
|
+
|
470
508
|
To upgrade from `license_finder` version 1.2 to 2.0, see
|
471
509
|
[`license_finder_upgrade`](https://github.com/mainej/license_finder_upgrade).
|
472
510
|
To upgrade to 2.0 from a version lower than 1.2, first upgrade to 1.2, and run
|
@@ -494,9 +532,9 @@ And save a `LICENSE` file which contains your license text in your repo.
|
|
494
532
|
|
495
533
|
* Bundler
|
496
534
|
* When using `--project-path`, Bundler cannot find the Gemfile.
|
497
|
-
|
535
|
+
|
498
536
|
* Yarn
|
499
|
-
* A module that is incompatible with the platform on which
|
537
|
+
* A module that is incompatible with the platform on which
|
500
538
|
license_finder is run will always be reported to have a license type
|
501
539
|
of "unknown". ([#456](https://github.com/pivotal/LicenseFinder/issues/456))
|
502
540
|
|
data/Rakefile
CHANGED
@@ -6,15 +6,6 @@ Bundler::GemHelper.install_tasks
|
|
6
6
|
require './lib/license_finder/platform'
|
7
7
|
require 'rspec/core/rake_task'
|
8
8
|
|
9
|
-
namespace :spec do
|
10
|
-
desc 'Run test tagged \'focus\''
|
11
|
-
RSpec::Core::RakeTask.new(:focus) do |t|
|
12
|
-
t.fail_on_error = true
|
13
|
-
t.pattern = './spec/**/*_spec.rb'
|
14
|
-
t.rspec_opts = %w[--color --tag focus]
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
9
|
desc 'Run all specs in spec/'
|
19
10
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
20
11
|
t.fail_on_error = true
|
@@ -63,7 +54,7 @@ task :update_pipeline, [:slack_url, :slack_channel] do |_, args|
|
|
63
54
|
puts 'Warning: You should provide slack channel and url to receive slack notifications on build failures'
|
64
55
|
end
|
65
56
|
|
66
|
-
ruby_versions = %w[2.7.1 2.6.5 2.5.7 2.4.9 2.3.8 jruby-9.2.
|
57
|
+
ruby_versions = %w[2.7.1 2.6.5 2.5.7 2.4.9 2.3.8 jruby-9.2.14.0]
|
67
58
|
|
68
59
|
params = []
|
69
60
|
params << "ruby_versions=#{ruby_versions.join(',')}"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.12.0
|
@@ -8,6 +8,8 @@ resource_types:
|
|
8
8
|
source:
|
9
9
|
repository: cfcommunity/slack-notification-resource
|
10
10
|
tag: latest
|
11
|
+
username: ((LicenseFinderDocker.username))
|
12
|
+
password: ((LicenseFinderDocker.password))
|
11
13
|
<% end %>
|
12
14
|
|
13
15
|
resources:
|
@@ -123,28 +125,38 @@ jobs:
|
|
123
125
|
|
124
126
|
- name: bump-major
|
125
127
|
plan:
|
126
|
-
-
|
128
|
+
- get: semver-version
|
127
129
|
tags: ["private-worker"]
|
128
130
|
params: {bump: major}
|
131
|
+
- put: semver-version
|
132
|
+
tags: ["private-worker"]
|
133
|
+
params: {file: semver-version/version}
|
134
|
+
|
129
135
|
|
130
136
|
- name: bump-minor
|
131
137
|
plan:
|
132
|
-
-
|
138
|
+
- get: semver-version
|
133
139
|
tags: ["private-worker"]
|
134
140
|
params: {bump: minor}
|
141
|
+
- put: semver-version
|
142
|
+
tags: ["private-worker"]
|
143
|
+
params: {file: semver-version/version}
|
135
144
|
|
136
145
|
- name: bump-patch
|
137
146
|
plan:
|
138
|
-
-
|
147
|
+
- get: semver-version
|
139
148
|
tags: ["private-worker"]
|
140
149
|
params: {bump: patch}
|
150
|
+
- put: semver-version
|
151
|
+
tags: ["private-worker"]
|
152
|
+
params: {file: semver-version/version}
|
141
153
|
|
142
154
|
- name: release
|
143
155
|
disable_manual_trigger: true
|
144
156
|
plan:
|
145
157
|
- get: lf-git
|
146
158
|
tags: ["private-worker"]
|
147
|
-
passed: [<%= "#{ruby_versions.map{ |version| "ruby-#{version}"}.join(', ')}, rubocop" %>]
|
159
|
+
passed: [<%= "#{ruby_versions.map{ |version| "ruby-#{version}" unless version == "jruby-9.2.14.0" }.compact.join(', ') }, rubocop" %>]
|
148
160
|
- get: semver-version
|
149
161
|
tags: ["private-worker"]
|
150
162
|
trigger: true
|