pwn 0.4.510 → 0.4.513

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -4
  3. data/README.md +2 -2
  4. data/lib/pwn/plugins/owasp_zap.rb +1 -1
  5. data/lib/pwn/reports/sast.rb +9 -8
  6. data/lib/pwn/sast/amqp_connect_as_guest.rb +8 -7
  7. data/lib/pwn/sast/apache_file_system_util_api.rb +8 -7
  8. data/lib/pwn/sast/aws.rb +8 -7
  9. data/lib/pwn/sast/banned_function_calls_c.rb +8 -7
  10. data/lib/pwn/sast/base64.rb +8 -7
  11. data/lib/pwn/sast/beef_hook.rb +8 -7
  12. data/lib/pwn/sast/cmd_execution_java.rb +8 -7
  13. data/lib/pwn/sast/cmd_execution_python.rb +8 -7
  14. data/lib/pwn/sast/cmd_execution_ruby.rb +8 -7
  15. data/lib/pwn/sast/cmd_execution_scala.rb +8 -7
  16. data/lib/pwn/sast/csrf.rb +8 -7
  17. data/lib/pwn/sast/deserial_java.rb +8 -7
  18. data/lib/pwn/sast/emoticon.rb +8 -7
  19. data/lib/pwn/sast/eval.rb +8 -7
  20. data/lib/pwn/sast/factory.rb +8 -7
  21. data/lib/pwn/sast/http_authorization_header.rb +8 -7
  22. data/lib/pwn/sast/inner_html.rb +8 -7
  23. data/lib/pwn/sast/keystore.rb +8 -7
  24. data/lib/pwn/sast/location_hash.rb +8 -7
  25. data/lib/pwn/sast/log4j.rb +8 -7
  26. data/lib/pwn/sast/logger.rb +8 -7
  27. data/lib/pwn/sast/outer_html.rb +8 -7
  28. data/lib/pwn/sast/password.rb +8 -7
  29. data/lib/pwn/sast/pom_version.rb +13 -10
  30. data/lib/pwn/sast/port.rb +8 -7
  31. data/lib/pwn/sast/private_key.rb +8 -7
  32. data/lib/pwn/sast/redirect.rb +8 -7
  33. data/lib/pwn/sast/redos.rb +8 -7
  34. data/lib/pwn/sast/shell.rb +8 -7
  35. data/lib/pwn/sast/signature.rb +8 -7
  36. data/lib/pwn/sast/sql.rb +8 -7
  37. data/lib/pwn/sast/ssl.rb +8 -7
  38. data/lib/pwn/sast/sudo.rb +8 -7
  39. data/lib/pwn/sast/task_tag.rb +8 -7
  40. data/lib/pwn/sast/throw_errors.rb +8 -7
  41. data/lib/pwn/sast/token.rb +8 -7
  42. data/lib/pwn/sast/version.rb +8 -7
  43. data/lib/pwn/sast/window_location_hash.rb +8 -7
  44. data/lib/pwn/version.rb +1 -1
  45. data/spec/lib/pwn/sast/amqp_connect_as_guest_spec.rb +3 -3
  46. data/spec/lib/pwn/sast/apache_file_system_util_api_spec.rb +3 -3
  47. data/spec/lib/pwn/sast/aws_spec.rb +3 -3
  48. data/spec/lib/pwn/sast/banned_function_calls_c_spec.rb +3 -3
  49. data/spec/lib/pwn/sast/base64_spec.rb +3 -3
  50. data/spec/lib/pwn/sast/beef_hook_spec.rb +3 -3
  51. data/spec/lib/pwn/sast/cmd_execution_java_spec.rb +3 -3
  52. data/spec/lib/pwn/sast/cmd_execution_python_spec.rb +3 -3
  53. data/spec/lib/pwn/sast/cmd_execution_ruby_spec.rb +3 -3
  54. data/spec/lib/pwn/sast/cmd_execution_scala_spec.rb +3 -3
  55. data/spec/lib/pwn/sast/csrf_spec.rb +3 -3
  56. data/spec/lib/pwn/sast/deserial_java_spec.rb +3 -3
  57. data/spec/lib/pwn/sast/emoticon_spec.rb +3 -3
  58. data/spec/lib/pwn/sast/eval_spec.rb +3 -3
  59. data/spec/lib/pwn/sast/factory_spec.rb +3 -3
  60. data/spec/lib/pwn/sast/http_authorization_header_spec.rb +3 -3
  61. data/spec/lib/pwn/sast/inner_html_spec.rb +3 -3
  62. data/spec/lib/pwn/sast/keystore_spec.rb +3 -3
  63. data/spec/lib/pwn/sast/location_hash_spec.rb +3 -3
  64. data/spec/lib/pwn/sast/log4j_spec.rb +3 -3
  65. data/spec/lib/pwn/sast/logger_spec.rb +3 -3
  66. data/spec/lib/pwn/sast/password_spec.rb +3 -3
  67. data/spec/lib/pwn/sast/pom_version_spec.rb +3 -3
  68. data/spec/lib/pwn/sast/port_spec.rb +3 -3
  69. data/spec/lib/pwn/sast/private_key_spec.rb +3 -3
  70. data/spec/lib/pwn/sast/redirect_spec.rb +3 -3
  71. data/spec/lib/pwn/sast/redos_spec.rb +3 -3
  72. data/spec/lib/pwn/sast/shell_spec.rb +3 -3
  73. data/spec/lib/pwn/sast/signature_spec.rb +3 -3
  74. data/spec/lib/pwn/sast/sql_spec.rb +3 -3
  75. data/spec/lib/pwn/sast/ssl_spec.rb +3 -3
  76. data/spec/lib/pwn/sast/sudo_spec.rb +3 -3
  77. data/spec/lib/pwn/sast/task_tag_spec.rb +3 -3
  78. data/spec/lib/pwn/sast/throw_errors_spec.rb +3 -3
  79. data/spec/lib/pwn/sast/token_spec.rb +3 -3
  80. data/spec/lib/pwn/sast/version_spec.rb +3 -3
  81. data/spec/lib/pwn/sast/window_location_hash_spec.rb +3 -3
  82. 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
