ComplianceAsCode/content

View on GitHub

Showing 1,093 of 1,093 total issues

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

def simplify(self, sort=True):
Severity: Critical
Found in ssg/ext/boolean/boolean.py by sonar-python

Merge this if statement with the enclosing one.
Open

if data.get("values"):

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

def normalize_passed_arguments(options):
Severity: Critical
Found in tests/automatus.py by sonar-python

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

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

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

def createPlatformRuleFunc(args):
Severity: Critical
Found in utils/add_kubernetes_rule.py by sonar-python

Either merge this branch with the identical one on line "36" or change one of the implementations.
Open

return current_status
Severity: Major
Found in utils/compare_results.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

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

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

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

def ssg_xccdf_stigid_mapping(ssgtree):
Severity: Critical
Found in utils/create-stig-overlay.py by sonar-python

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

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

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 self.is_benchmark():
Severity: Major
Found in ssg/xml.py by sonar-python

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

# FIXME: what does this pass Do?
Severity: Major
Found in ssg/ext/boolean/boolean.py by sonar-python

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

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

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

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

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

def get_shell_tasks(tasks):
Severity: Critical
Found in utils/ansible_shell_diff.py by sonar-python

Function "handle_control" has 8 parameters, which is greater than the 7 authorized.
Open

def handle_control(product: str, control: ssg.controls.Control, env_yaml: ssg.environment,
rule_json: dict, srgs: dict, used_rules: list, root_path: str,
prefer_controls: bool) -> list:
Severity: Major
Found in utils/create_srg_export.py by sonar-python

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

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

Merge this if statement with the enclosing one.
Open

if file_contents[line_num][0:sec_len] == sec_id:
Severity: Major
Found in ssg/rule_yaml.py by sonar-python

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

def clusterTestFunc(args):
Severity: Critical
Found in utils/add_kubernetes_rule.py by sonar-python
Severity
Category
Status
Source
Language