Cloning usnistgov/oscal-cli#315
ProfileResolver doesn't resolve profiles correctly in the following case:
Describe the bug
A produced profile can have multiple copies of controls
When does this occur?
When importing from a resolved profile.
How do we replicate the issue?
The specific steps I used to find this issue were:
- oscal-cli profile resolve --to=xml liboscal-java/src/test/resources/content/test-oscal-version-profile.xml source-profile.xml
- Create another profile (say, derived-profile.xml)
- Have
<import href="source-profile.xml> <include-all /> </import> inside derived-profile.xml
- oscal-cli profile resolve --to=xml derived-profile.xml
- Lo and behold, the generated profile has duplicates of the controls in it
source-profile.xml
derived-profile.xml
Expected behavior (i.e. solution)
Only one set of controls from the imported profile in the resolved profile
Cloning usnistgov/oscal-cli#315
ProfileResolver doesn't resolve profiles correctly in the following case:
Describe the bug
A produced profile can have multiple copies of controls
When does this occur?
When importing from a resolved profile.
How do we replicate the issue?
The specific steps I used to find this issue were:
<import href="source-profile.xml> <include-all /> </import>inside derived-profile.xmlsource-profile.xml
derived-profile.xml
Expected behavior (i.e. solution)
Only one set of controls from the imported profile in the resolved profile