Sha256: b6d42b7aeec6c23d9a0c6191b128c6c8f3cb810ae2867c4a49c6d4bea95d7a97
Contents?: true
Size: 1.63 KB
Versions: 1
Compression:
Stored size: 1.63 KB
Contents
# frozen_string_literal: true require_relative "../../../github/bundle_audit" module Neetob class CLI module MonthlyAudit module Security module Code class BundleAudit < CLI::Base def initialize super() end def run ui.success("### 1.1.1. Checking whether running `bundle-audit check` throws any vulnerabilities") repo_data = [["Repository", "Vulnerabilities Found", "Comments", "Audit Passed"]] ui.info "\n" last_comment = nil NeetoCompliance::NeetoRepos.products.keys.each do |repo| ui.info("Checking bundle audit run results for #{repo}", print_to_audit_log: false) bundle_audit_result = Neetob::CLI::Github::BundleAudit.new([repo]).run vulnerabilities_found = "No" audit_passed = "No" comments = nil if bundle_audit_result && bundle_audit_result.include?("No vulnerabilities found") audit_passed = "Yes" else vulnerabilities_found = "Yes" comments = bundle_audit_result.gsub("\n", "<br>") same_as_last_vulnerabilities = comments == last_comment last_comment = comments if same_as_last_vulnerabilities comments = "''" end 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
neetob-0.5.29 | lib/neetob/cli/monthly_audit/security/code/bundle_audit.rb |