expertiza/expertiza

View on GitHub

Showing 2,855 of 2,864 total issues

open-uri-cached Gem for Ruby Unsafe Temporary File Creation Local Privilege Escalation
Open

    open-uri-cached (0.0.5)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2015-3649

URL: http://seclists.org/oss-sec/2015/q2/373

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

Block has too many lines. [601/25]
Open

describe "assignment function" do
  before(:each) do
    create(:deadline_type, name: "submission")
    create(:deadline_type, name: "review")
    create(:deadline_type, name: "metareview")

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [590/25]
Open

describe QuestionnairesController do
  let(:questionnaire) do
    build(id: 1, name: 'questionnaire', ta_id: 8, course_id: 1, private: false, min_question_score: 0, max_question_score: 5, type: 'ReviewQuestionnaire')
  end
  let(:questionnaire) { build(:questionnaire) }

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [523/25]
Open

describe ReviewMappingController do
  let(:assignment) { double('Assignment', id: 1) }
  let(:review_response_map) do
    double('ReviewResponseMap', id: 1, map_id: 1, assignment: assignment,
                                reviewer: double('Participant', id: 1, name: 'reviewer'), reviewee: double('Participant', id: 2, name: 'reviewee'))

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [488/25]
Open

describe Assignment do
  let(:assignment) { build(:assignment, id: 1, name: 'no assignment', participants: [participant], teams: [team]) }
  let(:instructor) { build(:instructor, id: 6) }
  let(:student) { build(:student, id: 3, name: 'no one') }
  let(:review_response_map) { build(:review_response_map, response: [response], reviewer: build(:participant), reviewee: build(:assignment_team)) }
Severity: Minor
Found in spec/models/assignment_spec.rb by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [439/25]
Open

describe SignUpSheetController do
  let(:assignment) { build(:assignment, id: 1, instructor_id: 6, due_dates: [due_date], microtask: true, staggered_deadline: true) }
  let(:instructor) { build(:instructor, id: 6) }
  let(:student) { build(:student, id: 8) }
  let(:participant) { build(:participant, id: 1, user_id: 6, assignment: assignment) }

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [412/25]
Open

FactoryBot.define do
  factory :institution, class: Institution do
    name 'North Carolina State University'
  end

Severity: Minor
Found in spec/factories/factories.rb by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [374/25]
Open

describe User do
  let(:user) do
    User.new name: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',
             email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle'
  end
Severity: Minor
Found in spec/models/user_spec.rb by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [370/25]
Open

describe UsersController do
  let(:admin) { build(:admin, id: 3) }
  let(:super_admin) {build (:superadmin)}
  let(:instructor) { build(:instructor, id: 2) }
  let(:student1) { build(:student, id: 1, name: :lily) }

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [369/25]
Open

describe AssignmentParticipant do
  let(:response) { build(:response) }
  let(:team) { build(:assignment_team, id: 1) }
  let(:team2) { build(:assignment_team, id: 2) }
  let(:response_map) { build(:review_response_map, reviewer_id: 2, response: [response]) }

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [331/25]
Open

describe AssignmentsController do
  let(:assignment) do
    build(:assignment, id: 1, name: 'test assignment', instructor_id: 6, staggered_deadline: true, directory_path: 'same path',
                       participants: [build(:participant)], teams: [build(:assignment_team)], course_id: 1)
  end

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Assignment Branch Condition size for complete is too high. [222.9/15]
Open

  def complete(count, answer = nil, questionnaire_min, questionnaire_max, dropdown_or_scale)
    if self.size.nil?
      cols = '70'
      rows = '1'
    else
Severity: Minor
Found in app/models/criterion.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

Block has too many lines. [326/25]
Open

describe CollusionCycle do
  #
  # assignment participant -----
  #    ^                       |
  #    |                       V
Severity: Minor
Found in spec/models/collusion_cycle_spec.rb by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

File tree_display.jsx has 1153 lines of code (exceeds 250 allowed). Consider refactoring.
Open

jQuery(document).ready(function() {
  // This preloadedImages function is refered from http://jsfiddle.net/slashingweapon/8jAeu/
  // Actually I am not using the values in preloadedImages, but image loading speed is indeed getting faster
  var preloadedImages = []
  function preloadImages() {
Severity: Major
Found in app/assets/javascripts/tree_display.jsx - About 2 days to fix

    Block has too many lines. [302/25]
    Open

    describe ResponseController do
      let(:assignment) { build(:assignment, instructor_id: 6) }
      let(:instructor) { build(:instructor, id: 6) }
      let(:participant) { build(:participant, id: 1, user_id: 6, assignment: assignment) }
      let(:review_response) { build(:response, id: 1, map_id: 1) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [289/25]
    Open

    describe AssignmentForm do
      let(:assignment) { build(:assignment, id: 1) }
      let(:due_date) { build(:assignment_due_date) }
      let(:assignment_form) { AssignmentForm.new }
      let(:user) { double('Instructor', timezonepref: 'Eastern Time (US & Canada)') }
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [270/25]
    Open

    describe Assessment360Controller do
      let(:instructor) { build(:instructor, id: 6) }
      let(:student) { build(:student, id: 6) }
      let(:ta) { build(:teaching_assistant, id: 6) }
      let(:administrator) { build(:admin, id: 6) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

    module ReviewMappingHelper
      def create_report_table_header(headers = {})
        table_header = "<div class = 'reviewreport'>\
                        <table width='100% cellspacing='0' cellpadding='2' border='0' class='table table-striped'>\
                        <tr bgcolor='#CCCCCC'>"

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

    Block has too many lines. [262/25]
    Open

    describe TreeDisplayController do
      # Airbrake-1517247902792549741
      describe "#list" do
        it "should not redirect to tree_display#list if current user is an instructor" do
          user = build(:instructor)

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Assignment Branch Condition size for save_topic_deadlines is too high. [162.6/15]
    Open

      def save_topic_deadlines
        assignment = Assignment.find(params[:assignment_id])
        @assignment_submission_due_dates = assignment.due_dates.select {|due_date| due_date.deadline_type_id == 1 }
        @assignment_review_due_dates = assignment.due_dates.select {|due_date| due_date.deadline_type_id == 2 }
        due_dates = params[:due_date]

    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

    Severity
    Category
    Status
    Source
    Language