ComplianceAsCode/content

View on GitHub
ssg/build_profile.py

Summary

Maintainability
F
2 wks
Test Coverage
F
39%

Function show_profile_stats has a Cognitive Complexity of 103 (exceeds 7 allowed). Consider refactoring.
Open

    def show_profile_stats(self, profile, options):
        """Displays statistics for specific profile"""

        profile_stats = self.get_profile_stats(profile)
        rules_count = profile_stats['rules_count']
Severity: Minor
Found in ssg/build_profile.py - About 2 days 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

Cyclomatic complexity is too high in method get_profile_stats. (85)
Open

    def get_profile_stats(self, profile):
        """Obtain statistics for the profile"""

        # Holds the intermediary statistics for profile
        profile_stats = {
Severity: Minor
Found in ssg/build_profile.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

File build_profile.py has 736 lines of code (exceeds 400 allowed). Consider refactoring.
Open

from __future__ import absolute_import
from __future__ import print_function

import os
import sys
Severity: Major
Found in ssg/build_profile.py - About 1 day to fix

    Cyclomatic complexity is too high in method show_profile_stats. (57)
    Open

        def show_profile_stats(self, profile, options):
            """Displays statistics for specific profile"""
    
            profile_stats = self.get_profile_stats(profile)
            rules_count = profile_stats['rules_count']
    Severity: Minor
    Found in ssg/build_profile.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function get_profile_stats has a Cognitive Complexity of 28 (exceeds 7 allowed). Consider refactoring.
    Open

        def get_profile_stats(self, profile):
            """Obtain statistics for the profile"""
    
            # Holds the intermediary statistics for profile
            profile_stats = {
    Severity: Minor
    Found in ssg/build_profile.py - About 3 hrs 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

    Cyclomatic complexity is too high in class XCCDFBenchmark. (22)
    Open

    class XCCDFBenchmark(object):
        """
        Class for processing an XCCDF benchmark to generate
        statistics about the profiles contained within it.
        """
    Severity: Minor
    Found in ssg/build_profile.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function get_profile_stats has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def get_profile_stats(self, profile):
            """Obtain statistics for the profile"""
    
            # Holds the intermediary statistics for profile
            profile_stats = {
    Severity: Major
    Found in ssg/build_profile.py - About 2 hrs to fix

      Function __init__ has a Cognitive Complexity of 9 (exceeds 7 allowed). Consider refactoring.
      Open

          def __init__(self, filepath, product=""):
              self.tree = None
              try:
                  with open(filepath, 'r') as xccdf_file:
                      file_string = xccdf_file.read()
      Severity: Minor
      Found in ssg/build_profile.py - About 35 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

      Function __init__ has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
      Open

          def __init__(self, rule, cis_ns):
              self.id = rule.get("id")
              self.oval = rule.find('./{%s}check[@system="%s"]' % (XCCDF12_NS, oval_ns))
              self.sce = rule.find('./{%s}check[@system="%s"]' % (XCCDF12_NS, sce_ns))
              self.bash_fix = rule.find('./{%s}fix[@system="%s"]' % (XCCDF12_NS, bash_rem_system))
      Severity: Minor
      Found in ssg/build_profile.py - 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

      Refactor this function to reduce its Cognitive Complexity from 108 to the 15 allowed.
      Open

          def show_profile_stats(self, profile, options):
      Severity: Critical
      Found in ssg/build_profile.py by sonar-python

      Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

      See

      Refactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed.
      Open

          def get_profile_stats(self, profile):
      Severity: Critical
      Found in ssg/build_profile.py by sonar-python

      Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

      See

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

                  if options.missing_ovals and profile_stats['missing_ovals']:
                      print("*** Rules of '%s' " % profile + "profile missing " +
                            "OVAL: %d of %d [%d%% complete]" %
                            (rules_count - impl_ovals_count, rules_count,
                             profile_stats['implemented_ovals_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 2 other locations - About 4 hrs to fix
      ssg/build_profile.py on lines 561..567
      ssg/build_profile.py on lines 705..711

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

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

                  if options.missing_cces and profile_stats['missing_cces']:
                      print("***Rules of '%s' " % profile + "profile missing " +
                            "CCE identifier: %d of %d [%d%% complete]" %
                            (rules_count - impl_cces_count, rules_count,
                             profile_stats['assigned_cces_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 2 other locations - About 4 hrs to fix
      ssg/build_profile.py on lines 553..559
      ssg/build_profile.py on lines 561..567

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

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

                  if options.missing_sces and profile_stats['missing_sces']:
                      print("*** Rules of '%s' " % profile + "profile missing " +
                            "SCE: %d of %d [%d%% complete]" %
                            (rules_count - impl_sces_count, rules_count,
                             profile_stats['implemented_sces_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 2 other locations - About 4 hrs to fix
      ssg/build_profile.py on lines 553..559
      ssg/build_profile.py on lines 705..711

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

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

                  if options.missing_stigid_refs and profile_stats['missing_stigid_refs']:
                      print("*** rules of '%s' profile missing "
                            "stigid references: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_stigid_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 687..694
      ssg/build_profile.py on lines 696..703

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

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

                  if options.missing_stigref_refs and profile_stats['missing_stigref_refs']:
                      print("*** rules of '%s' profile missing "
                            "stigref references: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_stigref_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 687..694
      ssg/build_profile.py on lines 696..703

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

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

                  if options.missing_cis_refs and profile_stats['missing_cis_refs']:
                      print("*** rules of '%s' profile missing "
                            "CIS Refs: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_cis_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 687..694
      ssg/build_profile.py on lines 696..703

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

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

                  if options.missing_ccn_refs and profile_stats['missing_ccn_refs']:
                      print("*** rules of '%s' profile missing "
                            "CCN Refs: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_ccn_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 687..694
      ssg/build_profile.py on lines 696..703

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

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

                  if options.missing_anssi_refs and profile_stats['missing_anssi_refs']:
                      print("*** rules of '%s' profile missing "
                            "ANSSI Refs: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_anssi_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 687..694
      ssg/build_profile.py on lines 696..703

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

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

                  if options.missing_pcidss4_refs and profile_stats['missing_pcidss4_refs']:
                      print("*** rules of '%s' profile missing "
                            "PCI-DSS v4 Refs: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_pcidss4_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 696..703

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

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

                  if options.missing_hipaa_refs and profile_stats['missing_hipaa_refs']:
                      print("*** rules of '%s' profile missing "
                            "HIPAA Refs: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_hipaa_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 687..694
      ssg/build_profile.py on lines 696..703

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

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

                  if options.missing_cui_refs and profile_stats['missing_cui_refs']:
                      print("*** rules of '%s' profile missing "
                            "CUI Refs: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_cui_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 678..685
      ssg/build_profile.py on lines 687..694

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

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

                  if options.missing_ospp_refs and profile_stats['missing_ospp_refs']:
                      print("*** rules of '%s' profile missing "
                            "OSPP Refs: %d of %d have them [%d%% missing]"
                            % (profile, rules_count - missing_ospp_refs_count,
                               rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 624..631
      ssg/build_profile.py on lines 633..640
      ssg/build_profile.py on lines 642..649
      ssg/build_profile.py on lines 651..658
      ssg/build_profile.py on lines 660..667
      ssg/build_profile.py on lines 669..676
      ssg/build_profile.py on lines 687..694
      ssg/build_profile.py on lines 696..703

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

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

                  if options.implemented_ovals and \
                     profile_stats['implemented_ovals']:
                      print("** Rules of '%s' " % profile +
                            "profile having OVAL check: %d of %d [%d%% complete]" %
                            (impl_ovals_count, rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 2 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 481..488
      ssg/build_profile.py on lines 544..551

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

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

                  if options.implemented_sces and \
                     profile_stats['implemented_sces']:
                      print("** Rules of '%s' " % profile +
                            "profile having SCE check: %d of %d [%d%% complete]" %
                            (impl_sces_count, rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 2 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 472..479
      ssg/build_profile.py on lines 544..551

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

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

                  if options.assigned_cces and \
                     profile_stats['assigned_cces']:
                      print("*** Rules of '%s' " % profile +
                            "profile having CCE assigned: %d of %d [%d%% complete]" %
                            (impl_cces_count, rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 2 other locations - About 3 hrs to fix
      ssg/build_profile.py on lines 472..479
      ssg/build_profile.py on lines 481..488

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

      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

                      if profile_stats['missing_puppet_fixes']:
                          print("*** rules of '%s' profile missing "
                                "a puppet fix script: %d of %d [%d%% complete]"
                                % (profile, rules_count - impl_puppet_fixes_count,
                                   rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 570..577
      ssg/build_profile.py on lines 579..586
      ssg/build_profile.py on lines 588..595
      ssg/build_profile.py on lines 597..604
      ssg/build_profile.py on lines 615..622

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

      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

                      if profile_stats['missing_kubernetes_fixes']:
                          print("*** rules of '%s' profile missing "
                                "a kubernetes fix script: %d of %d [%d%% complete]"
                                % (profile, rules_count - impl_kubernetes_fixes_count,
                                   rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 570..577
      ssg/build_profile.py on lines 579..586
      ssg/build_profile.py on lines 588..595
      ssg/build_profile.py on lines 606..613
      ssg/build_profile.py on lines 615..622

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

      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

                      if profile_stats['missing_anaconda_fixes']:
                          print("*** rules of '%s' profile missing "
                                "a anaconda fix script: %d of %d [%d%% complete]"
                                % (profile, rules_count - impl_anaconda_fixes_count,
                                   rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 570..577
      ssg/build_profile.py on lines 579..586
      ssg/build_profile.py on lines 588..595
      ssg/build_profile.py on lines 597..604
      ssg/build_profile.py on lines 606..613

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

      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

                      if profile_stats['missing_ignition_fixes']:
                          print("*** rules of '%s' profile missing "
                                "a ignition fix script: %d of %d [%d%% complete]"
                                % (profile, rules_count - impl_ignition_fixes_count,
                                   rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 570..577
      ssg/build_profile.py on lines 579..586
      ssg/build_profile.py on lines 597..604
      ssg/build_profile.py on lines 606..613
      ssg/build_profile.py on lines 615..622

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

      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

                      if profile_stats['missing_bash_fixes']:
                          print("*** rules of '%s' profile missing "
                                "a bash fix script: %d of %d [%d%% complete]"
                                % (profile, rules_count - impl_bash_fixes_count,
                                   rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 579..586
      ssg/build_profile.py on lines 588..595
      ssg/build_profile.py on lines 597..604
      ssg/build_profile.py on lines 606..613
      ssg/build_profile.py on lines 615..622

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

      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

                      if profile_stats['missing_ansible_fixes']:
                          print("*** rules of '%s' profile missing "
                                "a ansible fix script: %d of %d [%d%% complete]"
                                % (profile, rules_count - impl_ansible_fixes_count,
                                   rules_count,
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 570..577
      ssg/build_profile.py on lines 588..595
      ssg/build_profile.py on lines 597..604
      ssg/build_profile.py on lines 606..613
      ssg/build_profile.py on lines 615..622

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

      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

                      if profile_stats['implemented_anaconda_fixes']:
                          print("*** Rules of '%s' profile having "
                                "a anaconda fix script: %d of %d [%d%% complete]"
                                % (profile, impl_anaconda_fixes_count, rules_count,
                                   profile_stats['implemented_anaconda_fixes_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 491..497
      ssg/build_profile.py on lines 499..506
      ssg/build_profile.py on lines 508..515
      ssg/build_profile.py on lines 517..524
      ssg/build_profile.py on lines 526..533

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

      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

                      if profile_stats['implemented_puppet_fixes']:
                          print("*** Rules of '%s' profile having "
                                "a puppet fix script: %d of %d [%d%% complete]"
                                % (profile, impl_puppet_fixes_count, rules_count,
                                   profile_stats['implemented_puppet_fixes_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 491..497
      ssg/build_profile.py on lines 499..506
      ssg/build_profile.py on lines 508..515
      ssg/build_profile.py on lines 517..524
      ssg/build_profile.py on lines 535..542

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

      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

                      if profile_stats['implemented_kubernetes_fixes']:
                          print("*** Rules of '%s' profile having "
                                "a kubernetes fix script: %d of %d [%d%% complete]"
                                % (profile, impl_kubernetes_fixes_count, rules_count,
                                   profile_stats['implemented_kubernetes_fixes_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 491..497
      ssg/build_profile.py on lines 499..506
      ssg/build_profile.py on lines 508..515
      ssg/build_profile.py on lines 526..533
      ssg/build_profile.py on lines 535..542

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

      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

                      if profile_stats['implemented_ansible_fixes']:
                          print("*** Rules of '%s' profile having "
                                "a ansible fix script: %d of %d [%d%% complete]"
                                % (profile, impl_ansible_fixes_count, rules_count,
                                   profile_stats['implemented_ansible_fixes_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 491..497
      ssg/build_profile.py on lines 508..515
      ssg/build_profile.py on lines 517..524
      ssg/build_profile.py on lines 526..533
      ssg/build_profile.py on lines 535..542

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

      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

                      if profile_stats['implemented_ignition_fixes']:
                          print("*** Rules of '%s' profile having "
                                "a ignition fix script: %d of %d [%d%% complete]"
                                % (profile, impl_ignition_fixes_count, rules_count,
                                   profile_stats['implemented_ignition_fixes_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 491..497
      ssg/build_profile.py on lines 499..506
      ssg/build_profile.py on lines 517..524
      ssg/build_profile.py on lines 526..533
      ssg/build_profile.py on lines 535..542

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

      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

                      if profile_stats['implemented_bash_fixes']:
                          print("*** Rules of '%s' profile having "
                                "a bash fix script: %d of %d [%d%% complete]"
                                % (profile, impl_bash_fixes_count, rules_count,
                                   profile_stats['implemented_bash_fixes_pct']))
      Severity: Major
      Found in ssg/build_profile.py and 5 other locations - About 2 hrs to fix
      ssg/build_profile.py on lines 499..506
      ssg/build_profile.py on lines 508..515
      ssg/build_profile.py on lines 517..524
      ssg/build_profile.py on lines 526..533
      ssg/build_profile.py on lines 535..542

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

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

              if 'ccn' in profile_stats['profile_id']:
                  profile_stats['missing_ccn_refs'] = \
                      [x.id for x in rule_stats if x.ccn_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 372..374
      ssg/build_profile.py on lines 377..379

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

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

              if 'ospp' in profile_stats['profile_id']:
                  profile_stats['missing_ospp_refs'] = \
                      [x.id for x in rule_stats if x.ospp_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 372..374
      ssg/build_profile.py on lines 377..379

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

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

              if 'cis' in profile_stats['profile_id']:
                  profile_stats['missing_cis_refs'] = \
                      [x.id for x in rule_stats if x.cis_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 372..374
      ssg/build_profile.py on lines 377..379

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

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

              if 'stig' in profile_stats['profile_id']:
                  profile_stats['missing_stigid_refs'] = \
                      [x.id for x in rule_stats if x.stigid_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 372..374
      ssg/build_profile.py on lines 377..379

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

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

              if 'stig' in profile_stats['profile_id']:
                  profile_stats['missing_stigref_refs'] = \
                      [x.id for x in rule_stats if x.stigref_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 372..374
      ssg/build_profile.py on lines 377..379

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

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

              if 'cui' in profile_stats['profile_id']:
                  profile_stats['missing_cui_refs'] = \
                      [x.id for x in rule_stats if x.cui_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 372..374

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

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

              if 'pci-dss' in profile_stats['profile_id']:
                  profile_stats['missing_pcidss4_refs'] = \
                      [x.id for x in rule_stats if x.pcidss4_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 377..379

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

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

              if 'hipaa' in profile_stats['profile_id']:
                  profile_stats['missing_hipaa_refs'] = \
                      [x.id for x in rule_stats if x.hipaa_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 362..364
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 372..374
      ssg/build_profile.py on lines 377..379

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

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

              if 'anssi' in profile_stats['profile_id']:
                  profile_stats['missing_anssi_refs'] = \
                      [x.id for x in rule_stats if x.anssi_ref is None]
      Severity: Major
      Found in ssg/build_profile.py and 8 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 337..339
      ssg/build_profile.py on lines 342..344
      ssg/build_profile.py on lines 347..349
      ssg/build_profile.py on lines 352..354
      ssg/build_profile.py on lines 357..359
      ssg/build_profile.py on lines 367..369
      ssg/build_profile.py on lines 372..374
      ssg/build_profile.py on lines 377..379

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

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

              profile_stats['implemented_checks_pct'] = \
                  float(len(profile_stats['implemented_checks'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              profile_stats['implemented_ansible_fixes_pct'] = \
                  float(len(profile_stats['implemented_ansible_fixes'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              profile_stats['implemented_anaconda_fixes_pct'] = \
                  float(len(profile_stats['implemented_anaconda_fixes'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 389..391

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

              profile_stats['implemented_sces_pct'] = \
                  float(len(profile_stats['implemented_sces'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              profile_stats['assigned_cces_pct'] = \
                  float(len(profile_stats['assigned_cces'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383

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

              profile_stats['implemented_ovals_pct'] = \
                  float(len(profile_stats['implemented_ovals'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              profile_stats['implemented_bash_fixes_pct'] = \
                  float(len(profile_stats['implemented_bash_fixes'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              if self.oval is not None:
                  self.check = self.oval
              elif self.sce is not None:
                  self.check = self.sce
      Severity: Major
      Found in ssg/build_profile.py and 1 other location - About 1 hr to fix
      ssg/build_profile.py on lines 97..102

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

              profile_stats['implemented_kubernetes_fixes_pct'] = \
                  float(len(profile_stats['implemented_kubernetes_fixes'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              profile_stats['implemented_ignition_fixes_pct'] = \
                  float(len(profile_stats['implemented_ignition_fixes'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              profile_stats['implemented_fixes_pct'] = \
                  float(len(profile_stats['implemented_fixes'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 319..321
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              profile_stats['implemented_puppet_fixes_pct'] = \
                  float(len(profile_stats['implemented_puppet_fixes'])) / \
                  profile_stats['rules_count'] * 100
      Severity: Major
      Found in ssg/build_profile.py and 10 other locations - About 1 hr to fix
      ssg/build_profile.py on lines 263..265
      ssg/build_profile.py on lines 271..273
      ssg/build_profile.py on lines 279..281
      ssg/build_profile.py on lines 287..289
      ssg/build_profile.py on lines 295..297
      ssg/build_profile.py on lines 303..305
      ssg/build_profile.py on lines 311..313
      ssg/build_profile.py on lines 330..332
      ssg/build_profile.py on lines 381..383
      ssg/build_profile.py on lines 389..391

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

              elif self.kubernetes_fix is not None:
                  self.fix = self.kubernetes_fix
              elif self.puppet_fix is not None:
                  self.fix = self.puppet_fix
              elif self.anaconda_fix is not None:
      Severity: Major
      Found in ssg/build_profile.py and 1 other location - About 1 hr to fix
      ssg/build_profile.py on lines 85..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 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

      Line too long (104 > 99 characters)
      Open

                  profile_stats['missing_anaconda_fixes_count'] = len(profile_stats['missing_anaconda_fixes'])
      Severity: Minor
      Found in ssg/build_profile.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (129 > 99 characters)
      Open

                  [rule_id for rule_id in profile_stats["missing_ansible_fixes"] if rule_id not in profile_stats["missing_bash_fixes"]]
      Severity: Minor
      Found in ssg/build_profile.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (100 > 99 characters)
      Open

                  profile_stats['missing_puppet_fixes_count'] = len(profile_stats['missing_puppet_fixes'])
      Severity: Minor
      Found in ssg/build_profile.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (102 > 99 characters)
      Open

                  profile_stats['missing_ansible_fixes_count'] = len(profile_stats['missing_ansible_fixes'])
      Severity: Minor
      Found in ssg/build_profile.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Continuation line over-indented for visual indent
      Open

                          len(profile_stats['missing_kubernetes_fixes'])
      Severity: Minor
      Found in ssg/build_profile.py by pep8

      Continuation lines indentation.

      Continuation lines should align wrapped elements either vertically
      using Python's implicit line joining inside parentheses, brackets
      and braces, or using a hanging indent.
      
      When using a hanging indent these considerations should be applied:
      - there should be no arguments on the first line, and
      - further indentation should be used to clearly distinguish itself
        as a continuation line.
      
      Okay: a = (\n)
      E123: a = (\n    )
      
      Okay: a = (\n    42)
      E121: a = (\n   42)
      E122: a = (\n42)
      E123: a = (\n    42\n    )
      E124: a = (24,\n     42\n)
      E125: if (\n    b):\n    pass
      E126: a = (\n        42)
      E127: a = (24,\n      42)
      E128: a = (24,\n    42)
      E129: if (a or\n    b):\n    pass
      E131: a = (\n    42\n 24)

      Line too long (104 > 99 characters)
      Open

                  profile_stats['missing_ignition_fixes_count'] = len(profile_stats['missing_ignition_fixes'])
      Severity: Minor
      Found in ssg/build_profile.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      There are no issues that match your filters.

      Category
      Status