license_finder 6.14.2 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +9 -0
  3. data/.rubocop.yml +12 -2
  4. data/CHANGELOG.md +35 -4
  5. data/Dockerfile +26 -5
  6. data/README.md +30 -27
  7. data/Rakefile +2 -2
  8. data/VERSION +1 -1
  9. data/ci/pipelines/release.yml.erb +1 -1
  10. data/ci/scripts/pushscript.sh +2 -3
  11. data/ci/scripts/run-tests.sh +4 -3
  12. data/ci/tasks/rubocop.yml +1 -1
  13. data/dlf +9 -5
  14. data/lib/license_finder/cli/approvals.rb +2 -2
  15. data/lib/license_finder/cli/base.rb +9 -5
  16. data/lib/license_finder/cli/dependencies.rb +4 -4
  17. data/lib/license_finder/cli/ignored_dependencies.rb +3 -3
  18. data/lib/license_finder/cli/ignored_groups.rb +3 -3
  19. data/lib/license_finder/cli/inherited_decisions.rb +5 -5
  20. data/lib/license_finder/cli/licenses.rb +2 -2
  21. data/lib/license_finder/cli/main.rb +17 -11
  22. data/lib/license_finder/cli/permitted_licenses.rb +3 -3
  23. data/lib/license_finder/cli/project_name.rb +4 -4
  24. data/lib/license_finder/cli/restricted_licenses.rb +3 -3
  25. data/lib/license_finder/configuration.rb +6 -3
  26. data/lib/license_finder/core.rb +2 -1
  27. data/lib/license_finder/decisions.rb +9 -5
  28. data/lib/license_finder/license/definitions.rb +22 -0
  29. data/lib/license_finder/license/text.rb +5 -3
  30. data/lib/license_finder/license.rb +8 -2
  31. data/lib/license_finder/logger.rb +1 -1
  32. data/lib/license_finder/package.rb +3 -11
  33. data/lib/license_finder/package_delta.rb +1 -1
  34. data/lib/license_finder/package_manager.rb +1 -0
  35. data/lib/license_finder/package_managers/cocoa_pods.rb +14 -9
  36. data/lib/license_finder/package_managers/conan.rb +2 -2
  37. data/lib/license_finder/package_managers/conda.rb +1 -1
  38. data/lib/license_finder/package_managers/glide.rb +7 -1
  39. data/lib/license_finder/package_managers/go_15vendorexperiment.rb +2 -2
  40. data/lib/license_finder/package_managers/go_dep.rb +1 -1
  41. data/lib/license_finder/package_managers/go_workspace.rb +1 -1
  42. data/lib/license_finder/package_managers/maven.rb +2 -6
  43. data/lib/license_finder/package_managers/nuget.rb +1 -1
  44. data/lib/license_finder/package_managers/pub.rb +86 -0
  45. data/lib/license_finder/package_managers/sbt.rb +1 -5
  46. data/lib/license_finder/package_managers/yarn.rb +48 -9
  47. data/lib/license_finder/package_utils/license_files.rb +2 -2
  48. data/lib/license_finder/packages/bower_package.rb +5 -2
  49. data/lib/license_finder/packages/erlangmk_package.rb +2 -4
  50. data/lib/license_finder/packages/npm_package.rb +1 -0
  51. data/lib/license_finder/packages/pubspec_package.rb +18 -0
  52. data/lib/license_finder/printer.rb +39 -0
  53. data/lib/license_finder/report.rb +2 -1
  54. data/lib/license_finder/reports/csv_report.rb +1 -1
  55. data/lib/license_finder/reports/erb_report.rb +7 -3
  56. data/lib/license_finder/reports/json_report.rb +2 -1
  57. data/lib/license_finder/reports/junit_report.rb +5 -1
  58. data/lib/license_finder/reports/xml_report.rb +5 -1
  59. data/lib/license_finder/scanner.rb +1 -1
  60. data/license_finder.gemspec +15 -13
  61. metadata +58 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34d77567442f9c47fcc7b150b7ffc32d2c7db0a76841ac3732f6e2af4887bc37
4
- data.tar.gz: 1ae0dec6f2a8902bddfbfc3f0e466a7f26e9b19d304b40eef4d1a7a76a56cd5a
3
+ metadata.gz: a65abcec91ace2929ab66aa2e364002c4019e8cfd5ffdde361ce0ea4b20147f8
4
+ data.tar.gz: cfeaa1bf0a57a0480d8193fa10a75597b7421abcaa15d6995adc3a885797f547
5
5
  SHA512:
