georgebellos/real_estate

View on GitHub

Showing 829 of 829 total issues

Regular Expression Denial of Service in Addressable templates
Open

    addressable (2.3.4)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2021-32740

Criticality: High

URL: https://github.com/advisories/GHSA-jxhc-q857-3j6g

Solution: upgrade to >= 2.8.0

Nokogiri Command Injection Vulnerability via Nokogiri::CSS::Tokenizer#load_file
Open

    nokogiri (1.5.9)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2019-5477

Criticality: Critical

URL: https://github.com/sparklemotion/nokogiri/issues/1915

Solution: upgrade to >= 1.10.4

Nokogiri gem, via libxml, is affected by DoS and RCE vulnerabilities
Open

    nokogiri (1.5.9)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2017-9050

Criticality: High

URL: https://github.com/sparklemotion/nokogiri/issues/1673

Solution: upgrade to >= 1.8.1

Nokogiri::XML::Schema trusts input by default, exposing risk of an XXE vulnerability
Open

    nokogiri (1.5.9)
Severity: Info
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2020-26247

Criticality: Low

URL: https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-vr8q-g5c7-m54m

Solution: upgrade to >= 1.11.0.rc4

Nokogiri gem contains several vulnerabilities in libxml2 and libxslt
Open

    nokogiri (1.5.9)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2015-1819

URL: https://github.com/sparklemotion/nokogiri/issues/1374

Solution: upgrade to ~> 1.6.6.4, >= 1.6.7.rc4

Nokogiri gem, via libxml, is affected by DoS vulnerabilities
Open

    nokogiri (1.5.9)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2017-15412

URL: https://github.com/sparklemotion/nokogiri/issues/1714

Solution: upgrade to >= 1.8.2

Race condition when using persistent connections
Open

    excon (0.23.0)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2019-16779

Criticality: Medium

URL: https://github.com/excon/excon/security/advisories/GHSA-q58g-455p-8vw9

Solution: upgrade to >= 0.71.0

rest-client ruby gem logs sensitive information
Open

    rest-client (1.6.7)
Severity: Info
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2015-3448

Criticality: Low

URL: https://github.com/rest-client/rest-client/issues/349

Solution: upgrade to >= 1.7.3

Nokogiri gem contains several vulnerabilities in libxml2 and libxslt
Open

    nokogiri (1.5.9)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2016-4658

Criticality: Critical

URL: https://github.com/sparklemotion/nokogiri/issues/1615

Solution: upgrade to >= 1.7.1

Possible information leak / session hijack vulnerability
Open

    rack (1.4.5)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2019-16782

Criticality: Medium

URL: https://github.com/rack/rack/security/advisories/GHSA-hrqr-hxpp-chr3

Solution: upgrade to ~> 1.6.12, >= 2.0.8

Update bundled libxml2 to v2.10.3 to resolve multiple CVEs
Open

    nokogiri (1.5.9)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Possible XSS vulnerability in Rack
Open

    rack (1.4.5)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2018-16471

URL: https://groups.google.com/forum/#!topic/ruby-security-ann/NAalCee8n6o

Solution: upgrade to ~> 1.6.11, >= 2.0.6

uglifier incorrectly handles non-boolean comparisons during minification
Open

    uglifier (2.1.1)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: OSVDB-126747

URL: https://github.com/mishoo/UglifyJS2/issues/751

Solution: upgrade to >= 2.7.2

Complex method Property::search (107.4)
Open

  def self.search(params)
    tire.search(load: true, page: params[:page], per_page: 12) do
      query do
        boolean do
          must { string params[:search][:query] } if params[:search][:query].present?
Severity: Minor
Found in app/models/property.rb by flog

Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

You can read more about ABC metrics or the flog tool

Method search has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
Open

  def self.search(params)
    tire.search(load: true, page: params[:page], per_page: 12) do
      query do
        boolean do
          must { string params[:search][:query] } if params[:search][:query].present?
Severity: Minor
Found in app/models/property.rb - About 7 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Assignment Branch Condition size for search is too high. [63.1/15]
Open

  def self.search(params)
    tire.search(load: true, page: params[:page], per_page: 12) do
      query do
        boolean do
          must { string params[:search][:query] } if params[:search][:query].present?
Severity: Minor
Found in app/models/property.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Assignment Branch Condition size for index is too high. [38.79/15]
Open

  def index
    @favs_quicklist = current_user.favorites.includes(:images).limit(4) if current_user
    @compares_quicklist = Property.includes(:images).find(session[:compare_list] || [])

    @properties = if params[:search].present?

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Complex method PropertiesController#index (54.1)
Open

  def index
    @favs_quicklist = current_user.favorites.includes(:images).limit(4) if current_user
    @compares_quicklist = Property.includes(:images).find(session[:compare_list] || [])

    @properties = if params[:search].present?

Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

You can read more about ABC metrics or the flog tool

Method has too many lines. [22/10]
Open

  def self.search(params)
    tire.search(load: true, page: params[:page], per_page: 12) do
      query do
        boolean do
          must { string params[:search][:query] } if params[:search][:query].present?
Severity: Minor
Found in app/models/property.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Cyclomatic complexity for search is too high. [16/6]
Open

  def self.search(params)
    tire.search(load: true, page: params[:page], per_page: 12) do
      query do
        boolean do
          must { string params[:search][:query] } if params[:search][:query].present?
Severity: Minor
Found in app/models/property.rb by rubocop

This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

Severity
Category
Status
Source
Language