Add modify-add feature - #52
Conversation
| return newCatalog, nil | ||
| } | ||
|
|
||
| func getCatalogForImport(ctx context.Context, i profile.Import, c chan *catalog.Catalog, e chan error) { |
There was a problem hiding this comment.
@anweiss
This method traverses the entire import tree and finds the catalog concurrently. The first goroutine that finds it pushes it to the channel and all other goroutines get killed thanks to the context package.
Let me know if this approach works better in stead of the old fashioned LNR tree parsing
1ad414d to
56a14e9
Compare
|
Currently this PR is shutting down unit tests as |
56a14e9 to
c9cc98e
Compare
|
@minhaj10p would it be possible to include the mocks in this PR? |
Sure. I can create a folder and put some profiles in it. Another thing just occurred to me is that we always put the |
c9cc98e to
6e4c915
Compare
|
@anweiss Tests updated. All are passing now with 73.0% code coverage |
1b25402 to
13ebd1e
Compare
|
@anweiss Let me know if theres anything you need changed in this pull request. Thanks. |
anweiss
left a comment
There was a problem hiding this comment.
@minhaj10p please add a space after // in all comments.
| return newCatalog, nil | ||
| } | ||
|
|
||
| func getCatalogForImport(ctx context.Context, i profile.Import, c chan *catalog.Catalog, e chan error) { |
|
@minhaj10p I tested this on my end with the FedRAMP High profile, and it looks like it's appending some erroneous structs. For example: Parts: []catalog.Part{
catalog.Part{
Id: "ir-9_smt",
Class: "statement",
Title: "",
},
catalog.Part{
Id: "ir-9_gdn",
Class: "guidance",
Title: "",
},
catalog.Part{
Id: "ir-9_obj",
Class: "objective",
Title: "",
},
catalog.Part{
Id: "",
Class: "assessment",
Title: "",
},
catalog.Part{
Id: "",
Class: "assessment",
Title: "",
},
catalog.Part{
Id: "",
Class: "assessment",
Title: "",
},
catalog.Part{
Id: "",
Class: "justification",
Title: "",
},
},Note the empty "assessment" and "justification" parts. Also as far as the |
@anweiss I haven't been able to implement nested It looks somewhat like this if just included in the template catalog.Part{
Id: "ir-9_obj",
Class: "objective",
Title: "",
Prose: "{{ } [] [p] [{{http://csrc.nist.gov/ns/oscal/1.0 p} [] [] [] [] [] [] [] [] [] [] [] Determine if the organization: }] [] [] []
}", |
|
@minhaj10p ah ok. That makes sense. I'll try to see what I can come up with re. nested parts and prose to help you out on this. |
29d8b41 to
aa73643
Compare
aa73643 to
2618aa0
Compare
|
@anweiss if you merge this, let me know so I can rebase the other dependent branches. |
|
@minhaj10p after speaking internally with @justincormack, we can go ahead and merge this. Thanks again for your patience. |
Description
Attempts to process
manipulationattributes in the profilemodifysection.Linking to #12.
Feature set
importchain traversal is enabled to fetch the root catalog for each importimportchain for the controls/subcontrols referenced by the root profile foraddmanipulation attributeparts with the sameclassinstead of adding a newpart