Sha256: a1f0f7c831c93ab3ee446625bc4564dd7c48fcb82d14ae154a072a5644a96e25

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

require 'brakeman'
require 'brakefast/detector'

module Brakefast
  class Brakeman
    def self.run(path)
      tracker = ::Brakeman.run(Rails.root.to_s)
      report = tracker.report.format(:to_hash)
      Brakefast::Detector::Base.types.each do |type|
        next if !Brakefast.public_send("#{type}_enable?")
        report[type].each do |vulnerability|
          detector = Brakefast::Detector::Base.create_instance(type, vulnerability)
          detector.set_detector_module
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brakefast-0.0.2 lib/brakefast/brakeman.rb
brakefast-0.0.1 lib/brakefast/brakeman.rb