presidentbeef/brakeman

View on GitHub
lib/brakeman/checks/check_redirect.rb

Summary

Maintainability
B
4 hrs
Test Coverage
A
99%

Consider simplifying this complex logical expression.
Open

    if not protected_by_raise?(call) and
        not only_path?(call) and
        not explicit_host?(opt) and
        not slice_call?(opt) and
        not safe_permit?(opt) and
Severity: Major
Found in lib/brakeman/checks/check_redirect.rb - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        if node_type? exp, :or
          decorated_model? exp.lhs or decorated_model? exp.rhs
        else
          tracker.config.has_gem? :draper and
          call? exp and
    Severity: Major
    Found in lib/brakeman/checks/check_redirect.rb - About 40 mins to fix

      Avoid too many return statements within this method.
      Open

              return Match.new(immediate, opt)
      Severity: Major
      Found in lib/brakeman/checks/check_redirect.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return false
        Severity: Major
        Found in lib/brakeman/checks/check_redirect.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                return (include_user_input?(opt.lhs) or include_user_input?(opt.rhs))
          Severity: Major
          Found in lib/brakeman/checks/check_redirect.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return false
            Severity: Major
            Found in lib/brakeman/checks/check_redirect.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                    return Match.new(immediate, opt)
              Severity: Major
              Found in lib/brakeman/checks/check_redirect.rb - About 30 mins to fix

                There are no issues that match your filters.

                Category
                Status