Skip to content

Commit 3692cf4

Browse files
committed
OpenControl key --> OSCAL component Description
1 parent c9b6091 commit 3692cf4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/oc_to_oscal_components.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ def main(source):
4646
cd = component.ComponentDefinition(metadata=md)
4747
cd.components = []
4848
for o_comp in oc.components:
49-
c = component.Component(title=o_comp.name, description=o_comp.name)
49+
if o_comp.key:
50+
desc = o_comp.key
51+
else:
52+
desc = o_comp.name
53+
c = component.Component(title=o_comp.name, description=desc)
5054
c.control_implementations = []
5155

5256
sorted_controls = sorted(o_comp.satisfies, key=lambda c: c.standard_key)

0 commit comments

Comments
 (0)