6
- metadata.gz: 5a6e40dca9d5f3a91ab6cfba5e002ef14b3974fd6caeb6e3489d4bfc17b16897d0126e6c9f7edc35b28a0ec087bf9b68c3eb739ae583ccc6dcffb29b0d901ae5
7
- data.tar.gz: 06d1bf8e227ce2db790f7ced5d53e507f384cdc7d582037bcb8be4574e7a483a550a34ba10c589c53b3513b24809900ba554da778de9b6cdb5437896c51a7b12
6
+ metadata.gz: c699e9127e4740d8795b5f494525c31251fa4dea297ebdd3c965b3d8bfc129d56d469135f2eb9614d244ed2828798008000116166fd55c1ac6ef5412e7d87313
7
+ data.tar.gz: e78c9b61fdf161c85c813a9892f02e470bc036f0061720a0fac73120394fb1f9e4161b6a935acb500ae55ac6c03d2ed6df6a320dda5cbc1443be6f62747c4f51
@@ -0,0 +1,9 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "20:00"
8
+ timezone: America/Los_Angeles
9
+ open-pull-requests-limit: 10
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.3.3
2
+ TargetRubyVersion: 2.4.0
3
3
  Exclude:
4
4
  - 'lib/license_finder/reports/**/*'
5
5
  - 'features/fixtures/**/*'
@@ -40,9 +40,17 @@ ModuleLength:
40
40
  # Security Cops
41
41
  YAMLLoad:
42
42
  Enabled: false
43
+ Security/Open:
44
+ Enabled: false
43
45
 
44
46
  #Style Cops
45
- Style/MethodMissingSuper:
47
+ Naming/VariableNumber:
48
+ Enabled: false
49
+ Lint/MixedRegexpCaptureTypes:
50
+ Enabled: false
51
+ Lint/MissingSuper:
52
+ Enabled: false
53
+ Style/OptionalBooleanParameter:
46
54
  Enabled: false
47
55
  Style/MissingRespondToMissing:
48
56
  Enabled: false
@@ -56,6 +64,8 @@ Style/HashTransformValues:
56
64
  Enabled: true
57
65
  Layout/MultilineMethodCallIndentation:
58
66
  Enabled: false
67
+ Lint/EmptyFile:
68
+ Enabled: false
59
69
  DoubleNegation:
60
70
  Enabled: false
61
71
  Documentation:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # [7.0.1] / 2022-03-18
