Sha256: 8123aebf1ff138ab6f39347d1b7c8707a94bde16776ca63373f1c3d68aa19ea3
Contents?: true
Size: 809 Bytes
Versions: 14
Compression:
Stored size: 809 Bytes
Contents
#!/usr/bin/env ruby require 'json' require 'tins/xt' require 'tins/go' include Tins::GO opt = go 'c' if opt['c'] brakeman = `bundle exec which brakeman`.full? or fail "cannot find brakeman in path" system *%w'bundle exec brakeman -q -s brakeman_ignore --url-safe-methods brakeman_ignore -o .brakeman.json' or fail "calling brakeman failed" end results = JSON File.read('.brakeman.json'), object_class: JSON::GenericObject puts "Found #{results.errors.size} errors and #{results.warnings.size} warnings.", "_" * 80 for error in results.errors puts error.location, "Error #{error.error.inspect}" end for warning in results.warnings puts "#{warning.file}:#{warning.line}", "#{warning.warning_type} (#{warning.confidence}) #{warning.message.inspect}", warning.code, "See: #{warning.link}" end
Version data entries
14 entries across 14 versions & 1 rubygems