ComplianceAsCode/content

View on GitHub

Showing 1,093 of 1,093 total issues

Merge this if statement with the enclosing one.
Open

if not cce.is_cce_value_valid("CCE-" + str(i_value)):
Severity: Major
Found in utils/fix_rules.py by sonar-python

Merge this if statement with the enclosing one.
Open

if ds_is_k8s_related(result_path) and scapval_requirement_id == XML_SCHEMA_REQUIREMENT:
Severity: Major
Found in tests/run_scapval.py by sonar-python

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

def translate(self, tree, store_defname=False):
Severity: Critical
Found in ssg/id_translate.py by sonar-python

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

def _start_operation(self, ast, operation, precedence):
Severity: Critical
Found in ssg/ext/boolean/boolean.py by sonar-python

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

def new_stig_overlay(xccdftree, ssgtree, outfile, quiet):
Severity: Critical
Found in utils/create-stig-overlay.py by sonar-python

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

def main():
Severity: Critical
Found in utils/rule_dir_json.py by sonar-python

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

def preprocess(data, lang):

Method "__init__" has 9 parameters, which is greater than the 7 authorized.
Open

def __init__(self, TRUE_class=None, FALSE_class=None, Symbol_class=None, Function_class=None,
NOT_class=None, AND_class=None, OR_class=None,
allowed_in_token=('.', ':', '_')):
Severity: Major
Found in ssg/ext/boolean/boolean.py by sonar-python

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

def absorb(self, args):
Severity: Critical
Found in ssg/ext/boolean/boolean.py by sonar-python

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

def _subs(self, substitutions, default, simplify):
Severity: Critical
Found in ssg/ext/boolean/boolean.py by sonar-python

Rename function "createTestProfile" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def createTestProfile(rule):
Severity: Major
Found in utils/add_kubernetes_rule.py by sonar-python

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

def print_report(current_dict: dict, baseline_dict: dict = None) -> None:
Severity: Critical
Found in utils/build_profiler_report.py by sonar-python

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

def preprocess(data, lang):

Remove this commented out code.
Open

# self.domain.shutdown()

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

def find_section_lines(file_contents, sec):
Severity: Critical
Found in ssg/rule_yaml.py by sonar-python

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

def has_duplicated_subkeys(file_path, file_contents, sections):
Severity: Critical
Found in ssg/rule_yaml.py by sonar-python

Merge this if statement with the enclosing one.
Open

if not os.path.isdir(group_path):
Severity: Major
Found in utils/add_kubernetes_rule.py by sonar-python

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

def handle_remediations(product_list, product_yamls, rule_obj):
Severity: Critical
Found in utils/rule_dir_json.py by sonar-python

Method "__init__" has 10 parameters, which is greater than the 7 authorized.
Open

self, environment, profile, datastream, benchmark_id,
rule_id, script_name, dont_clean, no_reports, manual_debug):
Severity: Major
Found in tests/ssg_test_suite/oscap.py by sonar-python

Either remove or fill this block of code.
Open

pass
Severity: Major
Found in ssg/ext/boolean/boolean.py by sonar-python
Severity
Category
Status
Source
Language