3scale/porta

View on GitHub
app/models/oidc_configuration.rb

Summary

Maintainability
A
0 mins
Test Coverage

Mass assignment is not restricted using attr_accessible
Open

class OIDCConfiguration < ApplicationRecord
Severity: Critical
Found in app/models/oidc_configuration.rb by brakeman

This warning comes up if a model does not limit what attributes can be set through mass assignment.

In particular, this check looks for attr_accessible inside model definitions. If it is not found, this warning will be issued.

Brakeman also warns on use of attr_protected - especially since it was found to be vulnerable to bypass. Warnings for mass assignment on models using attr_protected will be reported, but at a lower confidence level.

Note that disabling mass assignment globally will suppress these warnings.

OIDCConfiguration#to_xml contains iterators nested 2 deep
Open

      Config::ATTRIBUTES.each do |attr|
Severity: Minor
Found in app/models/oidc_configuration.rb by reek

A Nested Iterator occurs when a block contains another block.

Example

Given

class Duck
  class << self
    def duck_names
      %i!tick trick track!.each do |surname|
        %i!duck!.each do |last_name|
          puts "full name is #{surname} #{last_name}"
        end
      end
    end
  end
end

Reek would report the following warning:

test.rb -- 1 warning:
  [5]:Duck#duck_names contains iterators nested 2 deep (NestedIterators)

There are no issues that match your filters.

Category
Status