neetob 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +138 -5
- data/lib/neetob/cli/cloudflare/verify_spf.rb +16 -1
- data/lib/neetob/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1faa095ee6bf4577f4f7eb7998ed75cc2f5d7b7cc4a8f58a77c2111bfee962d1
|
4
|
+
data.tar.gz: 8da64fc40ecb7511210cd83f227e2f54b59f492594510116594437b1cba70788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcdf7dd75fba94cae9bfb4ab69d39c28beda90ec0c018063739351180fe3840be26f95fc009faf9948e10605714455c6f2ac4b7b6cc0c70631cba220184de818
|
7
|
+
data.tar.gz: 9ea00f74654d339d5af9954928ce2076fc809ecebaaddf43a6de0b91089b819881d95bdf3554009f5a55ae2809bd12a64382f3d051ce29e723e79d28a339d288
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
neetob (0.5.
|
4
|
+
neetob (0.5.6)
|
5
5
|
brakeman (~> 5.0)
|
6
6
|
chronic
|
7
7
|
dotenv (~> 2.8.1)
|
@@ -142,7 +142,7 @@ GEM
|
|
142
142
|
chronic (0.10.2)
|
143
143
|
coderay (1.1.3)
|
144
144
|
colorize (1.1.0)
|
145
|
-
concurrent-ruby (1.3.
|
145
|
+
concurrent-ruby (1.3.4)
|
146
146
|
connection_pool (2.4.1)
|
147
147
|
crack (0.4.5)
|
148
148
|
rexml
|
@@ -172,7 +172,7 @@ GEM
|
|
172
172
|
ffi (1.17.0)
|
173
173
|
ffi (1.17.0-x86_64-darwin)
|
174
174
|
ffi (1.17.0-x86_64-linux-gnu)
|
175
|
-
fugit (1.11.
|
175
|
+
fugit (1.11.1)
|
176
176
|
et-orbi (~> 1, >= 1.2.11)
|
177
177
|
raabro (~> 1.4)
|
178
178
|
fury (0.0.1)
|
@@ -364,7 +364,7 @@ GEM
|
|
364
364
|
io-console (~> 0.5)
|
365
365
|
request_store (1.7.0)
|
366
366
|
rack (>= 1.4)
|
367
|
-
rexml (3.3.
|
367
|
+
rexml (3.3.6)
|
368
368
|
strscan
|
369
369
|
rinku (2.0.6)
|
370
370
|
rubocop (1.39.0)
|
@@ -427,7 +427,7 @@ GEM
|
|
427
427
|
strscan (3.1.0)
|
428
428
|
terminal-table (3.0.2)
|
429
429
|
unicode-display_width (>= 1.1.1, < 3)
|
430
|
-
thor (1.3.
|
430
|
+
thor (1.3.2)
|
431
431
|
tilt (2.3.0)
|
432
432
|
timeout (0.4.1)
|
433
433
|
tty-cursor (0.7.1)
|
data/README.md
CHANGED
@@ -23,15 +23,25 @@ The `neetob` gem gives a different set of commands for interacting with Github r
|
|
23
23
|
3. [Execute](#execute)
|
24
24
|
5. [Working with neetoDeploy](#working-with-neetodeploy)
|
25
25
|
1. [Config Vars](#config-vars)
|
26
|
-
|
26
|
+
2. [Autoscaling](#autoscaling)
|
27
|
+
6. [Working with Cloudflare](#working-with-cloudflare)
|
28
|
+
1. [SSL Mode](#ssl-mode)
|
29
|
+
2. [Minimum TLS Version](#minimum-tls-version)
|
30
|
+
3. [Always Use HTTPS](#always-use-https)
|
31
|
+
4. [Verify SPF](#verify-spf)
|
32
|
+
5. [Bot Protection Mode](#bot-protection-mode)
|
33
|
+
6. [DNS Proxy Status](#dns-proxy-status)
|
34
|
+
7. [Working with SRE helpers](#working-with-sre-helpers)
|
35
|
+
1. [Checking essential environment variables](#checking-essential-environment-variables)
|
36
|
+
8. [Working with Users](#working-with-users)
|
27
37
|
1. [Audit](#audit)
|
28
38
|
2. [Commits](#commits)
|
29
|
-
|
30
|
-
|
39
|
+
9. [Make Repos Uptodate](#make-repos-uptodate)
|
40
|
+
10. [Working with neeto Repos](#working-with-neeto-repos)
|
31
41
|
1. [Audit](#audit-1)
|
32
|
-
|
42
|
+
11. [Working with local Repos](#working-with-local-repos)
|
33
43
|
1. [ls](#ls)
|
34
|
-
|
44
|
+
12. [Testing](docs/testing.md)
|
35
45
|
|
36
46
|
## Usage
|
37
47
|
|
@@ -460,6 +470,129 @@ To update the above-mentioned config variables under the defined project, we can
|
|
460
470
|
neetob neetodeploy config_vars upsert --path_with_project_keys ~/Desktop/config.json --apps "neeto-*-staging"
|
461
471
|
```
|
462
472
|
|
473
|
+
### Autoscaling
|
474
|
+
|
475
|
+
Use the following commands to check whether autoscaling is enabled or not for an application deployed in NeetoDeploy.
|
476
|
+
|
477
|
+
```
|
478
|
+
neetodeploy autoscaling_config list -a neeto-replay-web-production
|
479
|
+
```
|
480
|
+
|
481
|
+
This command will print whether or not autoscaling is enabled for all the process types specified in your Procfile like so.
|
482
|
+
|
483
|
+
```
|
484
|
+
{"release"=>false, "web"=>true, "worker"=>true}
|
485
|
+
```
|
486
|
+
|
487
|
+
## Working with Cloudflare
|
488
|
+
|
489
|
+
The `cloudflare` command interacts with resources in Cloudflare. For all the following commands you need to pass `CLOUDFLARE_API_KEY` as an environment variable.
|
490
|
+
|
491
|
+
### SSL Mode
|
492
|
+
|
493
|
+
Use the `ssl_mode` command to check if SSL/TLS is set to Full or not in Cloudflare.
|
494
|
+
|
495
|
+
```
|
496
|
+
CLOUDFLARE_API_KEY="Bearer APIKEY" neetob cloudflare ssl_mode -d "neetocode.com"
|
497
|
+
```
|
498
|
+
|
499
|
+
This will print the output like so:
|
500
|
+
|
501
|
+
```
|
502
|
+
SSL Mode is set to full
|
503
|
+
```
|
504
|
+
or like so if the SSL mode is set to `Full (strict)`:
|
505
|
+
|
506
|
+
```
|
507
|
+
SSL Mode is set to strict
|
508
|
+
```
|
509
|
+
|
510
|
+
### Minimum TLS Version
|
511
|
+
|
512
|
+
Use the `min_tls_version` command to check the value of the Minimum TLS version setting in Cloudflare for your domain.
|
513
|
+
|
514
|
+
```
|
515
|
+
CLOUDFLARE_API_KEY="Bearer APIKEY" neetob cloudflare min_tls_version -d "neetocode.com"
|
516
|
+
```
|
517
|
+
|
518
|
+
This will print the output like so:
|
519
|
+
|
520
|
+
```
|
521
|
+
Minimum TLS version is set to 1.2
|
522
|
+
```
|
523
|
+
|
524
|
+
### Always Use HTTPS
|
525
|
+
|
526
|
+
Use the `always_use_https` command to check if always use HTTPS is turned on in Cloudflare for your domain.
|
527
|
+
|
528
|
+
```
|
529
|
+
CLOUDFLARE_API_KEY="Bearer APIKEY" neetob cloudflare always_use_https -d "neetocode.com"
|
530
|
+
```
|
531
|
+
|
532
|
+
This will print the output like so:
|
533
|
+
|
534
|
+
```
|
535
|
+
Always use HTTPS is turned on
|
536
|
+
```
|
537
|
+
|
538
|
+
### Verify SPF
|
539
|
+
|
540
|
+
Use the `verify_spf` command to check if SPF settings are configured properly or not in Cloudflare for your domain.
|
541
|
+
|
542
|
+
```
|
543
|
+
CLOUDFLARE_API_KEY="Bearer uw_ec9MQAaLybH27dNQiZ4t1dELLx061A6hbfWM-" neetob cloudflare verify_spf -d "neetocode.com"
|
544
|
+
```
|
545
|
+
|
546
|
+
This will print the output like so:
|
547
|
+
|
548
|
+
```
|
549
|
+
Only one TXT record for SPF present
|
550
|
+
SPF TXT 1: v=spf1 include:_spf.mlsend.com include:_spf.google.com -all
|
551
|
+
```
|
552
|
+
|
553
|
+
Each domain should have only one TXT record for SPF.
|
554
|
+
|
555
|
+
### Bot Protection Mode
|
556
|
+
|
557
|
+
Use the `bot_fight_mode` command of to check if bot protection is turned on or not in Cloudflare.
|
558
|
+
|
559
|
+
```
|
560
|
+
CLOUDFLARE_API_KEY="Bearer uw_ec9MQAaLybH27dNQiZ4t1dELLx061A6hbfWM-" neetob cloudflare bot_fight_mode -d "neetocode.com"
|
561
|
+
```
|
562
|
+
|
563
|
+
This will print the output like so:
|
564
|
+
|
565
|
+
```
|
566
|
+
Bot fight mode is turned on
|
567
|
+
```
|
568
|
+
|
569
|
+
### DNS Proxy status
|
570
|
+
|
571
|
+
Use the `dns_proxy` command to check if DNS proxy is enabled for all DNS records of your domain in Cloudflare.
|
572
|
+
|
573
|
+
```
|
574
|
+
CLOUDFLARE_API_KEY="Bearer uw_ec9MQAaLybH27dNQiZ4t1dELLx061A6hbfWM-" neetob cloudflare dns_proxy -d "neetocode.com"
|
575
|
+
```
|
576
|
+
|
577
|
+
This will print the output like so:
|
578
|
+
|
579
|
+
```
|
580
|
+
DNS proxy is turned on for A record neetocode.com
|
581
|
+
DNS proxy is turned on for A record *.neetocode.com
|
582
|
+
```
|
583
|
+
|
584
|
+
## Working with SRE helpers
|
585
|
+
|
586
|
+
### Checking essential environment variables
|
587
|
+
|
588
|
+
The `neetob sre` command can be used to run a check against all Neeto apps to confirm whether or not the above mentioned essential environment variables are set in the application or not.
|
589
|
+
|
590
|
+
You can run it like so and it will print a list of all the apps, whether the environment variables are set, and if they're missing any it will print a list of missing envs.
|
591
|
+
|
592
|
+
```
|
593
|
+
neetob sre check_essential_env
|
594
|
+
```
|
595
|
+
|
463
596
|
## Working with users
|
464
597
|
|
465
598
|
The `users` command interacts with the contributors of neeto applications.
|
@@ -22,10 +22,15 @@ module Neetob
|
|
22
22
|
|
23
23
|
raise(StandardError, "No DNS records found") if response[:result].empty?
|
24
24
|
|
25
|
-
spf_txt_records = response[:result].filter { |dns|
|
25
|
+
spf_txt_records = response[:result].filter { |dns|
|
26
|
+
dns[:type] == "TXT" &&
|
27
|
+
(dns[:content].start_with?("v=spf1") || dns[:content].start_with?("\"v=spf1"))
|
28
|
+
}
|
26
29
|
|
27
30
|
if spf_txt_records.count > 1
|
28
31
|
ui.error("More than one TXT record found for SPF")
|
32
|
+
elsif spf_txt_records.count == 0
|
33
|
+
ui.success("No TXT record for SPF present")
|
29
34
|
else
|
30
35
|
ui.success("Only one TXT record for SPF present")
|
31
36
|
end
|
@@ -33,6 +38,16 @@ module Neetob
|
|
33
38
|
spf_txt_records.each_with_index do |dns, index|
|
34
39
|
ui.info("SPF TXT #{index + 1}: #{dns[:content]}")
|
35
40
|
end
|
41
|
+
|
42
|
+
if spf_txt_records.count == 1
|
43
|
+
unique_spf_txt_record = spf_txt_records.first
|
44
|
+
|
45
|
+
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")
|
47
|
+
else
|
48
|
+
ui.error("SPF TXT record is not set to hard fail for SPF compliance")
|
49
|
+
end
|
50
|
+
end
|
36
51
|
end
|
37
52
|
end
|
38
53
|
end
|
data/lib/neetob/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neetob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Udai Gupta
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -255,7 +255,7 @@ metadata:
|
|
255
255
|
homepage_uri: https://github.com/bigbinary/neetob
|
256
256
|
source_code_uri: https://github.com/bigbinary/neetob
|
257
257
|
changelog_uri: https://github.com/bigbinary/neetob/blob/main/CHANGELOG.md
|
258
|
-
post_install_message:
|
258
|
+
post_install_message:
|
259
259
|
rdoc_options: []
|
260
260
|
require_paths:
|
261
261
|
- lib
|
@@ -271,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
271
|
version: '0'
|
272
272
|
requirements: []
|
273
273
|
rubygems_version: 3.4.10
|
274
|
-
signing_key:
|
274
|
+
signing_key:
|
275
275
|
specification_version: 4
|
276
276
|
summary: Provides a set of helper scripts for Github and Heroku.
|
277
277
|
test_files: []
|