- security_requirements: security_requirements,
51
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
81
- contents: contents,
82
- author: author)
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.security_requirements
106
+ public_class_method def self.security_references
106
107
  {
107
108
  sast_module: self,
108
109
  section: 'INFORMATION INPUT VALIDATION',
@@ -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
- security_requirements: security_requirements,
56
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
86
- contents: contents,
87
- author: author)
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.security_requirements
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
- security_requirements: security_requirements,
52
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
82
- contents: contents,
83
- author: author)
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.security_requirements
109
+ public_class_method def self.security_references
109
110
  {
110
111
  sast_module: self,
111
112
  section: 'MALICIOUS CODE PROTECTION',
@@ -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
- security_requirements: security_requirements,
51
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
81
- contents: contents,
82
- author: author)
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.security_requirements
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
- security_requirements: security_requirements,
61
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
91
- contents: contents,
92
- author: author)
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.security_requirements
116
+ public_class_method def self.security_references
116
117
  {
117
118
  sast_module: self,
118
119
  section: 'PROTECTION OF INFORMATION AT REST',
@@ -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
- security_requirements: security_requirements,
52
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
82
- contents: contents,
83
- author: author)
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.security_requirements
109
+ public_class_method def self.security_references
109
110
  {
110
111
  sast_module: self,
111
112
  section: 'MALICIOUS CODE PROTECTION',
@@ -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
- security_requirements: security_requirements,
49
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
79
- contents: contents,
80
- author: author)
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.security_requirements
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
- security_requirements: security_requirements,
52
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
82
- contents: contents,
83
- author: author)
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.security_requirements
109
+ public_class_method def self.security_references
109
110
  {
110
111
  sast_module: self,
111
112
  section: 'MALICIOUS CODE PROTECTION',
@@ -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
- security_requirements: security_requirements,
52
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
82
- contents: contents,
83
- author: author)
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.security_requirements
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',
@@ -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
- security_requirements: security_requirements,
67
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
97
- contents: contents,
98
- author: author)
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.security_requirements
124
+ public_class_method def self.security_references
124
125
  {
125
126
  sast_module: self,
126
127
  section: 'PROTECTION OF INFORMATION AT REST',
@@ -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
- security_requirements: security_requirements,
52
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
82
- contents: contents,
83
- author: author)
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.security_requirements
109
+ public_class_method def self.security_references
109
110
  {
110
111
  sast_module: self,
111
112
  section: 'MALICIOUS CODE PROTECTION',
@@ -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
- security_requirements: security_requirements,
56
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
86
- contents: contents,
87
- author: author)
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.security_requirements
111
+ public_class_method def self.security_references
111
112
  {
112
113
  sast_module: self,
113
114
  section: 'PROTECTION OF INFORMATION AT REST',
@@ -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
- security_requirements: security_requirements,
50
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
82
- contents: contents,
83
- author: author)
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(line_no: '--',
88
- contents: '--',
89
- author: '--')
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.security_requirements
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
- security_requirements: security_requirements,
59
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
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(line_no: line_no,
89
- contents: contents,
90
- author: author)
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.security_requirements
116
+ public_class_method def self.security_references
116
117
  {
117
118
  sast_module: self,
118
119
  section: 'TRANSMISSION CONFIDENTIALITY AND INTEGRITY',