Cloning issue usnistgov/oscal-cli#325
Caused by ProfileResolver handleMerge()
Describe the bug
A runtime error prevents the resolution of profiles when the referenced catalog is very simple. The error message reads:
An uncaught runtime error occured. Cannot invoke "gov.nist.secauto.oscal.lib.profile.resolver.support.IEntityItem.setInstance(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem)" because "entity" is null
When does this occur?
This bug appears in very small catalogs. Oddly, adding a group to the catalog seems to prevent this issue.
How do we replicate the issue?
- Create a catalog containing a very small number of elements. Only one or two controls, and no groups.
- Create a profile including a control from this catalog
- oscal-cli profile resolve --to=xml null-error-catalog.xml
- bug appears
null-error-catalog.xml
null-error-profile.xml
Cloning issue usnistgov/oscal-cli#325
Caused by ProfileResolver handleMerge()
Describe the bug
A runtime error prevents the resolution of profiles when the referenced catalog is very simple. The error message reads:
An uncaught runtime error occured. Cannot invoke "gov.nist.secauto.oscal.lib.profile.resolver.support.IEntityItem.setInstance(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem)" because "entity" is nullWhen does this occur?
This bug appears in very small catalogs. Oddly, adding a group to the catalog seems to prevent this issue.
How do we replicate the issue?
null-error-catalog.xml
null-error-profile.xml