pwn 0.5.378 → 0.5.380
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 +11 -10
- data/lib/pwn/plugins/file_fu.rb +27 -6
- data/lib/pwn/plugins/git.rb +2 -5
- data/lib/pwn/reports/sast.rb +2 -2
- data/lib/pwn/sast/amqp_connect_as_guest.rb +5 -8
- data/lib/pwn/sast/apache_file_system_util_api.rb +5 -8
- data/lib/pwn/sast/aws.rb +5 -8
- data/lib/pwn/sast/banned_function_calls_c.rb +5 -8
- data/lib/pwn/sast/base64.rb +5 -8
- data/lib/pwn/sast/beef_hook.rb +3 -6
- data/lib/pwn/sast/cmd_execution_java.rb +3 -6
- data/lib/pwn/sast/cmd_execution_python.rb +3 -6
- data/lib/pwn/sast/cmd_execution_ruby.rb +3 -6
- data/lib/pwn/sast/cmd_execution_scala.rb +3 -6
- data/lib/pwn/sast/csrf.rb +3 -6
- data/lib/pwn/sast/deserial_java.rb +3 -6
- data/lib/pwn/sast/emoticon.rb +3 -6
- data/lib/pwn/sast/eval.rb +3 -6
- data/lib/pwn/sast/factory.rb +3 -6
- data/lib/pwn/sast/http_authorization_header.rb +3 -6
- data/lib/pwn/sast/inner_html.rb +3 -6
- data/lib/pwn/sast/keystore.rb +3 -6
- data/lib/pwn/sast/local_storage.rb +3 -6
- data/lib/pwn/sast/location_hash.rb +3 -6
- data/lib/pwn/sast/log4j.rb +3 -6
- data/lib/pwn/sast/logger.rb +3 -6
- data/lib/pwn/sast/md5.rb +3 -6
- data/lib/pwn/sast/outer_html.rb +3 -6
- data/lib/pwn/sast/padding_oracle.rb +3 -6
- data/lib/pwn/sast/password.rb +3 -6
- data/lib/pwn/sast/php_input_mechanisms.rb +3 -6
- data/lib/pwn/sast/php_type_juggling.rb +3 -6
- data/lib/pwn/sast/pom_version.rb +3 -6
- data/lib/pwn/sast/port.rb +3 -6
- data/lib/pwn/sast/post_message.rb +3 -6
- data/lib/pwn/sast/private_key.rb +3 -6
- data/lib/pwn/sast/redirect.rb +3 -6
- data/lib/pwn/sast/redos.rb +3 -6
- data/lib/pwn/sast/shell.rb +3 -6
- data/lib/pwn/sast/signature.rb +3 -6
- data/lib/pwn/sast/sql.rb +3 -6
- data/lib/pwn/sast/ssl.rb +3 -6
- data/lib/pwn/sast/sudo.rb +3 -6
- data/lib/pwn/sast/task_tag.rb +3 -6
- data/lib/pwn/sast/throw_errors.rb +3 -6
- data/lib/pwn/sast/token.rb +3 -6
- data/lib/pwn/sast/type_script_type_juggling.rb +3 -6
- data/lib/pwn/sast/version.rb +3 -6
- data/lib/pwn/sast/window_location_hash.rb +3 -6
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
data/lib/pwn/sast/inner_html.rb
CHANGED
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -62,11 +62,8 @@ module PWN
|
|
62
62
|
while line_no_count > current_count
|
63
63
|
line_no = line_contents_split[current_count]
|
64
64
|
contents = line_contents_split[current_count + 1]
|
65
|
-
if Dir.exist?(
|
66
|
-
|
67
|
-
|
68
|
-
repo_root = dir_path
|
69
|
-
repo_root = '.' if Dir.exist?('.git')
|
65
|
+
if Dir.exist?('.git')
|
66
|
+
repo_root = '.'
|
70
67
|
|
71
68
|
author = PWN::Plugins::Git.get_author(
|
72
69
|
repo_root: repo_root,
|
data/lib/pwn/sast/keystore.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -61,11 +61,8 @@ module PWN
|
|
61
61
|
while line_no_count > current_count
|
62
62
|
line_no = line_contents_split[current_count]
|
63
63
|
contents = line_contents_split[current_count + 1]
|
64
|
-
if Dir.exist?(
|
65
|
-
|
66
|
-
|
67
|
-
repo_root = dir_path
|
68
|
-
repo_root = '.' if Dir.exist?('.git')
|
64
|
+
if Dir.exist?('.git')
|
65
|
+
repo_root = '.'
|
69
66
|
|
70
67
|
author = PWN::Plugins::Git.get_author(
|
71
68
|
repo_root: repo_root,
|
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -63,11 +63,8 @@ module PWN
|
|
63
63
|
while line_no_count > current_count
|
64
64
|
line_no = line_contents_split[current_count]
|
65
65
|
contents = line_contents_split[current_count + 1]
|
66
|
-
if Dir.exist?(
|
67
|
-
|
68
|
-
|
69
|
-
repo_root = dir_path
|
70
|
-
repo_root = '.' if Dir.exist?('.git')
|
66
|
+
if Dir.exist?('.git')
|
67
|
+
repo_root = '.'
|
71
68
|
|
72
69
|
author = PWN::Plugins::Git.get_author(
|
73
70
|
repo_root: repo_root,
|
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -62,11 +62,8 @@ module PWN
|
|
62
62
|
while line_no_count > current_count
|
63
63
|
line_no = line_contents_split[current_count]
|
64
64
|
contents = line_contents_split[current_count + 1]
|
65
|
-
if Dir.exist?(
|
66
|
-
|
67
|
-
|
68
|
-
repo_root = dir_path
|
69
|
-
repo_root = '.' if Dir.exist?('.git')
|
65
|
+
if Dir.exist?('.git')
|
66
|
+
repo_root = '.'
|
70
67
|
|
71
68
|
author = PWN::Plugins::Git.get_author(
|
72
69
|
repo_root: repo_root,
|
data/lib/pwn/sast/log4j.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
25
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry) == '.java' && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -61,11 +61,8 @@ module PWN
|
|
61
61
|
while line_no_count > current_count
|
62
62
|
line_no = line_contents_split[current_count]
|
63
63
|
contents = line_contents_split[current_count + 1]
|
64
|
-
if Dir.exist?(
|
65
|
-
|
66
|
-
|
67
|
-
repo_root = dir_path
|
68
|
-
repo_root = '.' if Dir.exist?('.git')
|
64
|
+
if Dir.exist?('.git')
|
65
|
+
repo_root = '.'
|
69
66
|
|
70
67
|
author = PWN::Plugins::Git.get_author(
|
71
68
|
repo_root: repo_root,
|
data/lib/pwn/sast/logger.rb
CHANGED
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java') && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -76,11 +76,8 @@ module PWN
|
|
76
76
|
while line_no_count > current_count
|
77
77
|
line_no = line_contents_split[current_count]
|
78
78
|
contents = line_contents_split[current_count + 1]
|
79
|
-
if Dir.exist?(
|
80
|
-
|
81
|
-
|
82
|
-
repo_root = dir_path
|
83
|
-
repo_root = '.' if Dir.exist?('.git')
|
79
|
+
if Dir.exist?('.git')
|
80
|
+
repo_root = '.'
|
84
81
|
|
85
82
|
author = PWN::Plugins::Git.get_author(
|
86
83
|
repo_root: repo_root,
|
data/lib/pwn/sast/md5.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -61,11 +61,8 @@ module PWN
|
|
61
61
|
while line_no_count > current_count
|
62
62
|
line_no = line_contents_split[current_count]
|
63
63
|
contents = line_contents_split[current_count + 1]
|
64
|
-
if Dir.exist?(
|
65
|
-
|
66
|
-
|
67
|
-
repo_root = dir_path
|
68
|
-
repo_root = '.' if Dir.exist?('.git')
|
64
|
+
if Dir.exist?('.git')
|
65
|
+
repo_root = '.'
|
69
66
|
|
70
67
|
author = PWN::Plugins::Git.get_author(
|
71
68
|
repo_root: repo_root,
|
data/lib/pwn/sast/outer_html.rb
CHANGED
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -62,11 +62,8 @@ module PWN
|
|
62
62
|
while line_no_count > current_count
|
63
63
|
line_no = line_contents_split[current_count]
|
64
64
|
contents = line_contents_split[current_count + 1]
|
65
|
-
if Dir.exist?(
|
66
|
-
|
67
|
-
|
68
|
-
repo_root = dir_path
|
69
|
-
repo_root = '.' if Dir.exist?('.git')
|
65
|
+
if Dir.exist?('.git')
|
66
|
+
repo_root = '.'
|
70
67
|
|
71
68
|
author = PWN::Plugins::Git.get_author(
|
72
69
|
repo_root: repo_root,
|
@@ -20,7 +20,7 @@ module PWN
|
|
20
20
|
result_arr = []
|
21
21
|
logger_results = ''
|
22
22
|
|
23
|
-
PWN::Plugins::FileFu.
|
23
|
+
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
24
24
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
25
25
|
line_no_and_contents_arr = []
|
26
26
|
entry_beautified = false
|
@@ -61,11 +61,8 @@ module PWN
|
|
61
61
|
while line_no_count > current_count
|
62
62
|
line_no = line_contents_split[current_count]
|
63
63
|
contents = line_contents_split[current_count + 1]
|
64
|
-
if Dir.exist?(
|
65
|
-
|
66
|
-
|
67
|
-
repo_root = dir_path
|
68
|
-
repo_root = '.' if Dir.exist?('.git')
|
64
|
+
if Dir.exist?('.git')
|
65
|
+
repo_root = '.'
|
69
66
|
|
70
67
|
author = PWN::Plugins::Git.get_author(
|
71
68
|
repo_root: repo_root,
|
data/lib/pwn/sast/password.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -65,11 +65,8 @@ module PWN
|
|
65
65
|
while line_no_count > current_count
|
66
66
|
line_no = line_contents_split[current_count]
|
67
67
|
contents = line_contents_split[current_count + 1]
|
68
|
-
if Dir.exist?(
|
69
|
-
|
70
|
-
|
71
|
-
repo_root = dir_path
|
72
|
-
repo_root = '.' if Dir.exist?('.git')
|
68
|
+
if Dir.exist?('.git')
|
69
|
+
repo_root = '.'
|
73
70
|
|
74
71
|
author = PWN::Plugins::Git.get_author(
|
75
72
|
repo_root: repo_root,
|
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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).include?('.php') && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -67,11 +67,8 @@ module PWN
|
|
67
67
|
while line_no_count > current_count
|
68
68
|
line_no = line_contents_split[current_count]
|
69
69
|
contents = line_contents_split[current_count + 1]
|
70
|
-
if Dir.exist?(
|
71
|
-
|
72
|
-
|
73
|
-
repo_root = dir_path
|
74
|
-
repo_root = '.' if Dir.exist?('.git')
|
70
|
+
if Dir.exist?('.git')
|
71
|
+
repo_root = '.'
|
75
72
|
|
76
73
|
author = PWN::Plugins::Git.get_author(
|
77
74
|
repo_root: repo_root,
|
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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).include?('.php') && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -65,11 +65,8 @@ module PWN
|
|
65
65
|
while line_no_count > current_count
|
66
66
|
line_no = line_contents_split[current_count]
|
67
67
|
contents = line_contents_split[current_count + 1]
|
68
|
-
if Dir.exist?(
|
69
|
-
|
70
|
-
|
71
|
-
repo_root = dir_path
|
72
|
-
repo_root = '.' if Dir.exist?('.git')
|
68
|
+
if Dir.exist?('.git')
|
69
|
+
repo_root = '.'
|
73
70
|
|
74
71
|
author = PWN::Plugins::Git.get_author(
|
75
72
|
repo_root: repo_root,
|
data/lib/pwn/sast/pom_version.rb
CHANGED
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
26
|
if File.file?(entry) && File.basename(entry) == 'pom.xml' && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -64,11 +64,8 @@ module PWN
|
|
64
64
|
while line_no_count > current_count
|
65
65
|
line_no = line_contents_split[current_count]
|
66
66
|
contents = line_contents_split[current_count + 1]
|
67
|
-
if Dir.exist?(
|
68
|
-
|
69
|
-
|
70
|
-
repo_root = dir_path
|
71
|
-
repo_root = '.' if Dir.exist?('.git')
|
67
|
+
if Dir.exist?('.git')
|
68
|
+
repo_root = '.'
|
72
69
|
|
73
70
|
author = PWN::Plugins::Git.get_author(
|
74
71
|
repo_root: repo_root,
|
data/lib/pwn/sast/port.rb
CHANGED
@@ -23,7 +23,7 @@ module PWN
|
|
23
23
|
result_arr = []
|
24
24
|
logger_results = ''
|
25
25
|
|
26
|
-
PWN::Plugins::FileFu.
|
26
|
+
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
27
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
28
28
|
line_no_and_contents_arr = []
|
29
29
|
entry_beautified = false
|
@@ -68,11 +68,8 @@ module PWN
|
|
68
68
|
while line_no_count > current_count
|
69
69
|
line_no = line_contents_split[current_count]
|
70
70
|
contents = line_contents_split[current_count + 1]
|
71
|
-
if Dir.exist?(
|
72
|
-
|
73
|
-
|
74
|
-
repo_root = dir_path
|
75
|
-
repo_root = '.' if Dir.exist?('.git')
|
71
|
+
if Dir.exist?('.git')
|
72
|
+
repo_root = '.'
|
76
73
|
|
77
74
|
author = PWN::Plugins::Git.get_author(
|
78
75
|
repo_root: repo_root,
|
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -62,11 +62,8 @@ module PWN
|
|
62
62
|
while line_no_count > current_count
|
63
63
|
line_no = line_contents_split[current_count]
|
64
64
|
contents = line_contents_split[current_count + 1]
|
65
|
-
if Dir.exist?(
|
66
|
-
|
67
|
-
|
68
|
-
repo_root = dir_path
|
69
|
-
repo_root = '.' if Dir.exist?('.git')
|
65
|
+
if Dir.exist?('.git')
|
66
|
+
repo_root = '.'
|
70
67
|
|
71
68
|
author = PWN::Plugins::Git.get_author(
|
72
69
|
repo_root: repo_root,
|
data/lib/pwn/sast/private_key.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -61,11 +61,8 @@ module PWN
|
|
61
61
|
while line_no_count > current_count
|
62
62
|
line_no = line_contents_split[current_count]
|
63
63
|
contents = line_contents_split[current_count + 1]
|
64
|
-
if Dir.exist?(
|
65
|
-
|
66
|
-
|
67
|
-
repo_root = dir_path
|
68
|
-
repo_root = '.' if Dir.exist?('.git')
|
64
|
+
if Dir.exist?('.git')
|
65
|
+
repo_root = '.'
|
69
66
|
|
70
67
|
author = PWN::Plugins::Git.get_author(
|
71
68
|
repo_root: repo_root,
|
data/lib/pwn/sast/redirect.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -63,11 +63,8 @@ module PWN
|
|
63
63
|
while line_no_count > current_count
|
64
64
|
line_no = line_contents_split[current_count]
|
65
65
|
contents = line_contents_split[current_count + 1]
|
66
|
-
if Dir.exist?(
|
67
|
-
|
68
|
-
|
69
|
-
repo_root = dir_path
|
70
|
-
repo_root = '.' if Dir.exist?('.git')
|
66
|
+
if Dir.exist?('.git')
|
67
|
+
repo_root = '.'
|
71
68
|
|
72
69
|
author = PWN::Plugins::Git.get_author(
|
73
70
|
repo_root: repo_root,
|
data/lib/pwn/sast/redos.rb
CHANGED
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -68,11 +68,8 @@ module PWN
|
|
68
68
|
while line_no_count > current_count
|
69
69
|
line_no = line_contents_split[current_count]
|
70
70
|
contents = line_contents_split[current_count + 1]
|
71
|
-
if Dir.exist?(
|
72
|
-
|
73
|
-
|
74
|
-
repo_root = dir_path
|
75
|
-
repo_root = '.' if Dir.exist?('.git')
|
71
|
+
if Dir.exist?('.git')
|
72
|
+
repo_root = '.'
|
76
73
|
|
77
74
|
author = PWN::Plugins::Git.get_author(
|
78
75
|
repo_root: repo_root,
|
data/lib/pwn/sast/shell.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -69,11 +69,8 @@ module PWN
|
|
69
69
|
while line_no_count > current_count
|
70
70
|
line_no = line_contents_split[current_count]
|
71
71
|
contents = line_contents_split[current_count + 1]
|
72
|
-
if Dir.exist?(
|
73
|
-
|
74
|
-
|
75
|
-
repo_root = dir_path
|
76
|
-
repo_root = '.' if Dir.exist?('.git')
|
72
|
+
if Dir.exist?('.git')
|
73
|
+
repo_root = '.'
|
77
74
|
|
78
75
|
author = PWN::Plugins::Git.get_author(
|
79
76
|
repo_root: repo_root,
|
data/lib/pwn/sast/signature.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -61,11 +61,8 @@ module PWN
|
|
61
61
|
while line_no_count > current_count
|
62
62
|
line_no = line_contents_split[current_count]
|
63
63
|
contents = line_contents_split[current_count + 1]
|
64
|
-
if Dir.exist?(
|
65
|
-
|
66
|
-
|
67
|
-
repo_root = dir_path
|
68
|
-
repo_root = '.' if Dir.exist?('.git')
|
64
|
+
if Dir.exist?('.git')
|
65
|
+
repo_root = '.'
|
69
66
|
|
70
67
|
author = PWN::Plugins::Git.get_author(
|
71
68
|
repo_root: repo_root,
|
data/lib/pwn/sast/sql.rb
CHANGED
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -65,11 +65,8 @@ module PWN
|
|
65
65
|
while line_no_count > current_count
|
66
66
|
line_no = line_contents_split[current_count]
|
67
67
|
contents = line_contents_split[current_count + 1]
|
68
|
-
if Dir.exist?(
|
69
|
-
|
70
|
-
|
71
|
-
repo_root = dir_path
|
72
|
-
repo_root = '.' if Dir.exist?('.git')
|
68
|
+
if Dir.exist?('.git')
|
69
|
+
repo_root = '.'
|
73
70
|
|
74
71
|
author = PWN::Plugins::Git.get_author(
|
75
72
|
repo_root: repo_root,
|
data/lib/pwn/sast/ssl.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -65,11 +65,8 @@ module PWN
|
|
65
65
|
while line_no_count > current_count
|
66
66
|
line_no = line_contents_split[current_count]
|
67
67
|
contents = line_contents_split[current_count + 1]
|
68
|
-
if Dir.exist?(
|
69
|
-
|
70
|
-
|
71
|
-
repo_root = dir_path
|
72
|
-
repo_root = '.' if Dir.exist?('.git')
|
68
|
+
if Dir.exist?('.git')
|
69
|
+
repo_root = '.'
|
73
70
|
|
74
71
|
author = PWN::Plugins::Git.get_author(
|
75
72
|
repo_root: repo_root,
|
data/lib/pwn/sast/sudo.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -61,11 +61,8 @@ module PWN
|
|
61
61
|
while line_no_count > current_count
|
62
62
|
line_no = line_contents_split[current_count]
|
63
63
|
contents = line_contents_split[current_count + 1]
|
64
|
-
if Dir.exist?(
|
65
|
-
|
66
|
-
|
67
|
-
repo_root = dir_path
|
68
|
-
repo_root = '.' if Dir.exist?('.git')
|
64
|
+
if Dir.exist?('.git')
|
65
|
+
repo_root = '.'
|
69
66
|
|
70
67
|
author = PWN::Plugins::Git.get_author(
|
71
68
|
repo_root: repo_root,
|
data/lib/pwn/sast/task_tag.rb
CHANGED
@@ -22,7 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
-
PWN::Plugins::FileFu.
|
25
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
27
27
|
line_no_and_contents_arr = []
|
28
28
|
entry_beautified = false
|
@@ -75,11 +75,8 @@ module PWN
|
|
75
75
|
while line_no_count > current_count
|
76
76
|
line_no = line_contents_split[current_count]
|
77
77
|
contents = line_contents_split[current_count + 1]
|
78
|
-
if Dir.exist?(
|
79
|
-
|
80
|
-
|
81
|
-
repo_root = dir_path
|
82
|
-
repo_root = '.' if Dir.exist?('.git')
|
78
|
+
if Dir.exist?('.git')
|
79
|
+
repo_root = '.'
|
83
80
|
|
84
81
|
author = PWN::Plugins::Git.get_author(
|
85
82
|
repo_root: repo_root,
|
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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') && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -62,11 +62,8 @@ module PWN
|
|
62
62
|
while line_no_count > current_count
|
63
63
|
line_no = line_contents_split[current_count]
|
64
64
|
contents = line_contents_split[current_count + 1]
|
65
|
-
if Dir.exist?(
|
66
|
-
|
67
|
-
|
68
|
-
repo_root = dir_path
|
69
|
-
repo_root = '.' if Dir.exist?('.git')
|
65
|
+
if Dir.exist?('.git')
|
66
|
+
repo_root = '.'
|
70
67
|
|
71
68
|
author = PWN::Plugins::Git.get_author(
|
72
69
|
repo_root: repo_root,
|
data/lib/pwn/sast/token.rb
CHANGED
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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$/ && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -63,11 +63,8 @@ module PWN
|
|
63
63
|
while line_no_count > current_count
|
64
64
|
line_no = line_contents_split[current_count]
|
65
65
|
contents = line_contents_split[current_count + 1]
|
66
|
-
if Dir.exist?(
|
67
|
-
|
68
|
-
|
69
|
-
repo_root = dir_path
|
70
|
-
repo_root = '.' if Dir.exist?('.git')
|
66
|
+
if Dir.exist?('.git')
|
67
|
+
repo_root = '.'
|
71
68
|
|
72
69
|
author = PWN::Plugins::Git.get_author(
|
73
70
|
repo_root: repo_root,
|
@@ -21,7 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
-
PWN::Plugins::FileFu.
|
24
|
+
PWN::Plugins::FileFu.recurse_in_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).include?('.ts') && entry !~ /test/i
|
26
26
|
line_no_and_contents_arr = []
|
27
27
|
entry_beautified = false
|
@@ -65,11 +65,8 @@ module PWN
|
|
65
65
|
while line_no_count > current_count
|
66
66
|
line_no = line_contents_split[current_count]
|
67
67
|
contents = line_contents_split[current_count + 1]
|
68
|
-
if Dir.exist?(
|
69
|
-
|
70
|
-
|
71
|
-
repo_root = dir_path
|
72
|
-
repo_root = '.' if Dir.exist?('.git')
|
68
|
+
if Dir.exist?('.git')
|
69
|
+
repo_root = '.'
|
73
70
|
|
74
71
|
author = PWN::Plugins::Git.get_author(
|
75
72
|
repo_root: repo_root,
|