Skip to content

Commit

Permalink
as default we are disabling API KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereira committed Sep 7, 2015
1 parent 25a5213 commit b588098
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/owasp_zap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@ def auth
# TODO
# DOCUMENT the step necessary: install ZAP under $home/ZAP or should be passed to new as :zap parameter
def start(params = {})
# default we are disabling api key
params = {api_key:false}.merge(params)
cmd_line = "#{@zap_bin}"
case
when params.key?(:daemon)
cmd_line += " -daemon"
when params.key?(:api_key)
cmd_line += " -config api.key=#{@api_key}"
cmd_line += if params[:api_key] == true
" -config api.key=#{@api_key}"
else
" -config api.disablekey=true"
end
end
fork do
# if you passed :output=>"file.txt" to the constructor, then it will send the forked process output
Expand Down

0 comments on commit b588098

Please sign in to comment.