consul/consul

View on GitHub

Showing 1,691 of 1,691 total issues

CSRF vulnerability in OmniAuth's request phase
Open

    omniauth (1.9.1)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2015-9284

Criticality: High

URL: https://github.com/omniauth/omniauth/wiki/Resolving-CVE-2015-9284

Solution: upgrade to >= 2.0.0

File budget_investments_spec.rb has 1443 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require "rails_helper"

describe "Admin budget investments", :admin do
  let(:budget) { create(:budget) }
  let(:administrator) do
Severity: Major
Found in spec/system/admin/budget_investments_spec.rb - About 3 days to fix

    File proposals_spec.rb has 1284 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require "rails_helper"
    
    describe "Proposals" do
      it_behaves_like "milestoneable", :proposal
    
    
    Severity: Major
    Found in spec/system/proposals_spec.rb - About 3 days to fix

      File investments_spec.rb has 1188 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require "rails_helper"
      require "sessions_helper"
      
      describe "Budget Investments" do
        let(:author)  { create(:user, :level_two, username: "Isabel") }
      Severity: Major
      Found in spec/system/budgets/investments_spec.rb - About 3 days to fix

        File investment_spec.rb has 1018 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require "rails_helper"
        
        describe Budget::Investment do
          let(:investment) { build(:budget_investment) }
        
        
        Severity: Major
        Found in spec/models/budget/investment_spec.rb - About 2 days to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            describe "/moderation/ screen" do
              before do
                moderator = create(:moderator)
                login_as(moderator.user)
              end
          Severity: Major
          Found in spec/system/moderation/comments_spec.rb and 1 other location - About 2 days to fix
          spec/system/moderation/debates_spec.rb on lines 38..202

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 533.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            describe "/moderation/ screen" do
              before do
                moderator = create(:moderator)
                login_as(moderator.user)
              end
          Severity: Major
          Found in spec/system/moderation/debates_spec.rb and 1 other location - About 2 days to fix
          spec/system/moderation/comments_spec.rb on lines 65..229

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 533.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            describe "Debate index order filters" do
              scenario "Default order is hot_score" do
                best_debate = create(:debate, title: "Best")
                best_debate.update_column(:hot_score, 10)
                worst_debate = create(:debate, title: "Worst")
          Severity: Major
          Found in spec/system/debates_spec.rb and 1 other location - About 2 days to fix
          spec/system/proposals_spec.rb on lines 785..939

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 526.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            describe "Proposal index order filters" do
              scenario "Default order is hot_score" do
                best_proposal = create(:proposal, title: "Best proposal")
                best_proposal.update_column(:hot_score, 10)
                worst_proposal = create(:proposal, title: "Worst proposal")
          Severity: Major
          Found in spec/system/proposals_spec.rb and 1 other location - About 2 days to fix
          spec/system/debates_spec.rb on lines 379..535

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 526.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          File topics_spec.rb has 815 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require "rails_helper"
          
          describe "Commenting topics from proposals" do
            let(:user)     { create :user }
            let(:proposal) { create :proposal }
          Severity: Major
          Found in spec/system/comments/topics_spec.rb - About 1 day to fix

            File proposal_spec.rb has 804 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require "rails_helper"
            
            describe Proposal do
              let(:proposal) { build(:proposal) }
            
            
            Severity: Major
            Found in spec/models/proposal_spec.rb - About 1 day to fix

              File debates_spec.rb has 675 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require "rails_helper"
              
              describe "Debates" do
                context "Concerns" do
                  it_behaves_like "notifiable in-app", :debate
              Severity: Major
              Found in spec/system/debates_spec.rb - About 1 day to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  describe "#hot_score" do
                    let(:now) { Time.current }
                
                    it "period is correctly calculated to get exact votes per day" do
                      new_proposal = create(:proposal, created_at: 23.hours.ago)
                Severity: Major
                Found in spec/models/proposal_spec.rb and 1 other location - About 1 day to fix
                spec/models/legislation/proposal_spec.rb on lines 30..103

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 353.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  describe "#hot_score" do
                    let(:now) { Time.current }
                
                    it "period is correctly calculated to get exact votes per day" do
                      new_proposal = create(:legislation_proposal, created_at: 23.hours.ago)
                Severity: Major
                Found in spec/models/legislation/proposal_spec.rb and 1 other location - About 1 day to fix
                spec/models/proposal_spec.rb on lines 263..336

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 353.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                File user_spec.rb has 630 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                require "rails_helper"
                
                describe User do
                  describe "#headings_voted_within_group" do
                    it "returns the headings voted by a user" do
                Severity: Major
                Found in spec/models/user_spec.rb - About 1 day to fix

                  File debate_spec.rb has 586 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  require "rails_helper"
                  
                  describe Debate do
                    let(:debate) { build(:debate) }
                  
                  
                  Severity: Major
                  Found in spec/models/debate_spec.rb - About 1 day to fix

                    File legislation_annotations_spec.rb has 558 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require "rails_helper"
                    
                    describe "Commenting legislation questions" do
                      let(:user) { create :user }
                      let(:legislation_annotation) { create :legislation_annotation, author: user }
                    Severity: Major
                    Found in spec/system/comments/legislation_annotations_spec.rb - About 1 day to fix

                      File ballots_spec.rb has 493 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      require "rails_helper"
                      require "sessions_helper"
                      
                      describe "Ballots" do
                        let(:user)        { create(:user, :level_two) }
                      Severity: Minor
                      Found in spec/system/budgets/ballots_spec.rb - About 7 hrs to fix

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            context "reorder" do
                              it "is able to reorder by hot_score after searching" do
                                lowest_score  = create(:debate,  title: "stop corruption", cached_votes_up: 1)
                                highest_score = create(:debate,  title: "stop corruption", cached_votes_up: 2)
                                average_score = create(:debate,  title: "stop corruption", cached_votes_up: 3)
                        Severity: Major
                        Found in spec/models/debate_spec.rb and 1 other location - About 7 hrs to fix
                        spec/models/proposal_spec.rb on lines 618..680

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 249.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            context "reorder" do
                              it "is able to reorder by hot_score after searching" do
                                lowest_score  = create(:proposal,  title: "stop corruption", cached_votes_up: 1)
                                highest_score = create(:proposal,  title: "stop corruption", cached_votes_up: 2)
                                average_score = create(:proposal,  title: "stop corruption", cached_votes_up: 3)
                        Severity: Major
                        Found in spec/models/proposal_spec.rb and 1 other location - About 7 hrs to fix
                        spec/models/debate_spec.rb on lines 594..656

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 249.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language