pwn 0.5.437 → 0.5.438

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/pwn/ai/introspection.rb +0 -1
  4. data/lib/pwn/reports/sast.rb +0 -1
  5. data/lib/pwn/sast/amqp_connect_as_guest.rb +4 -3
  6. data/lib/pwn/sast/apache_file_system_util_api.rb +4 -3
  7. data/lib/pwn/sast/aws.rb +4 -3
  8. data/lib/pwn/sast/banned_function_calls_c.rb +4 -3
  9. data/lib/pwn/sast/base64.rb +4 -3
  10. data/lib/pwn/sast/beef_hook.rb +4 -3
  11. data/lib/pwn/sast/cmd_execution_java.rb +4 -3
  12. data/lib/pwn/sast/cmd_execution_python.rb +4 -3
  13. data/lib/pwn/sast/cmd_execution_ruby.rb +4 -3
  14. data/lib/pwn/sast/cmd_execution_scala.rb +4 -3
  15. data/lib/pwn/sast/csrf.rb +4 -3
  16. data/lib/pwn/sast/deserial_java.rb +4 -3
  17. data/lib/pwn/sast/emoticon.rb +4 -3
  18. data/lib/pwn/sast/eval.rb +4 -3
  19. data/lib/pwn/sast/factory.rb +4 -3
  20. data/lib/pwn/sast/http_authorization_header.rb +4 -3
  21. data/lib/pwn/sast/inner_html.rb +4 -3
  22. data/lib/pwn/sast/keystore.rb +4 -3
  23. data/lib/pwn/sast/local_storage.rb +4 -3
  24. data/lib/pwn/sast/location_hash.rb +4 -3
  25. data/lib/pwn/sast/log4j.rb +4 -3
  26. data/lib/pwn/sast/logger.rb +4 -3
  27. data/lib/pwn/sast/md5.rb +4 -3
  28. data/lib/pwn/sast/outer_html.rb +4 -3
  29. data/lib/pwn/sast/padding_oracle.rb +4 -3
  30. data/lib/pwn/sast/password.rb +4 -3
  31. data/lib/pwn/sast/php_input_mechanisms.rb +4 -3
  32. data/lib/pwn/sast/php_type_juggling.rb +4 -3
  33. data/lib/pwn/sast/pom_version.rb +4 -3
  34. data/lib/pwn/sast/port.rb +4 -3
  35. data/lib/pwn/sast/post_message.rb +4 -3
  36. data/lib/pwn/sast/private_key.rb +4 -3
  37. data/lib/pwn/sast/redirect.rb +4 -3
  38. data/lib/pwn/sast/redos.rb +4 -3
  39. data/lib/pwn/sast/shell.rb +4 -3
  40. data/lib/pwn/sast/signature.rb +4 -3
  41. data/lib/pwn/sast/sql.rb +4 -3
  42. data/lib/pwn/sast/ssl.rb +4 -3
  43. data/lib/pwn/sast/sudo.rb +4 -3
  44. data/lib/pwn/sast/task_tag.rb +4 -3
  45. data/lib/pwn/sast/throw_errors.rb +4 -3
  46. data/lib/pwn/sast/token.rb +4 -3
  47. data/lib/pwn/sast/type_script_type_juggling.rb +4 -3
  48. data/lib/pwn/sast/version.rb +4 -3
  49. data/lib/pwn/sast/window_location_hash.rb +4 -3
  50. data/lib/pwn/version.rb +1 -1
  51. metadata +1 -1
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -20,7 +21,8 @@ module PWN
20
21
  dir_path = opts[:dir_path]
21
22
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
22
23
  result_arr = []
23
- logger_results = ''
24
+ ai_introspection = PWN::Env[:ai][:introspection]
25
+ logger_results = "AI Introspection => #{ai_introspection} => "
24
26
 
25
27
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
26
28
  if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && entry !~ /test/i
@@ -89,9 +91,8 @@ module PWN
89
91
  end
