neetob 0.5.16 → 0.5.18

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.env +4 -0
  3. data/.neetoci/default.yml +1 -1
  4. data/.ruby-version +1 -1
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +108 -109
  7. data/lib/neetob/cli/cloudflare/always_use_https.rb +7 -2
  8. data/lib/neetob/cli/cloudflare/bot_fight_mode.rb +7 -2
  9. data/lib/neetob/cli/cloudflare/dns_proxy_status.rb +8 -2
  10. data/lib/neetob/cli/cloudflare/min_tls_version.rb +8 -2
  11. data/lib/neetob/cli/cloudflare/ssl_mode.rb +4 -1
  12. data/lib/neetob/cli/cloudflare/verify_spf.rb +21 -8
  13. data/lib/neetob/cli/code/audit.rb +19 -7
  14. data/lib/neetob/cli/cronitor/base.rb +49 -0
  15. data/lib/neetob/cli/cronitor/get_all_monitors.rb +21 -0
  16. data/lib/neetob/cli/github/base.rb +3 -2
  17. data/lib/neetob/cli/github/brakeman.rb +7 -3
  18. data/lib/neetob/cli/github/bundle_audit.rb +52 -0
  19. data/lib/neetob/cli/github/make_pr/base.rb +10 -2
  20. data/lib/neetob/cli/github/repositories/get_security_details.rb +45 -0
  21. data/lib/neetob/cli/github/repositories/pull_requests.rb +34 -0
  22. data/lib/neetob/cli/github/yarn_audit.rb +47 -0
  23. data/lib/neetob/cli/monthly_audit/commands.rb +19 -0
  24. data/lib/neetob/cli/monthly_audit/databases/main.rb +29 -0
  25. data/lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb +40 -0
  26. data/lib/neetob/cli/monthly_audit/databases/uuid_primary_key.rb +45 -0
  27. data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/always_use_https_is_enabled.rb +32 -0
  28. data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb +32 -0
  29. data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/dns_entry_has_proxy_status.rb +41 -0
  30. data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/main.rb +38 -0
  31. data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/minimum_tls_version_is_one_point_two.rb +34 -0
  32. data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/spf_records_are_valid.rb +41 -0
  33. data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/ssl_tls_encryption_mode_set_to_full.rb +34 -0
  34. data/lib/neetob/cli/monthly_audit/instances_and_addons/cronitor/main.rb +29 -0
  35. data/lib/neetob/cli/monthly_audit/instances_and_addons/cronitor/setup_correctly_for_apps.rb +54 -0
  36. data/lib/neetob/cli/monthly_audit/instances_and_addons/cronitor/setup_correctly_for_help_center.rb +53 -0
  37. data/lib/neetob/cli/monthly_audit/instances_and_addons/cronitor/setup_correctly_for_landing_pages.rb +53 -0
  38. data/lib/neetob/cli/monthly_audit/instances_and_addons/honeybadger/main.rb +23 -0
  39. data/lib/neetob/cli/monthly_audit/instances_and_addons/honeybadger/setup_correctly_for_apps.rb +49 -0
  40. data/lib/neetob/cli/monthly_audit/instances_and_addons/main.rb +40 -0
  41. data/lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy/auto_scaling_enabled.rb +46 -0
  42. data/lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy/cloudfront_cdn_enabled.rb +56 -0
  43. data/lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy/essential_environment_variables_set.rb +43 -0
  44. data/lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy/main.rb +35 -0
  45. data/lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy/scheduled_exports_enabled.rb +43 -0
  46. data/lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy/ssl_certificates_over_thirty_days_from_expiry.rb +41 -0
  47. data/lib/neetob/cli/monthly_audit/misc/main.rb +32 -0
  48. data/lib/neetob/cli/monthly_audit/misc/redirections_working_correctly.rb +30 -0
  49. data/lib/neetob/cli/monthly_audit/misc/sparkpost_sub_account_used_for_all_apps.rb +32 -0
  50. data/lib/neetob/cli/monthly_audit/misc/ssl_certs_setup_for_auto_renewal.rb +29 -0
  51. data/lib/neetob/cli/monthly_audit/perform.rb +41 -0
  52. data/lib/neetob/cli/monthly_audit/security/code/brakeman.rb +38 -0
  53. data/lib/neetob/cli/monthly_audit/security/code/bundle_audit.rb +40 -0
  54. data/lib/neetob/cli/monthly_audit/security/code/main.rb +29 -0
  55. data/lib/neetob/cli/monthly_audit/security/code/yarn_audit.rb +44 -0
  56. data/lib/neetob/cli/monthly_audit/security/github/dependabot_prs_merged.rb +48 -0
  57. data/lib/neetob/cli/monthly_audit/security/github/dependabot_turned_on.rb +44 -0
  58. data/lib/neetob/cli/monthly_audit/security/github/main.rb +26 -0
  59. data/lib/neetob/cli/monthly_audit/security/main.rb +31 -0
  60. data/lib/neetob/cli/neeto_deploy/autoscaling_config.rb +6 -1
  61. data/lib/neetob/cli/neeto_deploy/certificates.rb +3 -0
  62. data/lib/neetob/cli/neeto_deploy/config_vars/list.rb +8 -2
  63. data/lib/neetob/cli/neeto_deploy/scheduled_exports.rb +6 -1
  64. data/lib/neetob/cli/redirections/check.rb +13 -3
  65. data/lib/neetob/cli/sre/base.rb +10 -0
  66. data/lib/neetob/cli/sre/check_essential_env.rb +18 -3
  67. data/lib/neetob/cli/ui.rb +43 -3
  68. data/lib/neetob/cli.rb +4 -0
  69. data/lib/neetob/version.rb +1 -1
  70. metadata +48 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cb2e7034b3ad9051fa81237f9c5914bbc4cece5ff1ca947d6dd9a361538361d
