neetob 0.5.80 → 0.5.81
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/Gemfile.lock +1 -1
- data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/always_use_https_is_enabled.rb +1 -1
- data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/automatic_https_rewrites_is_enabled.rb +1 -1
- data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/cdn_dns_entry_has_proxy_disabled.rb +62 -0
- data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/main.rb +5 -2
- data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/minimum_tls_version_is_one_point_two.rb +1 -1
- data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/spf_records_are_valid.rb +1 -1
- data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/{dns_entry_has_proxy_status.rb → wildcard_dns_entry_has_proxy_enabled.rb} +2 -2
- data/lib/neetob/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd15337dac6d807d029e98124b09d3eba0c7619656d49a52827f71f7cf8d17ee
|
|
4
|
+
data.tar.gz: 63ba27b666b6f58f67530efd6b6a9c18392543af82689813a41bf4df73e6515c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15a71afae489ecff2ade69a0dec180fe5dd9857dab529b5c82ac1b574b077bfd24f78ce510089d857864c039dd35c1c51f9afc809309559473c67dc22b9792fe
|
|
7
|
+
data.tar.gz: 3cb346f2aeca61dbf16312ceede8948834b7c0860480dc54fa4203acba3e2ffe86e900b5561d5eda665776403c35bbb2213d5f844eadd841c18de9bd14540396
|
data/Gemfile.lock
CHANGED
data/lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/always_use_https_is_enabled.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Neetob
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def run
|
|
16
|
-
ui.success "### 3.2.
|
|
16
|
+
ui.success "### 3.2.5. Checking whether always use HTTPS is enabled"
|
|
17
17
|
|
|
18
18
|
domains_data = [["Domain", "Always use HTTPS", "Audit Passed"]]
|
|
19
19
|
ui.info("\n", print_to_audit_log: false)
|
|
@@ -13,7 +13,7 @@ module Neetob
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def run
|
|
16
|
-
ui.success "### 3.2.
|
|
16
|
+
ui.success "### 3.2.8. Checking whether Automatic HTTPS rewrites is enabled"
|
|
17
17
|
|
|
18
18
|
domains_data = [["Domain", "Automatic HTTPS rewrites", "Audit Passed"]]
|
|
19
19
|
ui.info("\n", print_to_audit_log: false)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "../../github_issue_creation"
|
|
4
|
+
|
|
5
|
+
module Neetob
|
|
6
|
+
class CLI
|
|
7
|
+
module MonthlyAudit
|
|
8
|
+
module InstancesAndAddons
|
|
9
|
+
module Cloudflare
|
|
10
|
+
class CdnDnsEntryHasProxyDisabled < CLI::Base
|
|
11
|
+
DOMAINS_TO_IGNORE_AUDIT_RESULT_FOR = [
|
|
12
|
+
"neeto.com",
|
|
13
|
+
"bigbinary.com",
|
|
14
|
+
]
|
|
15
|
+
def initialize
|
|
16
|
+
super()
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def run
|
|
20
|
+
ui.success "### 3.2.3. CDN DNS entry has proxy disabled"
|
|
21
|
+
|
|
22
|
+
domains_data = [["Domain", "DNS proxy status", "Audit Passed"]]
|
|
23
|
+
ui.info("\n", print_to_audit_log: false)
|
|
24
|
+
last_dns_proxy_status = nil
|
|
25
|
+
Neetob::CLI::Cloudflare::Base::ZONE_IDS.keys.select { |domain|
|
|
26
|
+
domain.to_s.include?(".com") }.map do |domain|
|
|
27
|
+
ui.info("Checking proxy status for CDN DNS entries for #{domain}", print_to_audit_log: false)
|
|
28
|
+
domain = domain.to_s
|
|
29
|
+
proxiable_records = Neetob::CLI::Cloudflare::DnsProxyStatus.new(domain).run
|
|
30
|
+
record_to_check = proxiable_records.select { |record| record[:name] == "cdn.#{domain}" }.first
|
|
31
|
+
if record_to_check.nil?
|
|
32
|
+
domains_data << [domain, "No cdn. records found", "Ignored"]
|
|
33
|
+
else
|
|
34
|
+
is_cdn_subdomain_proxied = record_to_check[:proxied]
|
|
35
|
+
audit_passed = DOMAINS_TO_IGNORE_AUDIT_RESULT_FOR.include?(domain.to_s) ?
|
|
36
|
+
"Ignored" :
|
|
37
|
+
(is_cdn_subdomain_proxied ? "No" : "Yes")
|
|
38
|
+
proxy_status = is_cdn_subdomain_proxied ? "on" : "off"
|
|
39
|
+
dns_proxy_status = "cdn. record has proxying turned #{proxy_status}"
|
|
40
|
+
same_as_last_dns_proxy_status = dns_proxy_status == last_dns_proxy_status
|
|
41
|
+
last_dns_proxy_status = dns_proxy_status
|
|
42
|
+
if audit_passed == "No"
|
|
43
|
+
repo = domain_to_repo(domain.to_s)
|
|
44
|
+
issue_url = GithubIssueCreation.new.create_issue(
|
|
45
|
+
repo:, title: "Disable proxying for CDN DNS on #{domain}",
|
|
46
|
+
description: dns_proxy_status)
|
|
47
|
+
audit_passed += " #{issue_url}"
|
|
48
|
+
end
|
|
49
|
+
if same_as_last_dns_proxy_status
|
|
50
|
+
dns_proxy_status = "''"
|
|
51
|
+
end
|
|
52
|
+
domains_data << [domain, dns_proxy_status, audit_passed]
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
ui.print_table(domains_data)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative "ssl_tls_encryption_mode_set_to_full"
|
|
4
|
-
require_relative "
|
|
4
|
+
require_relative "wildcard_dns_entry_has_proxy_enabled"
|
|
5
|
+
require_relative "cdn_dns_entry_has_proxy_disabled"
|
|
5
6
|
require_relative "minimum_tls_version_is_one_point_two"
|
|
6
7
|
require_relative "always_use_https_is_enabled"
|
|
7
8
|
require_relative "spf_records_are_valid"
|
|
@@ -20,7 +21,9 @@ module Neetob
|
|
|
20
21
|
def run
|
|
21
22
|
SslTlsEncryptionModeSetToFull.new.run
|
|
22
23
|
ui.info "\n"
|
|
23
|
-
|
|
24
|
+
WildcardDnsEntryHasProxyEnabled.new.run
|
|
25
|
+
ui.info "\n"
|
|
26
|
+
CdnDnsEntryHasProxyDisabled.new.run
|
|
24
27
|
ui.info "\n"
|
|
25
28
|
MinimumTlsVersionIsOnePointTwo.new.run
|
|
26
29
|
ui.info "\n"
|
|
@@ -14,7 +14,7 @@ module Neetob
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def run
|
|
17
|
-
ui.success "### 3.2.
|
|
17
|
+
ui.success "### 3.2.4. Checking whether Minimum TLS version is 1.2"
|
|
18
18
|
|
|
19
19
|
domains_data = [["Domain", "Minimum TLS version", "Audit Passed"]]
|
|
20
20
|
ui.info("\n", print_to_audit_log: false)
|
|
@@ -12,7 +12,7 @@ module Neetob
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def run
|
|
15
|
-
ui.success "### 3.2.
|
|
15
|
+
ui.success "### 3.2.6. Checking whether SPF records are valid"
|
|
16
16
|
|
|
17
17
|
domains_data = [["Domain", "SPF records data", "Comments", "Audit Passed"]]
|
|
18
18
|
ui.info("\n", print_to_audit_log: false)
|
|
@@ -7,7 +7,7 @@ module Neetob
|
|
|
7
7
|
module MonthlyAudit
|
|
8
8
|
module InstancesAndAddons
|
|
9
9
|
module Cloudflare
|
|
10
|
-
class
|
|
10
|
+
class WildcardDnsEntryHasProxyEnabled < CLI::Base
|
|
11
11
|
DOMAINS_TO_IGNORE_AUDIT_RESULT_FOR = [
|
|
12
12
|
"neeto.com",
|
|
13
13
|
"bigbinary.com",
|
|
@@ -18,7 +18,7 @@ module Neetob
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def run
|
|
21
|
-
ui.success "### 3.2.2.
|
|
21
|
+
ui.success "### 3.2.2. Wildcard DNS entry has proxy enabled"
|
|
22
22
|
|
|
23
23
|
domains_data = [["Domain", "DNS proxy status", "Audit Passed"]]
|
|
24
24
|
ui.info("\n", print_to_audit_log: false)
|
data/lib/neetob/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.81
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Udai Gupta
|
|
@@ -294,11 +294,12 @@ files:
|
|
|
294
294
|
- lib/neetob/cli/monthly_audit/github_issue_creation.rb
|
|
295
295
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/always_use_https_is_enabled.rb
|
|
296
296
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/automatic_https_rewrites_is_enabled.rb
|
|
297
|
-
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/
|
|
297
|
+
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/cdn_dns_entry_has_proxy_disabled.rb
|
|
298
298
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/main.rb
|
|
299
299
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/minimum_tls_version_is_one_point_two.rb
|
|
300
300
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/spf_records_are_valid.rb
|
|
301
301
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/ssl_tls_encryption_mode_set_to_full.rb
|
|
302
|
+
- lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/wildcard_dns_entry_has_proxy_enabled.rb
|
|
302
303
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cronitor/main.rb
|
|
303
304
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cronitor/setup_correctly_for_apps.rb
|
|
304
305
|
- lib/neetob/cli/monthly_audit/instances_and_addons/cronitor/setup_correctly_for_help_center.rb
|