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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/pwn_sast +1 -1
- data/lib/pwn/ai/introspection.rb +0 -1
- data/lib/pwn/reports/sast.rb +0 -1
- data/lib/pwn/sast/amqp_connect_as_guest.rb +4 -3
- data/lib/pwn/sast/apache_file_system_util_api.rb +4 -3
- data/lib/pwn/sast/aws.rb +4 -3
- data/lib/pwn/sast/banned_function_calls_c.rb +4 -3
- data/lib/pwn/sast/base64.rb +4 -3
- data/lib/pwn/sast/beef_hook.rb +4 -3
- data/lib/pwn/sast/cmd_execution_java.rb +4 -3
- data/lib/pwn/sast/cmd_execution_python.rb +4 -3
- data/lib/pwn/sast/cmd_execution_ruby.rb +4 -3
- data/lib/pwn/sast/cmd_execution_scala.rb +4 -3
- data/lib/pwn/sast/csrf.rb +4 -3
- data/lib/pwn/sast/deserial_java.rb +4 -3
- data/lib/pwn/sast/emoticon.rb +4 -3
- data/lib/pwn/sast/eval.rb +4 -3
- data/lib/pwn/sast/factory.rb +4 -3
- data/lib/pwn/sast/http_authorization_header.rb +4 -3
- data/lib/pwn/sast/inner_html.rb +4 -3
- data/lib/pwn/sast/keystore.rb +4 -3
- data/lib/pwn/sast/local_storage.rb +4 -3
- data/lib/pwn/sast/location_hash.rb +4 -3
- data/lib/pwn/sast/log4j.rb +4 -3
- data/lib/pwn/sast/logger.rb +4 -3
- data/lib/pwn/sast/md5.rb +4 -3
- data/lib/pwn/sast/outer_html.rb +4 -3
- data/lib/pwn/sast/padding_oracle.rb +4 -3
- data/lib/pwn/sast/password.rb +4 -3
- data/lib/pwn/sast/php_input_mechanisms.rb +4 -3
- data/lib/pwn/sast/php_type_juggling.rb +4 -3
- data/lib/pwn/sast/pom_version.rb +4 -3
- data/lib/pwn/sast/port.rb +4 -3
- data/lib/pwn/sast/post_message.rb +4 -3
- data/lib/pwn/sast/private_key.rb +4 -3
- data/lib/pwn/sast/redirect.rb +4 -3
- data/lib/pwn/sast/redos.rb +4 -3
- data/lib/pwn/sast/shell.rb +4 -3
- data/lib/pwn/sast/signature.rb +4 -3
- data/lib/pwn/sast/sql.rb +4 -3
- data/lib/pwn/sast/ssl.rb +4 -3
- data/lib/pwn/sast/sudo.rb +4 -3
- data/lib/pwn/sast/task_tag.rb +4 -3
- data/lib/pwn/sast/throw_errors.rb +4 -3
- data/lib/pwn/sast/token.rb +4 -3
- data/lib/pwn/sast/type_script_type_juggling.rb +4 -3
- data/lib/pwn/sast/version.rb +4 -3
- data/lib/pwn/sast/window_location_hash.rb +4 -3
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6754bb62346668c793d499dd95bf26e8fdda4eedc895ca50d471108eec8c3c95
|
4
|
+
data.tar.gz: 8ffa2c66caf5b398578813c44279452b4beb13d439f2a793800d6751967170df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
40
|
+
pwn[v0.5.439]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](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.
|
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.
|
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
data/lib/pwn/ai/introspection.rb
CHANGED
data/lib/pwn/reports/sast.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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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,
|
data/lib/pwn/sast/base64.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
|
-
|
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
|
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/beef_hook.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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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,
|
data/lib/pwn/sast/emoticon.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
|
-
|
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
|
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
|
-
|
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
|
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/factory.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
|
-
|
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
|
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
|
-
|
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
|
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,
|
data/lib/pwn/sast/inner_html.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
|
-
|
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
|
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/keystore.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
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
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/log4j.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
|
-
|
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
|
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,
|