Sha256: dba26f453822ccd74fafd124b4bb14e0e98b312e36941919e7c3fa611c57b41b

Contents?: true

Size: 1.31 KB

Versions: 13

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

module Neetob
  class CLI
    module MonthlyAudit
      module Security
        module Code
          class Brakeman < CLI::Base
            def initialize
              super()
            end

            def run
              ui.success("### 1.1.3. Checking whether running `bundle exec brakeman` throws any vulnerabilities")
              repo_data = [["Repository", "Vulnerabilities Found", "Comments", "Audit Passed"]]
              ui.info "\n"
              NeetoCompliance::NeetoRepos.products.keys.each do |repo|
                ui.info("Checking Brakeman run results for #{repo}", print_to_audit_log: false)
                brakeman_run_result = Neetob::CLI::Github::Brakeman.new([repo]).run
                vulnerabilities_found = "No"
                audit_passed = "No"
                comments = nil
                if brakeman_run_result && brakeman_run_result.include?("No warnings found")
                  audit_passed = "Yes"
                else
                  vulnerabilities_found = "Yes"
                  comments = brakeman_run_result.gsub("\n", "<br>")
                end
                repo_data << [repo, vulnerabilities_found, comments, audit_passed]
              end
              ui.print_table(repo_data)
            end
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
neetob-0.5.29 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.28 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.27 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.26 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.25 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.24 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.23 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.22 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.21 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.20 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.19 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.18 lib/neetob/cli/monthly_audit/security/code/brakeman.rb
neetob-0.5.17 lib/neetob/cli/monthly_audit/security/code/brakeman.rb