pwn 0.5.437 → 0.5.439

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/bin/pwn_sast +1 -1
  4. data/lib/pwn/ai/introspection.rb +0 -1
  5. data/lib/pwn/reports/sast.rb +0 -1
  6. data/lib/pwn/sast/amqp_connect_as_guest.rb +4 -3
  7. data/lib/pwn/sast/apache_file_system_util_api.rb +4 -3
  8. data/lib/pwn/sast/aws.rb +4 -3
  9. data/lib/pwn/sast/banned_function_calls_c.rb +4 -3
  10. data/lib/pwn/sast/base64.rb +4 -3
  11. data/lib/pwn/sast/beef_hook.rb +4 -3
  12. data/lib/pwn/sast/cmd_execution_java.rb +4 -3
  13. data/lib/pwn/sast/cmd_execution_python.rb +4 -3
  14. data/lib/pwn/sast/cmd_execution_ruby.rb +4 -3
  15. data/lib/pwn/sast/cmd_execution_scala.rb +4 -3
  16. data/lib/pwn/sast/csrf.rb +4 -3
  17. data/lib/pwn/sast/deserial_java.rb +4 -3
  18. data/lib/pwn/sast/emoticon.rb +4 -3
  19. data/lib/pwn/sast/eval.rb +4 -3
  20. data/lib/pwn/sast/factory.rb +4 -3
  21. data/lib/pwn/sast/http_authorization_header.rb +4 -3
  22. data/lib/pwn/sast/inner_html.rb +4 -3
  23. data/lib/pwn/sast/keystore.rb +4 -3
  24. data/lib/pwn/sast/local_storage.rb +4 -3
  25. data/lib/pwn/sast/location_hash.rb +4 -3
  26. data/lib/pwn/sast/log4j.rb +4 -3
  27. data/lib/pwn/sast/logger.rb +4 -3
  28. data/lib/pwn/sast/md5.rb +4 -3
  29. data/lib/pwn/sast/outer_html.rb +4 -3
  30. data/lib/pwn/sast/padding_oracle.rb +4 -3
  31. data/lib/pwn/sast/password.rb +4 -3
  32. data/lib/pwn/sast/php_input_mechanisms.rb +4 -3
  33. data/lib/pwn/sast/php_type_juggling.rb +4 -3
  34. data/lib/pwn/sast/pom_version.rb +4 -3
  35. data/lib/pwn/sast/port.rb +4 -3
  36. data/lib/pwn/sast/post_message.rb +4 -3
  37. data/lib/pwn/sast/private_key.rb +4 -3
  38. data/lib/pwn/sast/redirect.rb +4 -3
  39. data/lib/pwn/sast/redos.rb +4 -3
  40. data/lib/pwn/sast/shell.rb +4 -3
  41. data/lib/pwn/sast/signature.rb +4 -3
  42. data/lib/pwn/sast/sql.rb +4 -3
  43. data/lib/pwn/sast/ssl.rb +4 -3
  44. data/lib/pwn/sast/sudo.rb +4 -3
  45. data/lib/pwn/sast/task_tag.rb +4 -3
  46. data/lib/pwn/sast/throw_errors.rb +4 -3
  47. data/lib/pwn/sast/token.rb +4 -3
  48. data/lib/pwn/sast/type_script_type_juggling.rb +4 -3
  49. data/lib/pwn/sast/version.rb +4 -3
  50. data/lib/pwn/sast/window_location_hash.rb +4 -3
  51. data/lib/pwn/version.rb +1 -1
  52. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc4595f20cb20cc81eb1633ea84a91a9d3fd7ab8c7a17b718ec2ba15451412d5
4
- data.tar.gz: 991eb600f873d5f1ad790ade4791dcacedd3eecab8e6375bb646a3a3c4979afb
3
+ metadata.gz: 6754bb62346668c793d499dd95bf26e8fdda4eedc895ca50d471108eec8c3c95
4
+ data.tar.gz: 8ffa2c66caf5b398578813c44279452b4beb13d439f2a793800d6751967170df
5
5
  SHA512:
6
- metadata.gz: 289bb8fafb11ccc48cd7335fbbbc451f9629414f2c7d4f47913d2568649ae63b57d36cf3e5d8711bb38dd8ce59741f629d27a264aa4879daca55d851a635e430
7
- data.tar.gz: fc6256cc8b76c11f1286531e97c762572bda96fe337b73a905e30941fedc7978ce69886cf1f77a8895ee2284cdf624fe732df1407f36027f70ffaceb5ad1eee2
6
+ metadata.gz: 015b510fcc0ab2e73430bab05c21f97b32993f9b4ea4aab418a367871184d91fbabc153ad078abd82031e0de3489827b597f85e53fe0e49958e1387c7e5d7f79
7
+ data.tar.gz: 16ec47090606de2fcc40b10729feaf0d182a97f4b556e23ce72c1930d1abd4495e604c25d20dba9fdb80db2b3bee60042818786a7fbff6a51def3bb0016e33f9
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
37
37
  $ ./install.sh
