cirro-ruby-client 2.8.0 → 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: 7190bba0bdf421ec4415255b536cd5df5ecf96cdd166f752e691c39c17225076
4
- data.tar.gz: f5a93af0567dc240fd01edd975023d5384eeb93708eb89b8c6195224904068ac
3
+ metadata.gz: 101d2c8b46c83770524743e918ed784ae30273023a716269ac40d11a215e5880
4
+ data.tar.gz: fa4a057b29d61eaefbfe922591e1b76cf0d742dd608f2a9fc4728b56c113d455
5
5
  SHA512:
6
- metadata.gz: 2bddecfbc24b4528ac188df5cab457438b39287b2680ffc04245c281d31b04d334d442297e23a39cfcf0df2413baaa40c07fcae4ed8e74fed2c4fd002ad2d3ec
7
- data.tar.gz: a2a4b54d36e256d9da57f2b6ac680354af74186d200a1c0d93a0e2a138f632cfca6ec8fadd943ea7b62b51dd18254b3610273e21ce0a0d7188999b012820a755
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,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cirro-ruby-client (2.8.0)
4
+ cirro-ruby-client (2.8.1)
5
5
  activesupport
6
6
  faraday (~> 2.0)
7
7
  json_api_client (>= 1.10.0)
@@ -1,7 +1,7 @@
1
1
  # rubocop:disable Style/MutableConstant
2
2
  module CirroIO
3
3
  module Client
4
- VERSION = '2.8.0'
4
+ VERSION = '2.8.1'
5
5
  end
6
6
  end
7
7
  # rubocop:enable Style/MutableConstant
@@ -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.8.0
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-09-26 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