wearefine/fae

View on GitHub

Showing 1,556 of 1,556 total issues

Module has too many lines. [216/100]
Open

  module FormHelper

    def fae_input(f, attribute, options={})
      custom_options attribute, options
      language_support f, attribute, options
Severity: Minor
Found in app/helpers/fae/form_helper.rb by rubocop

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

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

    def get_deploys_env_response(path)
      return get "#{@endpoint_base}#{path}" unless Rails.env.test?
      [
        {
          "state"=>"building",
Severity: Minor
Found in app/services/fae/netlify_api.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.

Class has too many lines. [199/100]
Open

  class NetlifyApi

    def initialize()
      @netlify_api_user   = Fae.netlify[:api_user]
      @netlify_api_token  = Fae.netlify[:api_token]
Severity: Minor
Found in app/services/fae/netlify_api.rb by rubocop

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

Module has too many lines. [194/100]
Open

  module ViewHelper

    def fae_date_format(datetime, timezone = @option.time_zone)
      datetime.in_time_zone(timezone).strftime('%m/%d/%y') if is_date_or_time?(datetime)
    end
Severity: Minor
Found in app/helpers/fae/view_helper.rb by rubocop

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

Class has too many lines. [181/100]
Open

  class BaseGenerator < Rails::Generators::NamedBase
    source_root ::File.expand_path('../templates', __FILE__)
    argument :attributes, type: :array, default: [], banner: "field[:type][:index] field[:type][:index]"
    class_option :namespace, type: :string, default: 'admin', desc: 'Sets the namespace of the generator'
    class_option :template, type: :string, default: 'slim', desc: 'Sets the template engine of the generator'

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

Module has too many lines. [119/100]
Open

  module ApplicationHelper

    def form_header(name)
      name = name.class.name.split('::').last unless name.is_a? String
      form_title = "#{params[:action]} #{name}".titleize

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

Module has too many lines. [109/100]
Open

  module Cloneable
    extend ActiveSupport::Concern

    private

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

Module has too many lines. [103/100]
Open

  module Trackable
    extend ActiveSupport::Concern

    included do
      after_create :add_create_change, if: :track_changes?

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

Class has too many lines. [102/100]
Open

  class ApplicationController < ActionController::Base
    protect_from_forgery with: :exception

    include Fae::ApplicationControllerConcern

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

Uncontrolled Recursion in Loofah
Open

    loofah (2.14.0)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2022-23516

Criticality: High

URL: https://github.com/flavorjones/loofah/security/advisories/GHSA-3x8r-x6xp-q4vm

Solution: upgrade to >= 2.19.1

Improper neutralization of data URIs may allow XSS in Loofah
Open

    loofah (2.14.0)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2022-23515

Criticality: Medium

URL: https://github.com/flavorjones/loofah/security/advisories/GHSA-228g-948r-83gx

Solution: upgrade to >= 2.19.1

Inefficient Regular Expression Complexity in Loofah
Open

    loofah (2.14.0)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2022-23514

Criticality: High

URL: https://github.com/flavorjones/loofah/security/advisories/GHSA-486f-hjj9-9vhh

Solution: upgrade to >= 2.19.1

Potential XSS vulnerability in jQuery
Open

    jquery-rails (4.3.5)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2020-11023

Criticality: Medium

URL: https://blog.jquery.com/2020/04/10/jquery-3-5-0-released

Solution: upgrade to >= 4.4.0

Assignment Branch Condition size for filter is too high. [56.18/15]
Open

      def filter(params)
        # build conditions if specific params are present
        conditions = {}
        conditions[:user_id] = params['user'] if params['user'].present?
        conditions[:changeable_type] = params['model'] if params['model'].present?
Severity: Minor
Found in app/models/fae/change.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

File _validator.js has 392 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* global Fae, judge, FCH */

/**
 * Fae form validator
 * @namespace form.validator
Severity: Minor
Found in app/assets/javascripts/fae/form/_validator.js - About 5 hrs to fix

    Assignment Branch Condition size for clone_has_one_relationship is too high. [43.78/15]
    Open

        def clone_has_one_relationship(association,type)
          old_record = @item.send(association)
    
          if old_record.present?
            new_record = old_record.dup

    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 get_deploys_env_response has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def get_deploys_env_response(path)
          return get "#{@endpoint_base}#{path}" unless Rails.env.test?
          [
            {
              "state"=>"building",
    Severity: Major
    Found in app/services/fae/netlify_api.rb - About 4 hrs to fix

      Assignment Branch Condition size for td_columns is too high. [37.22/15]
      Open

          def td_columns(params)
            attribute = params[:col]
            attributes = params[:cols]
            item = params[:item]
      
      

      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 change_item_link is too high. [35.83/15]
      Open

          def change_item_link(change)
            text = "#{change.changeable_type.gsub('Fae::','')}: "
            test_source_method = :data_source_exists?
      
            if change.changeable_type.exclude?('Fae') && change.changeable_type.exclude?('Page') && !ActiveRecord::Base.connection.send(test_source_method, change.changeable_type.tableize)

      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. [30/10]
      Open

        def change
          create_table(:fae_users) do |t|
            ## Database authenticatable
            t.string :email,              :null => false, :default => ""
            t.string :encrypted_password, :null => false, :default => ""

      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.

      Severity
      Category
      Status
      Source
      Language