generated from IBM/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: demo of trestle task osco-to-oscal (#8)
* feat: demo of trestle task osco-to-oscal * Add trestle init to sequence of steps for demo. * Update trestle task examples section on landing page.
- Loading branch information
Showing
4 changed files
with
775 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# compliance-trestle-task-osco-to-oscal-demo | ||
|
||
Simple example of using trestle to facilitate transforming OSCO results to OSCAL (partial) results. | ||
|
||
## Prerequisites | ||
|
||
Download this repo | ||
|
||
``` | ||
> cd | ||
> mkdir git | ||
> cd git | ||
> git clone https://github.com/IBM/compliance-trestle-demos | ||
``` | ||
|
||
Install compliance trestle, ideally in a python virtual environment. | ||
|
||
``` | ||
> cd | ||
> python -m venv venv.compliance-trestle-demos | ||
> source venv.compliance-trestle-demos/bin/activate | ||
> cd git/compliance-trestle-demos | ||
> make install | ||
``` | ||
|
||
Running the demo | ||
|
||
``` | ||
> cd | ||
> cd git/compliance-trestle-demos/trestle_task_osco_to_oscal | ||
> trestle init | ||
> trestle task osco-to-oscal -c ./demo-osco-to-oscal.config | ||
output: osco/runtime/ssg-ocp4-ds-cis-111.222.333.444-pod.oscal.json | ||
inventory: 1 | ||
observations: 125 | ||
results: {} | ||
Task: osco-to-oscal executed successfully. | ||
``` | ||
|
||
Viewing the result | ||
|
||
``` | ||
> cat osco/runtime/ssg-ocp4-ds-cis-111.222.333.444-pod.oscal.json | ||
{ | ||
"results": [ | ||
{ | ||
"uuid": "5a69ce39-9ec9-4ded-8556-2c94a5b4e554", | ||
"title": "OpenShift Compliance Operator", | ||
"description": "OpenShift Compliance Operator Scan Results", | ||
"start": "2021-09-09T19:18:09.000+00:00", | ||
"end": "2021-09-09T19:18:09.000+00:00", | ||
"local-definitions": { | ||
"components": [ | ||
{ | ||
"uuid": "1690228d-860d-4fa0-a43b-c95f2f53410e", | ||
"type": "Service", | ||
"title": "Red Hat OpenShift Kubernetes Service Compliance Operator for ocp4", | ||
"description": "Red Hat OpenShift Kubernetes Service Compliance Operator for ocp4", | ||
"status": { | ||
"state": "operational" | ||
} | ||
} | ||
], | ||
"inventory-items": [ | ||
{ | ||
"uuid": "d4dff670-fe5e-4324-94aa-c1fffdef17c5", | ||
"description": "inventory", | ||
"props": [ | ||
... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[task.osco-to-oscal] | ||
|
||
input-dir = osco/input | ||
output-dir = osco/runtime | ||
output-overwrite = true |
Oops, something went wrong.