38
38
  $ ./install.sh ruby-gem
39
39
  $ pwn
40
- pwn[v0.5.437]:001 >>> PWN.help
40
+ pwn[v0.5.439]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.437]:001 >>> PWN.help
55
+ pwn[v0.5.439]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
  If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.437]:001 >>> PWN.help
65
+ pwn[v0.5.439]:001 >>> PWN.help
66
66
  ```
67
67
 
68
68
  PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
data/bin/pwn_sast CHANGED
@@ -60,7 +60,7 @@ begin
60
60
  pwn_env_path = opts[:pwn_env_path]
61
61
  pwn_dec_path = opts[:pwn_dec_path]
62
62
  if pwn_env_path
63
- PWN::Config.refresh(
63
+ PWN::Config.refresh_env(
64
64
  pwn_env_path: pwn_env_path,
65
65
  pwn_dec_path: pwn_dec_path
66
66
  )
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'json'
4
4
  require 'rest-client'
5
- require 'tty-spinner'
6
5
 
7
6
  module PWN
8
7
  module AI
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
- require 'tty-spinner'
5
4
 
6
5
  module PWN
7
6
  module Reports
@@ -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
@@ -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,
data/lib/pwn/sast/aws.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
@@ -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
@@ -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$/) && (File.extname(entry) == '.c' || File.extname(entry) == '.cpp' || File.extname(entry) == '.c++' || File.extname(entry) == '.cxx' || File.extname(entry) == '.h' || File.extname(entry) == '.hpp' || File.extname(entry) == '.h++' || File.extname(entry) == '.hh' || File.extname(entry) == '.hxx' || File.extname(entry) == '.ii' || File.extname(entry) == '.ixx' || File.extname(entry) == '.ipp' || File.extname(entry) == '.inl' || File.extname(entry) == '.txx' || File.extname(entry) == '.tpp' || File.extname(entry) == '.tpl') && entry !~ /test/i
@@ -203,9 +205,8 @@ module PWN
203
205
  end
204
206
  author ||= 'N/A'
205
207
 
206
- ai_instrospection = PWN::Env[:ai][:introspection]
207
208
  ai_analysis = nil
208
- if ai_instrospection
209
+ if ai_introspection
209
210
  request = {
210
211
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
211
212
  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
@@ -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$/) && File.extname(entry) == '.java' && 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) == '.py' || File.extname(entry) == '.pyc' || File.extname(entry) == '.pyo' || File.extname(entry) == '.pyd') && 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) == '.rb' || File.extname(entry) == '.rbw') && entry !~ /test/i
@@ -86,9 +88,8 @@ module PWN
86
88
  end
87
89
  author ||= 'N/A'
88
90
 
89
- ai_instrospection = PWN::Env[:ai][:introspection]
90
91
  ai_analysis = nil
91
- if ai_instrospection
92
+ if ai_introspection
92
93
  request = {
93
94
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
94
95
  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) == '.scala' && 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,
data/lib/pwn/sast/csrf.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
@@ -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
@@ -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$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java') && entry !~ /test/i
@@ -83,9 +85,8 @@ module PWN
83
85
  end
84
86
  author ||= 'N/A'
85
87
 
86
- ai_instrospection = PWN::Env[:ai][:introspection]
87
88
  ai_analysis = nil
88
- if ai_instrospection
89
+ if ai_introspection
89
90
  request = {
90
91
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
91
92
  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
@@ -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,
data/lib/pwn/sast/eval.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
@@ -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
@@ -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$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java') && 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
@@ -83,9 +85,8 @@ module PWN
83
85
  end
84
86
  author ||= 'N/A'
85
87
 
86
- ai_instrospection = PWN::Env[:ai][:introspection]
87
88
  ai_analysis = nil
88
- if ai_instrospection
89
+ if ai_introspection
89
90
  request = {
90
91
  scm_uri: "#{hash_line[:filename][:git_repo_root_uri]}/#{hash_line[:filename][:entry]}",
91
92
  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
@@ -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
@@ -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
@@ -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$/) && File.extname(entry) == '.java' && 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,