fastlane-plugin-dependency_check_ios_analyzer 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e345f12b5563a7925a7e3f9f68bec30cba87d77c008549f6894a2f2466933bd
4
- data.tar.gz: d1c5771351ae90caaf6cde75684fdffdb60a63513f0ea6d6a7464c0a712cd506
3
+ metadata.gz: 9ef35dee5ad3ab22fd56bfaf812d32cd3583eafaa89774396d564a62f6631230
4
+ data.tar.gz: c44a3437fe94b288b9ea0cbf8dce854a5e12b7ee3c23a197a6288be659a81ab1
5
5
  SHA512:
6
- metadata.gz: 00d998579a40c7ff824191c74cdbdae8189c3391a9fc081517798967612d714f71470d0480835dae02bc33526d5982202e1591abf517fa79b34c7cb5124266dc
7
- data.tar.gz: 224c59d4cb97b25fdc1dd22983a921b37eed9267bf2903feffe7bdebe8a3c8533da982345dfff2324ed17143c1e03b3f5ad3c9030c55c7f34f68fca9047bb5a6
6
+ metadata.gz: e9a8999284bec6d083ac6fc8bf2d77ac5b55b8edbf5cadfd6ce6a43b4ab6cd105c24d7820294bfc37ec768d364562095fa1e87ddbcc6a39aaf88133c0eb93050
7
+ data.tar.gz: 59dc152c71bc7fe5b6aa00687cfd60dd7fee57ee5370243d982ca5639dffa9e62f5877b9b213612632d748e2e4108c0ffcb3a02594fa750fab38f3e5e3fdee4c
data/README.md CHANGED
@@ -21,7 +21,7 @@ This analyzer is considered experimental. While it may be useful and provide val
21
21
  | `output_directory` | The directory in which all reports will be stored | `dependency-check` |
22
22
  | `output_types` | Comma separated list of the output types (e.g. `html`, `xml`, `csv`, `json`, `junit`, `sarif`, `all`) | `sarif` |
23
23
  | `cli_version` | Overwrite the version of `DependencyCheck` analyzer | `6.1.6` |
24
- | `gpg_key` | Overwrite the GPG key to verify the cryptographic integrity of the requested `cli_version` | |
24
+ | `verify_integrity` | Verify the cryptographic integrity of the tool before starting an analysis | `false` |
25
25
  | `verbose` | The file path to write verbose logging information | |
26
26
  | `fail_on_cvss` | Specifies if the build should be failed if a CVSS score above a specified level is identified. Since the CVSS scores are 0-10, by default the build will never fail | `11` |
27
27
  | `junit_fail_on_cvss` | Specifies the CVSS score that is considered a failure when generating the junit report | `0` |
@@ -115,11 +115,11 @@ module Fastlane
115
115
  type: String
116
116
  ),
117
117
  FastlaneCore::ConfigItem.new(
118
- key: :gpg_key,
119
- description: 'Overwrite the GPG key to verify the cryptographic integrity of the requested cli_version',
118
+ key: :verify_integrity,
119
+ description: 'Verify the cryptographic integrity of the tool before starting an analysis',
120
120
  optional: true,
121
- is_string: true,
122
- type: String
121
+ is_string: false,
122
+ type: Boolean
123
123
  ),
124
124
  FastlaneCore::ConfigItem.new(
125
125
  key: :verbose,
@@ -11,11 +11,9 @@ module Fastlane
11
11
  repo = 'https://github.com/jeremylong/DependencyCheck'
12
12
  name = 'dependency-check'
13
13
  version = params[:cli_version] ? params[:cli_version] : '6.1.6'
14
- gpg_key = params[:gpg_key] ? params[:gpg_key] : 'F9514E84AE3708288374BBBE097586CFEA37F9A6'
15
14
  base_url = "#{repo}/releases/download/v#{version}/#{name}-#{version}-release"
16
15
  bin_path = "#{params[:output_directory]}/#{name}/bin/#{name}.sh"
17
16
  zip_path = "#{params[:output_directory]}/#{name}.zip"
18
- asc_path = "#{zip_path}.asc"
19
17
 
20
18
  unless File.exist?(bin_path)
21
19
  FileUtils.mkdir_p(params[:output_directory])
@@ -27,17 +25,13 @@ module Fastlane
27
25
  File.open(zip_path, 'w+') { |f| f.write(curl.body_str) }
28
26
  end
29
27
 
30
- asc_url = "#{base_url}.zip.asc"
31
- UI.message("🚀 Downloading associated GPG signature file: #{asc_url}")
32
- curl = Curl.get(asc_url) { |curl| curl.follow_location = true }
33
- File.open(asc_path, 'w+') { |f| f.write(curl.body_str) }
34
-
35
- verify_cryptographic_integrity(asc_path: asc_path, gpg_key: gpg_key)
28
+ if params[:verify_integrity]
29
+ verify_cryptographic_integrity(zip_path: zip_path, base_url: base_url)
30
+ end
36
31
 
37
32
  unzip(file: zip_path, params: params)
38
33
 
39
34
  FileUtils.rm_rf(zip_path)
40
- FileUtils.rm_rf(asc_path)
41
35
  end
42
36
 
43
37
  bin_path
@@ -70,13 +64,24 @@ module Fastlane
70
64
  end
71
65
  end
72
66
 
73
- # https://jeremylong.github.io/DependencyCheck/dependency-check-cli/
74
- def self.verify_cryptographic_integrity(asc_path:, gpg_key:)
67
+ def self.verify_cryptographic_integrity(zip_path:, base_url:)
68
+ asc_url = "#{base_url}.zip.asc"
69
+ UI.message("🚀 Downloading associated GPG signature file: #{asc_url}")
70
+ curl = Curl.get(asc_url) { |curl| curl.follow_location = true }
71
+
72
+ asc_path = "#{zip_path}.asc"
73
+ File.open(asc_path, 'w+') { |f| f.write(curl.body_str) }
74
+
75
+ # https://jeremylong.github.io/DependencyCheck/dependency-check-cli/
76
+ gpg_key = 'F9514E84AE3708288374BBBE097586CFEA37F9A6'
77
+
75
78
  UI.message("🕵️ Verifying the cryptographic integrity")
76
79
  # Import the GPG key used to sign all DependencyCheck releases
77
80
  Actions.sh("gpg --keyserver hkp://keys.gnupg.net --recv-keys #{gpg_key}")
78
81
  # Verify the cryptographic integrity
79
82
  Actions.sh("gpg --verify #{asc_path}")
83
+
84
+ FileUtils.rm_rf(asc_path)
80
85
  end
81
86
  end
82
87
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module DependencyCheckIosAnalyzer
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-dependency_check_ios_analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Alter-Pesotskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-02 00:00:00.000000000 Z
11
+ date: 2021-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb