Sha256: a0e419488279f803b5f2de8a97f56ac4c62861e812e3932c33a9410e8c8462fd
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
# frozen_string_literal: true require_relative "./make_pr/base" require "pry" module Neetob class CLI module Github class BundleAudit < MakePr::Base DESCRIPTION = "Fix security vulnerabilities reported by bundle audit" attr_accessor :repos, :sandbox def initialize(repos, sandbox = false) super() @repos = repos @sandbox = sandbox end def run matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox) report = nil matching_repos.each do |repo| begin ui.info("\nWorking on repo #{repo}", print_to_audit_log: false) clone_repo_in_tmp_dir(repo) bundle_install!(repo) report = run_bundle_audit(repo) ui.success("Successfully executed bundle audit for #{repo}", print_to_audit_log: false) rescue StandardError => e ExceptionHandler.new(e).process end end `rm -rf /tmp/neetob` if Thread.current[:audit_mode] report end end private def run_bundle_audit(repo) `#{cd_to_repo(repo)} & rbenv local 3.3.5 & bundle-audit check` end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
neetob-0.5.19 | lib/neetob/cli/github/bundle_audit.rb |
neetob-0.5.17 | lib/neetob/cli/github/bundle_audit.rb |