Sha256: 01d84cf7cacf285f9e2371265c92095295525cd43648c11b7a13e5f03a59c86f
Contents?: true
Size: 633 Bytes
Versions: 12
Compression:
Stored size: 633 Bytes
Contents
# frozen_string_literal: true module Overcommit::Hook::PreCommit # Checks for vulnerable versions of gems in Gemfile.lock. # # @see https://github.com/rubysec/bundler-audit class BundleAudit < Base LOCK_FILE = 'Gemfile.lock' def run # Ignore if Gemfile.lock is not tracked by git ignored_files = execute(%W[git ls-files -o -i --exclude-standard -- #{LOCK_FILE}]). stdout.split("\n") return :pass if ignored_files.include?(LOCK_FILE) result = execute(command) if result.success? :pass else [:warn, result.stdout] end end end end
Version data entries
12 entries across 12 versions & 2 rubygems