site-inspector 3.2.0 → 4.0.0
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/.github/workflows/ci.yml +30 -0
- data/.rubocop.yml +1 -5
- data/.rubocop_todo.yml +185 -79
- data/.ruby-version +1 -1
- data/CHANGELOG.md +71 -0
- data/Gemfile +0 -2
- data/README.md +8 -14
- data/bin/site-inspector +13 -13
- data/lib/cliver/dependency_ext.rb +2 -2
- data/lib/data/well-known.yml +51 -0
- data/lib/site-inspector/domain.rb +27 -15
- data/lib/site-inspector/domain_parser.rb +11 -0
- data/lib/site-inspector/{checks → endpoint}/accessibility.rb +6 -4
- data/lib/site-inspector/{checks → endpoint}/check.rb +5 -1
- data/lib/site-inspector/endpoint/content.rb +151 -0
- data/lib/site-inspector/{checks → endpoint}/cookies.rb +13 -5
- data/lib/site-inspector/{checks → endpoint}/dns.rb +42 -18
- data/lib/site-inspector/endpoint/headers.rb +55 -0
- data/lib/site-inspector/{checks → endpoint}/hsts.rb +36 -5
- data/lib/site-inspector/endpoint/wappalyzer.rb +68 -0
- data/lib/site-inspector/endpoint/well_known.rb +95 -0
- data/lib/site-inspector/endpoint/whois.rb +56 -0
- data/lib/site-inspector/endpoint.rb +60 -23
- data/lib/site-inspector/formatter.rb +118 -0
- data/lib/site-inspector/version.rb +1 -1
- data/lib/site-inspector.rb +34 -30
- data/package-lock.json +670 -23
- data/package.json +2 -1
- data/renovate.json +4 -0
- data/script/benchmark +8 -0
- data/script/cibuild +2 -2
- data/script/console +1 -1
- data/script/pa11y-version +1 -1
- data/script/release +11 -4
- data/script/update-well-known +18 -0
- data/site-inspector.gemspec +16 -9
- data/spec/cliver/dependency_ext_spec.rb +21 -0
- data/spec/{site_inspector_domain_spec.rb → site_inspector/domain_spec.rb} +71 -9
- data/spec/{checks/site_inspector_endpoint_accessibility_spec.rb → site_inspector/endpoint/accessibility_spec.rb} +9 -7
- data/spec/{checks/site_inspector_endpoint_content_spec.rb → site_inspector/endpoint/content_spec.rb} +14 -4
- data/spec/{checks/site_inspector_endpoint_cookies_spec.rb → site_inspector/endpoint/cookies_spec.rb} +27 -14
- data/spec/{checks/site_inspector_endpoint_dns_spec.rb → site_inspector/endpoint/dns_spec.rb} +87 -9
- data/spec/{checks/site_inspector_endpoint_headers_spec.rb → site_inspector/endpoint/headers_spec.rb} +0 -7
- data/spec/{checks/site_inspector_endpoint_hsts_spec.rb → site_inspector/endpoint/hsts_spec.rb} +8 -8
- data/spec/site_inspector/endpoint/wappalyzer_spec.rb +20 -0
- data/spec/site_inspector/endpoint/well_known_spec.rb +12 -0
- data/spec/{checks/site_inspector_endpoint_whois_spec.rb → site_inspector/endpoint/whois_spec.rb} +2 -1
- data/spec/{site_inspector_endpoint_spec.rb → site_inspector/endpoint_spec.rb} +59 -3
- data/spec/site_inspector_spec.rb +58 -11
- data/spec/spec_helper.rb +9 -2
- metadata +100 -92
- data/.travis.yml +0 -9
- data/lib/site-inspector/cache.rb +0 -17
- data/lib/site-inspector/checks/content.rb +0 -85
- data/lib/site-inspector/checks/headers.rb +0 -68
- data/lib/site-inspector/checks/sniffer.rb +0 -67
- data/lib/site-inspector/checks/wappalyzer.rb +0 -62
- data/lib/site-inspector/checks/whois.rb +0 -36
- data/lib/site-inspector/disk_cache.rb +0 -42
- data/lib/site-inspector/rails_cache.rb +0 -13
- data/spec/checks/site_inspector_endpoint_sniffer_spec.rb +0 -150
- data/spec/checks/site_inspector_endpoint_wappalyzer_spec.rb +0 -34
- data/spec/site_inspector_cache_spec.rb +0 -15
- data/spec/site_inspector_disk_cache_spec.rb +0 -39
- /data/lib/site-inspector/{checks → endpoint}/https.rb +0 -0
- /data/spec/{checks/site_inspector_endpoint_check_spec.rb → site_inspector/endpoint/check_spec.rb} +0 -0
- /data/spec/{checks/site_inspector_endpoint_https_spec.rb → site_inspector/endpoint/https_spec.rb} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe SiteInspector::Endpoint::WellKnown do
|
|
6
|
+
subject do
|
|
7
|
+
stub_request(:head, 'http://example.com/')
|
|
8
|
+
.to_return(status: 200, headers: { foo: 'bar' })
|
|
9
|
+
endpoint = SiteInspector::Endpoint.new('http://example.com')
|
|
10
|
+
described_class.new(endpoint)
|
|
11
|
+
end
|
|
12
|
+
end
|
data/spec/{checks/site_inspector_endpoint_whois_spec.rb → site_inspector/endpoint/whois_spec.rb}
RENAMED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
require 'spec_helper'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# NOTE: these tests make external WHOIS calls; run them with LIVE=1
|
|
6
|
+
describe SiteInspector::Endpoint::Whois, :live do
|
|
6
7
|
subject do
|
|
7
8
|
stub_request(:head, site).to_return(status: 200)
|
|
8
9
|
endpoint = SiteInspector::Endpoint.new(site)
|
|
@@ -7,12 +7,13 @@ describe SiteInspector::Endpoint do
|
|
|
7
7
|
|
|
8
8
|
it 'downcases the host' do
|
|
9
9
|
endpoint = described_class.new('http://EXAMPLE.com')
|
|
10
|
-
expect(endpoint.host).to eql('example.com')
|
|
10
|
+
expect(endpoint.host.to_s).to eql('example.com')
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
it 'strips www from the host' do
|
|
14
|
+
skip
|
|
14
15
|
endpoint = described_class.new('http://www.example.com')
|
|
15
|
-
expect(endpoint.host).to eql('example.com')
|
|
16
|
+
expect(endpoint.host.to_s).to eql('example.com')
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
it 'returns the uri' do
|
|
@@ -114,6 +115,22 @@ describe SiteInspector::Endpoint do
|
|
|
114
115
|
expect(subject.response_code).to eql('200')
|
|
115
116
|
end
|
|
116
117
|
|
|
118
|
+
it 'is not up when there is no response' do
|
|
119
|
+
allow(subject).to receive(:response).and_return(nil)
|
|
120
|
+
expect(subject.up?).to be(false)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
it 'is up for 2xx and 3xx responses and down otherwise' do
|
|
124
|
+
allow(subject).to receive(:response) { Typhoeus::Response.new(code: 200) }
|
|
125
|
+
expect(subject.up?).to be(true)
|
|
126
|
+
|
|
127
|
+
allow(subject).to receive(:response) { Typhoeus::Response.new(code: 301) }
|
|
128
|
+
expect(subject.up?).to be(true)
|
|
129
|
+
|
|
130
|
+
allow(subject).to receive(:response) { Typhoeus::Response.new(code: 500) }
|
|
131
|
+
expect(subject.up?).to be(false)
|
|
132
|
+
end
|
|
133
|
+
|
|
117
134
|
it 'knows if a response has timed out' do
|
|
118
135
|
allow(subject).to receive(:response) { Typhoeus::Response.new(return_code: :operation_timedout) }
|
|
119
136
|
expect(subject.timed_out?).to be(true)
|
|
@@ -198,6 +215,44 @@ describe SiteInspector::Endpoint do
|
|
|
198
215
|
expect(subject.redirect?).to be(false)
|
|
199
216
|
end
|
|
200
217
|
|
|
218
|
+
it 'resolves protocol-relative redirects against the current scheme' do
|
|
219
|
+
stub_request(:head, 'http://example.com/')
|
|
220
|
+
.to_return(status: 301, headers: { location: '//www.example.com/' })
|
|
221
|
+
|
|
222
|
+
expect(subject.redirect?).to be(true)
|
|
223
|
+
expect(subject.redirect.uri.to_s).to eql('http://www.example.com/')
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
it 'keeps the https scheme for protocol-relative redirects to another host' do
|
|
227
|
+
endpoint = described_class.new('https://example.com')
|
|
228
|
+
stub_request(:head, 'https://example.com/')
|
|
229
|
+
.to_return(status: 301, headers: { location: '//other.com/' })
|
|
230
|
+
|
|
231
|
+
expect(endpoint.redirect.uri.to_s).to eql('https://other.com/')
|
|
232
|
+
expect(endpoint.redirect.scheme).to eql('https')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
it 'treats query-only redirects as internal' do
|
|
236
|
+
stub_request(:head, 'http://example.com/')
|
|
237
|
+
.to_return(status: 301, headers: { location: '?q=1' })
|
|
238
|
+
|
|
239
|
+
expect(subject.redirect?).to be(false)
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
it 'treats dot-segment redirects as internal' do
|
|
243
|
+
stub_request(:head, 'http://example.com/')
|
|
244
|
+
.to_return(status: 301, headers: { location: '../x' })
|
|
245
|
+
|
|
246
|
+
expect(subject.redirect?).to be(false)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
it 'handles a redirect without a location header' do
|
|
250
|
+
stub_request(:head, 'http://example.com/')
|
|
251
|
+
.to_return(status: 301)
|
|
252
|
+
|
|
253
|
+
expect(subject.redirect?).to be(false)
|
|
254
|
+
end
|
|
255
|
+
|
|
201
256
|
it 'knows what it resolves to' do
|
|
202
257
|
stub_request(:head, 'http://example.com/')
|
|
203
258
|
.to_return(status: 301, headers: { location: 'http://www.example.com' })
|
|
@@ -233,9 +288,10 @@ describe SiteInspector::Endpoint do
|
|
|
233
288
|
|
|
234
289
|
context 'checks' do
|
|
235
290
|
it 'identifies checks' do
|
|
236
|
-
expected =
|
|
291
|
+
expected = 10
|
|
237
292
|
pa11y = SiteInspector::Endpoint::Accessibility.pa11y?
|
|
238
293
|
expected -= 1 unless pa11y
|
|
294
|
+
expected -= 1 unless SiteInspector::Endpoint::Wappalyzer.wappalyzer?
|
|
239
295
|
expect(described_class.checks.count).to eql(expected)
|
|
240
296
|
end
|
|
241
297
|
|
data/spec/site_inspector_spec.rb
CHANGED
|
@@ -4,22 +4,72 @@ require 'spec_helper'
|
|
|
4
4
|
|
|
5
5
|
describe SiteInspector do
|
|
6
6
|
before do
|
|
7
|
-
described_class.instance_variable_set(
|
|
8
|
-
described_class.instance_variable_set(
|
|
7
|
+
described_class.instance_variable_set(:@cache, nil)
|
|
8
|
+
described_class.instance_variable_set(:@timeout, nil)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
it 'defaults to
|
|
11
|
+
it 'defaults to an in-memory cache' do
|
|
12
12
|
with_env 'CACHE', nil do
|
|
13
|
-
expect(described_class.cache
|
|
13
|
+
expect(described_class.cache).to be_a(Typhoeus::Cache::Rails)
|
|
14
|
+
store = described_class.cache.instance_variable_get(:@cache)
|
|
15
|
+
expect(store).to be_a(ActiveSupport::Cache::MemoryStore)
|
|
14
16
|
end
|
|
15
17
|
end
|
|
16
18
|
|
|
17
|
-
it 'uses
|
|
18
|
-
with_env 'CACHE',
|
|
19
|
-
expect(described_class.cache
|
|
19
|
+
it 'uses a file cache when requested' do
|
|
20
|
+
with_env 'CACHE', tmpdir do
|
|
21
|
+
expect(described_class.cache).to be_a(Typhoeus::Cache::Rails)
|
|
22
|
+
store = described_class.cache.instance_variable_get(:@cache)
|
|
23
|
+
expect(store).to be_a(ActiveSupport::Cache::FileStore)
|
|
24
|
+
expect(store.cache_path).to eql(tmpdir)
|
|
20
25
|
end
|
|
21
26
|
end
|
|
22
27
|
|
|
28
|
+
context 'with the response cache' do
|
|
29
|
+
let(:url) { 'https://example.com/' }
|
|
30
|
+
let(:response) do
|
|
31
|
+
Typhoeus::Response.new(code: 200, body: 'content', headers: { 'Server' => 'nginx' })
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
before { FileUtils.rm_rf(tmpdir) }
|
|
35
|
+
|
|
36
|
+
after { FileUtils.rm_rf(tmpdir) }
|
|
37
|
+
|
|
38
|
+
{
|
|
39
|
+
'memory' => -> { ActiveSupport::Cache::MemoryStore.new },
|
|
40
|
+
'file' => -> { ActiveSupport::Cache::FileStore.new(tmpdir) }
|
|
41
|
+
}.each do |name, store|
|
|
42
|
+
it "round-trips a response through the #{name} store using an equal request" do
|
|
43
|
+
cache = Typhoeus::Cache::Rails.new(store.call)
|
|
44
|
+
request = Typhoeus::Request.new(url, described_class.typhoeus_defaults)
|
|
45
|
+
request.finish(response)
|
|
46
|
+
cache.set(request, response)
|
|
47
|
+
|
|
48
|
+
cached = cache.get(Typhoeus::Request.new(url, described_class.typhoeus_defaults))
|
|
49
|
+
expect(cached).to be_a(Typhoeus::Response)
|
|
50
|
+
expect(cached.code).to be(200)
|
|
51
|
+
expect(cached.body).to eql('content')
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it 'misses for a different request' do
|
|
56
|
+
cache = Typhoeus::Cache::Rails.new(ActiveSupport::Cache::MemoryStore.new)
|
|
57
|
+
cache.set(Typhoeus::Request.new(url, described_class.typhoeus_defaults), response)
|
|
58
|
+
|
|
59
|
+
expect(cache.get(Typhoeus::Request.new('https://example.org/', described_class.typhoeus_defaults))).to be_nil
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it 'restores the environment when a with_env block raises' do
|
|
64
|
+
ENV['SITE_INSPECTOR_TEST_ENV'] = 'before'
|
|
65
|
+
expect do
|
|
66
|
+
with_env('SITE_INSPECTOR_TEST_ENV', 'during') { raise 'boom' }
|
|
67
|
+
end.to raise_error('boom')
|
|
68
|
+
expect(ENV.fetch('SITE_INSPECTOR_TEST_ENV')).to eql('before')
|
|
69
|
+
ensure
|
|
70
|
+
ENV.delete('SITE_INSPECTOR_TEST_ENV')
|
|
71
|
+
end
|
|
72
|
+
|
|
23
73
|
it 'returns the default timeout' do
|
|
24
74
|
expect(described_class.timeout).to be(10)
|
|
25
75
|
end
|
|
@@ -38,10 +88,7 @@ describe SiteInspector do
|
|
|
38
88
|
accept_encoding: 'gzip',
|
|
39
89
|
followlocation: false,
|
|
40
90
|
method: :head,
|
|
41
|
-
timeout: 10
|
|
42
|
-
headers: {
|
|
43
|
-
'User-Agent' => "Mozilla/5.0 (compatible; SiteInspector/#{SiteInspector::VERSION}; +https://github.com/benbalter/site-inspector)"
|
|
44
|
-
}
|
|
91
|
+
timeout: 10
|
|
45
92
|
}
|
|
46
93
|
expect(described_class.typhoeus_defaults).to eql(expected)
|
|
47
94
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -3,14 +3,21 @@
|
|
|
3
3
|
require 'bundler/setup'
|
|
4
4
|
require 'webmock/rspec'
|
|
5
5
|
require 'fileutils'
|
|
6
|
-
|
|
6
|
+
require 'site-inspector'
|
|
7
7
|
|
|
8
8
|
WebMock.disable_net_connect!
|
|
9
9
|
|
|
10
|
+
# Specs tagged :live hit real DNS and WHOIS servers, whose answers change over
|
|
11
|
+
# time. Skip them unless LIVE=1 is set.
|
|
12
|
+
RSpec.configure do |config|
|
|
13
|
+
config.filter_run_excluding :live unless ENV['LIVE']
|
|
14
|
+
end
|
|
15
|
+
|
|
10
16
|
def with_env(key, value)
|
|
11
|
-
old_env = ENV
|
|
17
|
+
old_env = ENV.fetch(key, nil)
|
|
12
18
|
ENV[key] = value
|
|
13
19
|
yield
|
|
20
|
+
ensure
|
|
14
21
|
ENV[key] = old_env
|
|
15
22
|
end
|
|
16
23
|
|
metadata
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: site-inspector
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Balter
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: activesupport
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '7.0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '7.0'
|
|
13
26
|
- !ruby/object:Gem::Dependency
|
|
14
27
|
name: cliver
|
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -39,137 +52,143 @@ dependencies:
|
|
|
39
52
|
- !ruby/object:Gem::Version
|
|
40
53
|
version: '1.1'
|
|
41
54
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
55
|
+
name: csv
|
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
|
44
57
|
requirements:
|
|
45
58
|
- - "~>"
|
|
46
59
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
60
|
+
version: '3.0'
|
|
48
61
|
type: :runtime
|
|
49
62
|
prerelease: false
|
|
50
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
64
|
requirements:
|
|
52
65
|
- - "~>"
|
|
53
66
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
67
|
+
version: '3.0'
|
|
55
68
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
69
|
+
name: dnsruby
|
|
57
70
|
requirement: !ruby/object:Gem::Requirement
|
|
58
71
|
requirements:
|
|
59
72
|
- - "~>"
|
|
60
73
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
74
|
+
version: '1.0'
|
|
62
75
|
type: :runtime
|
|
63
76
|
prerelease: false
|
|
64
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
78
|
requirements:
|
|
66
79
|
- - "~>"
|
|
67
80
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
81
|
+
version: '1.0'
|
|
69
82
|
- !ruby/object:Gem::Dependency
|
|
70
83
|
name: gman
|
|
71
84
|
requirement: !ruby/object:Gem::Requirement
|
|
72
85
|
requirements:
|
|
73
|
-
- - "~>"
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '7.0'
|
|
76
86
|
- - ">="
|
|
77
87
|
- !ruby/object:Gem::Version
|
|
78
88
|
version: 7.0.4
|
|
89
|
+
- - "<"
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: '9'
|
|
79
92
|
type: :runtime
|
|
80
93
|
prerelease: false
|
|
81
94
|
version_requirements: !ruby/object:Gem::Requirement
|
|
82
95
|
requirements:
|
|
83
|
-
- - "~>"
|
|
84
|
-
- !ruby/object:Gem::Version
|
|
85
|
-
version: '7.0'
|
|
86
96
|
- - ">="
|
|
87
97
|
- !ruby/object:Gem::Version
|
|
88
98
|
version: 7.0.4
|
|
99
|
+
- - "<"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '9'
|
|
89
102
|
- !ruby/object:Gem::Dependency
|
|
90
|
-
name:
|
|
103
|
+
name: http-cookie
|
|
91
104
|
requirement: !ruby/object:Gem::Requirement
|
|
92
105
|
requirements:
|
|
93
106
|
- - "~>"
|
|
94
107
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
108
|
+
version: '1.0'
|
|
96
109
|
type: :runtime
|
|
97
110
|
prerelease: false
|
|
98
111
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
112
|
requirements:
|
|
100
113
|
- - "~>"
|
|
101
114
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '
|
|
115
|
+
version: '1.0'
|
|
103
116
|
- !ruby/object:Gem::Dependency
|
|
104
|
-
name:
|
|
117
|
+
name: mercenary
|
|
105
118
|
requirement: !ruby/object:Gem::Requirement
|
|
106
119
|
requirements:
|
|
107
120
|
- - "~>"
|
|
108
121
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '
|
|
122
|
+
version: '0.0'
|
|
110
123
|
type: :runtime
|
|
111
124
|
prerelease: false
|
|
112
125
|
version_requirements: !ruby/object:Gem::Requirement
|
|
113
126
|
requirements:
|
|
114
127
|
- - "~>"
|
|
115
128
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '
|
|
129
|
+
version: '0.0'
|
|
117
130
|
- !ruby/object:Gem::Dependency
|
|
118
|
-
name:
|
|
131
|
+
name: naughty_or_nice
|
|
119
132
|
requirement: !ruby/object:Gem::Requirement
|
|
120
133
|
requirements:
|
|
121
134
|
- - "~>"
|
|
122
135
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '
|
|
136
|
+
version: '2.0'
|
|
124
137
|
type: :runtime
|
|
125
138
|
prerelease: false
|
|
126
139
|
version_requirements: !ruby/object:Gem::Requirement
|
|
127
140
|
requirements:
|
|
128
141
|
- - "~>"
|
|
129
142
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '
|
|
143
|
+
version: '2.0'
|
|
131
144
|
- !ruby/object:Gem::Dependency
|
|
132
|
-
name:
|
|
145
|
+
name: nokogiri
|
|
133
146
|
requirement: !ruby/object:Gem::Requirement
|
|
134
147
|
requirements:
|
|
135
148
|
- - "~>"
|
|
136
149
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: '1.
|
|
150
|
+
version: '1.10'
|
|
138
151
|
type: :runtime
|
|
139
152
|
prerelease: false
|
|
140
153
|
version_requirements: !ruby/object:Gem::Requirement
|
|
141
154
|
requirements:
|
|
142
155
|
- - "~>"
|
|
143
156
|
- !ruby/object:Gem::Version
|
|
144
|
-
version: '1.
|
|
157
|
+
version: '1.10'
|
|
145
158
|
- !ruby/object:Gem::Dependency
|
|
146
|
-
name:
|
|
159
|
+
name: parallel
|
|
147
160
|
requirement: !ruby/object:Gem::Requirement
|
|
148
161
|
requirements:
|
|
149
162
|
- - "~>"
|
|
150
163
|
- !ruby/object:Gem::Version
|
|
151
|
-
version: '
|
|
164
|
+
version: '1.0'
|
|
152
165
|
type: :runtime
|
|
153
166
|
prerelease: false
|
|
154
167
|
version_requirements: !ruby/object:Gem::Requirement
|
|
155
168
|
requirements:
|
|
156
169
|
- - "~>"
|
|
157
170
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: '
|
|
171
|
+
version: '1.0'
|
|
159
172
|
- !ruby/object:Gem::Dependency
|
|
160
|
-
name:
|
|
173
|
+
name: public_suffix
|
|
161
174
|
requirement: !ruby/object:Gem::Requirement
|
|
162
175
|
requirements:
|
|
163
|
-
- - "
|
|
176
|
+
- - ">="
|
|
164
177
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '
|
|
178
|
+
version: '4'
|
|
179
|
+
- - "<"
|
|
180
|
+
- !ruby/object:Gem::Version
|
|
181
|
+
version: '6'
|
|
166
182
|
type: :runtime
|
|
167
183
|
prerelease: false
|
|
168
184
|
version_requirements: !ruby/object:Gem::Requirement
|
|
169
185
|
requirements:
|
|
170
|
-
- - "
|
|
186
|
+
- - ">="
|
|
171
187
|
- !ruby/object:Gem::Version
|
|
172
|
-
version: '
|
|
188
|
+
version: '4'
|
|
189
|
+
- - "<"
|
|
190
|
+
- !ruby/object:Gem::Version
|
|
191
|
+
version: '6'
|
|
173
192
|
- !ruby/object:Gem::Dependency
|
|
174
193
|
name: typhoeus
|
|
175
194
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -288,14 +307,14 @@ dependencies:
|
|
|
288
307
|
requirements:
|
|
289
308
|
- - "~>"
|
|
290
309
|
- !ruby/object:Gem::Version
|
|
291
|
-
version: '
|
|
310
|
+
version: '3.0'
|
|
292
311
|
type: :development
|
|
293
312
|
prerelease: false
|
|
294
313
|
version_requirements: !ruby/object:Gem::Requirement
|
|
295
314
|
requirements:
|
|
296
315
|
- - "~>"
|
|
297
316
|
- !ruby/object:Gem::Version
|
|
298
|
-
version: '
|
|
317
|
+
version: '3.0'
|
|
299
318
|
- !ruby/object:Gem::Dependency
|
|
300
319
|
name: webmock
|
|
301
320
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -317,11 +336,12 @@ executables:
|
|
|
317
336
|
extensions: []
|
|
318
337
|
extra_rdoc_files: []
|
|
319
338
|
files:
|
|
339
|
+
- ".github/workflows/ci.yml"
|
|
320
340
|
- ".gitignore"
|
|
321
341
|
- ".rubocop.yml"
|
|
322
342
|
- ".rubocop_todo.yml"
|
|
323
343
|
- ".ruby-version"
|
|
324
|
-
-
|
|
344
|
+
- CHANGELOG.md
|
|
325
345
|
- Gemfile
|
|
326
346
|
- Guardfile
|
|
327
347
|
- LICENSE
|
|
@@ -331,55 +351,61 @@ files:
|
|
|
331
351
|
- lib/cliver/dependency_ext.rb
|
|
332
352
|
- lib/data/cdn.yml
|
|
333
353
|
- lib/data/cloud.yml
|
|
354
|
+
- lib/data/well-known.yml
|
|
334
355
|
- lib/site-inspector.rb
|
|
335
|
-
- lib/site-inspector/cache.rb
|
|
336
|
-
- lib/site-inspector/checks/accessibility.rb
|
|
337
|
-
- lib/site-inspector/checks/check.rb
|
|
338
|
-
- lib/site-inspector/checks/content.rb
|
|
339
|
-
- lib/site-inspector/checks/cookies.rb
|
|
340
|
-
- lib/site-inspector/checks/dns.rb
|
|
341
|
-
- lib/site-inspector/checks/headers.rb
|
|
342
|
-
- lib/site-inspector/checks/hsts.rb
|
|
343
|
-
- lib/site-inspector/checks/https.rb
|
|
344
|
-
- lib/site-inspector/checks/sniffer.rb
|
|
345
|
-
- lib/site-inspector/checks/wappalyzer.rb
|
|
346
|
-
- lib/site-inspector/checks/whois.rb
|
|
347
|
-
- lib/site-inspector/disk_cache.rb
|
|
348
356
|
- lib/site-inspector/domain.rb
|
|
357
|
+
- lib/site-inspector/domain_parser.rb
|
|
349
358
|
- lib/site-inspector/endpoint.rb
|
|
350
|
-
- lib/site-inspector/
|
|
359
|
+
- lib/site-inspector/endpoint/accessibility.rb
|
|
360
|
+
- lib/site-inspector/endpoint/check.rb
|
|
361
|
+
- lib/site-inspector/endpoint/content.rb
|
|
362
|
+
- lib/site-inspector/endpoint/cookies.rb
|
|
363
|
+
- lib/site-inspector/endpoint/dns.rb
|
|
364
|
+
- lib/site-inspector/endpoint/headers.rb
|
|
365
|
+
- lib/site-inspector/endpoint/hsts.rb
|
|
366
|
+
- lib/site-inspector/endpoint/https.rb
|
|
367
|
+
- lib/site-inspector/endpoint/wappalyzer.rb
|
|
368
|
+
- lib/site-inspector/endpoint/well_known.rb
|
|
369
|
+
- lib/site-inspector/endpoint/whois.rb
|
|
370
|
+
- lib/site-inspector/formatter.rb
|
|
351
371
|
- lib/site-inspector/version.rb
|
|
352
372
|
- package-lock.json
|
|
353
373
|
- package.json
|
|
374
|
+
- renovate.json
|
|
375
|
+
- script/benchmark
|
|
354
376
|
- script/bootstrap
|
|
355
377
|
- script/cibuild
|
|
356
378
|
- script/console
|
|
357
379
|
- script/pa11y-version
|
|
358
380
|
- script/release
|
|
381
|
+
- script/update-well-known
|
|
359
382
|
- site-inspector.gemspec
|
|
360
|
-
- spec/
|
|
361
|
-
- spec/checks/site_inspector_endpoint_check_spec.rb
|
|
362
|
-
- spec/checks/site_inspector_endpoint_content_spec.rb
|
|
363
|
-
- spec/checks/site_inspector_endpoint_cookies_spec.rb
|
|
364
|
-
- spec/checks/site_inspector_endpoint_dns_spec.rb
|
|
365
|
-
- spec/checks/site_inspector_endpoint_headers_spec.rb
|
|
366
|
-
- spec/checks/site_inspector_endpoint_hsts_spec.rb
|
|
367
|
-
- spec/checks/site_inspector_endpoint_https_spec.rb
|
|
368
|
-
- spec/checks/site_inspector_endpoint_sniffer_spec.rb
|
|
369
|
-
- spec/checks/site_inspector_endpoint_wappalyzer_spec.rb
|
|
370
|
-
- spec/checks/site_inspector_endpoint_whois_spec.rb
|
|
383
|
+
- spec/cliver/dependency_ext_spec.rb
|
|
371
384
|
- spec/fixtures/wappalyzer.json
|
|
372
|
-
- spec/
|
|
373
|
-
- spec/
|
|
374
|
-
- spec/
|
|
375
|
-
- spec/
|
|
385
|
+
- spec/site_inspector/domain_spec.rb
|
|
386
|
+
- spec/site_inspector/endpoint/accessibility_spec.rb
|
|
387
|
+
- spec/site_inspector/endpoint/check_spec.rb
|
|
388
|
+
- spec/site_inspector/endpoint/content_spec.rb
|
|
389
|
+
- spec/site_inspector/endpoint/cookies_spec.rb
|
|
390
|
+
- spec/site_inspector/endpoint/dns_spec.rb
|
|
391
|
+
- spec/site_inspector/endpoint/headers_spec.rb
|
|
392
|
+
- spec/site_inspector/endpoint/hsts_spec.rb
|
|
393
|
+
- spec/site_inspector/endpoint/https_spec.rb
|
|
394
|
+
- spec/site_inspector/endpoint/wappalyzer_spec.rb
|
|
395
|
+
- spec/site_inspector/endpoint/well_known_spec.rb
|
|
396
|
+
- spec/site_inspector/endpoint/whois_spec.rb
|
|
397
|
+
- spec/site_inspector/endpoint_spec.rb
|
|
376
398
|
- spec/site_inspector_spec.rb
|
|
377
399
|
- spec/spec_helper.rb
|
|
378
400
|
homepage: https://github.com/benbalter/site-inspector
|
|
379
401
|
licenses:
|
|
380
402
|
- MIT
|
|
381
|
-
metadata:
|
|
382
|
-
|
|
403
|
+
metadata:
|
|
404
|
+
rubygems_mfa_required: 'true'
|
|
405
|
+
homepage_uri: https://github.com/benbalter/site-inspector
|
|
406
|
+
source_code_uri: https://github.com/benbalter/site-inspector
|
|
407
|
+
bug_tracker_uri: https://github.com/benbalter/site-inspector/issues
|
|
408
|
+
changelog_uri: https://github.com/benbalter/site-inspector/releases
|
|
383
409
|
rdoc_options: []
|
|
384
410
|
require_paths:
|
|
385
411
|
- lib
|
|
@@ -387,33 +413,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
387
413
|
requirements:
|
|
388
414
|
- - ">="
|
|
389
415
|
- !ruby/object:Gem::Version
|
|
390
|
-
version: '
|
|
416
|
+
version: '3.2'
|
|
391
417
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
392
418
|
requirements:
|
|
393
419
|
- - ">="
|
|
394
420
|
- !ruby/object:Gem::Version
|
|
395
421
|
version: '0'
|
|
396
422
|
requirements: []
|
|
397
|
-
rubygems_version: 3.
|
|
398
|
-
signing_key:
|
|
423
|
+
rubygems_version: 3.6.9
|
|
399
424
|
specification_version: 4
|
|
400
|
-
summary:
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
- spec/checks/site_inspector_endpoint_check_spec.rb
|
|
404
|
-
- spec/checks/site_inspector_endpoint_content_spec.rb
|
|
405
|
-
- spec/checks/site_inspector_endpoint_cookies_spec.rb
|
|
406
|
-
- spec/checks/site_inspector_endpoint_dns_spec.rb
|
|
407
|
-
- spec/checks/site_inspector_endpoint_headers_spec.rb
|
|
408
|
-
- spec/checks/site_inspector_endpoint_hsts_spec.rb
|
|
409
|
-
- spec/checks/site_inspector_endpoint_https_spec.rb
|
|
410
|
-
- spec/checks/site_inspector_endpoint_sniffer_spec.rb
|
|
411
|
-
- spec/checks/site_inspector_endpoint_wappalyzer_spec.rb
|
|
412
|
-
- spec/checks/site_inspector_endpoint_whois_spec.rb
|
|
413
|
-
- spec/fixtures/wappalyzer.json
|
|
414
|
-
- spec/site_inspector_cache_spec.rb
|
|
415
|
-
- spec/site_inspector_disk_cache_spec.rb
|
|
416
|
-
- spec/site_inspector_domain_spec.rb
|
|
417
|
-
- spec/site_inspector_endpoint_spec.rb
|
|
418
|
-
- spec/site_inspector_spec.rb
|
|
419
|
-
- spec/spec_helper.rb
|
|
425
|
+
summary: Ruby gem and CLI that checks a domain's HTTPS, HSTS, DNS, headers, cookies,
|
|
426
|
+
WHOIS, accessibility, and tech stack
|
|
427
|
+
test_files: []
|
data/.travis.yml
DELETED
data/lib/site-inspector/cache.rb
DELETED