lula icon indicating copy to clipboard operation
lula copied to clipboard

File merge on write capabilities

Open brandtkeller opened this issue 9 months ago • 1 comments

Is your feature request related to a problem? Please describe.

Lula will be operating on all of the OSCAL models in some way as context is used across models to build more provenant workflows. This could mean many artifacts that are required for validation and evaluation as well as generation or evidence being required for even a single repository.

Instead of requiring a file per model - the current types already support a combined definition for all models. When lula performs any write operation to a file - it should read any existing file and merge it into the appropriate model before writing the result. Meaning that models could be co-located in the same file.

Describe the solution you'd like

  • Given a file exists containing some OSCAL data
  • When any command is executed that writes to a file (generation, validation, etc)
  • Then Lula supports retaining the existing data and performing a merge as appropriate.

Describe alternatives you've considered

Keep all files as distinct artifacts where each model is separate of one another.

Additional context

This should cut down requirements for 1 -> many OSCAL files for every "package"

brandtkeller avatar May 01 '24 16:05 brandtkeller

Common function that can handle each model update in the event of existing data would be good here.

brandtkeller avatar May 01 '24 20:05 brandtkeller