pwn 0.4.510 → 0.4.513
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/README.md +2 -2
- data/lib/pwn/plugins/owasp_zap.rb +1 -1
- data/lib/pwn/reports/sast.rb +9 -8
- data/lib/pwn/sast/amqp_connect_as_guest.rb +8 -7
- data/lib/pwn/sast/apache_file_system_util_api.rb +8 -7
- data/lib/pwn/sast/aws.rb +8 -7
- data/lib/pwn/sast/banned_function_calls_c.rb +8 -7
- data/lib/pwn/sast/base64.rb +8 -7
- data/lib/pwn/sast/beef_hook.rb +8 -7
- data/lib/pwn/sast/cmd_execution_java.rb +8 -7
- data/lib/pwn/sast/cmd_execution_python.rb +8 -7
- data/lib/pwn/sast/cmd_execution_ruby.rb +8 -7
- data/lib/pwn/sast/cmd_execution_scala.rb +8 -7
- data/lib/pwn/sast/csrf.rb +8 -7
- data/lib/pwn/sast/deserial_java.rb +8 -7
- data/lib/pwn/sast/emoticon.rb +8 -7
- data/lib/pwn/sast/eval.rb +8 -7
- data/lib/pwn/sast/factory.rb +8 -7
- data/lib/pwn/sast/http_authorization_header.rb +8 -7
- data/lib/pwn/sast/inner_html.rb +8 -7
- data/lib/pwn/sast/keystore.rb +8 -7
- data/lib/pwn/sast/location_hash.rb +8 -7
- data/lib/pwn/sast/log4j.rb +8 -7
- data/lib/pwn/sast/logger.rb +8 -7
- data/lib/pwn/sast/outer_html.rb +8 -7
- data/lib/pwn/sast/password.rb +8 -7
- data/lib/pwn/sast/pom_version.rb +13 -10
- data/lib/pwn/sast/port.rb +8 -7
- data/lib/pwn/sast/private_key.rb +8 -7
- data/lib/pwn/sast/redirect.rb +8 -7
- data/lib/pwn/sast/redos.rb +8 -7
- data/lib/pwn/sast/shell.rb +8 -7
- data/lib/pwn/sast/signature.rb +8 -7
- data/lib/pwn/sast/sql.rb +8 -7
- data/lib/pwn/sast/ssl.rb +8 -7
- data/lib/pwn/sast/sudo.rb +8 -7
- data/lib/pwn/sast/task_tag.rb +8 -7
- data/lib/pwn/sast/throw_errors.rb +8 -7
- data/lib/pwn/sast/token.rb +8 -7
- data/lib/pwn/sast/version.rb +8 -7
- data/lib/pwn/sast/window_location_hash.rb +8 -7
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/sast/amqp_connect_as_guest_spec.rb +3 -3
- data/spec/lib/pwn/sast/apache_file_system_util_api_spec.rb +3 -3
- data/spec/lib/pwn/sast/aws_spec.rb +3 -3
- data/spec/lib/pwn/sast/banned_function_calls_c_spec.rb +3 -3
- data/spec/lib/pwn/sast/base64_spec.rb +3 -3
- data/spec/lib/pwn/sast/beef_hook_spec.rb +3 -3
- data/spec/lib/pwn/sast/cmd_execution_java_spec.rb +3 -3
- data/spec/lib/pwn/sast/cmd_execution_python_spec.rb +3 -3
- data/spec/lib/pwn/sast/cmd_execution_ruby_spec.rb +3 -3
- data/spec/lib/pwn/sast/cmd_execution_scala_spec.rb +3 -3
- data/spec/lib/pwn/sast/csrf_spec.rb +3 -3
- data/spec/lib/pwn/sast/deserial_java_spec.rb +3 -3
- data/spec/lib/pwn/sast/emoticon_spec.rb +3 -3
- data/spec/lib/pwn/sast/eval_spec.rb +3 -3
- data/spec/lib/pwn/sast/factory_spec.rb +3 -3
- data/spec/lib/pwn/sast/http_authorization_header_spec.rb +3 -3
- data/spec/lib/pwn/sast/inner_html_spec.rb +3 -3
- data/spec/lib/pwn/sast/keystore_spec.rb +3 -3
- data/spec/lib/pwn/sast/location_hash_spec.rb +3 -3
- data/spec/lib/pwn/sast/log4j_spec.rb +3 -3
- data/spec/lib/pwn/sast/logger_spec.rb +3 -3
- data/spec/lib/pwn/sast/password_spec.rb +3 -3
- data/spec/lib/pwn/sast/pom_version_spec.rb +3 -3
- data/spec/lib/pwn/sast/port_spec.rb +3 -3
- data/spec/lib/pwn/sast/private_key_spec.rb +3 -3
- data/spec/lib/pwn/sast/redirect_spec.rb +3 -3
- data/spec/lib/pwn/sast/redos_spec.rb +3 -3
- data/spec/lib/pwn/sast/shell_spec.rb +3 -3
- data/spec/lib/pwn/sast/signature_spec.rb +3 -3
- data/spec/lib/pwn/sast/sql_spec.rb +3 -3
- data/spec/lib/pwn/sast/ssl_spec.rb +3 -3
- data/spec/lib/pwn/sast/sudo_spec.rb +3 -3
- data/spec/lib/pwn/sast/task_tag_spec.rb +3 -3
- data/spec/lib/pwn/sast/throw_errors_spec.rb +3 -3
- data/spec/lib/pwn/sast/token_spec.rb +3 -3
- data/spec/lib/pwn/sast/version_spec.rb +3 -3
- data/spec/lib/pwn/sast/window_location_hash_spec.rb +3 -3
- metadata +10 -10
@@ -26,7 +26,6 @@ module PWN
|
|
26
26
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
27
27
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java')
|
28
28
|
line_no_and_contents_arr = []
|
29
|
-
filename_arr = []
|
30
29
|
entry_beautified = false
|
31
30
|
|
32
31
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -47,8 +46,8 @@ module PWN
|
|
47
46
|
|
48
47
|
hash_line = {
|
49
48
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
50
|
-
|
51
|
-
filename:
|
49
|
+
security_references: security_references,
|
50
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
52
51
|
line_no_and_contents: '',
|
53
52
|
raw_content: str,
|
54
53
|
test_case_filter: test_case_filter
|
@@ -77,9 +76,11 @@ module PWN
|
|
77
76
|
else
|
78
77
|
author = 'N/A'
|
79
78
|
end
|
80
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
-
|
82
|
-
|
79
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
80
|
+
line_no: line_no,
|
81
|
+
contents: contents,
|
82
|
+
author: author
|
83
|
+
)
|
83
84
|
|
84
85
|
current_count += 2
|
85
86
|
end
|
@@ -102,7 +103,7 @@ module PWN
|
|
102
103
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
103
104
|
# Determine the level of Testing Coverage w/ PWN.
|
104
105
|
|
105
|
-
public_class_method def self.
|
106
|
+
public_class_method def self.security_references
|
106
107
|
{
|
107
108
|
sast_module: self,
|
108
109
|
section: 'INFORMATION INPUT VALIDATION',
|
data/lib/pwn/sast/emoticon.rb
CHANGED
@@ -24,7 +24,6 @@ module PWN
|
|
24
24
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
25
25
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
26
26
|
line_no_and_contents_arr = []
|
27
|
-
filename_arr = []
|
28
27
|
entry_beautified = false
|
29
28
|
|
30
29
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -52,8 +51,8 @@ module PWN
|
|
52
51
|
|
53
52
|
hash_line = {
|
54
53
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
55
|
-
|
56
|
-
filename:
|
54
|
+
security_references: security_references,
|
55
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
57
56
|
line_no_and_contents: '',
|
58
57
|
raw_content: str,
|
59
58
|
test_case_filter: test_case_filter
|
@@ -82,9 +81,11 @@ module PWN
|
|
82
81
|
else
|
83
82
|
author = 'N/A'
|
84
83
|
end
|
85
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
86
|
-
|
87
|
-
|
84
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
85
|
+
line_no: line_no,
|
86
|
+
contents: contents,
|
87
|
+
author: author
|
88
|
+
)
|
88
89
|
|
89
90
|
current_count += 2
|
90
91
|
end
|
@@ -110,7 +111,7 @@ module PWN
|
|
110
111
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
111
112
|
# Determine the level of Testing Coverage w/ PWN.
|
112
113
|
|
113
|
-
public_class_method def self.
|
114
|
+
public_class_method def self.security_references
|
114
115
|
{
|
115
116
|
sast_module: self,
|
116
117
|
section: 'LEAST PRIVILEGE',
|
data/lib/pwn/sast/eval.rb
CHANGED
@@ -25,7 +25,6 @@ module PWN
|
|
25
25
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
26
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
27
27
|
line_no_and_contents_arr = []
|
28
|
-
filename_arr = []
|
29
28
|
entry_beautified = false
|
30
29
|
|
31
30
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -48,8 +47,8 @@ module PWN
|
|
48
47
|
|
49
48
|
hash_line = {
|
50
49
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
51
|
-
|
52
|
-
filename:
|
50
|
+
security_references: security_references,
|
51
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
53
52
|
line_no_and_contents: '',
|
54
53
|
raw_content: str,
|
55
54
|
test_case_filter: test_case_filter
|
@@ -78,9 +77,11 @@ module PWN
|
|
78
77
|
else
|
79
78
|
author = 'N/A'
|
80
79
|
end
|
81
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
|
-
|
83
|
-
|
80
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
+
line_no: line_no,
|
82
|
+
contents: contents,
|
83
|
+
author: author
|
84
|
+
)
|
84
85
|
|
85
86
|
current_count += 2
|
86
87
|
end
|
@@ -105,7 +106,7 @@ module PWN
|
|
105
106
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
106
107
|
# Determine the level of Testing Coverage w/ PWN.
|
107
108
|
|
108
|
-
public_class_method def self.
|
109
|
+
public_class_method def self.security_references
|
109
110
|
{
|
110
111
|
sast_module: self,
|
111
112
|
section: 'MALICIOUS CODE PROTECTION',
|
data/lib/pwn/sast/factory.rb
CHANGED
@@ -26,7 +26,6 @@ module PWN
|
|
26
26
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
27
27
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java')
|
28
28
|
line_no_and_contents_arr = []
|
29
|
-
filename_arr = []
|
30
29
|
entry_beautified = false
|
31
30
|
|
32
31
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -47,8 +46,8 @@ module PWN
|
|
47
46
|
|
48
47
|
hash_line = {
|
49
48
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
50
|
-
|
51
|
-
filename:
|
49
|
+
security_references: security_references,
|
50
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
52
51
|
line_no_and_contents: '',
|
53
52
|
raw_content: str,
|
54
53
|
test_case_filter: test_case_filter
|
@@ -77,9 +76,11 @@ module PWN
|
|
77
76
|
else
|
78
77
|
author = 'N/A'
|
79
78
|
end
|
80
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
-
|
82
|
-
|
79
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
80
|
+
line_no: line_no,
|
81
|
+
contents: contents,
|
82
|
+
author: author
|
83
|
+
)
|
83
84
|
|
84
85
|
current_count += 2
|
85
86
|
end
|
@@ -102,7 +103,7 @@ module PWN
|
|
102
103
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
103
104
|
# Determine the level of Testing Coverage w/ PWN.
|
104
105
|
|
105
|
-
public_class_method def self.
|
106
|
+
public_class_method def self.security_references
|
106
107
|
{
|
107
108
|
sast_module: self,
|
108
109
|
section: 'DEVELOPER CONFIGURATION MANAGEMENT',
|
@@ -24,7 +24,6 @@ module PWN
|
|
24
24
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
25
25
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
26
26
|
line_no_and_contents_arr = []
|
27
|
-
filename_arr = []
|
28
27
|
entry_beautified = false
|
29
28
|
|
30
29
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -57,8 +56,8 @@ module PWN
|
|
57
56
|
|
58
57
|
hash_line = {
|
59
58
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
60
|
-
|
61
|
-
filename:
|
59
|
+
security_references: security_references,
|
60
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
62
61
|
line_no_and_contents: '',
|
63
62
|
raw_content: str,
|
64
63
|
test_case_filter: test_case_filter
|
@@ -87,9 +86,11 @@ module PWN
|
|
87
86
|
else
|
88
87
|
author = 'N/A'
|
89
88
|
end
|
90
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
91
|
-
|
92
|
-
|
89
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
90
|
+
line_no: line_no,
|
91
|
+
contents: contents,
|
92
|
+
author: author
|
93
|
+
)
|
93
94
|
|
94
95
|
current_count += 2
|
95
96
|
end
|
@@ -112,7 +113,7 @@ module PWN
|
|
112
113
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
113
114
|
# Determine the level of Testing Coverage w/ PWN.
|
114
115
|
|
115
|
-
public_class_method def self.
|
116
|
+
public_class_method def self.security_references
|
116
117
|
{
|
117
118
|
sast_module: self,
|
118
119
|
section: 'PROTECTION OF INFORMATION AT REST',
|
data/lib/pwn/sast/inner_html.rb
CHANGED
@@ -25,7 +25,6 @@ module PWN
|
|
25
25
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
26
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
27
27
|
line_no_and_contents_arr = []
|
28
|
-
filename_arr = []
|
29
28
|
entry_beautified = false
|
30
29
|
|
31
30
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -48,8 +47,8 @@ module PWN
|
|
48
47
|
|
49
48
|
hash_line = {
|
50
49
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
51
|
-
|
52
|
-
filename:
|
50
|
+
security_references: security_references,
|
51
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
53
52
|
line_no_and_contents: '',
|
54
53
|
raw_content: str,
|
55
54
|
test_case_filter: test_case_filter
|
@@ -78,9 +77,11 @@ module PWN
|
|
78
77
|
else
|
79
78
|
author = 'N/A'
|
80
79
|
end
|
81
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
|
-
|
83
|
-
|
80
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
+
line_no: line_no,
|
82
|
+
contents: contents,
|
83
|
+
author: author
|
84
|
+
)
|
84
85
|
|
85
86
|
current_count += 2
|
86
87
|
end
|
@@ -105,7 +106,7 @@ module PWN
|
|
105
106
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
106
107
|
# Determine the level of Testing Coverage w/ PWN.
|
107
108
|
|
108
|
-
public_class_method def self.
|
109
|
+
public_class_method def self.security_references
|
109
110
|
{
|
110
111
|
sast_module: self,
|
111
112
|
section: 'MALICIOUS CODE PROTECTION',
|
data/lib/pwn/sast/keystore.rb
CHANGED
@@ -24,7 +24,6 @@ module PWN
|
|
24
24
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
25
25
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
26
26
|
line_no_and_contents_arr = []
|
27
|
-
filename_arr = []
|
28
27
|
entry_beautified = false
|
29
28
|
|
30
29
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -45,8 +44,8 @@ module PWN
|
|
45
44
|
|
46
45
|
hash_line = {
|
47
46
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
48
|
-
|
49
|
-
filename:
|
47
|
+
security_references: security_references,
|
48
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
50
49
|
line_no_and_contents: '',
|
51
50
|
raw_content: str,
|
52
51
|
test_case_filter: test_case_filter
|
@@ -75,9 +74,11 @@ module PWN
|
|
75
74
|
else
|
76
75
|
author = 'N/A'
|
77
76
|
end
|
78
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
|
-
|
80
|
-
|
77
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
|
+
line_no: line_no,
|
79
|
+
contents: contents,
|
80
|
+
author: author
|
81
|
+
)
|
81
82
|
|
82
83
|
current_count += 2
|
83
84
|
end
|
@@ -102,7 +103,7 @@ module PWN
|
|
102
103
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
103
104
|
# Determine the level of Testing Coverage w/ PWN.
|
104
105
|
|
105
|
-
public_class_method def self.
|
106
|
+
public_class_method def self.security_references
|
106
107
|
{
|
107
108
|
sast_module: self,
|
108
109
|
section: 'CRYPTOGRAPHIC KEY ESTABLISHMENT AND MANAGEMENT',
|
@@ -25,7 +25,6 @@ module PWN
|
|
25
25
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
26
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
27
27
|
line_no_and_contents_arr = []
|
28
|
-
filename_arr = []
|
29
28
|
entry_beautified = false
|
30
29
|
|
31
30
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -48,8 +47,8 @@ module PWN
|
|
48
47
|
|
49
48
|
hash_line = {
|
50
49
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
51
|
-
|
52
|
-
filename:
|
50
|
+
security_references: security_references,
|
51
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
53
52
|
line_no_and_contents: '',
|
54
53
|
raw_content: str,
|
55
54
|
test_case_filter: test_case_filter
|
@@ -78,9 +77,11 @@ module PWN
|
|
78
77
|
else
|
79
78
|
author = 'N/A'
|
80
79
|
end
|
81
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
|
-
|
83
|
-
|
80
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
+
line_no: line_no,
|
82
|
+
contents: contents,
|
83
|
+
author: author
|
84
|
+
)
|
84
85
|
|
85
86
|
current_count += 2
|
86
87
|
end
|
@@ -105,7 +106,7 @@ module PWN
|
|
105
106
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
106
107
|
# Determine the level of Testing Coverage w/ PWN.
|
107
108
|
|
108
|
-
public_class_method def self.
|
109
|
+
public_class_method def self.security_references
|
109
110
|
{
|
110
111
|
sast_module: self,
|
111
112
|
section: 'MALICIOUS CODE PROTECTION',
|
data/lib/pwn/sast/log4j.rb
CHANGED
@@ -24,7 +24,6 @@ module PWN
|
|
24
24
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
25
25
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry) == '.java'
|
26
26
|
line_no_and_contents_arr = []
|
27
|
-
filename_arr = []
|
28
27
|
entry_beautified = false
|
29
28
|
|
30
29
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -48,8 +47,8 @@ module PWN
|
|
48
47
|
|
49
48
|
hash_line = {
|
50
49
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
51
|
-
|
52
|
-
filename:
|
50
|
+
security_references: security_references,
|
51
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
53
52
|
line_no_and_contents: '',
|
54
53
|
raw_content: str,
|
55
54
|
test_case_filter: test_case_filter
|
@@ -78,9 +77,11 @@ module PWN
|
|
78
77
|
else
|
79
78
|
author = 'N/A'
|
80
79
|
end
|
81
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
|
-
|
83
|
-
|
80
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
+
line_no: line_no,
|
82
|
+
contents: contents,
|
83
|
+
author: author
|
84
|
+
)
|
84
85
|
|
85
86
|
current_count += 2
|
86
87
|
end
|
@@ -105,7 +106,7 @@ module PWN
|
|
105
106
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
106
107
|
# Determine the level of Testing Coverage w/ PWN.
|
107
108
|
|
108
|
-
public_class_method def self.
|
109
|
+
public_class_method def self.security_references
|
109
110
|
{
|
110
111
|
sast_module: self,
|
111
112
|
section: 'DEVELOPER SECURITY AND PRIVACY ARCHITECTURE AND DESIGN',
|
data/lib/pwn/sast/logger.rb
CHANGED
@@ -25,7 +25,6 @@ module PWN
|
|
25
25
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
26
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java')
|
27
27
|
line_no_and_contents_arr = []
|
28
|
-
filename_arr = []
|
29
28
|
entry_beautified = false
|
30
29
|
|
31
30
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -63,8 +62,8 @@ module PWN
|
|
63
62
|
|
64
63
|
hash_line = {
|
65
64
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
66
|
-
|
67
|
-
filename:
|
65
|
+
security_references: security_references,
|
66
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
68
67
|
line_no_and_contents: '',
|
69
68
|
raw_content: str,
|
70
69
|
test_case_filter: test_case_filter
|
@@ -93,9 +92,11 @@ module PWN
|
|
93
92
|
else
|
94
93
|
author = 'N/A'
|
95
94
|
end
|
96
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
97
|
-
|
98
|
-
|
95
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
96
|
+
line_no: line_no,
|
97
|
+
contents: contents,
|
98
|
+
author: author
|
99
|
+
)
|
99
100
|
|
100
101
|
current_count += 2
|
101
102
|
end
|
@@ -120,7 +121,7 @@ module PWN
|
|
120
121
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
121
122
|
# Determine the level of Testing Coverage w/ PWN.
|
122
123
|
|
123
|
-
public_class_method def self.
|
124
|
+
public_class_method def self.security_references
|
124
125
|
{
|
125
126
|
sast_module: self,
|
126
127
|
section: 'PROTECTION OF INFORMATION AT REST',
|
data/lib/pwn/sast/outer_html.rb
CHANGED
@@ -25,7 +25,6 @@ module PWN
|
|
25
25
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
26
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
27
27
|
line_no_and_contents_arr = []
|
28
|
-
filename_arr = []
|
29
28
|
entry_beautified = false
|
30
29
|
|
31
30
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -48,8 +47,8 @@ module PWN
|
|
48
47
|
|
49
48
|
hash_line = {
|
50
49
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
51
|
-
|
52
|
-
filename:
|
50
|
+
security_references: security_references,
|
51
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
53
52
|
line_no_and_contents: '',
|
54
53
|
raw_content: str,
|
55
54
|
test_case_filter: test_case_filter
|
@@ -78,9 +77,11 @@ module PWN
|
|
78
77
|
else
|
79
78
|
author = 'N/A'
|
80
79
|
end
|
81
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
|
-
|
83
|
-
|
80
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
+
line_no: line_no,
|
82
|
+
contents: contents,
|
83
|
+
author: author
|
84
|
+
)
|
84
85
|
|
85
86
|
current_count += 2
|
86
87
|
end
|
@@ -105,7 +106,7 @@ module PWN
|
|
105
106
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
106
107
|
# Determine the level of Testing Coverage w/ PWN.
|
107
108
|
|
108
|
-
public_class_method def self.
|
109
|
+
public_class_method def self.security_references
|
109
110
|
{
|
110
111
|
sast_module: self,
|
111
112
|
section: 'MALICIOUS CODE PROTECTION',
|
data/lib/pwn/sast/password.rb
CHANGED
@@ -24,7 +24,6 @@ module PWN
|
|
24
24
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
25
25
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
26
26
|
line_no_and_contents_arr = []
|
27
|
-
filename_arr = []
|
28
27
|
entry_beautified = false
|
29
28
|
|
30
29
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -52,8 +51,8 @@ module PWN
|
|
52
51
|
|
53
52
|
hash_line = {
|
54
53
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
55
|
-
|
56
|
-
filename:
|
54
|
+
security_references: security_references,
|
55
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
57
56
|
line_no_and_contents: '',
|
58
57
|
raw_content: str,
|
59
58
|
test_case_filter: test_case_filter
|
@@ -82,9 +81,11 @@ module PWN
|
|
82
81
|
else
|
83
82
|
author = 'N/A'
|
84
83
|
end
|
85
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
86
|
-
|
87
|
-
|
84
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
85
|
+
line_no: line_no,
|
86
|
+
contents: contents,
|
87
|
+
author: author
|
88
|
+
)
|
88
89
|
|
89
90
|
current_count += 2
|
90
91
|
end
|
@@ -107,7 +108,7 @@ module PWN
|
|
107
108
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
108
109
|
# Determine the level of Testing Coverage w/ PWN.
|
109
110
|
|
110
|
-
public_class_method def self.
|
111
|
+
public_class_method def self.security_references
|
111
112
|
{
|
112
113
|
sast_module: self,
|
113
114
|
section: 'PROTECTION OF INFORMATION AT REST',
|
data/lib/pwn/sast/pom_version.rb
CHANGED
@@ -25,7 +25,6 @@ module PWN
|
|
25
25
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
26
26
|
if File.file?(entry) && File.basename(entry) == 'pom.xml'
|
27
27
|
line_no_and_contents_arr = []
|
28
|
-
filename_arr = []
|
29
28
|
entry_beautified = false
|
30
29
|
|
31
30
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -46,8 +45,8 @@ module PWN
|
|
46
45
|
|
47
46
|
hash_line = {
|
48
47
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
49
|
-
|
50
|
-
filename:
|
48
|
+
security_references: security_references,
|
49
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
51
50
|
line_no_and_contents: '',
|
52
51
|
raw_content: str,
|
53
52
|
test_case_filter: test_case_filter
|
@@ -78,15 +77,19 @@ module PWN
|
|
78
77
|
else
|
79
78
|
author = 'N/A'
|
80
79
|
end
|
81
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
|
-
|
83
|
-
|
80
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
|
+
line_no: line_no,
|
82
|
+
contents: contents,
|
83
|
+
author: author
|
84
|
+
)
|
84
85
|
|
85
86
|
current_count += 2
|
86
87
|
end
|
87
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
88
|
-
|
89
|
-
|
88
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
89
|
+
line_no: '--',
|
90
|
+
contents: '--',
|
91
|
+
author: '--'
|
92
|
+
)
|
90
93
|
end
|
91
94
|
result_arr.push(hash_line)
|
92
95
|
logger_results = "#{logger_results}x" # Seeing progress is good :)
|
@@ -109,7 +112,7 @@ module PWN
|
|
109
112
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
110
113
|
# Determine the level of Testing Coverage w/ PWN.
|
111
114
|
|
112
|
-
public_class_method def self.
|
115
|
+
public_class_method def self.security_references
|
113
116
|
{
|
114
117
|
sast_module: self,
|
115
118
|
section: 'VULNERABILITY SCANNING',
|
data/lib/pwn/sast/port.rb
CHANGED
@@ -26,7 +26,6 @@ module PWN
|
|
26
26
|
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
|
27
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
|
28
28
|
line_no_and_contents_arr = []
|
29
|
-
filename_arr = []
|
30
29
|
entry_beautified = false
|
31
30
|
|
32
31
|
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
|
@@ -55,8 +54,8 @@ module PWN
|
|
55
54
|
|
56
55
|
hash_line = {
|
57
56
|
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
|
58
|
-
|
59
|
-
filename:
|
57
|
+
security_references: security_references,
|
58
|
+
filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
|
60
59
|
line_no_and_contents: '',
|
61
60
|
raw_content: str,
|
62
61
|
test_case_filter: test_case_filter
|
@@ -85,9 +84,11 @@ module PWN
|
|
85
84
|
else
|
86
85
|
author = 'N/A'
|
87
86
|
end
|
88
|
-
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
89
|
-
|
90
|
-
|
87
|
+
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
88
|
+
line_no: line_no,
|
89
|
+
contents: contents,
|
90
|
+
author: author
|
91
|
+
)
|
91
92
|
|
92
93
|
current_count += 2
|
93
94
|
end
|
@@ -112,7 +113,7 @@ module PWN
|
|
112
113
|
# to PWN Exploit & Static Code Anti-Pattern Matching Modules to
|
113
114
|
# Determine the level of Testing Coverage w/ PWN.
|
114
115
|
|
115
|
-
public_class_method def self.
|
116
|
+
public_class_method def self.security_references
|
116
117
|
{
|
117
118
|
sast_module: self,
|
118
119
|
section: 'TRANSMISSION CONFIDENTIALITY AND INTEGRITY',
|