90
92
  author ||= 'N/A'
91
93
 
92
- ai_instrospection = PWN::Env[:ai][:introspection]
93
94
  ai_analysis = nil
94
- if ai_instrospection
95
+ if ai_introspection
95
96
  request = {
96
97
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
97
98
  line_no: line_no,
data/lib/pwn/sast/md5.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -74,9 +76,8 @@ module PWN
74
76
  end
75
77
  author ||= 'N/A'
76
78
 
77
- ai_instrospection = PWN::Env[:ai][:introspection]
78
79
  ai_analysis = nil
79
- if ai_instrospection
80
+ if ai_introspection
80
81
  request = {
81
82
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
82
83
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -20,7 +21,8 @@ module PWN
20
21
  dir_path = opts[:dir_path]
21
22
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
22
23
  result_arr = []
23
- logger_results = ''
24
+ ai_introspection = PWN::Env[:ai][:introspection]
25
+ logger_results = "AI Introspection => #{ai_introspection} => "
24
26
 
25
27
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
26
28
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -75,9 +77,8 @@ module PWN
75
77
  end
76
78
  author ||= 'N/A'
77
79
 
78
- ai_instrospection = PWN::Env[:ai][:introspection]
79
80
  ai_analysis = nil
80
- if ai_instrospection
81
+ if ai_introspection
81
82
  request = {
82
83
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
83
84
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -18,7 +19,8 @@ module PWN
18
19
  dir_path = opts[:dir_path]
19
20
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
20
21
  result_arr = []
21
- logger_results = ''
22
+ ai_introspection = PWN::Env[:ai][:introspection]
23
+ logger_results = "AI Introspection => #{ai_introspection} => "
22
24
 
23
25
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
24
26
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -74,9 +76,8 @@ module PWN
74
76
  end
75
77
  author ||= 'N/A'
76
78
 
77
- ai_instrospection = PWN::Env[:ai][:introspection]
78
79
  ai_analysis = nil
79
- if ai_instrospection
80
+ if ai_introspection
80
81
  request = {
81
82
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
82
83
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -78,9 +80,8 @@ module PWN
78
80
  end
79
81
  author ||= 'N/A'
80
82
 
81
- ai_instrospection = PWN::Env[:ai][:introspection]
82
83
  ai_analysis = nil
83
- if ai_instrospection
84
+ if ai_introspection
84
85
  request = {
85
86
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
86
87
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry).include?('.php') && entry !~ /test/i
@@ -80,9 +82,8 @@ module PWN
80
82
  end
81
83
  author ||= 'N/A'
82
84
 
83
- ai_instrospection = PWN::Env[:ai][:introspection]
84
85
  ai_analysis = nil
85
- if ai_instrospection
86
+ if ai_introspection
86
87
  request = {
87
88
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
88
89
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry).include?('.php') && entry !~ /test/i
@@ -78,9 +80,8 @@ module PWN
78
80
  end
79
81
  author ||= 'N/A'
80
82
 
81
- ai_instrospection = PWN::Env[:ai][:introspection]
82
83
  ai_analysis = nil
83
- if ai_instrospection
84
+ if ai_introspection
84
85
  request = {
85
86
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
86
87
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -20,7 +21,8 @@ module PWN
20
21
  dir_path = opts[:dir_path]
21
22
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
22
23
  result_arr = []
23
- logger_results = ''
24
+ ai_introspection = PWN::Env[:ai][:introspection]
25
+ logger_results = "AI Introspection => #{ai_introspection} => "
24
26
 
25
27
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
26
28
  if File.file?(entry) && File.basename(entry) == 'pom.xml' && entry !~ /test/i
@@ -77,9 +79,8 @@ module PWN
77
79
  end
78
80
  author ||= 'N/A'
79
81
 
80
- ai_instrospection = PWN::Env[:ai][:introspection]
81
82
  ai_analysis = nil
82
- if ai_instrospection
83
+ if ai_introspection
83
84
  request = {
84
85
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
85
86
  line_no: line_no,
data/lib/pwn/sast/port.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -21,7 +22,8 @@ module PWN
21
22
  dir_path = opts[:dir_path]
22
23
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
23
24
  result_arr = []
24
- logger_results = ''
25
+ ai_introspection = PWN::Env[:ai][:introspection]
26
+ logger_results = "AI Introspection => #{ai_introspection} => "
25
27
 
26
28
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
27
29
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -81,9 +83,8 @@ module PWN
81
83
  end
82
84
  author ||= 'N/A'
83
85
 
84
- ai_instrospection = PWN::Env[:ai][:introspection]
85
86
  ai_analysis = nil
86
- if ai_instrospection
87
+ if ai_introspection
87
88
  request = {
88
89
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
89
90
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -20,7 +21,8 @@ module PWN
20
21
  dir_path = opts[:dir_path]
21
22
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
22
23
  result_arr = []
23
- logger_results = ''
24
+ ai_introspection = PWN::Env[:ai][:introspection]
25
+ logger_results = "AI Introspection => #{ai_introspection} => "
24
26
 
25
27
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
26
28
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -75,9 +77,8 @@ module PWN
75
77
  end
76
78
  author ||= 'N/A'
77
79
 
78
- ai_instrospection = PWN::Env[:ai][:introspection]
79
80
  ai_analysis = nil
80
- if ai_instrospection
81
+ if ai_introspection
81
82
  request = {
82
83
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
83
84
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -74,9 +76,8 @@ module PWN
74
76
  end
75
77
  author ||= 'N/A'
76
78
 
77
- ai_instrospection = PWN::Env[:ai][:introspection]
78
79
  ai_analysis = nil
79
- if ai_instrospection
80
+ if ai_introspection
80
81
  request = {
81
82
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
82
83
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -76,9 +78,8 @@ module PWN
76
78
  end
77
79
  author ||= 'N/A'
78
80
 
79
- ai_instrospection = PWN::Env[:ai][:introspection]
80
81
  ai_analysis = nil
81
- if ai_instrospection
82
+ if ai_introspection
82
83
  request = {
83
84
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
84
85
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -20,7 +21,8 @@ module PWN
20
21
  dir_path = opts[:dir_path]
21
22
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
22
23
  result_arr = []
23
- logger_results = ''
24
+ ai_introspection = PWN::Env[:ai][:introspection]
25
+ logger_results = "AI Introspection => #{ai_introspection} => "
24
26
 
25
27
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
26
28
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -81,9 +83,8 @@ module PWN
81
83
  end
82
84
  author ||= 'N/A'
83
85
 
84
- ai_instrospection = PWN::Env[:ai][:introspection]
85
86
  ai_analysis = nil
86
- if ai_instrospection
87
+ if ai_introspection
87
88
  request = {
88
89
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
89
90
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -82,9 +84,8 @@ module PWN
82
84
  end
83
85
  author ||= 'N/A'
84
86
 
85
- ai_instrospection = PWN::Env[:ai][:introspection]
86
87
  ai_analysis = nil
87
- if ai_instrospection
88
+ if ai_introspection
88
89
  request = {
89
90
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
90
91
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -74,9 +76,8 @@ module PWN
74
76
  end
75
77
  author ||= 'N/A'
76
78
 
77
- ai_instrospection = PWN::Env[:ai][:introspection]
78
79
  ai_analysis = nil
79
- if ai_instrospection
80
+ if ai_introspection
80
81
  request = {
81
82
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
82
83
  line_no: line_no,
data/lib/pwn/sast/sql.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -20,7 +21,8 @@ module PWN
20
21
  dir_path = opts[:dir_path]
21
22
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
22
23
  result_arr = []
23
- logger_results = ''
24
+ ai_introspection = PWN::Env[:ai][:introspection]
25
+ logger_results = "AI Introspection => #{ai_introspection} => "
24
26
 
25
27
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
26
28
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -78,9 +80,8 @@ module PWN
78
80
  end
79
81
  author ||= 'N/A'
80
82
 
81
- ai_instrospection = PWN::Env[:ai][:introspection]
82
83
  ai_analysis = nil
83
- if ai_instrospection
84
+ if ai_introspection
84
85
  request = {
85
86
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
86
87
  line_no: line_no,
data/lib/pwn/sast/ssl.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -78,9 +80,8 @@ module PWN
78
80
  end
79
81
  author ||= 'N/A'
80
82
 
81
- ai_instrospection = PWN::Env[:ai][:introspection]
82
83
  ai_analysis = nil
83
- if ai_instrospection
84
+ if ai_introspection
84
85
  request = {
85
86
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
86
87
  line_no: line_no,
data/lib/pwn/sast/sudo.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -74,9 +76,8 @@ module PWN
74
76
  end
75
77
  author ||= 'N/A'
76
78
 
77
- ai_instrospection = PWN::Env[:ai][:introspection]
78
79
  ai_analysis = nil
79
- if ai_instrospection
80
+ if ai_introspection
80
81
  request = {
81
82
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
82
83
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -20,7 +21,8 @@ module PWN
20
21
  dir_path = opts[:dir_path]
21
22
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
22
23
  result_arr = []
23
- logger_results = ''
24
+ ai_introspection = PWN::Env[:ai][:introspection]
25
+ logger_results = "AI Introspection => #{ai_introspection} => "
24
26
 
25
27
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
26
28
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -88,9 +90,8 @@ module PWN
88
90
  end
89
91
  author ||= 'N/A'
90
92
 
91
- ai_instrospection = PWN::Env[:ai][:introspection]
92
93
  ai_analysis = nil
93
- if ai_instrospection
94
+ if ai_introspection
94
95
  request = {
95
96
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
96
97
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && entry !~ /test/i
@@ -77,9 +79,8 @@ module PWN
77
79
  end
78
80
  author ||= 'N/A'
79
81
 
80
- ai_instrospection = PWN::Env[:ai][:introspection]
81
82
  ai_analysis = nil
82
- if ai_instrospection
83
+ if ai_introspection
83
84
  request = {
84
85
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
85
86
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -76,9 +78,8 @@ module PWN
76
78
  end
77
79
  author ||= 'N/A'
78
80
 
79
- ai_instrospection = PWN::Env[:ai][:introspection]
80
81
  ai_analysis = nil
81
- if ai_instrospection
82
+ if ai_introspection
82
83
  request = {
83
84
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
84
85
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry).include?('.ts') && entry !~ /test/i
@@ -78,9 +80,8 @@ module PWN
78
80
  end
79
81
  author ||= 'N/A'
80
82
 
81
- ai_instrospection = PWN::Env[:ai][:introspection]
82
83
  ai_analysis = nil
83
- if ai_instrospection
84
+ if ai_introspection
84
85
  request = {
85
86
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
86
87
  line_no: line_no,
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ require 'json'
3
4
  require 'socket'
4
5
 
5
6
  module PWN
@@ -19,7 +20,8 @@ module PWN
19
20
  dir_path = opts[:dir_path]
20
21
  git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
21
22
  result_arr = []
22
- logger_results = ''
23
+ ai_introspection = PWN::Env[:ai][:introspection]
24
+ logger_results = "AI Introspection => #{ai_introspection} => "
23
25
 
24
26
  PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
25
27
  if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
@@ -75,9 +77,8 @@ module PWN
75
77
  end
76
78
  author ||= 'N/A'
77
79
 
78
- ai_instrospection = PWN::Env[:ai][:introspection]
79
80
  ai_analysis = nil
80
- if ai_instrospection
81
+ if ai_introspection
81
82
  request = {
82
83
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
83
84
  line_no: line_no,