Duplicate controls when importing from resolved profile
Assessment
This issue has not been assessed yet.
Description
Cloning https://github.com/usnistgov/oscal-cli/issues/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
- Dominant language
- Java
- Stars
- 42
- Forks
- 19
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from usnistgov/liboscal-java
-
bug
usnistgov/liboscal-java#371 · 1 assignee ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
usnistgov/liboscal-java#276 · 3 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
usnistgov/liboscal-java#209 · 5 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 30/100
usnistgov/liboscal-java#200 · 1 comment ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
usnistgov/liboscal-java#195 · 3 comments · 1 reaction ·
All issues in usnistgov/liboscal-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100