4
- data.tar.gz: a30b6c24fc4661b8e4834511337c68f5217eab86ac1bc7680bc6d95b9a879408
3
+ metadata.gz: 8942c3a30b3d6edc581f2578939d0fc183553269ecd8640142051b90371554a5
4
+ data.tar.gz: 5fb19b35d0af660c4d91d1ee0425ed39ae61aff0749718466a34eb0d70cd3ccd
5
5
  SHA512:
6
- metadata.gz: 27526cbcdf3173e94cb5bd6c5a56ede7757d4ce6ef441dbb31972590180b4265bcd68148e1267be2f2a695b9cd99cd809e7fde6aff71bf131e02fd75e0ddaaea
7
- data.tar.gz: af77d941ca0fec37d8be3e7ef8eec4dc48fbd25b4cc1f58490e4be6cbda6e9a4c13762126e569e55c5af2aceee0840b088f4f0e78f5e8e4f2a28846ecd4100a6
6
+ metadata.gz: 0fbf9a88888b0d500836970638cfe86d0d76a9381ef7c27ee1a3d28d6f783dc2ded006c491ac5a11e8b5c5cbb8b33d853e80ca3837632164b86d84c101d66f82
7
+ data.tar.gz: d8f9381c36e206a4a5b9d54364b5aa9a71524403777e8fbd7844fa20e312829c14f7dc7e73e116be8e884f9c6f2198de4fe5d9adae788b2143c535ecfe5dcbf9
data/.env CHANGED
@@ -1 +1,5 @@
1
1
  AUTH_PARAMS='{"provider": "github","client_id": "Ov23lio2YRvQdc3SOdHN","grant_type": "urn:ietf:params:oauth:grant-type:device_code","auth_uris": {"auth_req": "https://github.com/login/device/code","token_req": "https://github.com/login/oauth/access_token"},"scope": "repo,user"}'
2
+ CLOUDFLARE_API_KEY='Bearer SPJSRAtx5kIIFzeBNb9X2G0PBZWF-pDhRr1gr77A'
3
+ CRONITOR_ONE_API_KEY='00e1d2ad9d104967af53d42a52b76a1f'
4
+ CRONITOR_THREE_API_KEY='989733e0eb87407b83ecef6e31768f28'
5
+
data/.neetoci/default.yml CHANGED
@@ -5,7 +5,7 @@ plan: standard-2
5
5
  global_job_config:
6
6
  setup:
7
7
  - checkout
8
- - neetoci-version ruby 3.2.4
8
+ - neetoci-version ruby 3.3.5
9
9
  - bundle config path 'vendor/bundle'
10
10
  - cache restore
11
11
  - bundle install --jobs 1
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.4
1
+ 3.3.5
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in neetob.gemspec
6
6
  gemspec
7
7
 
8
- gem "rails"
8
+ gem "rails", "7.1.3.2"
9
9
 
10
10
  group :development do
11
11
  gem "dotenv", "~> 2.8.1"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neetob (0.5.16)
4
+ neetob (0.5.18)
5
5
  brakeman (~> 5.0)
6
6
  chronic
