Class: ShieldAst::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/shield_ast/runner.rb

Class Method Summary collapse

Class Method Details

.run(options, path) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/shield_ast/runner.rb', line 11

def self.run(options, path)
  reports = {}

  if options[:sast]
    puts "🔍 Running SAST ..."
    reports[:sast] = SAST.scan(path)
  end

  if options[:sca]
    puts "📦 Running SCA ..."
    reports[:sca] = SCA.scan(path)
  end

  if options[:iac]
    puts "☁️ Running IaC ..."
    reports[:iac] = IaC.scan(path)
  end

  reports
end