threadfix-cli 0.3.0 → 0.3.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08558fa9c18007a5c1708420a69386e483c226e9e8c556186656a8c35fed4894'
|
4
|
+
data.tar.gz: 457ddbb710dfbb0c643ea3d32a1b4efac65756dcb63723fc0652bb7d9de56dc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3364224b767303147610b18b165fb82c52351311519631a8b47f55be0991b3cbf45d2d3f35a381282c50649e2b373f771f8b3f8da3a72dec4d1c26e3b7ed08c4
|
7
|
+
data.tar.gz: 811b5d28d26cf75c7d9097dadea7be57028537af3ec1df72aa445675422d05e08b305373ae5cdfca2731166110b2091c4397837b554d20676004524f6cc30531
|
@@ -3,7 +3,7 @@ module Threadfix
|
|
3
3
|
module Applications
|
4
4
|
class GetId
|
5
5
|
# https://denimgroup.atlassian.net/wiki/spaces/TDOC/pages/664567813/List+Applications+-+API
|
6
|
-
API_VERSION='
|
6
|
+
API_VERSION='v2.7.5'
|
7
7
|
|
8
8
|
attr_reader :app_name
|
9
9
|
|
@@ -13,6 +13,7 @@ module Threadfix
|
|
13
13
|
|
14
14
|
def perform!
|
15
15
|
begin
|
16
|
+
puts "GET #{endpoint.to_s}" if ENV['DEBUG']
|
16
17
|
r = RestClient.get(
|
17
18
|
endpoint.to_s,
|
18
19
|
{ :accept => "application/json", :Authorization => "APIKEY #{apiKey}" }
|
@@ -21,15 +22,17 @@ module Threadfix
|
|
21
22
|
|
22
23
|
begin
|
23
24
|
body.fetch('object')
|
24
|
-
.find{ |a| a.fetch('name') == app_name}.fetch('id')
|
25
|
+
.find{ |a| a.fetch('name').downcase == app_name.downcase}.fetch('id')
|
25
26
|
rescue => e
|
26
27
|
puts "App '#{app_name}' was not found."
|
27
28
|
nil # return nil if data not found
|
28
29
|
end
|
29
30
|
rescue RestClient::NotFound => e
|
30
31
|
puts "Endpoint not found (using API version: #{API_VERSION})"
|
32
|
+
puts e.message if ENG['DEBUG']
|
31
33
|
raise e
|
32
34
|
rescue RestClient::ExceptionWithResponse => e
|
35
|
+
puts e.message if ENG['DEBUG']
|
33
36
|
raise e
|
34
37
|
end
|
35
38
|
end
|
@@ -2,7 +2,7 @@ module Threadfix
|
|
2
2
|
module Client
|
3
3
|
module Applications
|
4
4
|
class Lookup
|
5
|
-
API_VERSION='
|
5
|
+
API_VERSION='v2.5.0.2'
|
6
6
|
|
7
7
|
attr_reader :team_name, :app_name
|
8
8
|
|
@@ -13,6 +13,7 @@ module Threadfix
|
|
13
13
|
|
14
14
|
def perform!
|
15
15
|
begin
|
16
|
+
puts "GET #{endpoint.to_s}" if ENV['DEBUG']
|
16
17
|
r = RestClient.get(
|
17
18
|
endpoint.to_s,
|
18
19
|
{ :accept => "application/json", :Authorization => "APIKEY #{apiKey}" }
|
@@ -6,7 +6,7 @@ module Threadfix
|
|
6
6
|
module Client
|
7
7
|
module Scans
|
8
8
|
class Upload
|
9
|
-
API_VERSION='
|
9
|
+
API_VERSION='v2.5'
|
10
10
|
attr_reader :file_path, :app_id
|
11
11
|
|
12
12
|
def initialize(options={})
|
@@ -16,6 +16,7 @@ module Threadfix
|
|
16
16
|
|
17
17
|
def perform!
|
18
18
|
begin
|
19
|
+
puts "POST #{endpoint.to_s}" if ENV['DEBUG']
|
19
20
|
r = RestClient.post(
|
20
21
|
endpoint.to_s,
|
21
22
|
{ file: file },
|
@@ -26,6 +27,7 @@ module Threadfix
|
|
26
27
|
puts "Endpoint not found (using API version: #{API_VERSION})"
|
27
28
|
raise e
|
28
29
|
rescue RestClient::ExceptionWithResponse => e
|
30
|
+
puts e.message
|
29
31
|
raise e
|
30
32
|
end
|
31
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: threadfix-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Elliott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|