7
7
  dotenv (~> 2.8.1)
@@ -15,7 +15,7 @@ PATH
15
15
  GEM
16
16
  remote: https://O6Ts9-SVDaUZpHMRs2CpJp22RwbETDE@gems.neeto.com/
17
17
  specs:
18
- neeto-commons-backend (1.6.42)
18
+ neeto-commons-backend (1.13.8)
19
19
  actionview
20
20
  bullet
21
21
  colorize
@@ -41,9 +41,8 @@ GEM
41
41
  sidekiq
42
42
  sidekiq-cron
43
43
  sidekiq-failures
44
- solid_cache
45
44
  webmock
46
- neeto-compliance (1.2.76)
45
+ neeto-compliance (1.2.101)
47
46
  colorize
48
47
  hash-deep-merge
49
48
  hashdiff
@@ -52,35 +51,35 @@ GEM
52
51
  GEM
53
52
  remote: https://rubygems.org/
54
53
  specs:
55
- actioncable (7.1.4.1)
56
- actionpack (= 7.1.4.1)
57
- activesupport (= 7.1.4.1)
54
+ actioncable (7.1.3.2)
55
+ actionpack (= 7.1.3.2)
56
+ activesupport (= 7.1.3.2)
58
57
  nio4r (~> 2.0)
59
58
  websocket-driver (>= 0.6.1)
60
59
  zeitwerk (~> 2.6)
61
- actionmailbox (7.1.4.1)
62
- actionpack (= 7.1.4.1)
63
- activejob (= 7.1.4.1)
64
- activerecord (= 7.1.4.1)
65
- activestorage (= 7.1.4.1)
66
- activesupport (= 7.1.4.1)
60
+ actionmailbox (7.1.3.2)
61
+ actionpack (= 7.1.3.2)
62
+ activejob (= 7.1.3.2)
63
+ activerecord (= 7.1.3.2)
64
+ activestorage (= 7.1.3.2)
65
+ activesupport (= 7.1.3.2)
67
66
  mail (>= 2.7.1)
68
67
  net-imap
69
68
  net-pop
70
69
  net-smtp
71
- actionmailer (7.1.4.1)
72
- actionpack (= 7.1.4.1)
73
- actionview (= 7.1.4.1)
74
- activejob (= 7.1.4.1)
75
- activesupport (= 7.1.4.1)
70
+ actionmailer (7.1.3.2)
71
+ actionpack (= 7.1.3.2)
72
+ actionview (= 7.1.3.2)
73
+ activejob (= 7.1.3.2)
74
+ activesupport (= 7.1.3.2)
76
75
  mail (~> 2.5, >= 2.5.4)
77
76
  net-imap
78
77
  net-pop
79
78
  net-smtp
80
79
  rails-dom-testing (~> 2.2)
81
- actionpack (7.1.4.1)
82
- actionview (= 7.1.4.1)
83
- activesupport (= 7.1.4.1)
80
+ actionpack (7.1.3.2)
81
+ actionview (= 7.1.3.2)
82
+ activesupport (= 7.1.3.2)
84
83
  nokogiri (>= 1.8.5)
85
84
  racc
86
85
  rack (>= 2.2.4)
@@ -88,35 +87,35 @@ GEM
88
87
  rack-test (>= 0.6.3)
89
88
  rails-dom-testing (~> 2.2)
90
89
  rails-html-sanitizer (~> 1.6)
91
- actiontext (7.1.4.1)
92
- actionpack (= 7.1.4.1)
93
- activerecord (= 7.1.4.1)
94
- activestorage (= 7.1.4.1)
95
- activesupport (= 7.1.4.1)
90
+ actiontext (7.1.3.2)
91
+ actionpack (= 7.1.3.2)
92
+ activerecord (= 7.1.3.2)
93
+ activestorage (= 7.1.3.2)
94
+ activesupport (= 7.1.3.2)
96
95
  globalid (>= 0.6.0)
97
96
  nokogiri (>= 1.8.5)
98
- actionview (7.1.4.1)
99
- activesupport (= 7.1.4.1)
97
+ actionview (7.1.3.2)
98
+ activesupport (= 7.1.3.2)
100
99
  builder (~> 3.1)
101
100
  erubi (~> 1.11)
102
101
  rails-dom-testing (~> 2.2)
103
102
  rails-html-sanitizer (~> 1.6)
104
- activejob (7.1.4.1)
105
- activesupport (= 7.1.4.1)
103
+ activejob (7.1.3.2)
104
+ activesupport (= 7.1.3.2)
106
105
  globalid (>= 0.3.6)
