Class: Brakeman::CheckSendFile

Inherits:
CheckFileAccess show all
Defined in:
lib/brakeman/checks/check_send_file.rb

Overview

Checks for user input in send_file()

Constant Summary

Constant Summary

Constants inherited from BaseCheck

BaseCheck::CONFIDENCE

Constants included from Util

Util::ALL_PARAMETERS, Util::COOKIES, Util::PARAMETERS, Util::PATH_PARAMETERS, Util::QUERY_PARAMETERS, Util::REQUEST_PARAMETERS, Util::SESSION

Instance Attribute Summary

Attributes inherited from BaseCheck

#tracker, #warnings

Instance Method Summary (collapse)

Methods inherited from CheckFileAccess

#process_result

Methods inherited from BaseCheck

#add_result, #initialize, #process_call, #process_cookies, #process_default, #process_params

Methods included from Util

#array?, #call?, #camelize, #cookies?, #false?, #hash?, #hash_insert, #hash_iterate, #integer?, #number?, #params?, #pluralize, #regexp?, #result?, #set_env_defaults, #sexp?, #string?, #symbol?, #true?, #underscore

Methods included from ProcessorHelper

#class_name, #process_module

Constructor Details

This class inherits a constructor from Brakeman::BaseCheck

Instance Method Details

- (Object) run_check



8
9
10
11
12
13
14
15
16
# File 'lib/brakeman/checks/check_send_file.rb', line 8

def run_check
  debug_info "Finding all calls to send_file()"

  methods = tracker.find_call :target => false, :method => :send_file

  methods.each do |call|
    process_result call
  end
end