Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(report): initial doc for reporting layers #456

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Lula Compliance Reporting

Contextual reporting for the state of compliance with a given standard, benchmark, stig, or policy.

`lula report` will use context of default or specified OSCAL artifacts to perform an analysis on percentages met by components or systems.

## Context

```mermaid
flowchart TD
A[Report] -->|default/specified OSCAL files| B(Build Report)
B --> C{Check for existence of models & Catalog/Profile}
C -->|Components Exist| D[Component Report]
C -->|SSP Exists - not supported| E[System Report]
C -->|Assessment Results Exist| F[Assessment Report]
```

### Considerations

Reporting will perform the analysis of control context from relevant OSCAL layers to provide a layered reporting of compliance.

## Reporting Layers

### Component Report

Component Reporting will provide the most generalized layer of controls against a given standard. Components may be comprised of multiple standards (control implementations) and as such will need to potentially collect multiple catalogs and profiles.

### System Report

System Reporting will provide a filter of controls against a given system. This is more specialized and focuses on a single system and the standard for which it is being accredited.

### Assessment Report

Assessment Reporting will provide more specialized reporting on the state of a given assessment. The state of a control `finding` will be analyzed and reported in the form of percentage controls being `satisfied/not-satisfied given a result.
42 changes: 42 additions & 0 deletions src/cmd/report/report.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package report

import (
"github.com/spf13/cobra"
)

type flags struct {
InputFile string // -f --input-file
OutputFile string // -o --output-file
}

var opts = &flags{}

var reportHelp = `

`

var reportCmd = &cobra.Command{
Use: "report",
Hidden: false,
Aliases: []string{"r"},
Short: "Build a compliance report",
Example: reportHelp,
Run: func(_ *cobra.Command, args []string) {

},
}

func ReportCommand() *cobra.Command {

reportFlags()

return reportCmd
}

func reportFlags() {
reportFlags := reportCmd.PersistentFlags()

reportFlags.StringVarP(&opts.InputFile, "input-file", "f", "", "Path to a manifest file")
reportFlags.StringVarP(&opts.OutputFile, "output-file", "o", "", "Path and Name to an output file")

}