license_finder 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -0
- data/.pre-commit-hooks.yaml +10 -0
- data/CHANGELOG.md +41 -9
- data/CONTRIBUTING.md +1 -0
- data/Dockerfile +69 -52
- data/README.md +72 -29
- data/VERSION +1 -1
- data/dlf +6 -1
- data/lib/license_finder/cli/base.rb +2 -0
- data/lib/license_finder/cli/licenses.rb +8 -3
- data/lib/license_finder/cli/main.rb +3 -1
- data/lib/license_finder/configuration.rb +8 -0
- data/lib/license_finder/core.rb +2 -0
- data/lib/license_finder/decision_applier.rb +1 -1
- data/lib/license_finder/decisions.rb +24 -6
- data/lib/license_finder/license/definitions.rb +2 -0
- data/lib/license_finder/license/templates/Apache2.txt +0 -2
- data/lib/license_finder/manual_licenses.rb +79 -0
- data/lib/license_finder/package.rb +1 -0
- data/lib/license_finder/package_manager.rb +1 -0
- data/lib/license_finder/package_managers/dotnet.rb +5 -2
- data/lib/license_finder/package_managers/maven.rb +2 -6
- data/lib/license_finder/package_managers/nuget.rb +5 -0
- data/lib/license_finder/package_managers/pnpm.rb +120 -0
- data/lib/license_finder/package_managers/yarn.rb +91 -31
- data/lib/license_finder/package_utils/pypi.rb +3 -1
- data/lib/license_finder/packages/npm_package.rb +21 -0
- data/lib/license_finder/packages/pnpm_package.rb +13 -0
- data/lib/license_finder/reports/csv_report.rb +10 -1
- data/lib/license_finder/scanner.rb +1 -1
- data/license_finder.gemspec +4 -4
- metadata +19 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a74ac8d4dd390c9608445a97a27c1b6b1a3398b33c95d28eff8eb0e1cfff63e7
|
4
|
+
data.tar.gz: 6944369b76103e35729350d5508445ad72f91bb79b2d32e6241b552cd53bf3cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db5512b1f7c9f5c317fb4d9a0efe09fc6d4b88461b3c599ca0ab7b679ef9fdf07cb86eebe3d0ef87cefcfa5a531d9bd1e2b583f7e938ac9c3a64766f21a7f012
|
7
|
+
data.tar.gz: 75f9994268a1a7ef36145bd757cfa8c02e1fcb3d2debdd8301b9f26326bf4afc04771a8b9a2d4e8922398560e9df68c075df240144d6972a62c5613c4f6261c5
|
data/.github/dependabot.yml
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
- id: license-finder
|
2
|
+
name: Audit licenses of dependencies
|
3
|
+
entry: license_finder
|
4
|
+
language: ruby
|
5
|
+
pass_filenames: false
|
6
|
+
description: >
|
7
|
+
LicenseFinder works with your package managers to find dependencies, detect
|
8
|
+
the licenses of the packages in them, compare those licenses against a
|
9
|
+
user-defined list of permitted licenses, and give you an actionable
|
10
|
+
exception report.
|
data/CHANGELOG.md
CHANGED
@@ -1,19 +1,50 @@
|
|
1
|
+
# [7.1.0] / 2022-11-28
|
2
|
+
|
3
|
+
### Added
|
4
|
+
* Missing New BSD alternative name - [64d425d9](https://github.com/pivotal/LicenseFinder/commit/64d425d9210794c6b45c60bf730931e459a1e959)
|
5
|
+
* pre-commit hook - [2fd5ac85](https://github.com/pivotal/LicenseFinder/commit/2fd5ac85fbd4ea03b6f274f2c977448a8a517c2c) - Kurt von Laven
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
* - Apache 2 license being too restrictive on matching - [c7fd0399](https://github.com/pivotal/LicenseFinder/commit/c7fd03994592ca97408f5134dd9eac6566e51c48)
|
9
|
+
* - Erlang not installing properly with mix - [74af3885](https://github.com/pivotal/LicenseFinder/commit/74af388579dd2f26b1814ece39c869d684218cd9)
|
10
|
+
* Scan transitive Yarn v2+ dependencies - [0115445e](https://github.com/pivotal/LicenseFinder/commit/0115445eb26de3185518adfb257b0e1911cf2fbd) - Kurt von Laven
|
11
|
+
|
12
|
+
* Issue with chaining commands with dlf - [a6af8c3e](https://github.com/pivotal/LicenseFinder/commit/a6af8c3e0abb932ed8d3c0215175f23cf75b5fb2)
|
13
|
+
* Nuget and dotnet not returning proper licenses - [e3452336](https://github.com/pivotal/LicenseFinder/commit/e3452336aa980f26de9a7d44d725bddb0ddd67a0)
|
14
|
+
* Save help documentation for the default file name - [09a93762](https://github.com/pivotal/LicenseFinder/commit/09a93762dc3bd714fdcdebb4aa84af4c7dbefa04)
|
15
|
+
* - Yarn2 output parsing - [395a7f02](https://github.com/pivotal/LicenseFinder/commit/395a7f02b7729243aaf730b6ede71cae8f21cfeb)
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
* - Bump docker image golang version to 1.17.13 - [4f3df246](https://github.com/pivotal/LicenseFinder/commit/4f3df246d2f5245681a943a6fb6dee49e3ed3ed1)
|
19
|
+
|
20
|
+
# [7.0.1] / 2022-03-18
|
21
|
+
### Fixed
|
22
|
+
* Maven Wrapper command path must be relative to working directory - [298a733a](https://github.com/pivotal/LicenseFinder/commit/298a733a67f34341ffabc7dfbf2ee5c27574b979) - jbmgrtn
|
23
|
+
* Support yarn license command for yarn v2+ - [ed3b319b](https://github.com/pivotal/LicenseFinder/commit/ed3b319b64bf9c72c12fd5a365952137cf7f33b6)
|
24
|
+
|
25
|
+
|
1
26
|
# [7.0.0] / 2022-03-04
|
2
27
|
|
3
28
|
### Added
|
4
|
-
* Ruby 3.x Support - [02497dfb](https://github.com/pivotal/LicenseFinder/commit/02497dfb60d458e51a43ef26568389b5fcf302af)
|
29
|
+
* Ruby 3.x Support - [02497dfb](https://github.com/pivotal/LicenseFinder/commit/02497dfb60d458e51a43ef26568389b5fcf302af)
|
30
|
+
* Provide Flutter project scanning support - [e739f281](https://github.com/pivotal/LicenseFinder/commit/e739f2180c88504152c0e19477489177012f5631) - etiennecadicidean
|
31
|
+
* Add a new option to use spdx identifier in reports - [a71763bb](https://github.com/pivotal/LicenseFinder/commit/a71763bb132ed39e57f8071e72cb2450733bf8db) - etiennecadicidean
|
32
|
+
* Allow to specify cocoadpods acknowledgment through ENV - [67bd3fb5](https://github.com/pivotal/LicenseFinder/commit/67bd3fb5569afa54abc16035fd7804bc2d65b7c0) - etiennecadicidean
|
5
33
|
|
6
34
|
### Changed
|
7
|
-
*
|
8
|
-
*
|
35
|
+
* Updated code to support newest Thor gem - [b118772c](https://github.com/pivotal/LicenseFinder/commit/b118772c3f634dacc56795eebb7c3ba4c89ef639)
|
36
|
+
* Raise an error if the yarn licenses list command fails - [8f9ab6bd](https://github.com/pivotal/LicenseFinder/commit/8f9ab6bd681866aee888410672f3babab7aab383) - ajesler
|
37
|
+
|
38
|
+
### Deprecated
|
39
|
+
* Remove support for Ruby 2.3 - [02497dfb](https://github.com/pivotal/LicenseFinder/commit/02497dfb60d458e51a43ef26568389b5fcf302af)
|
9
40
|
|
10
41
|
# [6.15.0] / 2021-12-17
|
11
42
|
|
12
43
|
### Added
|
13
|
-
* Add Yarn2 support [
|
44
|
+
* Add Yarn2 support - [7f08790c](https://github.com/pivotal/LicenseFinder/commit/7f08790ce1d7cd12ccd0aa9de114ca3366ab408c)
|
14
45
|
|
15
46
|
###Changed
|
16
|
-
* Upgrade conan and use https://center.conan.io instead of conan.bintray.com [
|
47
|
+
* Upgrade conan and use https://center.conan.io instead of conan.bintray.com - [eea1292b](https://github.com/pivotal/LicenseFinder/commit/eea1292bf2613f603a8a0ae42747857acf77e361)
|
17
48
|
|
18
49
|
### Fixed
|
19
50
|
* Fix docker Conan and swift - [66031df9](https://github.com/pivotal/LicenseFinder/commit/66031df912c2e1e21aa794a4b897fc61c9ec6b02)
|
@@ -28,15 +59,15 @@
|
|
28
59
|
First two commit were supposed to show up in v6.14.0, but GPG bug prevented a correct build. Therefore, a follow up patch build was made to include the GPG fix.
|
29
60
|
|
30
61
|
### Changed
|
31
|
-
* Upgrade Docker image to use Ubuntu Bionic [#178471230] [1c12588c](https://github.com/pivotal/LicenseFinder/commit/1c12588cceecb8b7350d090c85b519b24bcc6682)
|
62
|
+
* Upgrade Docker image to use Ubuntu Bionic [#178471230] - [1c12588c](https://github.com/pivotal/LicenseFinder/commit/1c12588cceecb8b7350d090c85b519b24bcc6682)
|
32
63
|
* Update the default timezone to GMT [#178471230] - [9fcab84](https://github.com/pivotal/LicenseFinder/commit/9fcab84605cda81e7f276d3c567d14409e371333)
|
33
64
|
* Use local copy of Swift puglic GPG keys [#178674224] - [4db4b3e](https://github.com/pivotal/LicenseFinder/commit/4db4b3e5980ca52019549d74da574a2342a7846e)
|
34
65
|
|
35
66
|
### Added
|
36
|
-
* Added --npm_options option to customize npm behavior
|
67
|
+
* Added --npm_options option to customize npm behavior - [b8457a62](https://github.com/pivotal/LicenseFinder/commit/b8457a62e7b531294934364d1e5f72cd78a7686a) - Alexander-Malott
|
37
68
|
|
38
69
|
### Security
|
39
|
-
* Fix issue where commands could be injected running on Cocoapods projects
|
70
|
+
* Fix issue where commands could be injected running on Cocoapods projects - [b0a61a2d](https://github.com/pivotal/LicenseFinder/commit/b0a61a2d833921c714cc39cdda8ba80af3f33d04)
|
40
71
|
|
41
72
|
Thanks to Joern Schneeweisz Staff Security Engineer, Security Research | GitLab for raising the issue
|
42
73
|
|
@@ -1001,4 +1032,5 @@ Bugfixes:
|
|
1001
1032
|
[6.14.2]: https://github.com/pivotal/LicenseFinder/compare/v6.14.1...v6.14.2
|
1002
1033
|
[6.15.0]: https://github.com/pivotal/LicenseFinder/compare/v6.14.2...v6.15.0
|
1003
1034
|
[7.0.0]: https://github.com/pivotal/LicenseFinder/compare/v6.15.0...v7.0.0
|
1004
|
-
[7.0.
|
1035
|
+
[7.0.1]: https://github.com/pivotal/LicenseFinder/compare/v7.0.0...v7.0.1
|
1036
|
+
[7.1.0]: https://github.com/pivotal/LicenseFinder/compare/v7.0.1...v7.1.0
|
data/CONTRIBUTING.md
CHANGED
@@ -78,6 +78,7 @@ If you come up with something useful, consider posting it to the Google Group
|
|
78
78
|
To successfully run the test suite, you will need the following installed:
|
79
79
|
- NPM (requires Node)
|
80
80
|
- Yarn (requires Node)
|
81
|
+
- PNPM (requires Node)
|
81
82
|
- Bower (requires Node and NPM)
|
82
83
|
- Maven (requires Java)
|
83
84
|
- Gradle (requires Java)
|
data/Dockerfile
CHANGED
@@ -5,25 +5,25 @@ WORKDIR /tmp
|
|
5
5
|
# Versioning
|
6
6
|
ENV PIP_INSTALL_VERSION 19.0.2
|
7
7
|
ENV PIP3_INSTALL_VERSION 20.0.2
|
8
|
-
ENV GO_LANG_VERSION 1.
|
8
|
+
ENV GO_LANG_VERSION 1.17.13
|
9
9
|
ENV MAVEN_VERSION 3.6.0
|
10
10
|
ENV SBT_VERSION 1.3.3
|
11
11
|
ENV GRADLE_VERSION 5.6.4
|
12
12
|
ENV RUBY_VERSION 3.1.1
|
13
|
-
ENV MIX_VERSION
|
13
|
+
ENV MIX_VERSION 2.0
|
14
14
|
ENV COMPOSER_ALLOW_SUPERUSER 1
|
15
15
|
|
16
16
|
# programs needed for building
|
17
17
|
RUN apt-get update && apt-get install -y \
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
build-essential \
|
19
|
+
curl \
|
20
|
+
sudo \
|
21
|
+
unzip \
|
22
|
+
wget \
|
23
|
+
gnupg2 \
|
24
|
+
apt-utils \
|
25
|
+
software-properties-common \
|
26
|
+
bzr
|
27
27
|
|
28
28
|
RUN add-apt-repository ppa:git-core/ppa && apt-get update && apt-get install -y git
|
29
29
|
|
@@ -33,14 +33,18 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
|
33
33
|
|
34
34
|
# install yarn
|
35
35
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && \
|
37
|
+
apt-get update && \
|
38
|
+
apt-get install yarn
|
39
39
|
|
40
40
|
# install bower
|
41
41
|
RUN npm install -g bower && \
|
42
42
|
echo '{ "allow_root": true }' > /root/.bowerrc
|
43
43
|
|
44
|
+
# install pnpm
|
45
|
+
RUN npm install -g pnpm && \
|
46
|
+
pnpm version
|
47
|
+
|
44
48
|
# install jdk 12
|
45
49
|
RUN curl -L -o openjdk12.tar.gz https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz && \
|
46
50
|
tar xvf openjdk12.tar.gz && \
|
@@ -95,14 +99,29 @@ ENV PATH=$PATH:/go/bin
|
|
95
99
|
ENV GOROOT=/go
|
96
100
|
ENV GOPATH=/gopath
|
97
101
|
ENV PATH=$PATH:$GOPATH/bin
|
102
|
+
|
98
103
|
RUN mkdir /gopath && \
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
104
|
+
go install github.com/tools/godep@latest && \
|
105
|
+
go install github.com/FiloSottile/gvt@latest && \
|
106
|
+
go install github.com/kardianos/govendor@latest && \
|
107
|
+
go clean -cache
|
108
|
+
|
109
|
+
#install rvm and glide and godep
|
110
|
+
RUN apt-add-repository -y ppa:rael-gc/rvm && \
|
111
|
+
add-apt-repository -y ppa:masterminds/glide && \
|
112
|
+
apt update && apt install -y rvm && \
|
113
|
+
/usr/share/rvm/bin/rvm install --default $RUBY_VERSION &&\
|
114
|
+
apt-get install -y glide && \
|
115
|
+
apt-get install -y go-dep
|
116
|
+
|
117
|
+
# install trash
|
118
|
+
RUN curl -Lo trash.tar.gz https://github.com/rancher/trash/releases/download/v0.2.7/trash-linux_amd64.tar.gz && \
|
119
|
+
tar xvf trash.tar.gz && \
|
120
|
+
rm trash.tar.gz && \
|
121
|
+
sudo mv trash /usr/local/bin/
|
122
|
+
|
123
|
+
# install bundler
|
124
|
+
RUN bash -lc "gem update --system && gem install bundler"
|
106
125
|
|
107
126
|
WORKDIR /tmp
|
108
127
|
# Fix the locale
|
@@ -115,47 +134,44 @@ ENV LC_ALL=en_US.UTF-8
|
|
115
134
|
# install Cargo
|
116
135
|
RUN curl https://sh.rustup.rs -sSf | bash -ls -- -y --profile minimal
|
117
136
|
|
118
|
-
#install rvm
|
119
|
-
RUN apt-add-repository -y ppa:rael-gc/rvm && \
|
120
|
-
apt update && apt install -y rvm && \
|
121
|
-
/usr/share/rvm/bin/rvm install --default $RUBY_VERSION
|
122
|
-
|
123
|
-
# install bundler
|
124
|
-
RUN bash -lc "gem update --system && gem install bundler"
|
125
|
-
|
126
137
|
#install mix
|
127
138
|
RUN wget https://packages.erlang-solutions.com/erlang-solutions_${MIX_VERSION}_all.deb && \
|
128
139
|
sudo dpkg -i erlang-solutions_${MIX_VERSION}_all.deb && \
|
129
140
|
sudo rm -f erlang-solutions_${MIX_VERSION}_all.deb && \
|
130
141
|
sudo apt-get update && \
|
131
|
-
sudo apt-get install -y esl-erlang
|
132
|
-
|
142
|
+
sudo apt-get install -y esl-erlang
|
143
|
+
# Install Elixir
|
144
|
+
WORKDIR /tmp/elixir-build
|
145
|
+
RUN git clone https://github.com/elixir-lang/elixir.git
|
146
|
+
WORKDIR elixir
|
147
|
+
RUN make && make install
|
148
|
+
WORKDIR /
|
133
149
|
|
134
150
|
# install conan
|
135
151
|
RUN apt-get install -y python-dev && \
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
152
|
+
pip install --no-cache-dir --ignore-installed six --ignore-installed colorama \
|
153
|
+
--ignore-installed requests --ignore-installed chardet \
|
154
|
+
--ignore-installed urllib3 \
|
155
|
+
--upgrade setuptools && \
|
156
|
+
pip3 install --no-cache-dir -Iv conan==1.51.3 && \
|
141
157
|
conan config install https://github.com/conan-io/conanclientcert.git
|
142
158
|
|
143
159
|
|
144
160
|
# install NuGet (w. mono)
|
145
161
|
# https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#macoslinux
|
146
162
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF &&\
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
163
|
+
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list &&\
|
164
|
+
apt-get update &&\
|
165
|
+
apt-get install -y mono-complete &&\
|
166
|
+
curl -o "/usr/local/bin/nuget.exe" "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" &&\
|
167
|
+
curl -o "/usr/local/bin/nugetv3.5.0.exe" "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe"
|
152
168
|
|
153
169
|
# install dotnet core
|
154
170
|
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb &&\
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
171
|
+
sudo dpkg -i packages-microsoft-prod.deb &&\
|
172
|
+
rm packages-microsoft-prod.deb &&\
|
173
|
+
sudo apt-get update &&\
|
174
|
+
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
|
159
175
|
|
160
176
|
# install Composer
|
161
177
|
# The ARG and ENV are for installing tzdata which is part of this installaion.
|
@@ -178,12 +194,12 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5
|
|
178
194
|
# See https://docs.conda.io/en/latest/miniconda_hashes.html
|
179
195
|
# for latest versions and SHAs.
|
180
196
|
RUN \
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
197
|
+
conda_installer=Miniconda3-py38_4.9.2-Linux-x86_64.sh &&\
|
198
|
+
ref='1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7' &&\
|
199
|
+
wget -q https://repo.anaconda.com/miniconda/${conda_installer} &&\
|
200
|
+
sha=`openssl sha256 "${conda_installer}" | cut -d' ' -f2` &&\
|
201
|
+
([ "$sha" = "${ref}" ] || (echo "Verification failed: ${sha} != ${ref}"; false)) &&\
|
202
|
+
(echo; echo "yes") | sh "${conda_installer}"
|
187
203
|
|
188
204
|
# install Swift Package Manager
|
189
205
|
# Based on https://github.com/apple/swift-docker/blob/main/5.3/ubuntu/18.04/Dockerfile
|
@@ -208,11 +224,12 @@ RUN apt-get -q install -y \
|
|
208
224
|
|
209
225
|
#install flutter
|
210
226
|
ENV FLUTTER_HOME=/root/flutter
|
227
|
+
RUN git config --global --add safe.directory /root/flutter
|
211
228
|
RUN curl -o flutter_linux_2.8.1-stable.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.8.1-stable.tar.xz \
|
212
229
|
&& tar xf flutter_linux_2.8.1-stable.tar.xz \
|
213
230
|
&& mv flutter ${FLUTTER_HOME} \
|
214
231
|
&& rm flutter_linux_2.8.1-stable.tar.xz
|
215
|
-
|
232
|
+
|
216
233
|
ENV PATH=$PATH:${FLUTTER_HOME}/bin:${FLUTTER_HOME}/bin/cache/dart-sdk/bin
|
217
234
|
RUN flutter doctor -v \
|
218
235
|
&& flutter update-packages \
|
data/README.md
CHANGED
@@ -20,46 +20,56 @@ and give you an actionable exception report.
|
|
20
20
|
* docker: [licensefinder/license_finder](https://hub.docker.com/r/licensefinder/license_finder/)
|
21
21
|
* the docker image contains all the package managers needed to run `license_finder`
|
22
22
|
* support:
|
23
|
+
* The primary form of communication for support is through github issues. The google groups are not actively
|
24
|
+
monitored
|
23
25
|
* license-finder@googlegroups.com
|
24
26
|
* https://groups.google.com/forum/#!forum/license-finder
|
25
|
-
* backlog: https://www.pivotaltracker.com/n/projects/234851
|
26
27
|
|
27
28
|
### Supported project types
|
28
29
|
|
29
30
|
| Project Type | Package Manager | Tested on Version |
|
30
|
-
| ------------
|
31
|
-
| Ruby Gems | bundler |
|
32
|
-
| Python 2.7 Eggs | pip2
|
33
|
-
| Python 3.5 Eggs | pip3
|
34
|
-
| Node.js | npm | 6.4.1
|
35
|
-
| Bower | bower | 1.8.4
|
36
|
-
| Nuget (without license discovery) | nuget
|
37
|
-
| Godep | Godep | 80
|
38
|
-
| Go workspace
|
39
|
-
| Go modules | Go lang | 1.
|
40
|
-
| Java | maven | 3.6.0
|
41
|
-
| Java | gradle |
|
31
|
+
| ------------ |-----------------|------------------:|
|
32
|
+
| Ruby Gems | bundler | 2.3.7 |
|
33
|
+
| Python 2.7 Eggs | pip2 | 19.0.2 |
|
34
|
+
| Python 3.5 Eggs | pip3 | 20.0.2 |
|
35
|
+
| Node.js | npm | 6.4.1 |
|
36
|
+
| Bower | bower | 1.8.4 |
|
37
|
+
| Nuget (without license discovery) | nuget | 4.7.1.5393 |
|
38
|
+
| Godep | Godep | 80 |
|
39
|
+
| Go workspace | Go lang | 1.11.5 |
|
40
|
+
| Go modules | Go lang | 1.14.3 |
|
41
|
+
| Java | maven | 3.6.0 |
|
42
|
+
| Java | gradle | 5.6.4 |
|
42
43
|
|
43
44
|
### Experimental project types
|
44
45
|
|
45
46
|
* Erlang (via `rebar` and `Erlang.mk`)
|
46
|
-
* Objective-C, Swift (via Carthage, CocoaPods \[0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/)\]) and Swift Package Manager)
|
47
|
-
* Objective-C (+ CocoaPods 0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/))
|
47
|
+
* Objective-C, Swift (via Carthage, CocoaPods \[0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/)\]) and Swift Package Manager(SPM)
|
48
48
|
* Elixir (via `mix`)
|
49
49
|
* Golang (via `gvt`, `glide`,`dep`, `trash` and `govendor`)
|
50
50
|
* JavaScript (via `yarn`)
|
51
51
|
* C++/C (via `conan`)
|
52
52
|
* Scala (via `sbt`)
|
53
53
|
* Rust (via `cargo`)
|
54
|
-
* Go Modules (via `go mod`)
|
55
54
|
* PHP (via `composer`)
|
56
|
-
* Python (via Conda
|
57
|
-
* Flutter (via `flutter pub
|
55
|
+
* Python (via `Conda`, `pipenv`)
|
56
|
+
* Flutter (via `flutter pub`)
|
58
57
|
|
59
58
|
## Installation
|
60
59
|
|
61
|
-
License Finder
|
62
|
-
|
60
|
+
License Finder may be run as a [pre-commit](https://pre-commit.com) hook by
|
61
|
+
adding the following to your `.pre-commit-config.yaml`:
|
62
|
+
|
63
|
+
```yaml
|
64
|
+
repos:
|
65
|
+
- repo: https://github.com/pivotal/LicenseFinder
|
66
|
+
rev: v7.1.0 # You probably want the latest tag.
|
67
|
+
hooks:
|
68
|
+
- id: license-finder
|
69
|
+
```
|
70
|
+
|
71
|
+
Running License Finder directly requires Ruby 2.4.0 or greater. If you have an
|
72
|
+
older version of Ruby installed, you can update via Homebrew:
|
63
73
|
|
64
74
|
```sh
|
65
75
|
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
@@ -71,7 +81,7 @@ then:
|
|
71
81
|
$ brew install ruby
|
72
82
|
```
|
73
83
|
|
74
|
-
The easiest way to use `license_finder` is to install it as a command
|
84
|
+
The easiest way to use `license_finder` directly is to install it as a command
|
75
85
|
line tool, like brew, awk, gem or bundler:
|
76
86
|
|
77
87
|
```sh
|
@@ -155,10 +165,11 @@ $ dlf "bundle install && license_finder"
|
|
155
165
|
|
156
166
|
You can better understand the way this script works by looking at its source, but for
|
157
167
|
reference it will mount your current directory at the path `/scan` and run any commands
|
158
|
-
passed to it from that directory.
|
168
|
+
passed to it from that directory. If your command has `&&`, ensure you quote the command.
|
169
|
+
If it does not, ensure the command is not quoted.
|
159
170
|
|
160
171
|
Note that the docker image will run the gem which is installed within it.
|
161
|
-
So the docker image tagged `
|
172
|
+
So the docker image tagged `7.0.0` will run *License Finder Version 7.0.0*
|
162
173
|
|
163
174
|
See the [contributing guide](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md) for information on development.
|
164
175
|
|
@@ -169,9 +180,10 @@ languages, as long as that language has a package definition in the project dire
|
|
169
180
|
|
170
181
|
* `Gemfile` (for `bundler`)
|
171
182
|
* `requirements.txt` (for `pip`)
|
183
|
+
* `Pipfile.lock` (for `pipenv`)
|
172
184
|
* `package.json` (for `npm`)
|
173
185
|
* `pom.xml` (for `maven`)
|
174
|
-
* `build.gradle` (for `gradle`)
|
186
|
+
* `build.gradle` or `build.gradle.kts` (for `gradle`)
|
175
187
|
* `settings.gradle` that specifies `rootProject.buildFileName` (for `gradle`)
|
176
188
|
* `bower.json` (for `bower`)
|
177
189
|
* `Podfile` (for `pod`) (set `ACKNOWLEDGEMENTS_PATH` variable if you want to target a particular `Pods-acknowledgements-<TARGET>.plist`. Can be useful in multi-target pods projects.)
|
@@ -186,6 +198,8 @@ languages, as long as that language has a package definition in the project dire
|
|
186
198
|
* `glide.lock` file (for `glide`)
|
187
199
|
* `vendor/vendor.json` file (for `govendor`)
|
188
200
|
* `Gopkg.lock` file (for `dep`)
|
201
|
+
* `Godeps/Godeps.json` (for `godep`)
|
202
|
+
* `*.envrc` file (for `go`)
|
189
203
|
* `go.mod` file (for `go mod`)
|
190
204
|
* `vendor.conf` file (for `trash`)
|
191
205
|
* `yarn.lock` file (for `yarn`)
|
@@ -193,7 +207,8 @@ languages, as long as that language has a package definition in the project dire
|
|
193
207
|
* `build.sbt` file (for `sbt`)
|
194
208
|
* `Cargo.lock` file (for `cargo`)
|
195
209
|
* `composer.lock` file (for `composer`)
|
196
|
-
|
210
|
+
* `environment.yml` file (for `conda`)
|
211
|
+
* `pubspec.yaml & .pub cache locaton through ENV variable` (for `flutter`)
|
197
212
|
|
198
213
|
### Continuous Integration
|
199
214
|
|
@@ -330,12 +345,40 @@ you should manually research what the actual license is. When you
|
|
330
345
|
have established the real license, you can record it with:
|
331
346
|
|
332
347
|
```sh
|
333
|
-
$ license_finder licenses add my_unknown_dependency MIT
|
348
|
+
$ license_finder licenses add my_unknown_dependency MIT
|
334
349
|
```
|
335
350
|
|
336
|
-
This command would assign the MIT license to the dependency
|
337
|
-
`my_unknown_dependency`.
|
351
|
+
This command would assign the MIT license to all versions of the dependency
|
352
|
+
`my_unknown_dependency`. If you prefer, you could instead assign the license
|
353
|
+
to only a specific version of the dependency:
|
354
|
+
|
355
|
+
```sh
|
356
|
+
$ license_finder licenses add my_unknown_dependency MIT --version=1.0.0
|
357
|
+
```
|
338
358
|
|
359
|
+
Please note that adding a license to a specific version of a dependency will
|
360
|
+
cause any licenses previously added to all versions of that dependency to be
|
361
|
+
forgotten. Similarly, adding a license to all versions of a dependency will
|
362
|
+
override any licenses previously added to specific versions of that dependency.
|
363
|
+
|
364
|
+
There are several ways in which you can remove licenses that were previously
|
365
|
+
added through the `licenses add` command:
|
366
|
+
|
367
|
+
```sh
|
368
|
+
# Removes all licenses from any version of the dependency
|
369
|
+
$ license_finder licenses remove my_unknown_dependency
|
370
|
+
|
371
|
+
# Removes just the MIT license from any version of the dependency
|
372
|
+
$ license_finder licenses remove my_unknown_dependency MIT
|
373
|
+
|
374
|
+
# Removes all licenses from only version 1.0.0 of the dependency
|
375
|
+
# This has no effect if you had last added a license to all versions of the dependency
|
376
|
+
$ license_finder licenses remove my_unknown_dependency --version=1.0.0
|
377
|
+
|
378
|
+
# Removes just the MIT license from only version 1.0.0 of the dependency
|
379
|
+
# This has no effect if you had last added a license to all versions of the dependency
|
380
|
+
$ license_finder licenses remove my_unknown_dependency MIT --version=1.0.0
|
381
|
+
```
|
339
382
|
|
340
383
|
### Adding Hidden Dependencies
|
341
384
|
|
@@ -499,7 +542,7 @@ licenseConfigurations := Set("compile", "provided")
|
|
499
542
|
|
500
543
|
## Requirements
|
501
544
|
|
502
|
-
`license_finder` requires ruby >=
|
545
|
+
`license_finder` requires ruby >= 2.4.0. We will be dropping 2.4.x support soon.
|
503
546
|
|
504
547
|
|
505
548
|
## Upgrading
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.
|
1
|
+
7.1.0
|
data/dlf
CHANGED
@@ -7,7 +7,12 @@ if `which docker > /dev/null`; then
|
|
7
7
|
for p in "$@"; do
|
8
8
|
escaped_params="$escaped_params \"$p\""
|
9
9
|
done
|
10
|
-
|
10
|
+
if [[ $escaped_params =~ "&&" ]]; then
|
11
|
+
command=${escaped_params:2:${#escaped_params}-3}
|
12
|
+
else
|
13
|
+
command=$escaped_params
|
14
|
+
fi
|
15
|
+
docker run -v $PWD:/scan -it licensefinder/license_finder /bin/bash -lc "cd /scan && $command"
|
11
16
|
fi
|
12
17
|
else
|
13
18
|
echo "You do not have docker installed. Please install it:"
|
@@ -7,19 +7,24 @@ module LicenseFinder
|
|
7
7
|
include MakesDecisions
|
8
8
|
|
9
9
|
auditable
|
10
|
+
method_option :version, desc: 'The version associated with the license'
|
10
11
|
desc 'add DEPENDENCY LICENSE', "Set a dependency's licenses, overwriting any license_finder has found"
|
11
12
|
def add(name, license)
|
12
13
|
modifying { decisions.license(name, license, txn) }
|
13
14
|
|
14
|
-
|
15
|
+
version_info = options[:version] ? " with version #{options[:version]}" : ''
|
16
|
+
printer.say "The #{name} dependency#{version_info} has been marked as using #{license} license!", :green
|
15
17
|
end
|
16
18
|
|
17
19
|
auditable
|
20
|
+
method_option :version, desc: 'The version associated with the license'
|
18
21
|
desc 'remove DEPENDENCY LICENSE', 'Remove a manually set license'
|
19
|
-
def remove(dep, lic)
|
22
|
+
def remove(dep, lic = nil)
|
20
23
|
modifying { decisions.unlicense(dep, lic, txn) }
|
21
24
|
|
22
|
-
|
25
|
+
version_info = options[:version] ? " with version #{options[:version]}" : ''
|
26
|
+
suffix = lic ? " of #{lic}" : ''
|
27
|
+
printer.say "The dependency #{dep}#{version_info} no longer has a manual license#{suffix}"
|
23
28
|
end
|
24
29
|
end
|
25
30
|
end
|
@@ -32,6 +32,8 @@ module LicenseFinder
|
|
32
32
|
class_option :maven_include_groups, desc: 'Whether dependency name should include group id. Only meaningful if used with a Java/maven project. Defaults to false.'
|
33
33
|
class_option :maven_options, desc: 'Maven options to append to command. Defaults to empty.'
|
34
34
|
class_option :npm_options, desc: 'npm options to append to command. Defaults to empty.'
|
35
|
+
class_option :yarn_options, desc: 'yarn options to append to command. Defaults to empty.'
|
36
|
+
class_option :pnpm_options, desc: 'pnpm options to append to command. Defaults to empty.'
|
35
37
|
class_option :pip_requirements_path, desc: 'Path to python requirements file. Defaults to requirements.txt.'
|
36
38
|
class_option :python_version, desc: 'Python version to invoke pip with. Valid versions: 2 or 3. Default: 2'
|
37
39
|
class_option :rebar_command, desc: "Command to use when fetching rebar packages. Only meaningful if used with a Erlang/rebar project. Defaults to 'rebar'."
|
@@ -152,7 +154,7 @@ module LicenseFinder
|
|
152
154
|
shared_options
|
153
155
|
format_option
|
154
156
|
method_option :write_headers, type: :boolean, desc: 'Write exported columns as header row (csv).', default: false, required: false
|
155
|
-
method_option :save, desc: "Save report to a file. Default: 'license_report
|
157
|
+
method_option :save, desc: "Save report to a file. Default: 'license_report' in project root.", lazy_default: 'license_report'
|
156
158
|
|
157
159
|
def report
|
158
160
|
finder = LicenseAggregator.new(config, aggregate_paths)
|
data/lib/license_finder/core.rb
CHANGED
@@ -101,6 +101,8 @@ module LicenseFinder
|
|
101
101
|
maven_include_groups: config.maven_include_groups,
|
102
102
|
maven_options: config.maven_options,
|
103
103
|
npm_options: config.npm_options,
|
104
|
+
yarn_options: config.yarn_options,
|
105
|
+
pnpm_options: config.pnpm_options,
|
104
106
|
pip_requirements_path: config.pip_requirements_path,
|
105
107
|
python_version: config.python_version,
|
106
108
|
rebar_command: config.rebar_command,
|