Please follow below instructions to run the trestle functions / demos.
-
Create a folder on your local machine where you want to setup trestle workspace and download sample files for the demo.
-
cd
to the directory. -
Please follow the instructions to install compliance trestle on your local machine.
-
After installing trestle again run
source venv.trestle/bin/activate
Below steps demonstrate how to import an external OSCAL catalog JSON file into trestle workspace.
- Download NIST 800-53 catalog file to
data
folder - From trestle workspace directory run
trestle import -f ../data/NIST_SP-800-53_rev5_catalog.json -o NIST_800-53_v5
- The catalog would be imported into
trestle-workspace/catalogs/NIST_800-53_v5/catalog.json
- To validate the imported model run
trestle validate -t catalog -n NIST_800-53_v5
Below steps demonstrate how to convert a CIS benchmark into OSCAL Component Definition JSON.
- Download snippet of RHEL 9 CIS benchmarks file to
data
folder. - Also download the config file containing command line configuration options for executing the command to
data
folder. - From trestle workspace directory run
trestle task cis-xlsx-to-oscal-cd -c ../data/CIS_Red_Hat_Enterprise_Linux_9_Benchmark_v1.0.0.config
- The component definition would be created into
trestle.workspace/component-definitions/RHEL9-1_0_0/component-definition.json
OpenSCAP tool is used to execute CIS benchmarks compliance checks for RHEL9. It generates the check results in an xccdf XML format. This can be converted to OSCAL assessment results format using the below instructions.
- Create an
xccdf
folder indata
folder. Download sample [RHEL 9 results xml file]https://github.com/butler54/devconf-demo/blob/main/data/xccdf/cis_rhel9_scan.xml) todata/xccdf
folder. - Also download the the config file containing command line configuration options for executing the command to
data
folder. - From trestle workspace directory run
trestle task xccdf-result-to-oscal-ar -c ../data/cis_rhel9_scan.config
- The OSCAL assessment result would be created into
trestle.workspace/assessment-results/cis_rhel9_scan.oscal.json