|
@@ 64-73 (lines=10) @@
|
| 61 |
|
return True |
| 62 |
|
|
| 63 |
|
|
| 64 |
|
def has_empty_references(yaml_file, product_yaml=None): |
| 65 |
|
rule = yaml.open_and_macro_expand(yaml_file, product_yaml) |
| 66 |
|
if 'references' in rule and rule['references'] is None: |
| 67 |
|
return True |
| 68 |
|
|
| 69 |
|
if 'references' in rule and rule['references'] is not None: |
| 70 |
|
for _, value in rule['references'].items(): |
| 71 |
|
if str(value).strip() == "": |
| 72 |
|
return True |
| 73 |
|
return False |
| 74 |
|
|
| 75 |
|
|
| 76 |
|
def has_prefix_cce(yaml_file, product_yaml=None): |
|
@@ 37-46 (lines=10) @@
|
| 34 |
|
return wrapper |
| 35 |
|
|
| 36 |
|
|
| 37 |
|
def has_empty_identifier(yaml_file, product_yaml=None): |
| 38 |
|
rule = yaml.open_and_macro_expand(yaml_file, product_yaml) |
| 39 |
|
if 'identifiers' in rule and rule['identifiers'] is None: |
| 40 |
|
return True |
| 41 |
|
|
| 42 |
|
if 'identifiers' in rule and rule['identifiers'] is not None: |
| 43 |
|
for _, value in rule['identifiers'].items(): |
| 44 |
|
if str(value).strip() == "": |
| 45 |
|
return True |
| 46 |
|
return False |
| 47 |
|
|
| 48 |
|
|
| 49 |
|
def has_no_cce(yaml_file, product_yaml=None): |