hammackj/risu

View on GitHub

Showing 67 of 178 total issues

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

                Item.low_risks_unique_sorted.each do |item|
                    plugin = Plugin.find_by_id(item.plugin_id)
                    name = Plugin.find_by_id(item.plugin_id).plugin_name
                    count = Item.where(:plugin_id => item.plugin_id).count

Severity: Major
Found in lib/risu/templates/missing_root_causes.rb and 4 other locations - About 50 mins to fix
lib/risu/templates/missing_root_causes.rb on lines 63..72
lib/risu/templates/missing_root_causes.rb on lines 83..92
lib/risu/templates/missing_root_causes.rb on lines 103..112
lib/risu/templates/missing_root_causes.rb on lines 143..152

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

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 5 locations. Consider refactoring.
Open

                Item.medium_risks_unique_sorted.each do |item|
                    plugin = Plugin.find_by_id(item.plugin_id)
                    name = Plugin.find_by_id(item.plugin_id).plugin_name
                    count = Item.where(:plugin_id => item.plugin_id).count

Severity: Major
Found in lib/risu/templates/missing_root_causes.rb and 4 other locations - About 50 mins to fix
lib/risu/templates/missing_root_causes.rb on lines 63..72
lib/risu/templates/missing_root_causes.rb on lines 83..92
lib/risu/templates/missing_root_causes.rb on lines 123..132
lib/risu/templates/missing_root_causes.rb on lines 143..152

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

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 5 locations. Consider refactoring.
Open

                Item.info_risks_unique_sorted.each do |item|
                    plugin = Plugin.find_by_id(item.plugin_id)
                    name = Plugin.find_by_id(item.plugin_id).plugin_name
                    count = Item.where(:plugin_id => item.plugin_id).count

Severity: Major
Found in lib/risu/templates/missing_root_causes.rb and 4 other locations - About 50 mins to fix
lib/risu/templates/missing_root_causes.rb on lines 63..72
lib/risu/templates/missing_root_causes.rb on lines 83..92
lib/risu/templates/missing_root_causes.rb on lines 103..112
lib/risu/templates/missing_root_causes.rb on lines 123..132

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                output.table([headers] + results, :header => true, :column_widths => header_widths, :row_colors => ['ffffff', 'f0f0f0']) do
                    row(0).style(:font_style => :bold, :background_color => 'D0D0D0')
                    cells.borders = [:top, :bottom, :left, :right]
                end unless results == nil
Severity: Minor
Found in lib/risu/templates/executive_summary_detailed.rb and 2 other locations - About 35 mins to fix
lib/risu/templates/executive_summary_detailed.rb on lines 150..153
lib/risu/templates/executive_summary_detailed.rb on lines 210..213

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

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

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

                findings.each do |finding|
                    host = Host.find_by_id(finding.host_id)

                    host_string = "#{host.name}"
                    host_string << " (#{host.fqdn})" if host.fqdn != nil
Severity: Minor
Found in lib/risu/base/host_template_helper.rb and 1 other location - About 35 mins to fix
lib/risu/base/malware_template_helper.rb on lines 47..56

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                output.table([headers] + results, :header => true, :column_widths => header_widths, :row_colors => ['ffffff', 'f0f0f0']) do
                    row(0).style(:font_style => :bold, :background_color => 'D0D0D0')
                    cells.borders = [:top, :bottom, :left, :right]
                end unless results == nil
Severity: Minor
Found in lib/risu/templates/executive_summary_detailed.rb and 2 other locations - About 35 mins to fix
lib/risu/templates/executive_summary_detailed.rb on lines 150..153
lib/risu/templates/executive_summary_detailed.rb on lines 179..182

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                output.table([headers] + results, :header => true, :column_widths => header_widths, :row_colors => ['ffffff', 'f0f0f0']) do
                    row(0).style(:font_style => :bold, :background_color => 'D0D0D0')
                    cells.borders = [:top, :bottom, :left, :right]
                end unless results == nil
Severity: Minor
Found in lib/risu/templates/executive_summary_detailed.rb and 2 other locations - About 35 mins to fix
lib/risu/templates/executive_summary_detailed.rb on lines 179..182
lib/risu/templates/executive_summary_detailed.rb on lines 210..213

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

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

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

                findings.each do |finding|
                    host = Host.find_by_id(finding.host_id)

                    host_string = "#{host.name}"
                    host_string << " (#{host.fqdn})" if host.fqdn != nil
Severity: Minor
Found in lib/risu/base/malware_template_helper.rb and 1 other location - About 35 mins to fix
lib/risu/base/host_template_helper.rb on lines 38..47

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

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

                output.text "There were #{Item.risks.count} risks found during this scan. Of these, #{Item.critical_risks.count} were Critical risk vulnerabilities. #{Item.high_risks.count} were High risk vulnerabilities. Critical and high risk vulnerabilities require immediate attention to handle as they are relatively easy for attackers to exploit frequently resulting in full access to affected systems.     There were #{Item.medium_risks.count} findings which were Medium risk.     High risk vulnerabilities are harder to exploit and may not result in full control of the affected system and should be addressed rapidly and with priority. There were #{Item.low_risks.count} findings which were Low risk vulnerabilities. These risks usually let attackers gain information about your network making it easier for launching more advanced attacks and should be handled in a timely manner. And #{Item.info_risks.count} findings which were information findings.\n"
