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
@@ -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'))
@@ -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: 'CRYPTOGRAPHIC MODULE AUTHENTICATION',
@@ -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'))
@@ -50,8 +49,8 @@ module PWN
50
49
 
51
50
  hash_line = {
52
51
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
53
- security_requirements: security_requirements,
54
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
52
+ security_references: security_references,
53
+ filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
55
54
  line_no_and_contents: '',
56
55
  raw_content: str,
57
56
  test_case_filter: test_case_filter
@@ -80,9 +79,11 @@ module PWN
80
79
  else
81
80
  author = 'N/A'
82
81
  end
83
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
84
- contents: contents,
85
- author: author)
82
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
83
+ line_no: line_no,
84
+ contents: contents,
85
+ author: author
86
+ )
86
87
 
87
88
  current_count += 2
88
89
  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: 'LEAST PRIVILEGE',
@@ -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'))
@@ -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: 'PROTECTION OF INFORMATION AT REST',
@@ -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'))
@@ -56,8 +55,8 @@ module PWN
56
55
 
57
56
  hash_line = {
58
57
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
59
- security_requirements: security_requirements,
60
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
58
+ security_references: security_references,
59
+ filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
61
60
  line_no_and_contents: '',
62
61
  raw_content: str,
63
62
  test_case_filter: test_case_filter
@@ -86,9 +85,11 @@ module PWN
86
85
  else
87
86
  author = 'N/A'
88
87
  end
89
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
90
- contents: contents,
91
- author: author)
88
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
89
+ line_no: line_no,
90
+ contents: contents,
91
+ author: author
92
+ )
92
93
 
93
94
  current_count += 2
94
95
  end
@@ -113,7 +114,7 @@ module PWN
113
114
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
114
115
  # Determine the level of Testing Coverage w/ PWN.
115
116
 
