18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/pipeline/tasks/checkmarx.rb', line 18
def run
Pipeline.notify "#{@name}"
rootpath = @trigger.path
runsystem(true, "runCxConsole.sh", "scan", "-v",
"-CxUser", "#{@tracker.options[:checkmarx_user]}",
"-CxPassword", "#{@tracker.options[:checkmarx_password]}",
"-CxServer", "#{@tracker.options[:checkmarx_server]}",
"-LocationType", "folder",
"-LocationPath", "#{rootpath}",
"-ProjectName", "#{@tracker.options[:checkmarx_project]}",
"-ReportXML", "#{rootpath}checkmarx_results.xml",
"-Log", "#{@tracker.options[:checkmarx_log]}"
)
@results = Nokogiri::XML(File.read("#{rootpath}checkmarx_results.xml")).xpath '//Result'
end
|