Severity: Minor
Found in lib/risu/templates/executive_summary_detailed.rb and 1 other location - About 30 mins to fix
lib/risu/templates/exec_summary.rb on lines 68..68

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

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

                output.text "There were #{Item.risks.count} vulnerabilities found during this scan. Of these, #{Item.critical_risks.count} were critical vulnerabilities,#{Item.high_risks.count} were high vulnerabilities, #{Item.medium_risks.count} were medium vulnerabilities, #{Item.low_risks.count} were low vulnerabilities and #{Item.info_risks.count} were information findings.\n\n"
Severity: Minor
Found in lib/risu/templates/exec_summary.rb and 1 other location - About 30 mins to fix
lib/risu/templates/executive_summary_detailed.rb on lines 113..113

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

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

    module Parsers
        module Nessus
            module PostProcess
                class OpenOfficePatchRollup < Risu::Base::PostProcessBase

Severity: Minor
Found in lib/risu/parsers/nessus/postprocess/openoffice.rb and 1 other location - About 30 mins to fix
lib/risu/parsers/nessus/postprocess/vlc.rb on lines 23..50

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

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

    module Parsers
        module Nessus
            module PostProcess
                class VLCRollups < Risu::Base::PostProcessBase

Severity: Minor
Found in lib/risu/parsers/nessus/postprocess/vlc.rb and 1 other location - About 30 mins to fix
lib/risu/parsers/nessus/postprocess/openoffice.rb on lines 23..49

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

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

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

                def fix_ips
                    @hosts = Host.all

                    @hosts.each do |host|
                        if host.ip == nil
Severity: Minor
Found in lib/risu/parsers/nexpose/nexpose_document.rb and 1 other location - About 25 mins to fix
lib/risu/parsers/nessus/nessus_document.rb on lines 77..88

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

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

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

                def fix_ips
                    @hosts = Host.all

                    @hosts.each do |host|
                        if host.ip == nil
Severity: Minor
Found in lib/risu/parsers/nessus/nessus_document.rb and 1 other location - About 25 mins to fix
lib/risu/parsers/nexpose/nexpose_document.rb on lines 65..76

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

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

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

                @output.table([headers] + data, :header => true, :width => output.bounds.width) do
                    row(0).style(:font_style => :bold, :background_color => 'cccccc')
                    cells.borders = [:top, :bottom, :left, :right]
Severity: Minor
Found in lib/risu/base/malware_template_helper.rb and 1 other location - About 25 mins to fix
lib/risu/base/host_template_helper.rb on lines 50..52

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

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

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

                @output.table([headers] + data, :header => true, :width => output.bounds.width) do
                    row(0).style(:font_style => :bold, :background_color => 'cccccc')
                    cells.borders = [:top, :bottom, :left, :right]
Severity: Minor
Found in lib/risu/base/host_template_helper.rb and 1 other location - About 25 mins to fix
lib/risu/base/malware_template_helper.rb on lines 59..61

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

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

                            hosts.each do |host|
                                h = Host.find_by_id(host.host_id)
                                host_string = "#{h.name}"
                                host_string << " (#{h.fqdn})" if h.fqdn != nil
                                hostlist << host_string
Severity: Minor
Found in lib/risu/templates/notable_detailed.rb and 1 other location - About 25 mins to fix
lib/risu/templates/technical_findings.rb on lines 59..63

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

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

                        hosts.each do |host|
                            ho = Host.find_by_id(host.host_id)
                            host_string = "#{ho.name}"
                            host_string << " (#{ho.fqdn})" if ho.fqdn != nil
                            hostlist << host_string
Severity: Minor
Found in lib/risu/templates/technical_findings.rb and 1 other location - About 25 mins to fix
lib/risu/templates/notable_detailed.rb on lines 83..87

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

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 6 locations. Consider refactoring.
Open

    module Parsers
        module Nessus
            module PostProcess
                class LibreOfficePatchRollup < Risu::Base::PostProcessBase

Severity: Major
Found in lib/risu/parsers/nessus/postprocess/libreoffice.rb and 5 other locations - About 25 mins to fix
lib/risu/parsers/nessus/postprocess/blackberry_enterprise_server.rb on lines 23..45
lib/risu/parsers/nessus/postprocess/ca_brightstor_arcserve.rb on lines 23..45
lib/risu/parsers/nessus/postprocess/foxit_phantom_pdf.rb on lines 23..46
lib/risu/parsers/nessus/postprocess/real_player.rb on lines 23..46
lib/risu/parsers/nessus/postprocess/symantec_endpoint.rb on lines 23..46

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

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 6 locations. Consider refactoring.
Open

    module Parsers
        module Nessus
            module PostProcess
                class SymantecEndpointPatchRollup < Risu::Base::PostProcessBase

Severity: Major
Found in lib/risu/parsers/nessus/postprocess/symantec_endpoint.rb and 5 other locations - About 25 mins to fix
lib/risu/parsers/nessus/postprocess/blackberry_enterprise_server.rb on lines 23..45
lib/risu/parsers/nessus/postprocess/ca_brightstor_arcserve.rb on lines 23..45
lib/risu/parsers/nessus/postprocess/foxit_phantom_pdf.rb on lines 23..46
lib/risu/parsers/nessus/postprocess/libreoffice.rb on lines 23..47
lib/risu/parsers/nessus/postprocess/real_player.rb on lines 23..46

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

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

Severity
Category
Status
Source
Language