Skip to content

Commit

Permalink
Fix content_diff when a rule is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Apr 24, 2024
1 parent 5738d71 commit e6d3120
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ssg/content_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def _get_rules_to_compare(self, benchmark):
return rules

def compare_rules(self, old_benchmark, new_benchmark):
missing_rules = []
try:
rules_in_old_benchmark = self._get_rules_to_compare(old_benchmark)
except ValueError as e:
Expand All @@ -70,7 +69,6 @@ def compare_rules(self, old_benchmark, new_benchmark):
rule_id = old_rule.get_attr("id")
new_rule = new_benchmark.find_rule(rule_id)
if new_rule is None:
missing_rules.append(rule_id)
print("%s is missing in new data stream." % (rule_id))
continue
if self.only_rules:
Expand Down Expand Up @@ -315,7 +313,6 @@ def get_stig_rule_SV(self, sv_rule_id):
return stig_rule_id.group(1)

def compare_rules(self, old_benchmark, new_benchmark):
missing_rules = []
try:
rules_in_old_benchmark = self._get_rules_to_compare(old_benchmark)
rules_in_new_benchmark = self._get_rules_to_compare(new_benchmark)
Expand Down Expand Up @@ -347,7 +344,6 @@ def compare_existing_rules(self, new_benchmark, old_benchmark,
try:
new_sv_rule_id = new_rule_mapping[old_sv_rule_id]
except KeyError:
missing_rules.append(old_sv_rule_id)
print("%s is missing in new data stream." % old_stig_id)
continue
if self.only_rules:
Expand Down

0 comments on commit e6d3120

Please sign in to comment.