compliance-trestle
compliance-trestle copied to clipboard
Handling of properties namespace
Issue description / feature objectives
Currently we use a default namespace in profile-generate to specify namespace which is added as a default namespace in yaml header, and all props having that namespace will not have namespace populated in yaml header x-trestle-add-props.
But there are some props defined by OSCAL itself such as "marking" in profile, for which no ns is specified and by default all props having no ns are assumed to be from OSCAL namespace. This will clash with the above assumption as these OSCAL defined props will now be treated as part of default ns when converting markdowns back to OSCAL.
There are couple of options -
- for OSCAL specific props add a field called no-ns while converting JSON to markdown to explicitly specify that it has no namespace. While converting back to OSCAL such props will not have the default ns (no ns attribute).
- don't use default namespace option in profile generate at all, and let all props have their namespace populated in yaml header, if they are populated in JSON, and vice-versa.
Option 2 is simpler as it removes the default ns completely, but all non OSCAL props will have ns attribute in YAML header which will become verbose.
Option 1 will not require populating ns value in yaml header if they match with default ns,, but for others it will have to be populated and for OSCAL props a new attribute no-ns will have to be specified.