lib/pwn/sast/private_key.rb in pwn-0.4.510 vs lib/pwn/sast/private_key.rb in pwn-0.4.511
- old
+ new
@@ -22,11 +22,10 @@
logger_results = ''
PWN::Plugins::FileFu.recurse_dir(dir_path: dir_path) do |entry|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/
line_no_and_contents_arr = []
- filename_arr = []
entry_beautified = false
if File.extname(entry) == '.js' && (`wc -l #{entry}`.split.first.to_i < 20 || entry.include?('.min.js') || entry.include?('-all.js'))
js_beautify = `js-beautify #{entry} > #{entry}.JS-BEAUTIFIED`.to_s.scrub
entry = "#{entry}.JS-BEAUTIFIED"
@@ -47,10 +46,10 @@
str = "1:Result larger than 64KB -> Size: #{str.to_s.length}. Please click the \"Path\" link for more details." if str.to_s.length >= 64_000
hash_line = {
timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
security_requirements: security_requirements,
- filename: filename_arr.push(git_repo_root_uri: git_repo_root_uri, entry: entry),
+ filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
line_no_and_contents: '',
raw_content: str,
test_case_filter: test_case_filter
}