cirro-ruby-client 2.7.3 → 2.8.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: a284883c882e6e61c8449580ad57a886bed594109480e2ce67e570151c6c5c19
4
- data.tar.gz: e2288b62ba9a818322d5e76025259825575dc384d6dc109cd8d8d67758a75f80
3
+ metadata.gz: 101d2c8b46c83770524743e918ed784ae30273023a716269ac40d11a215e5880
4
+ data.tar.gz: fa4a057b29d61eaefbfe922591e1b76cf0d742dd608f2a9fc4728b56c113d455
5
5
  SHA512:
6
- metadata.gz: a73ad1b5f39955448ca3b6940ff7215ff56e63d654b75d8cd87623d1706fc7e70e4b05539c5322ef6f132e0f892e9614a91eea03eb6dee43664b5fcf7ef9e5ac
7
- data.tar.gz: 77d49218048a9543f8793fc6f71eecc10dc117b842031884867f55f1dfafa438eec5b300bb5f5d41f6e9fd99ad3da1604b1f1411b0ee0d44add384008fd07d6a
6
+ metadata.gz: 2ce706e8e7a4ca9a7c51bdb4c1443994bdc17bacc405754367ba6067169eda1343be9f1d0bd7ab7927fac87c93884717a03fd0d6ed6ef292a0810c4417235159
7
+ data.tar.gz: 6aef7329ef7d9c0be72cb6cc04d8950f0855c8afa0af4ea82e198b24acfda6a4ef362480b8c8024559f5fb02f03024e7f2d636b6bb9af6ca190a29393d915148
data/.circleci/config.yml CHANGED
@@ -63,60 +63,6 @@ jobs:
63
63
  gem push cirro-ruby-client-$version.gem
64
64
  shred -u ~/.gem/credentials # completely remove the file making it hard for even very expensive hardware to recover the data
65
65
 
66
- defectdojo:
67
- executor: cci-base
68
- environment:
69
- DEFECTDOJO_URL: defectdojo.testcloud.io
70
- DEFECTDOJO_PRODUCT: Cirro Ruby Client
71
- DEFECTDOJO_ENG_NAME: CircleCI Scan
72
- circleci_ip_ranges: true # opts the job into the IP ranges feature
73
- steps:
74
- - checkout
75
- - run:
76
- name: Install Trivy and Gitleaks
77
- command: |
78
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin
79
- curl -sfL https://github.com/zricethezav/gitleaks/releases/download/v8.18.2/gitleaks_8.18.2_linux_x64.tar.gz -o gitleaks.tar.gz && \
80
- tar -xf gitleaks.tar.gz
81
- - run:
82
- name: Scans
83
- command: |
84
- trivy fs --exit-code 0 --no-progress --format json --output filesystem-scan.json .
85
- ./gitleaks detect --no-git --exit-code 0 --report-format json --report-path gitleaks.json
86
- - run:
87
- name: Send data to DefectDojo
88
- command: |
89
- # The DEFECTDOJO_TOKEN env var is set in CCI to not have to be authenticated
90
- # to GCP only for this purpose, so please change it there if it gets rotated
91
-
92
- # Send Trivy filesystem scan
93
- curl --fail --request POST https://$DEFECTDOJO_URL/api/v2/reimport-scan/ \
94
- --header "Authorization: Token $DEFECTDOJO_TOKEN" \
95
- --form "active=true" \
96
- --form "auto_create_context=true" \
97
- --form "branch_tag=${CIRCLE_BRANCH}" \
98
- --form "commit_hash=${CIRCLE_SHA1}" \
99
- --form "close_old_findings=true" \
100
- --form "scan_type=Trivy Scan" \
101
- --form "test_title=Trivy application scan" \
102
- --form "engagement_name=${DEFECTDOJO_ENG_NAME}" \
103
- --form "product_name=${DEFECTDOJO_PRODUCT}" \
104
- --form "file=@filesystem-scan.json"
105
-
106
- # Send Gitleaks scan
107
- curl --fail --request POST https://$DEFECTDOJO_URL/api/v2/reimport-scan/ \
108
- --header "Authorization: Token $DEFECTDOJO_TOKEN" \
109
- --form "active=true" \
110
- --form "auto_create_context=true" \
111
- --form "branch_tag=${CIRCLE_BRANCH}" \
112
- --form "commit_hash=${CIRCLE_SHA1}" \
113
- --form "close_old_findings=true" \
114
- --form "scan_type=Gitleaks Scan" \
115
- --form "test_title=Gitleaks Scan" \
116
- --form "engagement_name=${DEFECTDOJO_ENG_NAME}" \
117
- --form "product_name=${DEFECTDOJO_PRODUCT}" \
118
- --form "file=@gitleaks.json"
119
-
120
66
  workflows:
121
67
  deploy_the_gem:
122
68
  jobs:
@@ -127,7 +73,3 @@ workflows:
127
73
  filters:
128
74
  branches:
129
75
  only: master
130
- - defectdojo:
131
- filters:
132
- branches:
133
- only: master
data/Gemfile.lock CHANGED
@@ -1,10 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cirro-ruby-client (2.7.3)
4
+ cirro-ruby-client (2.8.1)
5
5
  activesupport
6
- faraday (< 1.11.0)
7
- faraday_middleware
6
+ faraday (~> 2.0)
8
7
  json_api_client (>= 1.10.0)
9
8
  jwt
10
9
 
@@ -38,34 +37,15 @@ GEM
38
37
  drb (2.2.1)
39
38
  faker (3.2.3)
40
39
  i18n (>= 1.8.11, < 2)
