Skip to content

Null Entity when importing from a small catalog #371

Description

@selenaxiao-nist

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?

  1. Create a catalog containing a very small number of elements. Only one or two controls, and no groups.
  2. Create a profile including a control from this catalog
  3. oscal-cli profile resolve --to=xml null-error-catalog.xml
  4. bug appears

null-error-catalog.xml
null-error-profile.xml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions