Showing 16,065 of 22,177 total issues
Method cmd_aggregator_session_park
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_aggregator_session_park(*args)
return if !aggregator_verify
case args.length
when 1
- 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 nessus_index
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def nessus_index
if File.exist?(xindex.to_s)
# check if it's version line matches current version.
File.open(xindex.to_s) do |f|
line = f.readline
- 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
Function find_path_before_null_character
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_path_before_null_character(blob_data, start_offset):
current_position = start_offset
while current_position > 0:
current_byte = blob_data[current_position]
next_byte = blob_data[current_position + 1] if current_position + 1 < len(blob_data) else None
- 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 cmd_openvas_report_delete
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_report_delete(*args)
return unless openvas?
if args?(args)
begin
- 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 output_line
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def output_line(opts, line)
if opts[:output_file].nil?
if line[-2..] == "\r\n"
print_line(line[0..-3])
elsif line[-1] == "\n"
- 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 cmd_nessus_policy_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nessus_policy_list(*args)
search_term = nil
while (arg = args.shift)
case arg
when '-h', '--help'
- 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 cmd_openvas_report_import
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_report_import(*args)
return unless openvas?
if args?(args, 2)
begin
- 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 cmd_nessus_report_del
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nessus_report_del(*args)
if args[0] == '-h'
print_status('nessus_report_del <reportname>')
print_status('Example:> nessus_report_del f0eabba3-4065-7d54-5763-f191e98eb0f7f9f33db7e75a06ca')
print_status('Must be an admin to del reports.')
- 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 cmd_besecure_report_import
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_besecure_report_import(*args)
if args?(args, 2)
if !database?
print_error('Database not ready')
return ''
- 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 cmd_aggregator_save
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_aggregator_save(*args)
# if we are logged in, save session details to aggregator.yaml
if !args.empty? || args[0] == '-h'
usage_save
return
- 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 cmd_nessus_report_download
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nessus_report_download(*args)
if args[0] == '-h'
print_status('nessus_scan_report_download <scan_id> <file ID> ')
print_status('Use nessus_scan_export_status <scan ID> <file ID> to check the export status.')
print_status('Use nessus_scan_list -c to list all completed scans along with their corresponding scan IDs')
- 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 cmd_openvas_task_stop
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_task_stop(*args)
return unless openvas?
if args?(args)
begin
- 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 cmd_openvas_task_resume
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_task_resume(*args)
return unless openvas?
if args?(args)
begin
- 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 cmd_openvas_task_create
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_task_create(*args)
return unless openvas?
if args?(args, 4)
begin
- 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 cmd_openvas_task_start
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_task_start(*args)
return unless openvas?
if args?(args)
begin
- 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 cmd_aggregator_connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_aggregator_connect(*args)
if !args[0] && ::File.readable?(Aggregator_yaml.to_s)
lconfig = YAML.load_file(Aggregator_yaml.to_s)
@host = lconfig['default']['server']
@port = lconfig['default']['port']
- 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 cmd_nessus_scan_resume_all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nessus_scan_resume_all(*args)
scan_ids = Array.new
if args[0] == '-h'
print_status('nessus_scan_resume_all')
print_status('Example:> nessus_scan_resume_all')
- 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 cmd_nexpose_site_import
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nexpose_site_import(*args)
site_id = args.shift
if !site_id
print_error('No site ID was specified')
return
- 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 cmd_lab_search
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_lab_search(*args)
if args.empty?
hlp_print_lab
else
args.each do |arg|
- 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 quit?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def quit?
while (c = driver.input.read_nonblock(1))
print_status('Quited')
return true if c == 'Q'
end
- 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"