107
- activemodel (7.1.4.1)
108
- activesupport (= 7.1.4.1)
109
- activerecord (7.1.4.1)
110
- activemodel (= 7.1.4.1)
111
- activesupport (= 7.1.4.1)
106
+ activemodel (7.1.3.2)
107
+ activesupport (= 7.1.3.2)
108
+ activerecord (7.1.3.2)
109
+ activemodel (= 7.1.3.2)
110
+ activesupport (= 7.1.3.2)
112
111
  timeout (>= 0.4.0)
113
- activestorage (7.1.4.1)
114
- actionpack (= 7.1.4.1)
115
- activejob (= 7.1.4.1)
116
- activerecord (= 7.1.4.1)
117
- activesupport (= 7.1.4.1)
112
+ activestorage (7.1.3.2)
113
+ actionpack (= 7.1.3.2)
114
+ activejob (= 7.1.3.2)
115
+ activerecord (= 7.1.3.2)
116
+ activesupport (= 7.1.3.2)
118
117
  marcel (~> 1.0)
119
- activesupport (7.1.4.1)
118
+ activesupport (7.1.3.2)
120
119
  base64
121
120
  bigdecimal
122
121
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -134,7 +133,7 @@ GEM
134
133
  bigdecimal (3.1.8)
135
134
  brakeman (5.4.1)
136
135
  builder (3.3.0)
137
- bullet (7.2.0)
136
+ bullet (8.0.0)
138
137
  activesupport (>= 3.0.0)
139
138
  uniform_notifier (~> 1.11)
140
139
  childprocess (4.1.0)
@@ -147,15 +146,18 @@ GEM
147
146
  bigdecimal
148
147
  rexml
149
148
  crass (1.0.6)
150
- css_parser (1.19.1)
149
+ cronex (0.15.0)
150
+ tzinfo
151
+ unicode (>= 0.4.4.5)
152
+ css_parser (1.21.0)
151
153
  addressable
152
- database_cleaner (2.0.2)
154
+ database_cleaner (2.1.0)
153
155
  database_cleaner-active_record (>= 2, < 3)
154
156
  database_cleaner-active_record (2.2.0)
155
157
  activerecord (>= 5.a)
156
158
  database_cleaner-core (~> 2.0.0)
157
159
  database_cleaner-core (2.0.1)
158
- date (3.3.4)
160
+ date (3.4.1)
159
161
  docile (1.4.1)
160
162
  dotenv (2.8.1)
161
163
  drb (2.2.1)
@@ -163,12 +165,12 @@ GEM
163
165
  et-orbi (1.2.11)
164
166
  tzinfo
165
167
  eventmachine (1.2.7)
166
- faraday (2.12.0)
167
- faraday-net_http (>= 2.0, < 3.4)
168
+ faraday (2.12.2)
169
+ faraday-net_http (>= 2.0, < 3.5)
168
170
  json
169
171
  logger
170
- faraday-net_http (3.3.0)
171
- net-http
172
+ faraday-net_http (3.4.0)
173
+ net-http (>= 0.5.0)
172
174
  faraday-retry (2.0.0)
173
175
  faraday (~> 2.0)
174
176
  ffi (1.17.0)
@@ -181,9 +183,9 @@ GEM
181
183
  globalid (1.2.1)
182
184
  activesupport (>= 6.1)
183
185
  hash-deep-merge (0.1.1)
184
- hashdiff (1.1.1)
186
+ hashdiff (1.1.2)
185
187
  hashie (5.0.0)
186
- honeybadger (5.16.0)
188
+ honeybadger (5.26.0)
187
189
  logger
188
190
  htmlentities (4.3.4)
189
191
  httparty (0.21.0)
@@ -194,8 +196,8 @@ GEM
194
196
  iniparse (1.5.0)
195
197
  intercom-rails (1.0.1)
196
198
  activesupport (> 4.0)
197
- io-console (0.7.2)
198
- irb (1.14.1)
199
+ io-console (0.8.0)
200
+ irb (1.14.2)
199
201
  rdoc (>= 4.0.0)
200
202
  reline (>= 0.4.2)
201
203
  json (2.6.3)
@@ -203,8 +205,8 @@ GEM
203
205
  base64
204
206
  launchy (2.5.2)
205
207
  addressable (~> 2.8)
206
- logger (1.6.1)
207
- loofah (2.22.0)
208
+ logger (1.6.3)
209
+ loofah (2.23.1)
208
210
  crass (~> 1.0.2)
