-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement to handle arboretum fetcher-built OSCO evidence as input
Signed-off-by: Lou Degenaro <[email protected]>
- Loading branch information
Showing
14 changed files
with
18,040 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[task.osco-to-oscal] | ||
|
||
input-dir = tests/data/tasks/osco/input-fetcher | ||
output-dir = tests/data/tasks/osco/runtime | ||
output-overwrite = true |
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
tests/data/tasks/osco/input-fetcher/cluster_resource_no_data.json
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,39 @@ | ||
{ | ||
"iks": { | ||
"demo2020": [ | ||
{ | ||
"account": "demo2020", | ||
"name": "compliance-dev-dal10", | ||
"region": "us-south", | ||
"resources": [ | ||
{ | ||
"apiVersion": "v1", | ||
"bogus": { | ||
"exit-code": "2", | ||
"results": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TestResult></TestResult>" | ||
}, | ||
"kind": "ConfigMap", | ||
"metadata": { | ||
"annotations": { | ||
"compliance-remediations/processed": "", | ||
"compliance.openshift.io/scan-error-msg": "", | ||
"compliance.openshift.io/scan-result": "NON-COMPLIANT", | ||
"openscap-scan-result/node": "111.222.333.444" | ||
}, | ||
"creationTimestamp": "2020-08-03T02:26:34Z", | ||
"labels": { | ||
"compliance-scan": "ssg-ocp4-ds-cis" | ||
}, | ||
"name": "ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"namespace": "openshift-compliance", | ||
"resourceVersion": "22693328", | ||
"selfLink": "/api/v1/namespaces/openshift-compliance/configmaps/ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"uid": "1da3ea81-0a25-4512-ad86-7ac360246b5d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
|
39 changes: 39 additions & 0 deletions
39
tests/data/tasks/osco/input-fetcher/cluster_resource_no_kind0.json
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,39 @@ | ||
{ | ||
"iks": { | ||
"demo2020": [ | ||
{ | ||
"account": "demo2020", | ||
"name": "compliance-dev-dal10", | ||
"region": "us-south", | ||
"resources": [ | ||
{ | ||
"apiVersion": "v1", | ||
"data": { | ||
"exit-code": "2", | ||
"results": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TestResult></TestResult>" | ||
}, | ||
"bogus": "ConfigMap", | ||
"metadata": { | ||
"annotations": { | ||
"compliance-remediations/processed": "", | ||
"compliance.openshift.io/scan-error-msg": "", | ||
"compliance.openshift.io/scan-result": "NON-COMPLIANT", | ||
"openscap-scan-result/node": "111.222.333.444" | ||
}, | ||
"creationTimestamp": "2020-08-03T02:26:34Z", | ||
"labels": { | ||
"compliance-scan": "ssg-ocp4-ds-cis" | ||
}, | ||
"name": "ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"namespace": "openshift-compliance", | ||
"resourceVersion": "22693328", | ||
"selfLink": "/api/v1/namespaces/openshift-compliance/configmaps/ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"uid": "1da3ea81-0a25-4512-ad86-7ac360246b5d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
|
39 changes: 39 additions & 0 deletions
39
tests/data/tasks/osco/input-fetcher/cluster_resource_no_kind1.json
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,39 @@ | ||
{ | ||
"iks": { | ||
"demo2020": [ | ||
{ | ||
"account": "demo2020", | ||
"name": "compliance-dev-dal10", | ||
"region": "us-south", | ||
"resources": [ | ||
{ | ||
"apiVersion": "v1", | ||
"data": { | ||
"exit-code": "2", | ||
"results": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TestResult></TestResult>" | ||
}, | ||
"kind": "bogus", | ||
"metadata": { | ||
"annotations": { | ||
"compliance-remediations/processed": "", | ||
"compliance.openshift.io/scan-error-msg": "", | ||
"compliance.openshift.io/scan-result": "NON-COMPLIANT", | ||
"openscap-scan-result/node": "111.222.333.444" | ||
}, | ||
"creationTimestamp": "2020-08-03T02:26:34Z", | ||
"labels": { | ||
"compliance-scan": "ssg-ocp4-ds-cis" | ||
}, | ||
"name": "ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"namespace": "openshift-compliance", | ||
"resourceVersion": "22693328", | ||
"selfLink": "/api/v1/namespaces/openshift-compliance/configmaps/ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"uid": "1da3ea81-0a25-4512-ad86-7ac360246b5d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
|
39 changes: 39 additions & 0 deletions
39
tests/data/tasks/osco/input-fetcher/cluster_resource_no_metadata.json
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,39 @@ | ||
{ | ||
"iks": { | ||
"demo2020": [ | ||
{ | ||
"account": "demo2020", | ||
"name": "compliance-dev-dal10", | ||
"region": "us-south", | ||
"resources": [ | ||
{ | ||
"apiVersion": "v1", | ||
"data": { | ||
"exit-code": "2", | ||
"results": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TestResult></TestResult>" | ||
}, | ||
"kind": "ConfigMap", | ||
"bogus": { | ||
"annotations": { | ||
"compliance-remediations/processed": "", | ||
"compliance.openshift.io/scan-error-msg": "", | ||
"compliance.openshift.io/scan-result": "NON-COMPLIANT", | ||
"openscap-scan-result/node": "111.222.333.444" | ||
}, | ||
"creationTimestamp": "2020-08-03T02:26:34Z", | ||
"labels": { | ||
"compliance-scan": "ssg-ocp4-ds-cis" | ||
}, | ||
"name": "ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"namespace": "openshift-compliance", | ||
"resourceVersion": "22693328", | ||
"selfLink": "/api/v1/namespaces/openshift-compliance/configmaps/ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"uid": "1da3ea81-0a25-4512-ad86-7ac360246b5d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
|
39 changes: 39 additions & 0 deletions
39
tests/data/tasks/osco/input-fetcher/cluster_resource_no_metadata_name.json
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,39 @@ | ||
{ | ||
"iks": { | ||
"demo2020": [ | ||
{ | ||
"account": "demo2020", | ||
"name": "compliance-dev-dal10", | ||
"region": "us-south", | ||
"resources": [ | ||
{ | ||
"apiVersion": "v1", | ||
"data": { | ||
"exit-code": "2", | ||
"results": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TestResult></TestResult>" | ||
}, | ||
"kind": "ConfigMap", | ||
"metadata": { | ||
"annotations": { | ||
"compliance-remediations/processed": "", | ||
"compliance.openshift.io/scan-error-msg": "", | ||
"compliance.openshift.io/scan-result": "NON-COMPLIANT", | ||
"openscap-scan-result/node": "111.222.333.444" | ||
}, | ||
"creationTimestamp": "2020-08-03T02:26:34Z", | ||
"labels": { | ||
"compliance-scan": "ssg-ocp4-ds-cis" | ||
}, | ||
"bogus": "ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"namespace": "openshift-compliance", | ||
"resourceVersion": "22693328", | ||
"selfLink": "/api/v1/namespaces/openshift-compliance/configmaps/ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"uid": "1da3ea81-0a25-4512-ad86-7ac360246b5d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
|
39 changes: 39 additions & 0 deletions
39
tests/data/tasks/osco/input-fetcher/cluster_resource_no_resources.json
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,39 @@ | ||
{ | ||
"iks": { | ||
"demo2020": [ | ||
{ | ||
"account": "demo2020", | ||
"name": "compliance-dev-dal10", | ||
"region": "us-south", | ||
"bogus": [ | ||
{ | ||
"apiVersion": "v1", | ||
"data": { | ||
"exit-code": "2", | ||
"results": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TestResult></TestResult>" | ||
}, | ||
"kind": "ConfigMap", | ||
"metadata": { | ||
"annotations": { | ||
"compliance-remediations/processed": "", | ||
"compliance.openshift.io/scan-error-msg": "", | ||
"compliance.openshift.io/scan-result": "NON-COMPLIANT", | ||
"openscap-scan-result/node": "111.222.333.444" | ||
}, | ||
"creationTimestamp": "2020-08-03T02:26:34Z", | ||
"labels": { | ||
"compliance-scan": "ssg-ocp4-ds-cis" | ||
}, | ||
"name": "ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"namespace": "openshift-compliance", | ||
"resourceVersion": "22693328", | ||
"selfLink": "/api/v1/namespaces/openshift-compliance/configmaps/ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"uid": "1da3ea81-0a25-4512-ad86-7ac360246b5d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
|
39 changes: 39 additions & 0 deletions
39
tests/data/tasks/osco/input-fetcher/cluster_resource_no_results.json
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,39 @@ | ||
{ | ||
"iks": { | ||
"demo2020": [ | ||
{ | ||
"account": "demo2020", | ||
"name": "compliance-dev-dal10", | ||
"region": "us-south", | ||
"resources": [ | ||
{ | ||
"apiVersion": "v1", | ||
"data": { | ||
"exit-code": "2", | ||
"bogus": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TestResult></TestResult>" | ||
}, | ||
"kind": "ConfigMap", | ||
"metadata": { | ||
"annotations": { | ||
"compliance-remediations/processed": "", | ||
"compliance.openshift.io/scan-error-msg": "", | ||
"compliance.openshift.io/scan-result": "NON-COMPLIANT", | ||
"openscap-scan-result/node": "111.222.333.444" | ||
}, | ||
"creationTimestamp": "2020-08-03T02:26:34Z", | ||
"labels": { | ||
"compliance-scan": "ssg-ocp4-ds-cis" | ||
}, | ||
"name": "ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"namespace": "openshift-compliance", | ||
"resourceVersion": "22693328", | ||
"selfLink": "/api/v1/namespaces/openshift-compliance/configmaps/ssg-ocp4-ds-cis-111.222.333.444-pod", | ||
"uid": "1da3ea81-0a25-4512-ad86-7ac360246b5d" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
|
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,55 @@ | ||
|
||
ssg-ocp4-ds-cis-111.222.333.444-pod: | ||
locker: https://github.mycorp.com/degenaro/evidence-locker | ||
namespace: xccdf | ||
subject-references: | ||
component: | ||
uuid-ref: 56666738-0f9a-4e38-9aac-c0fad00a5821 | ||
type: component | ||
title: Red Hat OpenShift Kubernetes | ||
inventory-item: | ||
uuid-ref: 46aADFAC-A1fd-4Cf0-a6aA-d1AfAb3e0d3e | ||
type: inventory-item | ||
title: Pod | ||
properties: | ||
target: kube-br7qsa3d0vceu2so1a90-roksopensca-default-0000026b.iks.mycorp | ||
cluster-name: ROKS-OpenSCAP-1 | ||
cluster-type: openshift | ||
cluster-region: us-south | ||
|
||
ssg-ocp4-ds-cis-111.222.333.555-pod: | ||
locker: https://github.mycorp.com/degenaro/evidence-locker | ||
namespace: xccdf | ||
subject-references: | ||
component: | ||
uuid-ref: 3e42fa6b-a819-4f58-b073-a04a0b3c828d | ||
type: component | ||
title: Red Hat OpenShift Kubernetes | ||
inventory-item: | ||
uuid-ref: 285d87c2-aab0-4935-b28b-c4dab131cf88 | ||
type: inventory-item | ||
title: Pod | ||
properties: | ||
target: kube-br7qsa3d0vceu2so1a90-roksopensca-default-000001fe.iks.mycorp | ||
cluster-name: ROKS-OpenSCAP-1 | ||
cluster-type: openshift | ||
cluster-region: us-south | ||
|
||
ssg-rhel7-ds-cis-111.222.333.444-pod: | ||
locker: https://github.mycorp.com/degenaro/evidence-locker | ||
namespace: xccdf | ||
subject-references: | ||
component: | ||
uuid-ref: 89cfe7a7-ce6b-4699-aa7b-2f5739c72001 | ||
type: component | ||
title: RedHat Enterprise Linux 7.8 | ||
inventory-item: | ||
uuid-ref: 46aADFAC-A1fd-4Cf0-a6aA-d1AfAb3e0d3e | ||
type: inventory-item | ||
title: VM | ||
properties: | ||
target: kube-br7qsa3d0vceu2so1a90-roksopensca-default-0000026b.iks.mycorp | ||
cluster-name: ROKS-OpenSCAP-1 | ||
cluster-type: openshift | ||
cluster-region: us-south | ||
|
Oops, something went wrong.