Skip to content

feat: oscal export command#290

Merged
gusfcarvalho merged 2 commits intomainfrom
gc-feat-oscal-export
Dec 10, 2025
Merged

feat: oscal export command#290
gusfcarvalho merged 2 commits intomainfrom
gc-feat-oscal-export

Conversation

@gusfcarvalho
Copy link
Contributor

introduces oscal export command (also related to developer experience)

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copilot AI review requested due to automatic review settings December 10, 2025 13:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new oscal export command that allows users to export OSCAL objects (System Security Plans, Assessment Plans, Catalogs, and Profiles) from the database to JSON files. The implementation follows the existing pattern established by the oscal import command, providing a complementary data extraction capability for the compliance framework.

Key Changes

  • Added newExportCMD() function to create an export command with --output and --type flags
  • Implemented four export functions (exportSSP, exportAP, exportCatalog, exportProfile) with comprehensive GORM preload chains to fetch nested associations
  • Registered the new export command in the OSCAL command root

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
cmd/oscal/export.go New file implementing the OSCAL export command with type-specific export functions for SSP, AP, Catalog, and Profile objects
cmd/oscal/oscal.go Registers the new export command alongside the existing import command

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
@gusfcarvalho gusfcarvalho merged commit c72bc94 into main Dec 10, 2025
4 checks passed
@gusfcarvalho gusfcarvalho deleted the gc-feat-oscal-export branch December 10, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants