Class: Pipeline::ScanJS
Instance Attribute Summary
Attributes inherited from BaseTask
#appname, #description, #findings, #labels, #name, #stage, #trigger, #warnings
Instance Method Summary
collapse
Methods inherited from BaseTask
#report, #severity, #warn
Constructor Details
#initialize(trigger, tracker) ⇒ ScanJS
8
9
10
11
12
13
14
|
# File 'lib/pipeline/tasks/scanjs.rb', line 8
def initialize(trigger, tracker)
super(trigger)
@name = "ScanJS"
@description = "Source analysis for JavaScript"
@stage = :code
@labels << "code" << "javascript"
end
|
Instance Method Details
#analyze ⇒ Object
22
23
24
|
# File 'lib/pipeline/tasks/scanjs.rb', line 22
def analyze
puts @result
end
|
#run ⇒ Object
16
17
18
19
20
|
# File 'lib/pipeline/tasks/scanjs.rb', line 16
def run
Pipeline.notify "#{@name}"
rootpath = @trigger.path
@result=`scanner.js -t "#{rootpath}"`
end
|
#supported? ⇒ Boolean
26
27
28
29
|
# File 'lib/pipeline/tasks/scanjs.rb', line 26
def supported?
return true
end
|