consul/consul

View on GitHub

Showing 1,677 of 1,677 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/pull/809

Solution: remove or disable this gem until a patch is available!

File proposals_spec.rb has 1485 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 1477 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 budget_investments_spec.rb has 1459 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 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 "Proposal index order filters" do
              scenario "Default order is hot_score", :js 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 349..508

          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 538.

          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", :js 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 754..911

          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 538.

          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 debates_spec.rb has 880 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require "rails_helper"
          
          describe "Debates" do
            scenario "Disabled with a feature flag" do
              Setting["process.debates"] = nil
          Severity: Major
          Found in spec/system/debates_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 46..198

            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 515.

            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..217

            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 515.

            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

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

                      context "Search by author type" do
                        scenario "Public employee", :js do
                          ana = create :user, official_level: 1
                          john = create :user, official_level: 2
                
                
                Severity: Major
                Found in spec/system/debates_spec.rb and 1 other location - About 1 day to fix
                spec/system/proposals_spec.rb on lines 1180..1292

                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 379.

                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 "Search by author type" do
                        scenario "Public employee", :js do
                          ana = create :user, official_level: 1
                          john = create :user, official_level: 2
                
                
                Severity: Major
                Found in spec/system/proposals_spec.rb and 1 other location - About 1 day to fix
                spec/system/debates_spec.rb on lines 569..681

                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 379.

                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

                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

                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 user_spec.rb has 565 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 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 528 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      require "rails_helper"
                      
                      describe "Ballots" do
                        let(:user)        { create(:user, :level_two) }
                        let!(:budget)     { create(:budget, :balloting) }
                      Severity: Major
                      Found in spec/system/budgets/ballots_spec.rb - About 1 day to fix
                        Severity
                        Category
                        Status
                        Source
                        Language