| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.openscap.www_collection_from_xccdf_test_single_rule.xccdf.xml" schematron-version="1.3" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 https://scap.nist.gov/schema/scap/1.3/scap-source-data-stream_1.3.xsd"> |
| 3 | <ds:data-stream id="scap_org.openscap.www_datastream_simple" scap-version="1.3" use-case="OTHER"> |
| 4 | <ds:checklists> |
| 5 | <ds:component-ref id="scap_org.openscap.www_cref_test_single_rule.xccdf.xml" xlink:href="#scap_org.openscap.www_comp_test_single_rule.xccdf.xml"> |
| 6 | <cat:catalog> |
| 7 | <cat:uri name="test_single_rule.oval.xml" uri="#scap_org.openscap.www_cref_test_single_rule.oval.xml"/> |
| 8 | </cat:catalog> |
| 9 | </ds:component-ref> |
| 10 | </ds:checklists> |
| 11 | <ds:checks> |
| 12 | <ds:component-ref id="scap_org.openscap.www_cref_test_single_rule.oval.xml" xlink:href="#scap_org.openscap.www_comp_test_single_rule.oval.xml"/> |
| 13 | </ds:checks> |
| 14 | </ds:data-stream> |
| 15 | <ds:component id="scap_org.openscap.www_comp_test_single_rule.oval.xml" timestamp="2021-02-01T08:07:06+01:00"> |
| 16 | <oval_definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:win-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#windows windows-definitions-schema.xsd"> |
| 17 | <generator> |
| 18 | <oval:schema_version>5.11.2</oval:schema_version> |
| 19 | <oval:timestamp>2021-02-01T08:07:06+01:00</oval:timestamp> |
| 20 | </generator> |
| 21 | <definitions> |
| 22 | <definition class="compliance" id="oval:org.openscap.www:def:1" version="1"> |
| 23 | <metadata> |
| 24 | <title>PASS</title> |
| 25 | <description>pass</description> |
| 26 | </metadata> |
| 27 | <criteria> |
| 28 | <criterion comment="PASS test" test_ref="oval:org.openscap.www:tst:1"/> |
| 29 | </criteria> |
| 30 | </definition> |
| 31 | </definitions> |
| 32 | <tests> |
| 33 | <variable_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" id="oval:org.openscap.www:tst:1" check="all" comment="always pass" version="1"> |
| 34 | <object object_ref="oval:org.openscap.www:obj:1"/> |
| 35 | </variable_test> |
| 36 | </tests> |
| 37 | <objects> |
| 38 | <variable_object xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" id="oval:org.openscap.www:obj:1" version="1" comment="x"> |
| 39 | <var_ref>oval:org.openscap.www:var:1</var_ref> |
| 40 | </variable_object> |
| 41 | </objects> |
| 42 | <variables> |
| 43 | <constant_variable id="oval:org.openscap.www:var:1" version="1" comment="x" datatype="int"> |
| 44 | <value>100</value> |
| 45 | </constant_variable> |
| 46 | </variables> |
| 47 | </oval_definitions> |
| 48 | </ds:component> |
| 49 | <ds:component id="scap_org.openscap.www_comp_test_single_rule.xccdf.xml" timestamp="2021-02-01T08:07:06+01:00"> |
| 50 | <Benchmark xmlns="http://checklists.nist.gov/xccdf/1.2" id="xccdf_org.openscap.www_benchmark_test"> |
| 51 | <status>accepted</status> |
| 52 | <version>1.0</version> |
| 53 | <Profile id="xccdf_org.openscap.www_profile_common"> |
| 54 | <title>Common hardening profile</title> |
| 55 | <description>This is a very cool profile</description> |
| 56 | <select idref="xccdf_org.openscap.www_rule_1" selected="true"/> |
| 57 | <select idref="xccdf_org.openscap.www_rule_2" selected="true"/> |
| 58 | <select idref="xccdf_org.openscap.www_rule_3" selected="true"/> |
| 59 | <select idref="xccdf_org.openscap.www_rule_4" selected="true"/> |
| 60 | <select idref="xccdf_org.openscap.www_rule_5" selected="true"/> |
| 61 | <select idref="xccdf_org.openscap.www_rule_6" selected="true"/> |
| 62 | <select idref="xccdf_org.openscap.www_rule_7" selected="true"/> |
| 63 | <select idref="xccdf_org.openscap.www_rule_8" selected="true"/> |
| 64 | <select idref="xccdf_org.openscap.www_rule_9" selected="true"/> |
| 65 | <select idref="xccdf_org.openscap.www_rule_10" selected="true"/> |
| 66 | </Profile> |
| 67 | <Rule selected="false" id="xccdf_org.openscap.www_rule_1"> |
| 68 | <title>Rule 1: Enable Audit Service</title> |
| 69 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 70 | service enable auditd |
| 71 | </fix> |
| 72 | </Rule> |
| 73 | <Rule selected="false" id="xccdf_org.openscap.www_rule_2"> |
| 74 | <title>Rule 2: Install rsyslog package</title> |
| 75 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 76 | package install rsyslog |
| 77 | </fix> |
| 78 | </Rule> |
| 79 | <Rule selected="false" id="xccdf_org.openscap.www_rule_3"> |
| 80 | <title>Rule 3: Enable Rsyslog Service</title> |
| 81 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 82 | # this command should end up in the command section |
| 83 | service enable rsyslog |
| 84 | </fix> |
| 85 | </Rule> |
| 86 | <Rule selected="false" id="xccdf_org.openscap.www_rule_4"> |
| 87 | <title>Rule 4: Remove USBGuard</title> |
| 88 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 89 | package remove usbguard |
| 90 | </fix> |
| 91 | </Rule> |
| 92 | <Rule selected="false" id="xccdf_org.openscap.www_rule_5"> |
| 93 | <title>Rule 5: Install and enable SSHD</title> |
| 94 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 95 | # openssh-server will go to %packages section |
| 96 | package install openssh-server |
| 97 | |
| 98 | # the service commands will end up in the command section |
| 99 | service enable sshd |
| 100 | service disable telnet |
| 101 | </fix> |
| 102 | </Rule> |
| 103 | <Rule selected="false" id="xccdf_org.openscap.www_rule_6"> |
| 104 | <title>Rule 6: Configure all partitions</title> |
| 105 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 106 | logvol /var/tmp 1024 |
| 107 | </fix> |
| 108 | </Rule> |
| 109 | <Rule selected="false" id="xccdf_org.openscap.www_rule_7"> |
| 110 | <title>Rule 7: Bootloader</title> |
| 111 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 112 | bootloader quick |
| 113 | bootloader audit=1 |
| 114 | </fix> |
| 115 | </Rule> |
| 116 | <Rule selected="false" id="xccdf_org.openscap.www_rule_8"> |
| 117 | <title>Rule 8: Extra nochroot %post section</title> |
| 118 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 119 | %post --nochroot |
| 120 | mkdir -p /etc/ddfds |
| 121 | %end |
| 122 | </fix> |
| 123 | </Rule> |
| 124 | <Rule selected="false" id="xccdf_org.openscap.www_rule_9"> |
| 125 | <title>Rule 9: Crazy remediation</title> |
| 126 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 127 | %post --nochroot |
| 128 | mkdir -p /etc/abcd |
| 129 | %end |
| 130 | service disable httpd |
| 131 | # other post section |
| 132 | %post |
| 133 | rm -rf /etc/xyz |
| 134 | # create a new path |
| 135 | feel /etc/xyz |
| 136 | %end |
| 137 | package install podman |
| 138 | kdump disable |
| 139 | </fix> |
| 140 | </Rule> |
| 141 | <Rule selected="false" id="xccdf_org.openscap.www_rule_10"> |
| 142 | <title>Rule 10: Firewall</title> |
| 143 | <fix system="urn:xccdf:fix:script:kickstart"> |
| 144 | firewall enable sshd |
| 145 | firewall disable httpd |
| 146 | </fix> |
| 147 | </Rule> |
| 148 | </Benchmark> |
| 149 | </ds:component> |
| 150 | </ds:data-stream-collection> |