AgileVentures/LocalSupport

View on GitHub

Showing 792 of 792 total issues

Assignment Branch Condition size for update is too high. [17.15/15] (http://c2.com/cgi/wiki?AbcMetric)
Open

  def update
    user = User.find_by_id(params[:id])
    if params[:pending_org_action] == "decline"
      UserOrganisationDecliner.new(self, user, current_user).call
    elsif params[:pending_org_action] == "approve"

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

Method has too many lines. [9/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def self.from(value)
    [
      '1',
      1,
      'y',
Severity: Minor
Found in lib/boolean.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.

Method has too many lines. [9/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def update
    # UpdateProposedOrganisationEdit.with(observer: self, params: create_params)
    proposed_edit = ProposedOrganisationEdit.find(update_params.fetch(:id))
    if !proposed_edit_params.empty?
      proposed_edit.accept(proposed_edit_params)

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.

Method has too many lines. [9/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def run
    #for the future this from the devis wiki might be relevant
    #When skip_invitation is used, you must also then set the invitation_sent_at field when the user is sent
    # their token. Failure to do so will yield “Invalid invitation token” errors when the user attempts to
    # accept the invite. You can set it like so:

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.

Assignment Branch Condition size for after_inactive_sign_up_path_for is too high. [16.16/15] (http://c2.com/cgi/wiki?AbcMetric)
Open

    def after_inactive_sign_up_path_for(resource)
      if session[:pending_organisation_id]
        UserOrganisationClaimer.new(self, resource, resource).call(session[:pending_organisation_id])
        return organisation_path resource.pending_organisation 
      elsif session[:proposed_org]

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

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def upgrade
    user = User.find(params[:id])
    if user.superadmin?
      flash[:error] = 'User already site admin!'
    else

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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def index
    @volunteer_ops = displayed_volunteer_ops unless iframe_map?
    @markers = BuildMarkersWithInfoWindow.with(VolunteerOp.build_by_coordinates, self)
    response.headers.delete 'X-Frame-Options' if iframe?

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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def bootstrap_class_for flash_type
    case flash_type
    when 'warning'
      'alert-warning'
    when 'notice', 'success'
Severity: Minor
Found in app/helpers/application_helper.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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def show
    url = 'https://api.github.com/repos/AgileVentures/LocalSupport/contributors'
    uri = URI.parse url
    request = Net::HTTP::Get.new(uri.request_uri)
    http = Net::HTTP.new(uri.host, uri.port)

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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def destroy
    user = User.find(params[:id])
    if user == current_user
      flash[:error] = "You may not destroy your own account!"
    else

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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

    def <=> other
      if (@sym == :what_they_do && other.sym == :how_they_help) || (@sym == :what_they_do && other.sym == :who_they_help) ||
        (@sym == :who_they_help && other.sym == :how_they_help)
        -1
      elsif @sym == other.sym
Severity: Minor
Found in app/models/category.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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

    def self.build params
      params.permit(
          :id,
          :email,
          :password,
Severity: Minor
Found in app/controllers/users_controller.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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def find_or_create_charities_and_update
    @charities.each do |charity|
      organisation = @model_klass.find_or_create_by! name: charity['name'].titleize 
      organisation.update ({ address: charity['add1'],
                             postcode: charity['postcode'],

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.

Method has too many lines. [8/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def index
    index_instance_vars_from_params
    index_services_and_markers
    response.headers.delete 'X-Frame-Options'
    

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.

Assignment Branch Condition size for type is too high. [15.3/15] (http://c2.com/cgi/wiki?AbcMetric)
Open

  def type
    return CategoryType.what_they_do if self.charity_commission_id < 200
    return CategoryType.who_they_help if (self.charity_commission_id < 300) & (self.charity_commission_id > 199)
    return CategoryType.how_they_help if (self.charity_commission_id < 400) & (self.charity_commission_id > 299)
  end
Severity: Minor
Found in app/models/category.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

Function invite_users has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.invite_users = function () {
        $(this).click(function () {
            var values = {},
                checks = $('input:checked');
            checks.each(function () {
Severity: Minor
Found in app/assets/javascripts/invitations.js - About 1 hr to fix

    ReDoS based DoS vulnerability in Action Dispatch
    Open

        actionpack (5.2.4.1)
    Severity: Minor
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2023-22795

    URL: https://github.com/rails/rails/releases/tag/v7.0.4.1

    Solution: upgrade to >= 5.2.8.15, ~> 5.2.8, >= 6.1.7.1, ~> 6.1.7, >= 7.0.4.1

    Possible exposure of information vulnerability in Action Pack
    Open

        actionpack (5.2.4.1)
    Severity: Critical
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2022-23633

    Criticality: High

    URL: https://groups.google.com/g/ruby-security-ann/c/FkTM-_7zSNA/m/K2RiMJBlBAAJ

    Solution: upgrade to >= 5.2.6.2, ~> 5.2.6, >= 6.0.4.6, ~> 6.0.4, >= 6.1.4.6, ~> 6.1.4, >= 7.0.2.2

    HTTP Request Smuggling in puma
    Open

        puma (4.3.3)
    Severity: Minor
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2022-24790

    Criticality: Critical

    URL: https://github.com/puma/puma/security/advisories/GHSA-h99w-9q5r-gjq9

    Solution: upgrade to ~> 4.3.12, >= 5.6.4

    Keepalive Connections Causing Denial Of Service in puma
    Open

        puma (4.3.3)
    Severity: Critical
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2021-29509

    Criticality: High

    URL: https://github.com/puma/puma/security/advisories/GHSA-q28m-8xjw-8vr5

    Solution: upgrade to ~> 4.3.8, >= 5.3.1

    Severity
    Category
    Status
    Source
    Language