From 8a2a0f4f6445bb38ed77db6034391be9b83a6b12 Mon Sep 17 00:00:00 2001 From: Lou DeGenaro Date: Tue, 16 May 2023 11:18:18 -0400 Subject: [PATCH] fix xccdf, from osco (#35) Signed-off-by: degenaro --- README.md | 4 ++-- .../demo-osco-result-to-oscal-ar.config | 5 ----- .../README.md | 18 +++++++++--------- .../demo-xccdf-result-to-oscal-ar.config | 5 +++++ .../ssg-ocp4-ds-cis-111.222.333.444-pod.yaml | 0 5 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 trestle_task_osco_result_to_oscal_ar/demo-osco-result-to-oscal-ar.config rename {trestle_task_osco_result_to_oscal_ar => trestle_task_xccdf_result_to_oscal_ar}/README.md (67%) create mode 100644 trestle_task_xccdf_result_to_oscal_ar/demo-xccdf-result-to-oscal-ar.config rename {trestle_task_osco_result_to_oscal_ar/osco => trestle_task_xccdf_result_to_oscal_ar/xccdf}/input/ssg-ocp4-ds-cis-111.222.333.444-pod.yaml (100%) diff --git a/README.md b/README.md index 1877686..724eb1e 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,9 @@ The Centre for Internet Security (CIS) produce a number of cross industry standa This [demonstration](./trestle_task_spread_sheet_to_component_definition) shows how to use the `trestle task xlsx-to-oscal-cd` functionality. -*Convert an OpenShift Compliance Operator (OSCO) results into a partial `assessment-results`* +*Convert an `xccdf` results into a partial `assessment-results`* -This [demonstration](./trestle_task_osco_result_to_oscal_ar) shows how to use the `trestle task osco_result_to_oscal_ar` functionality. +This [demonstration](./trestle_task_xccdf_result_to_oscal_ar) shows how to use the `trestle task xccdf_result_to_oscal_ar` functionality. ## Trestle as Foundation Examples diff --git a/trestle_task_osco_result_to_oscal_ar/demo-osco-result-to-oscal-ar.config b/trestle_task_osco_result_to_oscal_ar/demo-osco-result-to-oscal-ar.config deleted file mode 100644 index 7399662..0000000 --- a/trestle_task_osco_result_to_oscal_ar/demo-osco-result-to-oscal-ar.config +++ /dev/null @@ -1,5 +0,0 @@ -[task.osco-result-to-oscal-ar] - -input-dir = osco/input -output-dir = osco/runtime -output-overwrite = true diff --git a/trestle_task_osco_result_to_oscal_ar/README.md b/trestle_task_xccdf_result_to_oscal_ar/README.md similarity index 67% rename from trestle_task_osco_result_to_oscal_ar/README.md rename to trestle_task_xccdf_result_to_oscal_ar/README.md index 48aef7c..57e2415 100644 --- a/trestle_task_osco_result_to_oscal_ar/README.md +++ b/trestle_task_xccdf_result_to_oscal_ar/README.md @@ -1,6 +1,6 @@ -# compliance-trestle-task-osco-to-oscal-demo +# compliance-trestle-task-xccdf-to-oscal-demo -Simple example of using trestle to facilitate transforming OSCO results to OSCAL (partial) results. +Simple example of using trestle to facilitate transforming XCCDF results to OSCAL (partial) results. ## Prerequisites @@ -27,21 +27,21 @@ Running the demo ``` > cd -> cd git/compliance-trestle-demos/trestle_task_osco_to_oscal +> cd git/compliance-trestle-demos/trestle_task_xccdf_result_to_oscal_ar > trestle init -> trestle task osco-result-to-oscal-ar -c ./demo-osco-to-oscal.config +> trestle task xccdf-result-to-oscal-ar -c ./demo-xccdf-result-to-oscal-ar.config -output: osco/runtime/ssg-ocp4-ds-cis-111.222.333.444-pod.oscal.json +output: xccdf/runtime/ssg-ocp4-ds-cis-111.222.333.444-pod.oscal.json inventory: 1 observations: 125 results: {} -Task: osco-to-oscal executed successfully. +Task: xccdf-to-oscal executed successfully. ``` Viewing the result ``` -> cat osco/runtime/ssg-ocp4-ds-cis-111.222.333.444-pod.oscal.json +> cat xccdf/runtime/ssg-ocp4-ds-cis-111.222.333.444-pod.oscal.json { "results": [ { @@ -53,12 +53,12 @@ Viewing the result "props": [ { "name": "scanner_name", - "ns": "https://ibm.github.io/compliance-trestle/schemas/oscal/ar/osco", + "ns": "https://ibm.github.io/compliance-trestle/schemas/oscal/ar/xccdf", "value": "OpenSCAP" }, { "name": "scanner_version", - "ns": "https://ibm.github.io/compliance-trestle/schemas/oscal/ar/osco", + "ns": "https://ibm.github.io/compliance-trestle/schemas/oscal/ar/xccdf", "value": "1.3.3" }, ... diff --git a/trestle_task_xccdf_result_to_oscal_ar/demo-xccdf-result-to-oscal-ar.config b/trestle_task_xccdf_result_to_oscal_ar/demo-xccdf-result-to-oscal-ar.config new file mode 100644 index 0000000..5e146d2 --- /dev/null +++ b/trestle_task_xccdf_result_to_oscal_ar/demo-xccdf-result-to-oscal-ar.config @@ -0,0 +1,5 @@ +[task.xccdf-result-to-oscal-ar] + +input-dir = xccdf/input +output-dir = xccdf/runtime +output-overwrite = true diff --git a/trestle_task_osco_result_to_oscal_ar/osco/input/ssg-ocp4-ds-cis-111.222.333.444-pod.yaml b/trestle_task_xccdf_result_to_oscal_ar/xccdf/input/ssg-ocp4-ds-cis-111.222.333.444-pod.yaml similarity index 100% rename from trestle_task_osco_result_to_oscal_ar/osco/input/ssg-ocp4-ds-cis-111.222.333.444-pod.yaml rename to trestle_task_xccdf_result_to_oscal_ar/xccdf/input/ssg-ocp4-ds-cis-111.222.333.444-pod.yaml