Skip to content

Commit

Permalink
allow config file for brakeman, Fixes #30
Browse files Browse the repository at this point in the history
  • Loading branch information
nijikon committed Dec 1, 2015
1 parent 9d71eff commit 6a5964c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/polish_geeks/dev_tools/commands/brakeman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Commands
# A static analysis security vulnerability scanner for Ruby on Rails applications
# @see https://github.com/presidentbeef/brakeman
class Brakeman < Base
self.config_name = 'brakeman.yml'
self.type = :validator
self.validators = [
Validators::Rails
Expand All @@ -21,7 +22,9 @@ class Brakeman < Base
# Executes this command
# @return [String] command output
def execute
@output = Shell.new.execute('bundle exec brakeman -q')
cmd = ['bundle exec brakeman -q']
cmd << "-c #{config}" if config?
@output = Shell.new.execute(cmd.join(' '))
end

# @return [Boolean] true if we didn't have any vulnerabilities detected
Expand Down

0 comments on commit 6a5964c

Please sign in to comment.