pluginscan 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.gitlab-ci.yml +16 -0
- data/.rspec +3 -0
- data/.rubocop.yml +46 -0
- data/.rubocop_todo.yml +36 -0
- data/CHANGELOG.md +89 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +90 -0
- data/README.md +56 -0
- data/Rakefile +2 -0
- data/TODO.md +8 -0
- data/bin/pluginscan +53 -0
- data/lib/file_creator.rb +18 -0
- data/lib/pluginscan.rb +69 -0
- data/lib/pluginscan/error.rb +9 -0
- data/lib/pluginscan/error_printer.rb +17 -0
- data/lib/pluginscan/file_finder.rb +42 -0
- data/lib/pluginscan/printer.rb +14 -0
- data/lib/pluginscan/reports/cloc_report.rb +27 -0
- data/lib/pluginscan/reports/cloc_report/cloc.rb +21 -0
- data/lib/pluginscan/reports/cloc_report/cloc_printer.rb +42 -0
- data/lib/pluginscan/reports/cloc_report/cloc_scanner.rb +41 -0
- data/lib/pluginscan/reports/cloc_report/system_cloc.rb +33 -0
- data/lib/pluginscan/reports/issues_report.rb +24 -0
- data/lib/pluginscan/reports/issues_report/error_list_printer.rb +99 -0
- data/lib/pluginscan/reports/issues_report/issue_checks.rb +382 -0
- data/lib/pluginscan/reports/issues_report/issue_checks/check.rb +55 -0
- data/lib/pluginscan/reports/issues_report/issue_checks/comment_checker.rb +13 -0
- data/lib/pluginscan/reports/issues_report/issue_checks/function_check.rb +32 -0
- data/lib/pluginscan/reports/issues_report/issue_checks/variable_check.rb +14 -0
- data/lib/pluginscan/reports/issues_report/issue_checks/variable_safety_checker.rb +112 -0
- data/lib/pluginscan/reports/issues_report/issues_models/check_findings.rb +29 -0
- data/lib/pluginscan/reports/issues_report/issues_models/issues.rb +31 -0
- data/lib/pluginscan/reports/issues_report/issues_printer.rb +34 -0
- data/lib/pluginscan/reports/issues_report/issues_printer/check_findings_printer.rb +37 -0
- data/lib/pluginscan/reports/issues_report/issues_printer/file_issues_printer.rb +36 -0
- data/lib/pluginscan/reports/issues_report/issues_printer/finding_printer.rb +38 -0
- data/lib/pluginscan/reports/issues_report/issues_printer_factory.rb +19 -0
- data/lib/pluginscan/reports/issues_report/issues_scanner.rb +49 -0
- data/lib/pluginscan/reports/issues_report/issues_scanner/file_issues_scanner.rb +39 -0
- data/lib/pluginscan/reports/issues_report/issues_scanner/line_issues_scanner.rb +15 -0
- data/lib/pluginscan/reports/issues_report/issues_scanner/utf8_checker.rb +14 -0
- data/lib/pluginscan/reports/sloccount_report.rb +26 -0
- data/lib/pluginscan/reports/sloccount_report/sloccount.rb +19 -0
- data/lib/pluginscan/reports/sloccount_report/sloccount_printer.rb +22 -0
- data/lib/pluginscan/reports/sloccount_report/sloccount_scanner.rb +86 -0
- data/lib/pluginscan/reports/vulnerability_report.rb +28 -0
- data/lib/pluginscan/reports/vulnerability_report/advisories_api.rb +23 -0
- data/lib/pluginscan/reports/vulnerability_report/vulnerabilities_printer.rb +55 -0
- data/lib/pluginscan/reports/vulnerability_report/vulnerability_scanner.rb +17 -0
- data/lib/pluginscan/reports/vulnerability_report/wp_vuln_db_api.rb +77 -0
- data/lib/pluginscan/version.rb +3 -0
- data/pluginscan.gemspec +31 -0
- data/spec/acceptance/cloc_spec.rb +54 -0
- data/spec/acceptance/create_error_list_file_spec.rb +29 -0
- data/spec/acceptance/issues_spec.rb +197 -0
- data/spec/acceptance/pluginscan_spec.rb +18 -0
- data/spec/acceptance/sloccount_spec.rb +39 -0
- data/spec/acceptance/vulnerabilities_spec.rb +57 -0
- data/spec/acceptance_spec_helper.rb +10 -0
- data/spec/checks_examples_spec.rb +352 -0
- data/spec/file_creator_spec.rb +51 -0
- data/spec/pluginscan/cloc_scanner/cloc_scanner_spec.rb +64 -0
- data/spec/pluginscan/cloc_scanner/cloc_spec.rb +30 -0
- data/spec/pluginscan/file_finder_spec.rb +91 -0
- data/spec/pluginscan/issues_scanner/check_findings_spec.rb +22 -0
- data/spec/pluginscan/issues_scanner/error_list_printer_ignores_spec.rb +35 -0
- data/spec/pluginscan/issues_scanner/error_list_printer_spec.rb +42 -0
- data/spec/pluginscan/issues_scanner/file_issues_scanner_spec.rb +25 -0
- data/spec/pluginscan/issues_scanner/issues_printer_factory_spec.rb +9 -0
- data/spec/pluginscan/issues_scanner/issues_spec.rb +55 -0
- data/spec/pluginscan/issues_scanner/variable_check_spec.rb +13 -0
- data/spec/pluginscan/issues_scanner/variable_safety_checker_spec.rb +81 -0
- data/spec/pluginscan/issues_scanner_spec.rb +21 -0
- data/spec/pluginscan/sloccount_scanner/sloccount_scanner_spec.rb +95 -0
- data/spec/pluginscan/sloccount_scanner/sloccount_spec.rb +72 -0
- data/spec/pluginscan/vulnerability_scanner_spec.rb +96 -0
- data/spec/process_spec_helper.rb +6 -0
- data/spec/spec_helper.rb +70 -0
- data/spec/support/acceptance_helpers.rb +68 -0
- data/spec/support/file_helpers.rb +35 -0
- data/spec/support/heredoc_helper.rb +7 -0
- data/spec/support/process_helpers.rb +25 -0
- data/spec/support/shared_examples_for_issue_checks.rb +31 -0
- data/spec/support/vcr_helper.rb +6 -0
- data/vcr_cassettes/wpvulndb/relevanssi.yml +78 -0
- metadata +342 -0
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'support/process_helpers'
|
2
|
+
|
3
|
+
# helper methods and constants which are only relevant to acceptance specs
|
4
|
+
module AcceptanceHelpers
|
5
|
+
def stub_sloccount(system_sloccount = fake_system_sloccount)
|
6
|
+
allow(SLOCCountScanner::SystemSLOCCount).to receive(:instance)
|
7
|
+
.and_return system_sloccount
|
8
|
+
end
|
9
|
+
|
10
|
+
def fake_system_sloccount
|
11
|
+
instance_double('SystemSLOCCount').tap do |fake|
|
12
|
+
allow(fake).to receive(:available?)
|
13
|
+
.and_return true
|
14
|
+
allow(fake).to receive(:call)
|
15
|
+
.and_return [double('result'), failed_process_status]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def stub_cloc(result: "", which_result: which_success('cloc'), process_status: successful_process_status)
|
20
|
+
fake_system_cloc = instance_double(
|
21
|
+
SystemCloc,
|
22
|
+
call: [result, process_status],
|
23
|
+
which: which_result
|
24
|
+
)
|
25
|
+
fake_system_cloc_klass = class_double(SystemCloc, new: fake_system_cloc)
|
26
|
+
stub_const('SystemCloc', fake_system_cloc_klass)
|
27
|
+
end
|
28
|
+
|
29
|
+
def stub_vuln_check
|
30
|
+
stub_request(:get, Regexp.new('https://wpvulndb.com/api/v2/plugins/'))
|
31
|
+
.with(headers: { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Ruby' })
|
32
|
+
.to_return(status: 404, body: "The page you were looking for doesn't exist (404).", headers: {})
|
33
|
+
end
|
34
|
+
|
35
|
+
def coloured_red(string)
|
36
|
+
coloured(RED_START, string)
|
37
|
+
end
|
38
|
+
|
39
|
+
def coloured_green(string)
|
40
|
+
coloured(GREEN_START, string)
|
41
|
+
end
|
42
|
+
|
43
|
+
def coloured_yellow(string)
|
44
|
+
coloured(YELLOW_START, string)
|
45
|
+
end
|
46
|
+
|
47
|
+
def coloured_cyan(string)
|
48
|
+
coloured(CYAN_START, string)
|
49
|
+
end
|
50
|
+
|
51
|
+
def coloured(colour, string)
|
52
|
+
"#{colour_regexp(colour)}#{string}#{colour_regexp(COLOUR_END)}"
|
53
|
+
end
|
54
|
+
|
55
|
+
# Colour codes show up when running specs from the command line,
|
56
|
+
# but not when capturing to a file - e.g when running from vim
|
57
|
+
# so these need to be optional - hence the '?'
|
58
|
+
def colour_regexp(colour_code)
|
59
|
+
"(#{Regexp.escape colour_code})?"
|
60
|
+
end
|
61
|
+
|
62
|
+
# ANSI colour codes:
|
63
|
+
RED_START = "\e[31m".freeze
|
64
|
+
GREEN_START = "\e[32m".freeze
|
65
|
+
YELLOW_START = "\e[33m".freeze
|
66
|
+
CYAN_START = "\e[36m".freeze
|
67
|
+
COLOUR_END = "\e[0m".freeze
|
68
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module FileHelpers
|
4
|
+
def setup_tempdir(name = 'tmp')
|
5
|
+
FileUtils.rm_rf(name)
|
6
|
+
FileUtils.mkdir(name)
|
7
|
+
end
|
8
|
+
|
9
|
+
def add_non_php_file(tempdir = 'tmp')
|
10
|
+
FileUtils.touch("#{tempdir}/file#{rand(999)}.html")
|
11
|
+
end
|
12
|
+
|
13
|
+
def add_php_file(base_path = 'tmp', contents = nil, name = nil)
|
14
|
+
name ||= "file#{rand(999)}.php"
|
15
|
+
path = "#{base_path}/#{name}"
|
16
|
+
create_file(path, contents)
|
17
|
+
path
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_file(path, contents)
|
21
|
+
return create_empty_file(path) unless contents
|
22
|
+
|
23
|
+
file = File.new(path, 'w')
|
24
|
+
file.write(contents)
|
25
|
+
file.close
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_empty_file(path)
|
29
|
+
FileUtils.touch(path)
|
30
|
+
end
|
31
|
+
|
32
|
+
def add_directory(tempdir = 'tmp', name = 'foo')
|
33
|
+
FileUtils.mkdir("#{tempdir}/#{name}")
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module ProcessHelpers
|
2
|
+
def successful_process_status
|
3
|
+
process_status_double(true)
|
4
|
+
end
|
5
|
+
|
6
|
+
def failed_process_status
|
7
|
+
process_status_double(false)
|
8
|
+
end
|
9
|
+
|
10
|
+
def process_status_double(success_boolean)
|
11
|
+
instance_double(Process::Status).tap do |status|
|
12
|
+
allow(status).to receive(:success?).and_return success_boolean
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def which_success(command)
|
17
|
+
# The kind of response that Open3 will return if `which command` was successful
|
18
|
+
["/usr/local/bin/#{command}\n", successful_process_status]
|
19
|
+
end
|
20
|
+
|
21
|
+
def which_failure
|
22
|
+
# The kind of response that Open3 will return if `which command` failed
|
23
|
+
["", failed_process_status]
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
RSpec.shared_examples "matches lines containing" do |match, example_string, check_index: 0, match_index: 0, ignored: false|
|
2
|
+
context match do
|
3
|
+
context example_string do
|
4
|
+
before(:all) { @scanner = described_class.new(Pluginscan::THE_CHECKS) }
|
5
|
+
let(:file_contents) { example_string }
|
6
|
+
let(:checks_findings) { @scanner.scan(file_contents) }
|
7
|
+
let(:check_findings) { checks_findings[check_index] }
|
8
|
+
let(:finding) do
|
9
|
+
raise "Tried to get findings for the #{check_index}th check matching this line, but only #{checks_findings.count} checks match this line" if check_findings.nil?
|
10
|
+
check_findings.findings[match_index]
|
11
|
+
end
|
12
|
+
|
13
|
+
it "finds a finding which checks_findings #{match}" do
|
14
|
+
expect(checks_findings).to_not be_empty
|
15
|
+
expect(finding.lineno).to eq 1
|
16
|
+
expect(finding.line).to eq file_contents
|
17
|
+
expect(finding.match).to eq match
|
18
|
+
expect(finding.ignored).to eq ignored
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
RSpec.shared_examples "ignores lines containing" do |match, example_string, check_index: 0, match_index: 0|
|
25
|
+
it_behaves_like "matches lines containing", match, example_string, check_index: check_index, match_index: match_index, ignored: true
|
26
|
+
end
|
27
|
+
|
28
|
+
RSpec.shared_examples "matches a variable assigned to a superglobal" do |superglobal|
|
29
|
+
example_string = "$value = #{superglobal}['foo']"
|
30
|
+
it_behaves_like "matches lines containing", superglobal, example_string
|
31
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://wpvulndb.com/api/v2/plugins/relevanssi
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Mon, 23 May 2016 13:00:57 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
Cache-Control:
|
34
|
+
- max-age=0, private, must-revalidate
|
35
|
+
X-Request-Id:
|
36
|
+
- 8da0a81f-dfe0-493e-bb99-55486456834f
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=63072000; includeSubDomains; preload
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Download-Options:
|
46
|
+
- noopen
|
47
|
+
X-Permitted-Cross-Domain-Policies:
|
48
|
+
- none
|
49
|
+
Content-Security-Policy:
|
50
|
+
- default-src 'self'; child-src 'self' https://rpm.newrelic.com; frame-src 'self'
|
51
|
+
https://rpm.newrelic.com https://www.google.com/recaptcha/; script-src 'self'
|
52
|
+
https://www.google.com/recaptcha/ https://apis.google.com https://www.google.com/recaptcha/
|
53
|
+
https://www.gstatic.com/recaptcha/; img-src 'self' https://ssl.gstatic.com/;
|
54
|
+
style-src 'self' 'unsafe-inline'; upgrade-insecure-requests; block-all-mixed-content;
|
55
|
+
report-uri https://firefart.report-uri.io/r/default/csp/enforce;
|
56
|
+
X-Content-Security-Policy:
|
57
|
+
- default-src 'self'; child-src 'self' https://rpm.newrelic.com; frame-src 'self'
|
58
|
+
https://rpm.newrelic.com https://www.google.com/recaptcha/; script-src 'self'
|
59
|
+
https://www.google.com/recaptcha/ https://apis.google.com https://www.google.com/recaptcha/
|
60
|
+
https://www.gstatic.com/recaptcha/; img-src 'self' https://ssl.gstatic.com/;
|
61
|
+
style-src 'self' 'unsafe-inline'; upgrade-insecure-requests; block-all-mixed-content;
|
62
|
+
report-uri https://firefart.report-uri.io/r/default/csp/enforce;
|
63
|
+
X-Webkit-Csp:
|
64
|
+
- default-src 'self'; child-src 'self' https://rpm.newrelic.com; frame-src 'self'
|
65
|
+
https://rpm.newrelic.com https://www.google.com/recaptcha/; script-src 'self'
|
66
|
+
https://www.google.com/recaptcha/ https://apis.google.com https://www.google.com/recaptcha/
|
67
|
+
https://www.gstatic.com/recaptcha/; img-src 'self' https://ssl.gstatic.com/;
|
68
|
+
style-src 'self' 'unsafe-inline'; upgrade-insecure-requests; block-all-mixed-content;
|
69
|
+
report-uri https://firefart.report-uri.io/r/default/csp/enforce;
|
70
|
+
body:
|
71
|
+
encoding: ASCII-8BIT
|
72
|
+
string: '{"relevanssi":{"latest_version":"3.5.3","last_updated":"2016-04-20T09:39:00.000Z","popular":true,"vulnerabilities":[{"id":6425,"title":"Relevanssi
|
73
|
+
3.2 - Unspecified SQL Injection","created_at":"2014-08-01T10:58:47.000Z","updated_at":"2015-05-15T13:47:47.000Z","published_date":null,"references":{"url":["http://www.securityfocus.com/bid/65960/"],"secunia":["56641"]},"vuln_type":"SQLI","fixed_in":"3.3"},{"id":6426,"title":"Relevanssi
|
74
|
+
2.7.2 - Stored XSS Vulnerability","created_at":"2014-08-01T10:58:47.000Z","updated_at":"2015-05-15T13:47:47.000Z","published_date":null,"references":{"secunia":["43461"],"exploitdb":["16233"]},"vuln_type":"XSS","fixed_in":"2.7.3"},{"id":7740,"title":"Relevanssi
|
75
|
+
<= 3.3.7.1 - Cross-Site Scripting (XSS)","created_at":"2015-01-03T11:29:33.000Z","updated_at":"2015-05-15T13:49:13.000Z","published_date":null,"references":{"cve":["2014-9443"],"secunia":["61744"]},"vuln_type":"XSS","fixed_in":"3.3.8"}]}}'
|
76
|
+
http_version:
|
77
|
+
recorded_at: Mon, 23 May 2016 13:00:57 GMT
|
78
|
+
recorded_with: VCR 3.0.3
|
metadata
ADDED
@@ -0,0 +1,342 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pluginscan
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- dxw
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rainbow
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "<"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.5'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.5'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.4.0
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 3.4.0
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 3.4.0
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 3.4.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: webmock
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "<"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '3'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: vcr
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "<"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '4'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '4'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: simplecov
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "<"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "<"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '1'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rubocop
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "<"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '1'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "<"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '1'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: fuubar
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '2'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '2'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: pry
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: rake
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 10.0.0
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: 10.0.0
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: geminabox-release
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0.2'
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: 0.2.0
|
183
|
+
type: :development
|
184
|
+
prerelease: false
|
185
|
+
version_requirements: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - "~>"
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0.2'
|
190
|
+
- - ">="
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: 0.2.0
|
193
|
+
description: Scans WordPress plugins for potential issues and vulnerabilities
|
194
|
+
email:
|
195
|
+
- security@dxw.com
|
196
|
+
executables:
|
197
|
+
- pluginscan
|
198
|
+
extensions: []
|
199
|
+
extra_rdoc_files: []
|
200
|
+
files:
|
201
|
+
- ".gitignore"
|
202
|
+
- ".gitlab-ci.yml"
|
203
|
+
- ".rspec"
|
204
|
+
- ".rubocop.yml"
|
205
|
+
- ".rubocop_todo.yml"
|
206
|
+
- CHANGELOG.md
|
207
|
+
- Gemfile
|
208
|
+
- Gemfile.lock
|
209
|
+
- README.md
|
210
|
+
- Rakefile
|
211
|
+
- TODO.md
|
212
|
+
- bin/pluginscan
|
213
|
+
- lib/file_creator.rb
|
214
|
+
- lib/pluginscan.rb
|
215
|
+
- lib/pluginscan/error.rb
|
216
|
+
- lib/pluginscan/error_printer.rb
|
217
|
+
- lib/pluginscan/file_finder.rb
|
218
|
+
- lib/pluginscan/printer.rb
|
219
|
+
- lib/pluginscan/reports/cloc_report.rb
|
220
|
+
- lib/pluginscan/reports/cloc_report/cloc.rb
|
221
|
+
- lib/pluginscan/reports/cloc_report/cloc_printer.rb
|
222
|
+
- lib/pluginscan/reports/cloc_report/cloc_scanner.rb
|
223
|
+
- lib/pluginscan/reports/cloc_report/system_cloc.rb
|
224
|
+
- lib/pluginscan/reports/issues_report.rb
|
225
|
+
- lib/pluginscan/reports/issues_report/error_list_printer.rb
|
226
|
+
- lib/pluginscan/reports/issues_report/issue_checks.rb
|
227
|
+
- lib/pluginscan/reports/issues_report/issue_checks/check.rb
|
228
|
+
- lib/pluginscan/reports/issues_report/issue_checks/comment_checker.rb
|
229
|
+
- lib/pluginscan/reports/issues_report/issue_checks/function_check.rb
|
230
|
+
- lib/pluginscan/reports/issues_report/issue_checks/variable_check.rb
|
231
|
+
- lib/pluginscan/reports/issues_report/issue_checks/variable_safety_checker.rb
|
232
|
+
- lib/pluginscan/reports/issues_report/issues_models/check_findings.rb
|
233
|
+
- lib/pluginscan/reports/issues_report/issues_models/issues.rb
|
234
|
+
- lib/pluginscan/reports/issues_report/issues_printer.rb
|
235
|
+
- lib/pluginscan/reports/issues_report/issues_printer/check_findings_printer.rb
|
236
|
+
- lib/pluginscan/reports/issues_report/issues_printer/file_issues_printer.rb
|
237
|
+
- lib/pluginscan/reports/issues_report/issues_printer/finding_printer.rb
|
238
|
+
- lib/pluginscan/reports/issues_report/issues_printer_factory.rb
|
239
|
+
- lib/pluginscan/reports/issues_report/issues_scanner.rb
|
240
|
+
- lib/pluginscan/reports/issues_report/issues_scanner/file_issues_scanner.rb
|
241
|
+
- lib/pluginscan/reports/issues_report/issues_scanner/line_issues_scanner.rb
|
242
|
+
- lib/pluginscan/reports/issues_report/issues_scanner/utf8_checker.rb
|
243
|
+
- lib/pluginscan/reports/sloccount_report.rb
|
244
|
+
- lib/pluginscan/reports/sloccount_report/sloccount.rb
|
245
|
+
- lib/pluginscan/reports/sloccount_report/sloccount_printer.rb
|
246
|
+
- lib/pluginscan/reports/sloccount_report/sloccount_scanner.rb
|
247
|
+
- lib/pluginscan/reports/vulnerability_report.rb
|
248
|
+
- lib/pluginscan/reports/vulnerability_report/advisories_api.rb
|
249
|
+
- lib/pluginscan/reports/vulnerability_report/vulnerabilities_printer.rb
|
250
|
+
- lib/pluginscan/reports/vulnerability_report/vulnerability_scanner.rb
|
251
|
+
- lib/pluginscan/reports/vulnerability_report/wp_vuln_db_api.rb
|
252
|
+
- lib/pluginscan/version.rb
|
253
|
+
- pluginscan.gemspec
|
254
|
+
- spec/acceptance/cloc_spec.rb
|
255
|
+
- spec/acceptance/create_error_list_file_spec.rb
|
256
|
+
- spec/acceptance/issues_spec.rb
|
257
|
+
- spec/acceptance/pluginscan_spec.rb
|
258
|
+
- spec/acceptance/sloccount_spec.rb
|
259
|
+
- spec/acceptance/vulnerabilities_spec.rb
|
260
|
+
- spec/acceptance_spec_helper.rb
|
261
|
+
- spec/checks_examples_spec.rb
|
262
|
+
- spec/file_creator_spec.rb
|
263
|
+
- spec/pluginscan/cloc_scanner/cloc_scanner_spec.rb
|
264
|
+
- spec/pluginscan/cloc_scanner/cloc_spec.rb
|
265
|
+
- spec/pluginscan/file_finder_spec.rb
|
266
|
+
- spec/pluginscan/issues_scanner/check_findings_spec.rb
|
267
|
+
- spec/pluginscan/issues_scanner/error_list_printer_ignores_spec.rb
|
268
|
+
- spec/pluginscan/issues_scanner/error_list_printer_spec.rb
|
269
|
+
- spec/pluginscan/issues_scanner/file_issues_scanner_spec.rb
|
270
|
+
- spec/pluginscan/issues_scanner/issues_printer_factory_spec.rb
|
271
|
+
- spec/pluginscan/issues_scanner/issues_spec.rb
|
272
|
+
- spec/pluginscan/issues_scanner/variable_check_spec.rb
|
273
|
+
- spec/pluginscan/issues_scanner/variable_safety_checker_spec.rb
|
274
|
+
- spec/pluginscan/issues_scanner_spec.rb
|
275
|
+
- spec/pluginscan/sloccount_scanner/sloccount_scanner_spec.rb
|
276
|
+
- spec/pluginscan/sloccount_scanner/sloccount_spec.rb
|
277
|
+
- spec/pluginscan/vulnerability_scanner_spec.rb
|
278
|
+
- spec/process_spec_helper.rb
|
279
|
+
- spec/spec_helper.rb
|
280
|
+
- spec/support/acceptance_helpers.rb
|
281
|
+
- spec/support/file_helpers.rb
|
282
|
+
- spec/support/heredoc_helper.rb
|
283
|
+
- spec/support/process_helpers.rb
|
284
|
+
- spec/support/shared_examples_for_issue_checks.rb
|
285
|
+
- spec/support/vcr_helper.rb
|
286
|
+
- vcr_cassettes/wpvulndb/relevanssi.yml
|
287
|
+
homepage: https://twinkie.dxw.net/dxw/pluginscan
|
288
|
+
licenses: []
|
289
|
+
metadata: {}
|
290
|
+
post_install_message:
|
291
|
+
rdoc_options: []
|
292
|
+
require_paths:
|
293
|
+
- lib
|
294
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
295
|
+
requirements:
|
296
|
+
- - ">="
|
297
|
+
- !ruby/object:Gem::Version
|
298
|
+
version: '0'
|
299
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
|
+
requirements:
|
301
|
+
- - ">="
|
302
|
+
- !ruby/object:Gem::Version
|
303
|
+
version: '0'
|
304
|
+
requirements: []
|
305
|
+
rubyforge_project:
|
306
|
+
rubygems_version: 2.6.8
|
307
|
+
signing_key:
|
308
|
+
specification_version: 4
|
309
|
+
summary: Does stuff
|
310
|
+
test_files:
|
311
|
+
- spec/acceptance/cloc_spec.rb
|
312
|
+
- spec/acceptance/create_error_list_file_spec.rb
|
313
|
+
- spec/acceptance/issues_spec.rb
|
314
|
+
- spec/acceptance/pluginscan_spec.rb
|
315
|
+
- spec/acceptance/sloccount_spec.rb
|
316
|
+
- spec/acceptance/vulnerabilities_spec.rb
|
317
|
+
- spec/acceptance_spec_helper.rb
|
318
|
+
- spec/checks_examples_spec.rb
|
319
|
+
- spec/file_creator_spec.rb
|
320
|
+
- spec/pluginscan/cloc_scanner/cloc_scanner_spec.rb
|
321
|
+
- spec/pluginscan/cloc_scanner/cloc_spec.rb
|
322
|
+
- spec/pluginscan/file_finder_spec.rb
|
323
|
+
- spec/pluginscan/issues_scanner/check_findings_spec.rb
|
324
|
+
- spec/pluginscan/issues_scanner/error_list_printer_ignores_spec.rb
|
325
|
+
- spec/pluginscan/issues_scanner/error_list_printer_spec.rb
|
326
|
+
- spec/pluginscan/issues_scanner/file_issues_scanner_spec.rb
|
327
|
+
- spec/pluginscan/issues_scanner/issues_printer_factory_spec.rb
|
328
|
+
- spec/pluginscan/issues_scanner/issues_spec.rb
|
329
|
+
- spec/pluginscan/issues_scanner/variable_check_spec.rb
|
330
|
+
- spec/pluginscan/issues_scanner/variable_safety_checker_spec.rb
|
331
|
+
- spec/pluginscan/issues_scanner_spec.rb
|
332
|
+
- spec/pluginscan/sloccount_scanner/sloccount_scanner_spec.rb
|
333
|
+
- spec/pluginscan/sloccount_scanner/sloccount_spec.rb
|
334
|
+
- spec/pluginscan/vulnerability_scanner_spec.rb
|
335
|
+
- spec/process_spec_helper.rb
|
336
|
+
- spec/spec_helper.rb
|
337
|
+
- spec/support/acceptance_helpers.rb
|
338
|
+
- spec/support/file_helpers.rb
|
339
|
+
- spec/support/heredoc_helper.rb
|
340
|
+
- spec/support/process_helpers.rb
|
341
|
+
- spec/support/shared_examples_for_issue_checks.rb
|
342
|
+
- spec/support/vcr_helper.rb
|