Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trufflehog - Exclude files #830

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nit
  • Loading branch information
maitrayshah-cb committed Mar 29, 2023
commit b44bbc6a9cb16e2f4218911e5405945cc351a4f0
6 changes: 3 additions & 3 deletions lib/salus/scanners/trufflehog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

module Salus::Scanners
class Trufflehog < Base
FILTER_FILE = 'filter.txt'
FILTER_FILE = 'filter.txt'.freeze

def should_run?
true
Expand Down Expand Up @@ -42,8 +42,8 @@ def command
exclusions.each do |exclude|
exclusion_content += exclude + "\n"
end
File.open("#{@repository.path_to_repo}/#{FILTER_FILE}", "w") do |f|
f.write(exclusion_content)
File.open("#{@repository.path_to_repo}/#{FILTER_FILE}", "w") do |f|
f.write(exclusion_content)
end
cmd += ' -x ' + "#{@repository.path_to_repo}/#{FILTER_FILE}"
end
Expand Down