|
1 | | -{% set check_tags = ["permanent", "inherent", "n_a", "not_applicable"] %} |
| 1 | + {% set check_tags = ["permanent", "inherent", "n_a", "not_applicable"] %} |
| 2 | +{% set additional_info = rule | get_nested(["platforms", rule.os_type, "enforcement_info", "fix", "additional_info"]) %} |
| 3 | +{% set check_shell = rule | get_nested(["platforms", rule.os_type, "enforcement_info", "check", "shell"]) %} |
| 4 | +{% set fix_shell = rule | get_nested(["platforms", rule.os_type, "enforcement_info", "fix", "shell"]) %} |
| 5 | +{% if not markdown_tree | default(false) %} |
2 | 6 |
|
3 | 7 | ### {{ rule.title }} |
4 | 8 |
|
| 9 | +{% endif %} |
5 | 10 | {% if rule.tags is defined or rule.tags is not none and "supplemental" in rule.tags %} |
6 | 11 | {{ rule.discussion | include_replace | asciidoc_to_markdown }} |
7 | 12 | {% else %} |
|
15 | 20 | {% if not rule.tags | select('in', check_tags) | list %} |
16 | 21 | {% if rule.tags is not defined or rule.tags is none or "supplemental" not in rule.tags %} |
17 | 22 | {% if rule.os_type.lower() in NIX_OS %} |
| 23 | +{% if markdown_tree | default(false) %} |
| 24 | +## {% trans %}Check{% endtrans %} |
| 25 | + |
| 26 | +{% endif %} |
18 | 27 | {% trans %}To check the state of the system, run the following command(s){% endtrans %}: |
19 | 28 |
|
20 | 29 | ```bash |
|
28 | 37 | {% trans %}If the result is not{% endtrans %} _{{ rule.result_value }}_, {% trans %}this is a finding{% endtrans %}. |
29 | 38 | {% endif %} |
30 | 39 |
|
| 40 | +{% if markdown_tree | default(false) %} |
| 41 | +## {% trans %}Remediation Description{% endtrans %} |
| 42 | + |
| 43 | +{% if rule.fix is not none %} |
| 44 | +{% trans %}Perform the following to configure the system to meet the requirements{% endtrans %}: |
| 45 | +{% endif %} |
| 46 | + |
| 47 | +{% if rule.mobileconfig_info is none and rule.fix is not none or fix_shell %} |
| 48 | +{% trans %}Run the following command(s){% endtrans %}: |
| 49 | + |
| 50 | +```bash |
| 51 | +{{ rule.fix | asciidoc_to_markdown if rule.fix is not none else fix_shell }} |
| 52 | +``` |
| 53 | + |
| 54 | +{% elif additional_info is not none %} |
| 55 | +{{ additional_info | asciidoc_to_markdown }} |
| 56 | +{% elif rule.mobileconfig_info is not none and fix_shell %} |
| 57 | +{% if fix_shell %} |
| 58 | +```bash |
| 59 | +{{ fix_shell -}} |
| 60 | +``` |
| 61 | +{% endif %} |
| 62 | + |
| 63 | +{% if rule.mobileconfig_info %} |
| 64 | +```xml |
| 65 | +{{ rule.mobileconfig_info | mobileconfig_payloads_to_xml -}} |
| 66 | +``` |
| 67 | +{% endif %} |
| 68 | +{% else %} |
| 69 | +{% if rule.os_name == "macos" %} |
| 70 | +{{ rule.fix | asciidoc_to_markdown }} |
| 71 | +{% else %} |
| 72 | +{% trans %}Deploy a configuration profile containing the following payload.{% endtrans %} |
| 73 | + |
| 74 | +```xml |
| 75 | +{{ rule.mobileconfig_info | mobileconfig_payloads_to_xml -}} |
| 76 | +``` |
| 77 | +{% endif %} |
| 78 | +{% endif %} |
| 79 | + |
| 80 | +## {% trans %}References{% endtrans %} |
| 81 | + |
| 82 | +| | | |
| 83 | +|---|---| |
| 84 | +| **ID** | `{{ rule.rule_id }}` | |
| 85 | +{% if rule.severity is not none %} |
| 86 | +| **Severity** | {{ rule.severity }} | |
| 87 | +{% endif %} |
| 88 | +| **800-53r5** | {{ rule.references.nist.nist_800_53r5 | group_ulify if rule.references.nist.nist_800_53r5 is not none }} | |
| 89 | +{% if "800-171" in baseline.title | upper or show_all_tags %} |
| 90 | +| **800-171r3** | {{ rule.references.nist.nist_800_171r3 | render_rules if rule.references.nist.nist_800_171r3 is not none }} | |
| 91 | +{% endif %} |
| 92 | +{% if "STIG" in baseline.title | upper or show_all_tags %} |
| 93 | +| **DISA STIG(s)** | {{ rule.references.disa.disa_stig | render_rules if rule.references.disa.disa_stig is not none }} | |
| 94 | +{% if rule.references.disa.sfr is not none %} |
| 95 | +| **SFR** | {{ rule.references.disa.sfr | render_rules if rule.references.disa.sfr is not none }} | |
| 96 | +{% endif %} |
| 97 | +{% endif %} |
| 98 | +{% if "CIS" in baseline.title | upper or show_all_tags %} |
| 99 | +| **CIS Benchmark** | {{ rule.references.cis.benchmark | render_rules if rule.references.cis.benchmark is not none }} | |
| 100 | +| **CIS Controls V8** | {{ rule.references.cis.controls_v8 | render_rules if rule.references.cis.controls_v8 is not none }} | |
| 101 | +{% endif %} |
| 102 | +{% if "INDIGO" in baseline.title | upper or show_all_tags %} |
| 103 | +| **indigo** | {{ rule.references.bsi.indigo | render_rules if rule.references.bsi.indigo is not none }} | |
| 104 | +{% endif %} |
| 105 | +{% if "CMMC" in baseline.title | upper or show_all_tags %} |
| 106 | +| **CMMC** | {{ rule.references.disa.cmmc | render_rules if rule.references.disa.cmmc is not none }} | |
| 107 | +{% endif %} |
| 108 | +{% if "HICP_LP" in baseline.title | upper or show_all_tags %} |
| 109 | +| **HICP** | {{ rule.references.hhs.hicp | render_rules if rule.references.hhs.hicp is not none }} | |
| 110 | +{% endif %} |
| 111 | +{% if rule.references.nist.cce is not none %} |
| 112 | +| **CCE** | {{ rule.references.nist.cce | render_rules }} | |
| 113 | +{% endif %} |
| 114 | +{% if "references" in rule.customized %} |
| 115 | +| **Custom References** | {{ rule.references.custom_refs.references | render_references if rule.references.custom_refs is not none }} | |
| 116 | +{% endif %} |
| 117 | +{% if show_all_tags %} |
| 118 | +| **TAGS** | {{ rule.tags | render_rules }} | |
| 119 | +{% endif %} |
| 120 | +{% else %} |
31 | 121 | <table class="remediation"> |
32 | 122 | <tr> |
33 | 123 | <td> |
|
78 | 168 | </table> |
79 | 169 | {% endif %} |
80 | 170 |
|
| 171 | +{% if not markdown_tree | default(false) %} |
81 | 172 | <table class="outer-table" border="1"> |
82 | 173 | <tr> |
83 | 174 | <td> ID </td> |
|
164 | 255 | </tr> |
165 | 256 | </table> |
166 | 257 | {% endif %} |
| 258 | +{% endif %} |
| 259 | +{% endif %} |
0 commit comments