Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/defenseunicorns/go-oscal
Repository for the generation of OSCAL data types
https://github.com/defenseunicorns/go-oscal
Last synced: 2 months ago
JSON representation
Repository for the generation of OSCAL data types
- Host: GitHub
- URL: https://github.com/defenseunicorns/go-oscal
- Owner: defenseunicorns
- License: apache-2.0
- Created: 2023-01-04T23:00:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T21:10:24.000Z (3 months ago)
- Last Synced: 2024-10-26T08:00:08.045Z (2 months ago)
- Language: Go
- Size: 3.79 MB
- Stars: 16
- Watchers: 6
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- awesome-oscal - Defense Unicorn's go-oscal
README
# go-oscal
[![Go Reference](https://pkg.go.dev/badge/github.com/defenseunicorns/go-oscal.svg)](https://pkg.go.dev/github.com/defenseunicorns/go-oscal)
[![Go Report Card](https://goreportcard.com/badge/github.com/defenseunicorns/go-oscal)](https://goreportcard.com/report/github.com/defenseunicorns/go-oscal)
[![License](https://img.shields.io/github/license/defenseunicorns/go-oscal)](https://github.com/defenseunicorns/go-oscal/blob/main/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
- [go-oscal](#go-oscal)
- [Table Of Contents](#table-of-contents)
- [Usage](#usage)
- [CLI](#cli)
- [Commands](#commands)
- [Import](#import)
- [Using Types](#using-types)
- [Development](#development)
- [Additional Resources and Projects](#additional-resources-and-projects)## Usage
### CLI
- Clone the repository and change into the `go-oscal` directory
- Build the CLI
```bash
go build .
```
#### Commands
- [root](./docs/commands/root.md)
- [validate](./docs/commands/validate.md)
- [revise](./docs/commands/revise.md)
- [doctor](./docs/commands/doctor.md)
- [generate](./docs/commands/generate.md)### Import
```bash
go get github.com/defenseunicorns/go-oscal
```#### Using Types
```golang
// 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",
},
},
},
},
}
```
## DevelopmentFor development, the `Makefile` can be used to build, test, and generate the Go structs:
```bash
make test
```## Additional Resources and Projects
- [lula](https://github.com/defenseunicorns/lula)
- [OSCAL](https://github.com/usnistgov/OSCAL)
- [fedramp automation](https://github.com/GSA/fedramp-automation)
- [Awesome Oscal](https://github.com/oscal-club/awesome-oscal)