209
211
  nokogiri (>= 1.12.0)
210
212
  mail (2.8.1)
@@ -215,20 +217,20 @@ GEM
215
217
  marcel (1.0.4)
216
218
  method_source (1.1.0)
217
219
  mini_mime (1.1.5)
218
- mini_portile2 (2.8.7)
219
- minitest (5.16.3)
220
+ mini_portile2 (2.8.8)
221
+ minitest (5.25.4)
220
222
  minitest-reporters (1.5.0)
221
223
  ansi
222
224
  builder
223
225
  minitest (>= 5.0)
224
226
  ruby-progressbar
225
227
  mixpanel-ruby (2.3.0)
226
- mocha (2.0.2)
228
+ mocha (2.7.1)
227
229
  ruby2_keywords (>= 0.0.5)
228
230
  multi_xml (0.7.1)
229
231
  bigdecimal (~> 3.1)
230
232
  multipart-post (2.4.1)
231
- mutex_m (0.2.0)
233
+ mutex_m (0.3.0)
232
234
  neetodeploy (1.1.13)
233
235
  colorize
234
236
  dotenv (~> 2.8.1)
@@ -238,9 +240,9 @@ GEM
238
240
  thor (~> 1.3.0)
239
241
  tty-spinner
240
242
  websocket-eventmachine-client
241
- net-http (0.4.1)
243
+ net-http (0.6.0)
242
244
  uri
243
- net-imap (0.4.17)
245
+ net-imap (0.5.1)
244
246
  date
245
247
  net-protocol
246
248
  net-pop (0.1.2)
@@ -249,13 +251,13 @@ GEM
249
251
  timeout
250
252
  net-smtp (0.5.0)
251
253
  net-protocol
252
- nio4r (2.7.3)
253
- nokogiri (1.16.7)
254
+ nio4r (2.7.4)
255
+ nokogiri (1.17.2)
254
256
  mini_portile2 (~> 2.8.2)
255
257
  racc (~> 1.4)
256
- nokogiri (1.16.7-x86_64-darwin)
258
+ nokogiri (1.17.2-x86_64-darwin)
257
259
  racc (~> 1.4)
258
- nokogiri (1.16.7-x86_64-linux)
260
+ nokogiri (1.17.2-x86_64-linux)
259
261
  racc (~> 1.4)
260
262
  oauth2 (2.0.9)
261
263
  faraday (>= 0.17.3, < 3.0)
@@ -283,7 +285,7 @@ GEM
283
285
  childprocess (>= 0.6.3, < 5)
284
286
  iniparse (~> 1.4)
285
287
  rexml (~> 3.2)
286
- pagy (9.1.0)
288
+ pagy (9.3.3)
287
289
  parallel (1.26.3)
288
290
  parser (3.3.5.0)
289
291
  ast (~> 2.4.1)
@@ -299,7 +301,8 @@ GEM
299
301
  pry (0.14.1)
300
302
  coderay (~> 1.1)
301
303
  method_source (~> 1.0)
302
- psych (5.1.2)
304
+ psych (5.2.1)
305
+ date
303
306
  stringio
304
307
  public_suffix (6.0.1)
305
308
  pundit (2.4.0)
@@ -313,65 +316,65 @@ GEM
313
316
  rack (>= 2.0.0)
314
317
  rack-mini-profiler (3.3.1)
315
318
  rack (>= 1.2.0)
316
- rack-protection (4.0.0)
319
+ rack-protection (4.1.1)
317
320
  base64 (>= 0.1.0)
321
+ logger (>= 1.6.0)
318
322
  rack (>= 3.0.0, < 4)
319
323
  rack-session (2.0.0)
320
324
  rack (>= 3.0.0)
321
325
  rack-test (2.1.0)
322
326
  rack (>= 1.3)
323
327
  rack-timeout (0.7.0)
324
- rackup (2.1.0)
328
+ rackup (2.2.1)
325
329
  rack (>= 3)