2
+
3
+ # [7.0.0] / 2022-03-04
4
+
5
+ ### Added
6
+ * Ruby 3.x Support - [02497dfb](https://github.com/pivotal/LicenseFinder/commit/02497dfb60d458e51a43ef26568389b5fcf302af)
7
+ * Provide Flutter project scanning support - [e739f281](https://github.com/pivotal/LicenseFinder/commit/e739f2180c88504152c0e19477489177012f5631) - etiennecadicidean
8
+ * Add a new option to use spdx identifier in reports - [a71763bb](https://github.com/pivotal/LicenseFinder/commit/a71763bb132ed39e57f8071e72cb2450733bf8db) - etiennecadicidean
9
+ * Allow to specify cocoadpods acknowledgment through ENV - [67bd3fb5](https://github.com/pivotal/LicenseFinder/commit/67bd3fb5569afa54abc16035fd7804bc2d65b7c0) - etiennecadicidean
10
+
11
+ ### Changed
12
+ * Updated code to support newest Thor gem - [b118772c](https://github.com/pivotal/LicenseFinder/commit/b118772c3f634dacc56795eebb7c3ba4c89ef639)
13
+ * Raise an error if the yarn licenses list command fails - [8f9ab6bd](https://github.com/pivotal/LicenseFinder/commit/8f9ab6bd681866aee888410672f3babab7aab383) - ajesler
14
+
15
+ ### Deprecated
16
+ * Remove support for Ruby 2.3 - [02497dfb](https://github.com/pivotal/LicenseFinder/commit/02497dfb60d458e51a43ef26568389b5fcf302af)
17
+
18
+ # [6.15.0] / 2021-12-17
19
+
20
+ ### Added
21
+ * Add Yarn2 support - [7f08790c](https://github.com/pivotal/LicenseFinder/commit/7f08790ce1d7cd12ccd0aa9de114ca3366ab408c)
22
+
23
+ ###Changed
24
+ * Upgrade conan and use https://center.conan.io instead of conan.bintray.com - [eea1292b](https://github.com/pivotal/LicenseFinder/commit/eea1292bf2613f603a8a0ae42747857acf77e361)
25
+
26
+ ### Fixed
27
+ * Fix docker Conan and swift - [66031df9](https://github.com/pivotal/LicenseFinder/commit/66031df912c2e1e21aa794a4b897fc61c9ec6b02)
28
+
1
29
  # [6.14.2] / 2021-10-27
2
30
 
3
31
  ### Added
@@ -8,17 +36,17 @@
8
36
  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.
9
37
 
10
38
  ### Changed
11
- * Upgrade Docker image to use Ubuntu Bionic [#178471230] [1c12588c](https://github.com/pivotal/LicenseFinder/commit/1c12588cceecb8b7350d090c85b519b24bcc6682)
39
+ * Upgrade Docker image to use Ubuntu Bionic [#178471230] - [1c12588c](https://github.com/pivotal/LicenseFinder/commit/1c12588cceecb8b7350d090c85b519b24bcc6682)
12
40
  * Update the default timezone to GMT [#178471230] - [9fcab84](https://github.com/pivotal/LicenseFinder/commit/9fcab84605cda81e7f276d3c567d14409e371333)
13
41
  * Use local copy of Swift puglic GPG keys [#178674224] - [4db4b3e](https://github.com/pivotal/LicenseFinder/commit/4db4b3e5980ca52019549d74da574a2342a7846e)
14
42
 
15
43
  ### Added
16
- * Added --npm_options option to customize npm behavior. [b8457a62](https://github.com/pivotal/LicenseFinder/commit/b8457a62e7b531294934364d1e5f72cd78a7686a) - Alexander-Malott
44
+ * Added --npm_options option to customize npm behavior - [b8457a62](https://github.com/pivotal/LicenseFinder/commit/b8457a62e7b531294934364d1e5f72cd78a7686a) - Alexander-Malott
17
45
 
18
46
  ### Security
19
- * Fix issue where commands could be injected running on Cocoapods projects. [b0a61a2d](https://github.com/pivotal/LicenseFinder/commit/b0a61a2d833921c714cc39cdda8ba80af3f33d04)
47
+ * Fix issue where commands could be injected running on Cocoapods projects - [b0a61a2d](https://github.com/pivotal/LicenseFinder/commit/b0a61a2d833921c714cc39cdda8ba80af3f33d04)
20
48
 
21
- Thanks to Joern SchneeweiszStaff Security Engineer, Security Research | GitLab for raising the issue
49
+ Thanks to Joern Schneeweisz Staff Security Engineer, Security Research | GitLab for raising the issue
22
50
 
23
51
 
24
52
  # [6.13.0] / 2021-04-27
@@ -979,3 +1007,6 @@ Bugfixes:
979
1007
  [6.13.0]: https://github.com/pivotal/LicenseFinder/compare/v6.12.2...v6.13.0
980
1008
  [6.14.1]: https://github.com/pivotal/LicenseFinder/compare/v6.13.0...v6.14.1
981
1009
  [6.14.2]: https://github.com/pivotal/LicenseFinder/compare/v6.14.1...v6.14.2
1010
+ [6.15.0]: https://github.com/pivotal/LicenseFinder/compare/v6.14.2...v6.15.0
1011
+ [7.0.0]: https://github.com/pivotal/LicenseFinder/compare/v6.15.0...v7.0.0
1012
+ [7.0.1]: https://github.com/pivotal/LicenseFinder/compare/v7.0.0...v7.0.1
data/Dockerfile CHANGED
@@ -9,7 +9,7 @@ ENV GO_LANG_VERSION 1.14.3
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
- ENV RUBY_VERSION 2.7.1
12
+ ENV RUBY_VERSION 3.1.1
13
13
  ENV MIX_VERSION 1.0
14
14
  ENV COMPOSER_ALLOW_SUPERUSER 1
15
15
 
@@ -137,7 +137,9 @@ RUN apt-get install -y python-dev && \
137
137
  --ignore-installed requests --ignore-installed chardet \
138
138
  --ignore-installed urllib3 \
139
139
  --upgrade setuptools && \
140
- pip install --no-cache-dir -Iv conan==1.11.2
140
+ pip install --no-cache-dir -Iv conan==1.43.0 && \
141
+ conan config install https://github.com/conan-io/conanclientcert.git
142
+
141
143
 
142
144
  # install NuGet (w. mono)
143
145
  # https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#macoslinux
@@ -204,6 +206,25 @@ RUN apt-get -q install -y \
204
206
  pkg-config \
205
207
  && rm -r /var/lib/apt/lists/*
206
208
 
209
+ #install flutter
210
+ ENV FLUTTER_HOME=/root/flutter
211
+ 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
+ && tar xf flutter_linux_2.8.1-stable.tar.xz \
213
+ && mv flutter ${FLUTTER_HOME} \
214
+ && rm flutter_linux_2.8.1-stable.tar.xz
215
+
216
+ ENV PATH=$PATH:${FLUTTER_HOME}/bin:${FLUTTER_HOME}/bin/cache/dart-sdk/bin
217
+ RUN flutter doctor -v \
218
+ && flutter update-packages \
219
+ && flutter precache
220
+ # Accepting all licences
221
+ RUN yes | flutter doctor --android-licenses -v
222
+ # Creating Flutter sample projects to put binaries in cache fore each template type
223
+ RUN flutter create --template=app ${TEMP}/app_sample \
224
+ && flutter create --template=package ${TEMP}/package_sample \
225
+ && flutter create --template=plugin ${TEMP}/plugin_sample
226
+
227
+
207
228
  # pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
208
229
  # Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
209
230
  # uid Swift 5.x Release Signing Key <swift-infrastructure@swift.org
@@ -211,7 +232,7 @@ ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
211
232
  ARG SWIFT_PLATFORM=ubuntu18.04
212
233
  ARG SWIFT_BRANCH=swift-5.3.3-release
213
234
  ARG SWIFT_VERSION=swift-5.3.3-RELEASE
214
- ARG SWIFT_WEBROOT=https://swift.org/builds/
235
+ ARG SWIFT_WEBROOT=https://download.swift.org
215
236
 
216
237
  ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
217
238
  SWIFT_PLATFORM=$SWIFT_PLATFORM \
@@ -221,7 +242,7 @@ ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
221
242
 
222
243
  COPY swift-all-keys.asc .
223
244
  RUN set -e; \
224
- SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)/" \
245
+ SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)" \
225
246
  && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
226
247
  && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
227
248
  # - Grab curl here so we cache better up above
@@ -240,7 +261,7 @@ RUN set -e; \
240
261
 
241
262
  # install license_finder
242
263
  COPY . /LicenseFinder
243
- RUN bash -lc "cd /LicenseFinder && bundle config set no-cache 'true' && bundle install -j4 && rake install"
264
+ RUN bash -lc "cd /LicenseFinder && bundle config set no-cache 'true' && bundle install -j4 && bundle pristine && rake install"
244
265
 
245
266
  WORKDIR /
246
267
 
data/README.md CHANGED
@@ -3,12 +3,11 @@
3
3
  [![Code Climate](https://codeclimate.com/github/pivotal/LicenseFinder.png)](https://codeclimate.com/github/pivotal/LicenseFinder)
4
4
 
5
5
  Build status
6
- * Ruby 2.3.8 [![Ruby 2.3.8 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.3.8/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
7
6
  * Ruby 2.4.9 [![Ruby 2.4.9 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.4.9/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
8
7
  * Ruby 2.5.7 [![Ruby 2.5.7 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.5.7/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
9
- * Ruby 2.6.5 [![Ruby 2.6.5 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.6.5/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
10
- * Ruby 2.7.1 [![Ruby 2.7.1 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.7.1/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
11
- * JRuby 9.2.9.0 [![JRuby 9.2.9.0 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-jruby-9.2.9.0/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
8
+ * Ruby 2.6.9 [![Ruby 2.6.9 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.6.9/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
9
+ * Ruby 2.7.5 [![Ruby 2.7.5 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.7.5/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
10
+ * Ruby 3.1.1 [![Ruby 3.1.1 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-3.1.1/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
12
11
 
13
12
 
14
13
  LicenseFinder works with your package managers to find dependencies,
@@ -21,44 +20,44 @@ and give you an actionable exception report.
21
20
  * docker: [licensefinder/license_finder](https://hub.docker.com/r/licensefinder/license_finder/)
22
21
  * the docker image contains all the package managers needed to run `license_finder`
23
22
  * support:
23
+ * The primary form of communication for support is through github issues. The google groups are not actively
24
+ monitored
24
25
  * license-finder@googlegroups.com
25
26
  * https://groups.google.com/forum/#!forum/license-finder
26
- * backlog: https://www.pivotaltracker.com/n/projects/234851
27
27
 
28
28
  ### Supported project types
29
29
 
30
30
  | Project Type | Package Manager | Tested on Version |
31
- | ------------ | --------------- | -------:|
32
- | Ruby Gems | bundler | 1.16.6 |
33
- | Python 2.7 Eggs | pip2 | 19.0.2 |
34
- | Python 3.5 Eggs | pip3 | 19.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 (via a `.envrc` file) | Go lang | 1.11.5 |
40
- | Go modules | Go lang | 1.11.5 |
41
- | Java | maven | 3.6.0 |
42
- | Java | gradle | 4.10.3 |
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 |
43
43
 
44
44
  ### Experimental project types
45
45
 
46
46
  * Erlang (via `rebar` and `Erlang.mk`)
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)
48
- * 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)
49
48
  * Elixir (via `mix`)
50
49
  * Golang (via `gvt`, `glide`,`dep`, `trash` and `govendor`)
51
50
  * JavaScript (via `yarn`)
52
51
  * C++/C (via `conan`)
53
52
  * Scala (via `sbt`)
54
53
  * Rust (via `cargo`)
55
- * Go Modules (via `go mod`)
56
54
  * PHP (via `composer`)
57
- * Python (via Conda [Conda 4.8.3, Python 3.7, Bash; requires an `environment.yml` or `environment.yaml`])
55
+ * Python (via `Conda`, `pipenv`)
56
+ * Flutter (via `flutter pub`)
58
57
 
59
58
  ## Installation
60
59
 
61
- License Finder requires Ruby 2.3.3 or greater to run. If you have an older
60
+ License Finder requires Ruby 2.4.0 or greater to run. If you have an older
62
61
  version of Ruby installed, you can update via Homebrew:
63
62
 
64
63
  ```sh
@@ -158,7 +157,7 @@ reference it will mount your current directory at the path `/scan` and run any c
158
157
  passed to it from that directory.
159
158
 
160
159
  Note that the docker image will run the gem which is installed within it.
161
- So the docker image tagged `4.0.2` will run *License Finder Version 4.0.2*
160
+ So the docker image tagged `7.0.0` will run *License Finder Version 7.0.0*
162
161
 
163
162
  See the [contributing guide](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md) for information on development.
164
163
 
@@ -169,12 +168,13 @@ languages, as long as that language has a package definition in the project dire
169
168
 
170
169
  * `Gemfile` (for `bundler`)
171
170
  * `requirements.txt` (for `pip`)
171
+ * `Pipfile.lock` (for `pipenv`)
172
172
  * `package.json` (for `npm`)
173
173
  * `pom.xml` (for `maven`)
174
- * `build.gradle` (for `gradle`)
174
+ * `build.gradle` or `build.gradle.kts` (for `gradle`)
175
175
  * `settings.gradle` that specifies `rootProject.buildFileName` (for `gradle`)
176
176
  * `bower.json` (for `bower`)
177
- * `Podfile` (for `pod`)
177
+ * `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.)
178
178
  * `Cartfile` (for `carthage`)
179
179
  * `workspace-state.json` under build directory (provided as enviroment variable `SPM_DERIVED_DATA` for Xcode, or default `.build` for non-Xcode projects), (for `spm`)
180
180
  * `rebar.config` (for `rebar`)
@@ -186,6 +186,8 @@ languages, as long as that language has a package definition in the project dire
186
186
  * `glide.lock` file (for `glide`)
187
187
  * `vendor/vendor.json` file (for `govendor`)
188
188
  * `Gopkg.lock` file (for `dep`)
189
+ * `Godeps/Godeps.json` (for `godep`)
190
+ * `*.envrc` file (for `go`)
189
191
  * `go.mod` file (for `go mod`)
190
192
  * `vendor.conf` file (for `trash`)
191
193
  * `yarn.lock` file (for `yarn`)
@@ -193,7 +195,8 @@ languages, as long as that language has a package definition in the project dire
193
195
  * `build.sbt` file (for `sbt`)
194
196
  * `Cargo.lock` file (for `cargo`)
195
197
  * `composer.lock` file (for `composer`)
196
-
198
+ * `environment,yml` file (for `conda`)
199
+ * `pubspec.yaml & .pub cache locaton through ENV variable` (for `flutter`)
197
200
 
198
201
  ### Continuous Integration
199
202
 
@@ -499,7 +502,7 @@ licenseConfigurations := Set("compile", "provided")
499
502
 
500
503
  ## Requirements
501
504
 
502
- `license_finder` requires ruby >= 1.9.3, or jruby.
505
+ `license_finder` requires ruby >= 2.4.0. We will be dropping 2.4.x support soon.
503
506
 
504
507
 
505
508
  ## Upgrading
data/Rakefile CHANGED
@@ -40,7 +40,7 @@ task :check_dependencies do
40
40
  LicenseFinder::Scanner::PACKAGE_MANAGERS.each do |package_manager|
41
41
  satisfied = false unless package_manager.new(project_path: Pathname.new('')).installed?(LicenseFinder::Logger.new(LicenseFinder::Logger::MODE_INFO))
42
42
  end
43
- STDOUT.flush
43
+ $stdout.flush
44
44
  exit 1 unless satisfied
45
45
  end
46
46
 
@@ -54,7 +54,7 @@ task :update_pipeline, [:slack_url, :slack_channel] do |_, args|
54
54
  puts 'Warning: You should provide slack channel and url to receive slack notifications on build failures'
55
55
  end
56
56
 
57
- ruby_versions = %w[2.7.1 2.6.5 2.5.7 2.4.9 2.3.8 jruby-9.2.14.0]
57
+ ruby_versions = %w[3.1.1 2.7.5 2.6.9 2.5.7 2.4.9]
58
58
 
59
59
  params = []
60
60
  params << "ruby_versions=#{ruby_versions.join(',')}"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.14.2
1
+ 7.0.1
@@ -156,7 +156,7 @@ jobs:
156
156
  plan:
157
157
  - get: lf-git
158
158
  tags: ["private-worker"]
159
- passed: [<%= "#{ruby_versions.map{ |version| "ruby-#{version}" unless version == "jruby-9.2.14.0" }.compact.join(', ') }, rubocop" %>]
159
+ passed: [<%= "#{ruby_versions.map{ |version| "ruby-#{version}" unless version == "jruby-9.3.1.0" }.compact.join(', ') }, rubocop" %>]
160
160
  - get: semver-version
161
161
  tags: ["private-worker"]
162
162
  trigger: true
@@ -1,7 +1,6 @@
1
1
  #!/bin/bash
2
-
3
- echo -e "---\n:rubygems_api_key: $GEM_API_KEY" > ~/.gem/credentials
4
- chmod 0600 ~/.gem/credentials
2
+ echo -e "---\n:rubygems_api_key: $GEM_API_KEY" > ~/.local/share/gem/credentials
3
+ chmod 0600 ~/.local/share/gem/credentials
5
4
 
6
5
  build_version="$(cat semver-version/version)"
7
6
  cd lf-git
@@ -16,9 +16,10 @@ pushd "$PROJECT_ROOT"
16
16
  gem update --system
17
17
  gem install bundler
18
18
  bundle install
19
+ bundle pristine
19
20
 
20
- bundle exec rake install
21
- bundle exec rake spec
21
+ rake install
22
+ rake spec
22
23
 
23
- bundle exec rake features
24
+ rake features
24
25
  popd
data/ci/tasks/rubocop.yml CHANGED
@@ -4,7 +4,7 @@ image_resource:
4
4
  type: registry-image
5
5
  source:
6
6
  repository: ruby
7
- tag: 2.7.1
7
+ tag: 3.1.1
8
8
  username: ((LicenseFinderDocker.username))
9
9
  password: ((LicenseFinderDocker.password))
10
10
 
data/dlf CHANGED
@@ -1,10 +1,14 @@
1
1
  #!/bin/bash
2
2
  if `which docker > /dev/null`; then
3
- if [ $# -eq 0 ]; then
4
- docker run -v $PWD:/scan -it licensefinder/license_finder
5
- else
6
- docker run -v $PWD:/scan -it licensefinder/license_finder /bin/bash -lc "cd /scan && `echo $@`"
7
- fi
3
+ if [ $# -eq 0 ]; then
4
+ docker run -v $PWD:/scan -it licensefinder/license_finder
5
+ else
6
+ escaped_params=""
7
+ for p in "$@"; do
8
+ escaped_params="$escaped_params \"$p\""
9
+ done
10
+ docker run -v $PWD:/scan -it licensefinder/license_finder /bin/bash -lc "cd /scan && $escaped_params"
11
+ fi
8
12
  else
9
13
  echo "You do not have docker installed. Please install it:"
10
14
  echo " https://docs.docker.com/engine/installation/"
@@ -13,7 +13,7 @@ module LicenseFinder
13
13
  assert_some names
14
14
  modifying { names.each { |name| decisions.approve(name, txn) } }
15
15
 
16
- say "The #{names.join(', ')} dependency has been approved!", :green
16
+ printer.say "The #{names.join(', ')} dependency has been approved!", :green
17
17
  end
18
18
 
19
19
  auditable
@@ -21,7 +21,7 @@ module LicenseFinder
21
21
  def remove(dep)
22
22
  modifying { decisions.unapprove(dep, txn) }
23
23
 
24
- say "The dependency #{dep} no longer has a manual approval"
24
+ printer.say "The dependency #{dep} no longer has a manual approval"
25
25
  end
26
26
  end
27
27
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'thor'
4
-
5
4
  module LicenseFinder
6
5
  module CLI
7
6
  class Base < Thor
@@ -24,12 +23,16 @@ module LicenseFinder
24
23
  def config
25
24
  @config ||= Configuration.with_optional_saved_config(license_finder_config)
26
25
  end
26
+
27
+ def printer
28
+ @printer || Printer.new
29
+ end
27
30
  end
28
31
 
29
32
  private
30
33
 
31
34
  def fail(message)
32
- say(message) && exit(1)
35
+ printer.say(message) && exit(1)
33
36
  end
34
37
 
35
38
  def license_finder_config
@@ -61,7 +64,8 @@ module LicenseFinder
61
64
  :recursive,
62
65
  :sbt_include_groups,
63
66
  :conda_bash_setup_script,
64
- :composer_check_require_only
67
+ :composer_check_require_only,
68
+ :use_spdx_id
65
69
  ).merge(
66
70
  logger: logger_mode
67
71
  )
@@ -84,10 +88,10 @@ module LicenseFinder
84
88
  def say_each(coll)
85
89
  if coll.any?
86
90
  coll.each do |item|
87
- say(block_given? ? yield(item) : item)
91
+ printer.say(block_given? ? yield(item) : item)
88
92
  end
89
93
  else
90
- say '(none)'
94
+ printer.say '(none)'
91
95
  end
92
96
  end
93
97
 
@@ -20,9 +20,9 @@ module LicenseFinder
20
20
  decisions.approve(name, txn) if options[:approve]
21
21
  end
22
22
  if options[:approve]
23
- say "The #{name} dependency has been added and approved!", :green
23
+ printer.say "The #{name} dependency has been added and approved!", :green
24
24
  else
25
- say "The #{name} dependency has been added!", :green
25
+ printer.say "The #{name} dependency has been added!", :green
26
26
  end
27
27
  end
28
28
 
@@ -31,12 +31,12 @@ module LicenseFinder
31
31
  def remove(name)
32
32
  modifying { decisions.remove_package(name, txn) }
33
33
 
34
- say "The #{name} dependency has been removed.", :green
34
+ printer.say "The #{name} dependency has been removed.", :green
35
35
  end
36
36
 
37
37
  desc 'list', 'List manually added dependencies'
38
38
  def list
39
- say 'Manually Added Dependencies:', :blue
39
+ printer.say 'Manually Added Dependencies:', :blue
40
40
  say_each(decisions.packages, &:name)
41
41
  end
42
42
  end
@@ -8,7 +8,7 @@ module LicenseFinder
8
8
 
9
9
  desc 'list', 'List all the ignored dependencies'
10
10
  def list
11
- say 'Ignored Dependencies:', :blue
11
+ printer.say 'Ignored Dependencies:', :blue
12
12
  say_each(decisions.ignored)
13
13
  end
14
14
 
@@ -17,7 +17,7 @@ module LicenseFinder
17
17
  def add(dep)
18
18
  modifying { decisions.ignore(dep, txn) }
19
19
 
20
- say "Added #{dep} to the ignored dependencies"
20
+ printer.say "Added #{dep} to the ignored dependencies"
21
21
  end
22
22
 
23
23
  auditable
@@ -25,7 +25,7 @@ module LicenseFinder
25
25
  def remove(dep)
26
26
  modifying { decisions.heed(dep, txn) }
27
27
 
28
- say "Removed #{dep} from the ignored dependencies"
28
+ printer.say "Removed #{dep} from the ignored dependencies"
29
29
  end
30
30
  end
31
31
  end
@@ -8,7 +8,7 @@ module LicenseFinder
8
8
 
9
9
  desc 'list', 'List all the ignored groups'
10
10
  def list
11
- say 'Ignored Groups:', :blue
11
+ printer.say 'Ignored Groups:', :blue
12
12
  say_each(decisions.ignored_groups)
13
13
  end
14
14
 
@@ -17,7 +17,7 @@ module LicenseFinder
17
17
  def add(group)
18
18
  modifying { decisions.ignore_group(group, txn) }
19
19
 
20
- say "Added #{group} to the ignored groups"
20
+ printer.say "Added #{group} to the ignored groups"
21
21
  end
22
22
 
23
23
  auditable
@@ -25,7 +25,7 @@ module LicenseFinder
25
25
  def remove(group)
26
26
  modifying { decisions.heed_group(group, txn) }
27
27
 
28
- say "Removed #{group} from the ignored groups"
28
+ printer.say "Removed #{group} from the ignored groups"
29
29
  end
30
30
  end
31
31
  end
@@ -8,7 +8,7 @@ module LicenseFinder
8
8
 
9
9
  desc 'list', 'List all the inherited decision files'
10
10
  def list
11
- say 'Inherited Decision Files:', :blue
11
+ printer.say 'Inherited Decision Files:', :blue
12
12
  say_each(decisions.inherited_decisions)
13
13
  end
14
14
 
@@ -17,7 +17,7 @@ module LicenseFinder
17
17
  def add(*decision_files)
18
18
  assert_some decision_files
19
19
  modifying { decision_files.each { |filepath| decisions.inherit_from(filepath) } }
20
- say "Added #{decision_files.join(', ')} to the inherited decisions"
20
+ printer.say "Added #{decision_files.join(', ')} to the inherited decisions"
21
21
  end
22
22
 
23
23
  auditable
@@ -26,7 +26,7 @@ module LicenseFinder
26
26
  url, auth_type, token_or_env = params
27
27
  auth_info = { 'url' => url, 'authorization' => "#{auth_type} #{token_or_env}" }
28
28
  modifying { decisions.add_decision [:inherit_from, auth_info] }
29
- say "Added #{url} to the inherited decisions"
29
+ printer.say "Added #{url} to the inherited decisions"
30
30
  end
31
31
 
32
32
  auditable
@@ -34,7 +34,7 @@ module LicenseFinder
34
34
  def remove(*decision_files)
35
35
  assert_some decision_files
36
36
  modifying { decision_files.each { |filepath| decisions.remove_inheritance(filepath) } }
37
- say "Removed #{decision_files.join(', ')} from the inherited decisions"
37
+ printer.say "Removed #{decision_files.join(', ')} from the inherited decisions"
38
38
  end
39
39
 
40
40
  auditable
@@ -43,7 +43,7 @@ module LicenseFinder
43
43
  url, auth_type, token_or_env = params
44
44
  auth_info = { 'url' => url, 'authorization' => "#{auth_type} #{token_or_env}" }
45
45
  modifying { decisions.remove_inheritance(auth_info) }
46
- say "Removed #{url} from the inherited decisions"
46
+ printer.say "Removed #{url} from the inherited decisions"
47
47
  end
48
48
  end
49
49
  end
@@ -11,7 +11,7 @@ module LicenseFinder
11
11
  def add(name, license)
12
12
  modifying { decisions.license(name, license, txn) }
13
13
 
14
- say "The #{name} dependency has been marked as using #{license} license!", :green
14
+ printer.say "The #{name} dependency has been marked as using #{license} license!", :green
15
15
  end
16
16
 
17
17
  auditable
@@ -19,7 +19,7 @@ module LicenseFinder
19
19
  def remove(dep, lic)
20
20
  modifying { decisions.unlicense(dep, lic, txn) }
21
21
 
22
- say "The dependency #{dep} no longer has a manual license"
22
+ printer.say "The dependency #{dep} no longer has a manual license"
23
23
  end
24
24
  end
25
25
  end