def process_result result
return unless original? result
call = result[:call]
file_name = call.first_arg
return if called_on_tempfile?(file_name)
if match = has_immediate_user_input?(file_name)
confidence = :high
elsif match = has_immediate_model?(file_name)
match = Match.new(:model, match)
confidence = :medium
elsif tracker.options[:check_arguments] and
match = include_user_input?(file_name)
if call?(file_name) and (file_name.method == :+ or file_name.method == :<<)
confidence = :high
else
confidence = :weak
end
end
if match and not temp_file_method? match.match
message = msg(msg_input(match), " used in file name")
warn :result => result,
:warning_type => "File Access",
:warning_code => :file_access,
:message => message,
:confidence => confidence,
:code => call,
:user_input => match
end
end