cirro-ruby-client 2.7.1 → 2.7.3
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 +4 -4
- data/.circleci/config.yml +32 -41
- data/Gemfile.lock +1 -1
- data/lib/cirro_io/client/version.rb +1 -1
- data/lib/cirro_io_v2/resources/user.rb +5 -0
- data/lib/cirro_io_v2/responses/responses.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a284883c882e6e61c8449580ad57a886bed594109480e2ce67e570151c6c5c19
|
4
|
+
data.tar.gz: e2288b62ba9a818322d5e76025259825575dc384d6dc109cd8d8d67758a75f80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a73ad1b5f39955448ca3b6940ff7215ff56e63d654b75d8cd87623d1706fc7e70e4b05539c5322ef6f132e0f892e9614a91eea03eb6dee43664b5fcf7ef9e5ac
|
7
|
+
data.tar.gz: 77d49218048a9543f8793fc6f71eecc10dc117b842031884867f55f1dfafa438eec5b300bb5f5d41f6e9fd99ad3da1604b1f1411b0ee0d44add384008fd07d6a
|
data/.circleci/config.yml
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
version: 2.1
|
2
|
-
infra_container: &infra_container
|
3
|
-
us.gcr.io/oi-tset/swissknife@sha256:e8b74aab06de688b29c600785782a614efdaf2c20df7ef9b53b2b0276815fb0c
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
executors:
|
4
|
+
cci-ruby:
|
5
|
+
docker:
|
6
|
+
- image: cimg/ruby:3.2.2
|
7
|
+
environment:
|
8
|
+
RAILS_ENV: test
|
9
|
+
RACK_ENV: test
|
10
|
+
cci-base:
|
11
|
+
docker:
|
12
|
+
- image: cimg/base:stable
|
11
13
|
|
12
14
|
jobs:
|
13
15
|
test:
|
14
|
-
|
15
|
-
- image: cimg/ruby:3.2.2-node
|
16
|
-
environment:
|
17
|
-
- RAILS_ENV=test
|
18
|
-
- RACK_ENV=test
|
16
|
+
executor: cci-ruby
|
19
17
|
steps:
|
20
18
|
- checkout
|
21
19
|
- restore_cache:
|
@@ -36,8 +34,7 @@ jobs:
|
|
36
34
|
command: bundle exec rubocop
|
37
35
|
|
38
36
|
deploy:
|
39
|
-
|
40
|
-
- image: cimg/ruby:3.2.2-node
|
37
|
+
executor: cci-ruby
|
41
38
|
steps:
|
42
39
|
- checkout
|
43
40
|
- run:
|
@@ -53,47 +50,44 @@ jobs:
|
|
53
50
|
git push origin v"$version"
|
54
51
|
fi
|
55
52
|
- run:
|
56
|
-
name:
|
53
|
+
name: Build the gem
|
57
54
|
command: gem build cirro-ruby-client.gemspec
|
58
55
|
- run:
|
59
|
-
name:
|
56
|
+
name: Push to Rubygems
|
60
57
|
command: |
|
61
58
|
version=$(cat lib/cirro_io/client/version.rb | grep VERSION | awk -F' = ' '{print $2}' | xargs)
|
62
|
-
echo "gem
|
59
|
+
echo "gem $(gem --version)"
|
63
60
|
mkdir ~/.gem
|
64
|
-
cat .circleci/gem_credentials | sed -e "s/__RUBYGEMS_API_KEY__/$
|
61
|
+
cat .circleci/gem_credentials | sed -e "s/__RUBYGEMS_API_KEY__/$RUBYGEMS_API_KEY/" > ~/.gem/credentials
|
65
62
|
chmod 0600 ~/.gem/credentials
|
66
63
|
gem push cirro-ruby-client-$version.gem
|
67
|
-
shred -u ~/.gem/credentials
|
64
|
+
shred -u ~/.gem/credentials # completely remove the file making it hard for even very expensive hardware to recover the data
|
68
65
|
|
69
66
|
defectdojo:
|
70
|
-
|
71
|
-
- image: *infra_container
|
72
|
-
<<: *infra_container_registry_auth
|
67
|
+
executor: cci-base
|
73
68
|
environment:
|
74
|
-
|
75
|
-
|
76
|
-
|
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
|
77
73
|
steps:
|
78
74
|
- checkout
|
79
75
|
- run:
|
80
|
-
name:
|
76
|
+
name: Install Trivy and Gitleaks
|
81
77
|
command: |
|
82
|
-
|
83
|
-
|
84
|
-
|
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
|
85
81
|
- run:
|
86
82
|
name: Scans
|
87
83
|
command: |
|
88
|
-
|
89
|
-
gitleaks detect --no-git --exit-code 0 --report-format json --report-path gitleaks.json
|
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
|
90
86
|
- run:
|
91
87
|
name: Send data to DefectDojo
|
92
88
|
command: |
|
93
|
-
|
94
|
-
|
95
|
-
--project=oi-tset \
|
96
|
-
--quiet)
|
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
|
97
91
|
|
98
92
|
# Send Trivy filesystem scan
|
99
93
|
curl --fail --request POST https://$DEFECTDOJO_URL/api/v2/reimport-scan/ \
|
@@ -124,7 +118,6 @@ jobs:
|
|
124
118
|
--form "file=@gitleaks.json"
|
125
119
|
|
126
120
|
workflows:
|
127
|
-
version: 2
|
128
121
|
deploy_the_gem:
|
129
122
|
jobs:
|
130
123
|
- test
|
@@ -133,10 +126,8 @@ workflows:
|
|
133
126
|
- test
|
134
127
|
filters:
|
135
128
|
branches:
|
136
|
-
only:
|
137
|
-
- master
|
129
|
+
only: master
|
138
130
|
- defectdojo:
|
139
131
|
filters:
|
140
132
|
branches:
|
141
|
-
only:
|
142
|
-
- master
|
133
|
+
only: master
|
data/Gemfile.lock
CHANGED
@@ -11,6 +11,11 @@ module CirroIOV2
|
|
11
11
|
CirroIOV2::Responses::UserResponse.new(response.body)
|
12
12
|
end
|
13
13
|
|
14
|
+
def delete(id)
|
15
|
+
response = client.request_client.request(:delete, "#{resource_root}/#{id}")
|
16
|
+
Responses::UserDeleteResponse.new(response.body)
|
17
|
+
end
|
18
|
+
|
14
19
|
def notification_preference(id)
|
15
20
|
response = client.request_client.request(:get, "#{resource_root}/#{id}/notification_preference")
|
16
21
|
CirroIOV2::Responses::UserNotificationPreferenceResponse.new(response.body)
|
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.
|
4
|
+
version: 2.7.3
|
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:
|
11
|
+
date: 2025-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|