326
- webrick (~> 1.8)
327
- rails (7.1.4.1)
328
- actioncable (= 7.1.4.1)
329
- actionmailbox (= 7.1.4.1)
330
- actionmailer (= 7.1.4.1)
331
- actionpack (= 7.1.4.1)
332
- actiontext (= 7.1.4.1)
333
- actionview (= 7.1.4.1)
334
- activejob (= 7.1.4.1)
335
- activemodel (= 7.1.4.1)
336
- activerecord (= 7.1.4.1)
337
- activestorage (= 7.1.4.1)
338
- activesupport (= 7.1.4.1)
330
+ rails (7.1.3.2)
331
+ actioncable (= 7.1.3.2)
332
+ actionmailbox (= 7.1.3.2)
333
+ actionmailer (= 7.1.3.2)
334
+ actionpack (= 7.1.3.2)
335
+ actiontext (= 7.1.3.2)
336
+ actionview (= 7.1.3.2)
337
+ activejob (= 7.1.3.2)
338
+ activemodel (= 7.1.3.2)
339
+ activerecord (= 7.1.3.2)
340
+ activestorage (= 7.1.3.2)
341
+ activesupport (= 7.1.3.2)
339
342
  bundler (>= 1.15.0)
340
- railties (= 7.1.4.1)
343
+ railties (= 7.1.3.2)
341
344
  rails-dom-testing (2.2.0)
342
345
  activesupport (>= 5.0.0)
343
346
  minitest
344
347
  nokogiri (>= 1.6)
345
- rails-html-sanitizer (1.6.0)
348
+ rails-html-sanitizer (1.6.2)
346
349
  loofah (~> 2.21)
347
- nokogiri (~> 1.14)
350
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
348
351
  rails_email_preview (2.2.3)
349
352
  rails (>= 4.2)
350
353
  request_store
351
354
  sassc-rails (>= 2.0.0)
352
355
  turbolinks
353
- railties (7.1.4.1)
354
- actionpack (= 7.1.4.1)
355
- activesupport (= 7.1.4.1)
356
+ railties (7.1.3.2)
357
+ actionpack (= 7.1.3.2)
358
+ activesupport (= 7.1.3.2)
356
359
  irb
357
360
  rackup (>= 1.0.0)
358
361
  rake (>= 12.2)
359
362
  thor (~> 1.0, >= 1.2.2)
360
363
  zeitwerk (~> 2.6)
361
364
  rainbow (3.1.1)
362
- rake (13.0.6)
363
- rdoc (6.7.0)
365
+ rake (13.2.1)
366
+ rdoc (6.9.0)
364
367
  psych (>= 4.0.0)
365
368
  redis (5.3.0)
366
369
  redis-client (>= 0.22.0)
367
- redis-client (0.22.2)
370
+ redis-client (0.23.0)
368
371
  connection_pool
369
372
  regexp_parser (2.9.2)
370
- reline (0.5.10)
373
+ reline (0.5.12)
371
374
  io-console (~> 0.5)
372
375
  request_store (1.7.0)
373
376
  rack (>= 1.4)
374
- rexml (3.3.9)
377
+ rexml (3.4.0)
375
378
  rinku (2.0.6)
376
379
  rubocop (1.39.0)
377
380
  json (~> 2.3)
@@ -398,16 +401,16 @@ GEM
398
401
  sawyer (0.9.2)
399
402
  addressable (>= 2.3.5)
400
403
  faraday (>= 0.17.3, < 3)
401
- sidekiq (7.3.2)
402
- concurrent-ruby (< 2)
404
+ sidekiq (7.3.6)
403
405
  connection_pool (>= 2.3.0)
404
406
  logger
405
407
  rack (>= 2.2.4)
406
408
  redis-client (>= 0.22.2)
407
- sidekiq-cron (1.12.0)
408
- fugit (~> 1.8)
409
+ sidekiq-cron (2.0.1)
410
+ cronex (>= 0.13.0)
411
+ fugit (~> 1.8, >= 1.11.1)
409
412
  globalid (>= 1.0.1)
410
- sidekiq (>= 6)
413
+ sidekiq (>= 6.5.0)
411
414
  sidekiq-failures (1.0.4)
412
415
  sidekiq (>= 4.0.0)
413
416
  simplecov (0.21.2)
@@ -419,10 +422,6 @@ GEM
419
422
  snaky_hash (2.0.1)
420
423
  hashie
421
424
  version_gem (~> 1.1, >= 1.1.1)
422
- solid_cache (0.7.0)
423
- activejob (>= 7)
424
- activerecord (>= 7)
425
- railties (>= 7)
426
425
  sprockets (4.2.1)
427
426
  concurrent-ruby (~> 1.0)
428
427
  rack (>= 2.2.4, < 4)
@@ -430,12 +429,12 @@ GEM
430
429
  actionpack (>= 6.1)
431
430
  activesupport (>= 6.1)
432
431
  sprockets (>= 3.0.0)
