Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何跳过brakeman扫描过程中的特定方法+;轨道_Ruby On Rails_Ruby On Rails 3_Security_Brakeman - Fatal编程技术网

Ruby on rails 如何跳过brakeman扫描过程中的特定方法+;轨道

Ruby on rails 如何跳过brakeman扫描过程中的特定方法+;轨道,ruby-on-rails,ruby-on-rails-3,security,brakeman,Ruby On Rails,Ruby On Rails 3,Security,Brakeman,我正在我的应用程序中使用brakeman进行安全检查。我想跳过一些方法 我将方法标记为安全的,但我想在方法中添加一个标志,以便在brakeman扫描应用程序时跳过该方法 例如: class User < ActiveRecord::Base # I want to skip this method when brakeman scan the application # Kind of `flag` to skip the method def profile # .

我正在我的应用程序中使用
brakeman
进行安全检查。我想跳过一些方法 我
将方法标记为安全的
,但我想在方法中添加一个
标志
,以便在
brakeman
扫描应用程序时跳过该方法

例如:

class User < ActiveRecord::Base

  # I want to skip this method when brakeman scan the application
  # Kind of `flag` to skip the method
  def profile
    # ..
  end

  def company
    #..
  end
end
class用户
我想添加一个文件,以便管理需要跳过的标记。

有人知道我怎么做吗?
非常感谢您的帮助。

不,无法跳过处理特定方法

您可以通过忽略特定警告。使用
-I
运行Brakeman可以创建/管理该文件:

brakeman -I

但是有一种方法可以减少警告,但不确定如何实现?