mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-03-01 07:52:54 +00:00
Combine custom tags with original
This commit is contained in:
@@ -5,6 +5,7 @@ import types
|
||||
import sys
|
||||
import os.path
|
||||
import plistlib
|
||||
from unittest import result
|
||||
import xlwt
|
||||
import io
|
||||
import glob
|
||||
@@ -1121,7 +1122,14 @@ def get_rule_yaml(rule_file, custom=False, baseline_name=""):
|
||||
resulting_yaml['customized'] = ["customized references"]
|
||||
except:
|
||||
pass
|
||||
|
||||
elif yaml_field == "tags":
|
||||
# try to concatenate tags from both original yaml and custom yaml
|
||||
if og_rule_yaml["tags"] == rule_yaml["tags"]:
|
||||
#print("using default data in yaml field {}".format("tags"))
|
||||
resulting_yaml['tags'] = og_rule_yaml['tags']
|
||||
else:
|
||||
#print("Found custom tags... concatenating them")
|
||||
resulting_yaml['tags'] = og_rule_yaml['tags'] + rule_yaml['tags']
|
||||
else:
|
||||
try:
|
||||
if og_rule_yaml[yaml_field] == rule_yaml[yaml_field]:
|
||||
|
||||
Reference in New Issue
Block a user