supremebeing7/time_log_robot

View on GitHub

Showing 10 of 10 total issues

OS Command Injection in Rake
Open

    rake (10.5.0)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2020-8130

Criticality: High

URL: https://github.com/advisories/GHSA-jppv-gw3r-w3q8

Solution: upgrade to >= 12.3.3

json Gem for Ruby Unsafe Object Creation Vulnerability (additional fix)
Open

    json (1.8.1)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Advisory: CVE-2020-10663

Criticality: High

URL: https://www.ruby-lang.org/en/news/2020/03/19/json-dos-cve-2020-10663/

Solution: upgrade to >= 2.3.0

httparty has multipart/form-data request tampering vulnerability
Open

    httparty (0.14.0)
Severity: Minor
Found in Gemfile.lock by bundler-audit

Advisory:

Criticality: Medium

URL: https://github.com/jnunemaker/httparty/security/advisories/GHSA-5pq7-52mg-hr42

Solution: upgrade to >= 0.21.0

Method has too many lines. [46/30]
Open

    def parse(args)
      options = OpenStruct.new
      options.mapping   = nil
      options.overwrite = false
      options.since     = nil
Severity: Minor
Found in lib/time_log_robot.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 parse has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def parse(args)
      options = OpenStruct.new
      options.mapping   = nil
      options.overwrite = false
      options.since     = nil
Severity: Minor
Found in lib/time_log_robot.rb - About 1 hr to fix

Method log has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        def log(entry)
          payload = build_payload(entry)
          @issue_key = parse_issue_key(entry)
          response = post("/issue/#{issue_key}/worklog", basic_auth: auth, headers: headers, body: payload)
          if response.success?
Severity: Minor
Found in lib/time_log_robot/jira/work_logger.rb - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def run(args)
      options = TimeLogRobot.parse(args)

      create_settings_file_if_nonexistent

Severity: Minor
Found in lib/time_log_robot.rb - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

TODO found
Open

        # @TODO Extract since it's used in several different models

TODO found
Open

      # TODO Refactor to avoid having to pass around `since` so much
Severity: Minor
Found in lib/time_log_robot/toggl/report.rb by fixme

TODO found
Open

      # @TODO This probably belongs on the reporter class?
Severity: Minor
Found in lib/time_log_robot/toggl/entry.rb by fixme
Severity
Category
Status
Source
Language