433
- stringio (3.1.1)
432
+ stringio (3.1.2)
434
433
  terminal-table (3.0.2)
435
434
  unicode-display_width (>= 1.1.1, < 3)
436
435
  thor (1.3.2)
437
436
  tilt (2.4.0)
438
- timeout (0.4.1)
437
+ timeout (0.4.3)
439
438
  tty-cursor (0.7.1)
440
439
  tty-spinner (0.9.3)
441
440
  tty-cursor (~> 0.7)
@@ -444,15 +443,15 @@ GEM
444
443
  turbolinks-source (5.2.0)
445
444
  tzinfo (2.0.6)
446
445
  concurrent-ruby (~> 1.0)
446
+ unicode (0.4.4.5)
447
447
  unicode-display_width (2.6.0)
448
448
  uniform_notifier (1.16.0)
449
- uri (0.13.1)
449
+ uri (1.0.2)
450
450
  version_gem (1.1.4)
451
- webmock (3.18.1)
451
+ webmock (3.24.0)
452
452
  addressable (>= 2.8.0)
453
453
  crack (>= 0.3.2)
454
454
  hashdiff (>= 0.4.0, < 2.0.0)
455
- webrick (1.8.2)
456
455
  websocket (1.2.11)
457
456
  websocket-driver (0.7.6)
458
457
  websocket-extensions (>= 0.1.0)
@@ -464,7 +463,7 @@ GEM
464
463
  websocket-eventmachine-base (~> 1.0)
465
464
  websocket-extensions (0.1.5)
466
465
  websocket-native (1.0.0)
467
- zeitwerk (2.6.18)
466
+ zeitwerk (2.7.1)
468
467
 
469
468
  PLATFORMS
470
469
  ruby
@@ -486,7 +485,7 @@ DEPENDENCIES
486
485
  neetodeploy
487
486
  overcommit (~> 0.59.1)
488
487
  pry
489
- rails
488
+ rails (= 7.1.3.2)
490
489
  rake (~> 13.0)
491
490
  rubocop (~> 1.28)
492
491
  simplecov
@@ -15,14 +15,19 @@ module Neetob
15
15
 
16
16
  def run
17
17
  zone_id = ZONE_IDS[domain.to_sym]
18
- raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
18
+ unless Thread.current[:audit_mode]
19
+ raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
20
+ end
19
21
 
20
22
  url = create_url(zone_id, "settings/always_use_https")
21
23
  response = get(url)
22
24
  always_use_https = response[:result][:value] == "on" ?
23
25
  print_success(response[:result][:value]) :
24
26
  print_failure(response[:result][:value])
25
- ui.info("Always use HTTPS is turned #{always_use_https}")
27
+ ui.info("Always use HTTPS is turned #{always_use_https}", print_to_audit_log: false)
28
+ if Thread.current[:audit_mode]
29
+ response[:result][:value]
30
+ end
26
31
  end
27
32
  end
28
33
  end
@@ -15,14 +15,19 @@ module Neetob
15
15
 
16
16
  def run
17
17
  zone_id = ZONE_IDS[domain.to_sym]
18
- raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
18
+ unless Thread.current[:audit_mode]
19
+ raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
20
+ end
19
21
 
20
22
  url = create_url(zone_id, "bot_management")
21
23
  response = get(url)
22
24
  ui.info(
23
25
  "Bot fight mode is turned #{response[:result][:fight_mode] ?
24
26
  print_success("on") :
25
- print_failure("off")}")
27
+ print_failure("off")}", print_to_audit_log: false)
28
+ if Thread.current[:audit_mode]
29
+ response[:result][:fight_mode]
30
+ end
26
31
  end
27
32
  end
28
33
  end
@@ -20,15 +20,21 @@ module Neetob
20
20
  url = create_url(zone_id, "dns_records")
21
21
  response = get(url)
22
22
 
23
- raise(StandardError, "No DNS records found") if response[:result].empty?
23
+ unless Thread.current[:audit_mode]
24
+ raise(StandardError, "No DNS records found") if response[:result].empty?
25
+ end
24
26
 
25
27
  response[:result].each do |record|
26
28
  if record[:proxiable]
27
29
  ui.info(
28
30
  "DNS proxy is turned #{record[:proxied] ? print_success("on") : print_failure("off")} " \
29
- "for #{record[:type]} record #{record[:name]}")
31
+ "for #{record[:type]} record #{record[:name]}", print_to_audit_log: false)
30
32
  end
