Skip to content

Commit

Permalink
test/configs: add oscap json tailoring test
Browse files Browse the repository at this point in the history
Add a test for RHEL9 to check tailoring with a `json` tailoring file.
  • Loading branch information
kingsleyzissou committed Jul 19, 2024
1 parent f28b026 commit ac8773d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/config-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@
"ami"
]
},
"./configs/oscap-rhel9-with-json-tailoring.json": {
"distros": [
"rhel-9.4"
],
"image-types": [
"ami"
]
},
"./configs/oscap-rhel9-with-xml-tailoring.json": {
"distros": [
"rhel-9.4"
Expand Down
32 changes: 32 additions & 0 deletions test/configs/oscap-rhel9-with-json-tailoring.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "oscap-rhel9-with-json-tailoring",
"blueprint": {
"packages": [
{
"name": "xmlstarlet"
},
{
"name": "openscap-utils"
},
{
"name": "jq"
}
],
"customizations": {
"files": [
{
"path": "/oscap_data/tailoring.json",
"data": "{\"profiles\":[{\"id\":\"cis\",\"base_profile_id\":\"cis\",\"rules\":{\"partition_var_log\":{\"evaluate\":true},\"rpm_verify_hashes\":{\"evaluate\":false},\"rpm_verify_permisions\":{\"evaluate\":false},\"grub2_password\":{\"evaluate\":false},\"grub2_uefi_password\":{\"evaluate\":false},\"partition_for_dev_shm\":{\"evaluate\":false},\"mount_option_dev_shm_nosuid\":{\"evaluate\":false},\"mount_option_dev_shm_noexec\":{\"evaluate\":false},\"mount_option_dev_shm_nodev\":{\"evaluate\":false}}}]}"
}
],
"openscap": {
"profile_id": "xccdf_org.ssgproject.content_profile_cis",
"datastream": "/usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml",
"json_tailoring": {
"profile_id": "xccdf_org.ssgproject.content_profile_cis_osbuild_tailoring",
"filepath": "/oscap_data/tailoring.json"
}
}
}
}
}

0 comments on commit ac8773d

Please sign in to comment.