Showing 65 of 65 total issues
Uncontrolled Recursion in Loofah Open
loofah (2.7.0)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-23516
Criticality: High
URL: https://github.com/flavorjones/loofah/security/advisories/GHSA-3x8r-x6xp-q4vm
Solution: upgrade to >= 2.19.1
Denial of Service (DoS) in Nokogiri on JRuby Open
nokogiri (1.10.10)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-24839
Criticality: High
URL: https://github.com/sparklemotion/nekohtml/security/advisories/GHSA-9849-p7jc-9rmv
Solution: upgrade to >= 1.13.4
Cross-site Scripting in Sidekiq Open
sidekiq (6.1.1)
- Read upRead up
- Exclude checks
Advisory: CVE-2021-30151
Criticality: Medium
URL: https://github.com/advisories/GHSA-grh7-935j-hg6w
Solution: upgrade to ~> 5.2.0, >= 6.2.1
Remote shell execution vulnerability when applying commands from user input Open
image_processing (1.11.0)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-24720
Criticality: Critical
URL: https://github.com/janko/image_processing/security/advisories/GHSA-cxf7-qrc5-9446
Solution: upgrade to >= 1.12.2
Inefficient Regular Expression Complexity in Loofah Open
loofah (2.7.0)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-23514
Criticality: High
URL: https://github.com/flavorjones/loofah/security/advisories/GHSA-486f-hjj9-9vhh
Solution: upgrade to >= 2.19.1
Improper neutralization of data URIs may allow XSS in rails-html-sanitizer Open
rails-html-sanitizer (1.3.0)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-23518
Criticality: Medium
URL: https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m
Solution: upgrade to >= 1.4.4
Improper neutralization of data URIs may allow XSS in Loofah Open
loofah (2.7.0)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-23515
Criticality: Medium
URL: https://github.com/flavorjones/loofah/security/advisories/GHSA-228g-948r-83gx
Solution: upgrade to >= 2.19.1
Denial of service in sidekiq Open
sidekiq (6.1.1)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-23837
Criticality: High
URL: https://github.com/mperham/sidekiq/commit/7785ac1399f1b28992adb56055f6acd88fd1d956
Solution: upgrade to >= 6.4.0, ~> 5.2.10
File users.rb
has 542 lines of code (exceeds 400 allowed). Consider refactoring. Open
module API
module V2
module Admin
# Admin functionality over users table
class Users < Grape::API
Class Authorize
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Authorize
STATE_CHANGING_VERBS = %w[POST PUT PATCH DELETE TRACE].freeze
# Custom Error class to support error status and message
class AuthError < StandardError
attr_reader :code
Method handle_message
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def handle_message(delivery_info, _metadata, payload)
exchange = @exchanges.select { |_, ex| ex[:name] == delivery_info[:exchange] }
exchange_id = exchange.keys.first.to_s
signer = exchange[exchange_id.to_sym][:signer]
Method authorize
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def authorize
@restrictions = Rails.cache.fetch('restrictions', expires_in: 5.minutes) { fetch_restrictions }
# whitelink path
unless params[:path] == 'api/v2/barong/identity/users/access'
- Read upRead up
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 seed_users
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def seed_users
logger.info "Seeding users"
seeds["users"].each do |seed|
logger.info "---"
- Read upRead up
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 perform
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def perform(user_id, identificator)
# user, that will be verified
@user = User.find(user_id)
# exact batch of the docs to be verified
docs = @user.documents.where(identificator: identificator)
Server-side request forgery in CarrierWave Open
carrierwave (2.1.0)
- Read upRead up
- Exclude checks
Advisory: CVE-2021-21288
Criticality: Medium
URL: https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-fwcm-636p-68r5
Solution: upgrade to ~> 1.3.2, >= 2.1.1
Denial of service via header parsing in Rack Open
rack (2.2.3)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-44570
URL: https://github.com/rack/rack/releases/tag/v3.0.4.1
Solution: upgrade to >= 2.0.9.2, ~> 2.0.9, >= 2.1.4.2, ~> 2.1.4, >= 2.2.6.2, ~> 2.2.6, >= 3.0.4.1
Code Injection vulnerability in CarrierWave::RMagick Open
carrierwave (2.1.0)
- Read upRead up
- Exclude checks
Advisory: CVE-2021-21305
Criticality: High
URL: https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4
Solution: upgrade to ~> 1.3.2, >= 2.1.1
Denial of Service Vulnerability in ActiveRecord’s PostgreSQL adapter Open
activerecord (5.2.4.4)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-44566
URL: https://github.com/rails/rails/releases/tag/v7.0.4.1
Solution: upgrade to >= 5.2.8.15, ~> 5.2.8, >= 6.1.7.1, ~> 6.1.7, >= 7.0.4.1
ReDoS based DoS vulnerability in Active Support’s underscore Open
activesupport (5.2.4.4)
- Read upRead up
- Exclude checks
Advisory: CVE-2023-22796
URL: https://github.com/rails/rails/releases/tag/v7.0.4.1
Solution: upgrade to >= 5.2.8.15, ~> 5.2.8, >= 6.1.7.1, ~> 6.1.7, >= 7.0.4.1
Possible XSS Vulnerability in Action View tag helpers Open
actionview (5.2.4.4)
- Read upRead up
- Exclude checks
Advisory: CVE-2022-27777
Criticality: Medium
URL: https://groups.google.com/g/ruby-security-ann/c/9wJPEDv-iRw
Solution: upgrade to >= 5.2.7.1, ~> 5.2.7, >= 6.0.4.8, ~> 6.0.4, >= 6.1.5.1, ~> 6.1.5, >= 7.0.2.4