41
- faraday (1.10.3)
42
- faraday-em_http (~> 1.0)
43
- faraday-em_synchrony (~> 1.0)
44
- faraday-excon (~> 1.1)
45
- faraday-httpclient (~> 1.0)
46
- faraday-multipart (~> 1.0)
47
- faraday-net_http (~> 1.0)
48
- faraday-net_http_persistent (~> 1.0)
49
- faraday-patron (~> 1.0)
50
- faraday-rack (~> 1.0)
51
- faraday-retry (~> 1.0)
52
- ruby2_keywords (>= 0.0.4)
53
- faraday-em_http (1.0.0)
54
- faraday-em_synchrony (1.0.0)
55
- faraday-excon (1.1.0)
40
+ faraday (2.13.4)
41
+ faraday-net_http (>= 2.0, < 3.5)
42
+ json
43
+ logger
56
44
  faraday-gzip (2.0.1)
57
45
  faraday (>= 1.0)
58
46
  zlib (~> 3.0)
59
- faraday-httpclient (1.0.1)
60
- faraday-multipart (1.0.4)
61
- multipart-post (~> 2)
62
- faraday-net_http (1.0.2)
63
- faraday-net_http_persistent (1.2.0)
64
- faraday-patron (1.0.0)
65
- faraday-rack (1.0.0)
66
- faraday-retry (1.0.3)
67
- faraday_middleware (1.2.0)
68
- faraday (~> 1.0)
47
+ faraday-net_http (3.4.1)
48
+ net-http (>= 0.5.0)
69
49
  hashdiff (1.1.0)
70
50
  i18n (1.14.5)
71
51
  concurrent-ruby (~> 1.0)
@@ -80,10 +60,12 @@ GEM
80
60
  jwt (2.8.2)
81
61
  base64
82
62
  language_server-protocol (3.17.0.3)
63
+ logger (1.7.0)
83
64
  method_source (1.0.0)
84
65
  minitest (5.24.1)
85
- multipart-post (2.4.1)
86
66
  mutex_m (0.2.0)
67
+ net-http (0.6.0)
68
+ uri
87
69
  parallel (1.24.0)
88
70
  parser (3.3.0.5)
89
71
  ast (~> 2.4.1)
@@ -133,10 +115,10 @@ GEM
133
115
  rubocop-capybara (~> 2.17)
134
116
  rubocop-factory_bot (~> 2.22)
135
117
  ruby-progressbar (1.13.0)
136
- ruby2_keywords (0.0.5)
137
118
  tzinfo (2.0.6)
138
119
  concurrent-ruby (~> 1.0)
139
120
  unicode-display_width (2.5.0)
121
+ uri (1.0.3)
140
122
  webmock (3.23.0)
141
123
  addressable (>= 2.8.0)
142
124
  crack (>= 0.3.2)
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_runtime_dependency 'activesupport'
29
29
  spec.add_runtime_dependency 'jwt'
30
- spec.add_runtime_dependency 'faraday', '< 1.11.0'
31
- spec.add_runtime_dependency 'faraday_middleware'
30
+ spec.add_runtime_dependency 'faraday', '~> 2.0'
32
31
  spec.add_runtime_dependency 'json_api_client', '>= 1.10.0'
33
32
  end
@@ -1,7 +1,7 @@
1
1
  # rubocop:disable Style/MutableConstant
2
2
  module CirroIO
3
3
  module Client
4
- VERSION = '2.7.3'
4
+ VERSION = '2.8.1'
5
5
  end
6
6
  end
7
7
  # rubocop:enable Style/MutableConstant
@@ -2,7 +2,6 @@ require 'json_api_client'
2
2
 
3
3
  require 'cirro_io/client/version'
4
4
  require 'cirro_io/client/configuration'
5
- require 'cirro_io/client/response_debugging_middleware'
6
5
  require 'cirro_io/client/jwt_authentication'
7
6
  require 'cirro_io/client/base'
8
7
  require 'cirro_io/client/bulk_action_helper'
@@ -17,12 +17,11 @@ module CirroIOV2
17
17
  end
18
18
 
19
19
  def message
20
- puts faraday_error.response.inspect
21
- faraday_error.response.then do |response|
22
- return response.inspect if ENV.fetch('DEBUG_CIRRO_RUBY_CLIENT', false)
20
+ return faraday_error.response.inspect if ENV['DEBUG_CIRRO_RUBY_CLIENT']
23
21
 
24
- faraday_error.response[:body].presence || faraday_error.try(:message)
25
- end
22
+ body = faraday_error.response&.dig(:body)
23
+ result = body.presence || faraday_error.try(:message)
24
+ result.is_a?(String) ? result : result.to_json
26
25
  end
27
26
  end
28
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cirro-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.3
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cirro Dev Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-25 00:00:00.000000000 Z
11
+ date: 2026-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -42,30 +42,16 @@ dependencies:
42
42
  name: faraday
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "<"
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.11.0
47
+ version: '2.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "<"
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.11.0
55
- - !ruby/object:Gem::Dependency
56
- name: faraday_middleware
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
54
+ version: '2.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: json_api_client
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -118,7 +104,6 @@ files:
118
104
  - lib/cirro_io/client/notifications_template.rb
119
105
  - lib/cirro_io/client/notifications_topic.rb
120
106
  - lib/cirro_io/client/payout.rb
121
- - lib/cirro_io/client/response_debugging_middleware.rb
122
107
  - lib/cirro_io/client/version.rb
123
108
  - lib/cirro_io/client/worker_filter.rb
124
109
  - lib/cirro_io_v2/client.rb
@@ -1,10 +0,0 @@
1
- # This middleware can be injected during debugging or while adding new specs
2
- module CirroIO
3
- module Client
4
- class ResponseDebuggingMiddleware < Faraday::Response::Middleware
5
- def on_complete(env)
6
- binding.pry # rubocop:disable Lint/Debugger
7
- end
8
- end
9
- end
10
- end