lib/pwn/sast/port.rb in pwn-0.4.516 vs lib/pwn/sast/port.rb in pwn-0.4.517
- old
+ new
@@ -22,10 +22,10 @@
git_repo_root_uri = opts[:git_repo_root_uri].to_s.scrub
result_arr = []
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$/
+ if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
line_no_and_contents_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