Sha256: d95d5dea8f49386cfb0c0f34c65ff27bacc4cabcbd38c6e3e71f1a20c4c4b215
Contents?: true
Size: 640 Bytes
Versions: 18
Compression:
Stored size: 640 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 return [:warn, result.stdout] end end end end
Version data entries
18 entries across 18 versions & 2 rubygems