116
- public_class_method def self.security_requirements
117
+ public_class_method def self.security_references
117
118
  {
118
119
  sast_module: self,
119
120
  section: 'DEVELOPER SECURITY AND PRIVACY ARCHITECTURE AND DESIGN',
@@ -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'))
@@ -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: 'CRYPTOGRAPHIC MODULE AUTHENTICATION',
data/lib/pwn/sast/sql.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'))
@@ -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
@@ -109,7 +110,7 @@ module PWN
109
110
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
110
111
  # Determine the level of Testing Coverage w/ PWN.
111
112
 
112
- public_class_method def self.security_requirements
113
+ public_class_method def self.security_references
113
114
  {
114
115
  sast_module: self,
115
116
  section: 'INFORMATION INPUT VALIDATION',
data/lib/pwn/sast/ssl.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
- 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: 'PUBLIC KEY INFRASTRUCTURE CERTIFICATES',
data/lib/pwn/sast/sudo.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'))
@@ -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: 'LEAST PRIVILEGE',
@@ -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'))
@@ -62,8 +61,8 @@ module PWN
62
61
 
63
62
  hash_line = {
64
63
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
65
- security_requirements: security_requirements,
66
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
64
+ security_references: security_references,
65
+ filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
67
66
  line_no_and_contents: '',
68
67
  raw_content: str,
69
68
  test_case_filter: test_case_filter
@@ -92,9 +91,11 @@ module PWN
92
91
  else
93
92
  author = 'N/A'
94
93
  end
95
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
96
- contents: contents,
97
- author: author)
94
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
95
+ line_no: line_no,
96
+ contents: contents,
97
+ author: author
98
+ )
98
99
 
99
100
  current_count += 2
100
101
  end
@@ -119,7 +120,7 @@ module PWN
119
120
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
120
121
  # Determine the level of Testing Coverage w/ PWN.
121
122
 
122
- public_class_method def self.security_requirements
123
+ public_class_method def self.security_references
123
124
  {
124
125
  sast_module: self,
125
126
  section: 'LEAST PRIVILEGE',
@@ -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) == '.scala' || 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'))
@@ -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
@@ -104,7 +105,7 @@ module PWN
104
105
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
105
106
  # Determine the level of Testing Coverage w/ PWN.
106
107
 
107
- public_class_method def self.security_requirements
108
+ public_class_method def self.security_references
108
109
  {
109
110
  sast_module: self,
110
111
  section: 'ERROR HANDLING',
@@ -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 MODULE AUTHENTICATION',
@@ -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: 'VULNERABILITY SCANNING',
@@ -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'))
@@ -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
@@ -104,7 +105,7 @@ module PWN
104
105
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
105
106
  # Determine the level of Testing Coverage w/ PWN.
106
107
 
107
- public_class_method def self.security_requirements
108
+ public_class_method def self.security_references
108
109
  {
109
110
  sast_module: self,
110
111
  section: 'MALICIOUS CODE PROTECTION',
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.510'
4
+ VERSION = '0.4.513'
5
5
  end
@@ -8,9 +8,9 @@ describe PWN::SAST::AMQPConnectAsGuest do
8
8
  expect(scan_response).to respond_to :scan
9
9
  end
10
10
 
11
- it 'should display information for security_requirements' do
12
- security_requirements_response = PWN::SAST::AMQPConnectAsGuest
13
- expect(security_requirements_response).to respond_to :security_requirements
11
+ it 'should display information for security_references' do
12
+ security_references_response = PWN::SAST::AMQPConnectAsGuest
13
+ expect(security_references_response).to respond_to :security_references
14
14
  end
15
15
 
16
16
  it 'should display information for authors' do
@@ -8,9 +8,9 @@ describe PWN::SAST::ApacheFileSystemUtilAPI do
8
8
  expect(scan_response).to respond_to :scan
9
9
  end
10
10
 
11
- it 'should display information for security_requirements' do
12
- security_requirements_response = PWN::SAST::ApacheFileSystemUtilAPI
13
- expect(security_requirements_response).to respond_to :security_requirements
11
+ it 'should display information for security_references' do
12
+ security_references_response = PWN::SAST::ApacheFileSystemUtilAPI
13
+ expect(security_references_response).to respond_to :security_references
14
14
  end
15
15
 
16
16
  it 'should display information for authors' do
@@ -8,9 +8,9 @@ describe PWN::SAST::AWS do
8
8
  expect(scan_response).to respond_to :scan
9
9
  end
10
10
 
11
- it 'should display information for security_requirements' do
12
- security_requirements_response = PWN::SAST::AWS
13
- expect(security_requirements_response).to respond_to :security_requirements
11
+ it 'should display information for security_references' do
12
+ security_references_response = PWN::SAST::AWS
13
+ expect(security_references_response).to respond_to :security_references
14
14
  end
15
15
 
16
16
  it 'should display information for authors' do
@@ -8,9 +8,9 @@ describe PWN::SAST::BannedFunctionCallsC do
8
8
  expect(scan_response).to respond_to :scan
9
9
  end
10
10
 
11
- it 'should display information for security_requirements' do
12
- security_requirements_response = PWN::SAST::BannedFunctionCallsC
13
- expect(security_requirements_response).to respond_to :security_requirements
11
+ it 'should display information for security_references' do
12
+ security_references_response = PWN::SAST::BannedFunctionCallsC
13
+ expect(security_references_response).to respond_to :security_references
14
14
  end
15
15
 
16
16
  it 'should display information for authors' do
@@ -8,9 +8,9 @@ describe PWN::SAST::Base64 do
8
8
  expect(scan_response).to respond_to :scan
9
9
  end
10
10
 
11
- it 'should display information for security_requirements' do
12
- security_requirements_response = PWN::SAST::Base64
13
- expect(security_requirements_response).to respond_to :security_requirements
11
+ it 'should display information for security_references' do
12
+ security_references_response = PWN::SAST::Base64
13
+ expect(security_references_response).to respond_to :security_references
14
14
  end
15
15
 
16
16
  it 'should display information for authors' do