go-oscal

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

go-oscal

Go Reference Go Report Card License

go-oscal is a comprehensive Go library designed for interacting with the Open Security Controls Assessment Language (OSCAL). It offers robust support for OSCAL releases >=1.0.4, providing Go types that correspond to the latest OSCAL schemas. Notably, go-oscal offers more than just type definitions; it includes tooling for validating OSCAL documents against their respective OSCAL version schemas, facilitating the seamless transition of existing OSCAL documents to newer versions, and generating new OSCAL types as needed. Leveraging the OSCAL Complete Schema definition, go-oscal ensures that developers have access to the most up-to-date and accurate representations of OSCAL releases for their projects.

Table Of Contents

Usage

CLI
  • Clone the repository and change into the go-oscal directory
  • Build the CLI
go build .
Commands
Import
go get github.com/defenseunicorns/go-oscal
Using Types
// Types can be imported by their version
oscalTypes_1_1_2 "github.com/defenseunicorns/go-oscal/src/types/oscal-1-1-2"

result := oscalTypes_1_1_2.Result{
    Findings: &[]oscalTypes_1_1_2.Finding{
        {
            Target: oscalTypes_1_1_2.FindingTarget{
                TargetId: "ID-1",
                Status: oscalTypes_1_1_2.ObjectiveStatus{
                    State: "satisfied",
                },
            },
        },
    },
}

Development

For development, the Makefile can be used to build, test, and generate the Go structs:

make test

Additional Resources and Projects

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src
cmd
types/oscal-1-0-4
This file was auto-generated with go-oscal.
This file was auto-generated with go-oscal.
types/oscal-1-0-5
This file was auto-generated with go-oscal.
This file was auto-generated with go-oscal.
types/oscal-1-0-6
This file was auto-generated with go-oscal.
This file was auto-generated with go-oscal.
types/oscal-1-1-0
This file was auto-generated with go-oscal.
This file was auto-generated with go-oscal.
types/oscal-1-1-1
This file was auto-generated with go-oscal.
This file was auto-generated with go-oscal.
types/oscal-1-1-2
This file was auto-generated with go-oscal.
This file was auto-generated with go-oscal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL