You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mass_assignment.rb
    path of file: ./repos/spektr/lib/spektr/checks
    
    the code of the file until where you have to start completion: module Spektr
  class Checks
    class MassAssignment < Base

      # TODO: Make this better
      def initialize(app, target)
        super
        @name = "Mass Assignment"
        @type = "Input Validation"
        @targets = ["Spektr::Targets::Controller"]
      end

      def run
        return unless super
        model_names = @app.models.collect(&:name)
        calls = []
        model_names.each do |receiver|
          [:new, :build, :create].each do |method|
            calls.concat @target.find_calls(method, receiver)
          end
        end
        calls.each do |call|
          argument = call.arguments.first
          next if argument.nil?
          ::Spektr.logg
    
      def run
        return unless super
        model_names = @app.models.collect(&:name)
        calls = []
        model_names.each do |receiver|
          [:new, :build, :create].each do |method|
            calls.concat @target.find_calls(method, receiver)
          end
        end
        calls.each do |call|
          argument = call.arguments.first
          next if argument.nil?
          ::Spektr.logger.debug "Mass assignment check at #{call.location.line}"
          if user_input?(argument.type, argument.name, call.ast)
            # we check for permit! separately
            next if argument.ast.children[1] == :permit!
            # check for permit with arguments
            next if argument.ast.children[1] == :permit && argument.ast.children[2]
            warn! @target, self, call.location, "Mass assignment"
          end
        end