31
33
  end
34
+
35
+ if Thread.current[:audit_mode]
36
+ response[:result].select { |record| record[:proxiable] }
37
+ end
32
38
  end
33
39
  end
34
40
  end
@@ -15,14 +15,20 @@ module Neetob
15
15
 
16
16
  def run
17
17
  zone_id = ZONE_IDS[domain.to_sym]
18
- raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
18
+ unless Thread.current[:audit_mode]
19
+ raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
20
+ end
19
21
 
20
22
  url = create_url(zone_id, "settings/min_tls_version")
21
23
  response = get(url)
22
24
  tls_version = response[:result][:value] == "1.2" ?
23
25
  print_success(response[:result][:value]) :
24
26
  print_failure(response[:result][:value])
25
- ui.info("Minimum TLS version is set to #{tls_version}")
27
+
28
+ ui.info("Minimum TLS version is set to #{tls_version}", print_to_audit_log: false)
29
+ if Thread.current[:audit_mode]
30
+ response[:result][:value]
31
+ end
26
32
  end
27
33
  end
28
34
  end
@@ -22,7 +22,10 @@ module Neetob
22
22
  ssl_mode = response[:result][:value] == "full" ?
23
23
  print_success(response[:result][:value]) :
24
24
  print_failure(response[:result][:value])
25
- ui.info("SSL Mode is set to #{ssl_mode}")
25
+ ui.info("SSL Mode is set to #{ssl_mode}", print_to_audit_log: false)
26
+ if Thread.current[:audit_mode]
27
+ response[:result][:value]
28
+ end
26
29
  end
27
30
  end
28
31
  end
@@ -15,39 +15,52 @@ module Neetob
15
15
 
16
16
  def run
17
17
  zone_id = ZONE_IDS[domain.to_sym]
18
- raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
18
+ unless Thread.current[:audit_mode]
19
+ raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?
20
+ end
19
21
 
20
22
  url = create_url(zone_id, "dns_records")
21
23
  response = get(url)
22
24
 
23
- raise(StandardError, "No DNS records found") if response[:result].empty?
25
+ unless Thread.current[:audit_mode]
26
+ raise(StandardError, "No DNS records found") if response[:result].empty?
27
+ end
24
28
 
25
29
  spf_txt_records = response[:result].filter { |dns|
26
30
  dns[:type] == "TXT" &&
27
31
  (dns[:content].start_with?("v=spf1") || dns[:content].start_with?("\"v=spf1"))
28
32
  }
29
33
 
34
+ audit_result = { spf_txt_records: }
30
35
  if spf_txt_records.count > 1
31
- ui.error("More than one TXT record found for SPF")
36
+ error = "More than one TXT record found for SPF"
37
+ ui.error(error, print_to_audit_log: false)
38
+ audit_result[:message] = error
32
39
  elsif spf_txt_records.count == 0
33
- ui.success("No TXT record for SPF present")
40
+ ui.success("No TXT record for SPF present", print_to_audit_log: false)
34
41
  else
35
- ui.success("Only one TXT record for SPF present")
42
+ ui.success("Only one TXT record for SPF present", print_to_audit_log: false)
36
43
  end
37
44
 
38
45
  spf_txt_records.each_with_index do |dns, index|
39
- ui.info("SPF TXT #{index + 1}: #{dns[:content]}")
46
+ ui.info("SPF TXT #{index + 1}: #{dns[:content]}", print_to_audit_log: false)
40
47
  end
41
48
 
42
49
  if spf_txt_records.count == 1
43
50
  unique_spf_txt_record = spf_txt_records.first
44
51
 
45
52
  if unique_spf_txt_record[:content].end_with?("-all") || unique_spf_txt_record[:content].end_with?("-all\"")
46
- ui.success("SPF TXT record is set to hard fail for SPF compliance")
53
+ ui.success("SPF TXT record is set to hard fail for SPF compliance", print_to_audit_log: false)
47
54
  else
48
- ui.error("SPF TXT record is not set to hard fail for SPF compliance")
55
+ hard_fail_not_set_message = "SPF TXT record is not set to hard fail for SPF compliance"
56
+ audit_result[:hard_fail_not_set_message] = hard_fail_not_set_message
57
+ ui.error(hard_fail_not_set_message, print_to_audit_log: false)
49
58
  end
50
59
  end
60
+
61
+ if Thread.current[:audit_mode]
62
+ audit_result
63
+ end
51
64
  end
52
65
  end
53
66
  end