Documentation
¶
Index ¶
- Constants
- func BackMatterToMap(backMatter oscalTypes_1_1_2.BackMatter) (resourceMap map[string]string)
- func ComponentDefinitionToRequirementMap(componentDefinition *oscalTypes_1_1_2.ComponentDefinition) (requirementMap map[string]Requirement)
- func ComponentFromCatalog(source string, catalog *oscalTypes_1_1_2.Catalog, componentTitle string, ...) (*oscalTypes_1_1_2.ComponentDefinition, error)
- func ControlToImplementedRequirement(control *oscalTypes_1_1_2.Control, targetRemarks []string) (...)
- func CreateObservation(method string, relevantEvidence *[]oscalTypes_1_1_2.RelevantEvidence, ...) oscalTypes_1_1_2.Observation
- func EvaluateResults(thresholdResult *oscalTypes_1_1_2.Result, newResult *oscalTypes_1_1_2.Result) (bool, map[string][]oscalTypes_1_1_2.Finding, error)
- func GenerateAssessmentResults(findingMap map[string]oscalTypes_1_1_2.Finding, ...) (*oscalTypes_1_1_2.AssessmentResults, error)
- func GenerateFindingsMap(findings []oscalTypes_1_1_2.Finding) map[string]oscalTypes_1_1_2.Finding
- func GetOscalModel(model *oscalTypes_1_1_2.OscalModels) (modelType string, err error)
- func IdentifyResults(assessmentMap map[string]*oscalTypes_1_1_2.AssessmentResults) (map[string]*oscalTypes_1_1_2.Result, error)
- func MergeAssessmentResults(original *oscalTypes_1_1_2.AssessmentResults, ...) (*oscalTypes_1_1_2.AssessmentResults, error)
- func MergeComponentDefinitions(original *oscalTypes_1_1_2.ComponentDefinition, ...) (*oscalTypes_1_1_2.ComponentDefinition, error)
- func MergeOscalModels(existingModel *oscalTypes_1_1_2.OscalModels, ...) (*oscalTypes_1_1_2.OscalModels, error)
- func NewAssessmentResults(data []byte) (*oscalTypes_1_1_2.AssessmentResults, error)
- func NewCatalog(data []byte) (catalog *oscalTypes_1_1_2.Catalog, err error)
- func NewOscalComponentDefinition(data []byte) (componentDefinition *oscalTypes_1_1_2.ComponentDefinition, err error)
- func NewOscalModel(data []byte) (*oscalTypes_1_1_2.OscalModels, error)
- func UpdateProps(name string, namespace string, value string, ...)
- func WriteOscalModel(filePath string, model *oscalTypes_1_1_2.OscalModels) error
- type Requirement
Constants ¶
const OSCAL_VERSION = "1.1.2"
Variables ¶
This section is empty.
Functions ¶
func BackMatterToMap ¶
func BackMatterToMap(backMatter oscalTypes_1_1_2.BackMatter) (resourceMap map[string]string)
Returns a map of the uuid - description of the back-matter resources
func ComponentDefinitionToRequirementMap ¶ added in v0.4.0
func ComponentDefinitionToRequirementMap(componentDefinition *oscalTypes_1_1_2.ComponentDefinition) ( requirementMap map[string]Requirement)
Returns a map of the requirements and lula validations
func ComponentFromCatalog ¶ added in v0.3.0
func ComponentFromCatalog(source string, catalog *oscalTypes_1_1_2.Catalog, componentTitle string, targetControls []string, targetRemarks []string) (*oscalTypes_1_1_2.ComponentDefinition, error)
Creates a component-definition from a catalog and identified (or all) controls. Allows for specification of what the content of the remarks section should contain.
func ControlToImplementedRequirement ¶ added in v0.3.0
func ControlToImplementedRequirement(control *oscalTypes_1_1_2.Control, targetRemarks []string) (implementedRequirement oscalTypes_1_1_2.ImplementedRequirementControlImplementation, err error)
Consume a control - Identify statements - iterate through parts in order to create a description
func CreateObservation ¶ added in v0.4.0
func CreateObservation(method string, relevantEvidence *[]oscalTypes_1_1_2.RelevantEvidence, descriptionPattern string, descriptionArgs ...any) oscalTypes_1_1_2.Observation
Helper function to create observation
func EvaluateResults ¶ added in v0.4.0
func EvaluateResults(thresholdResult *oscalTypes_1_1_2.Result, newResult *oscalTypes_1_1_2.Result) (bool, map[string][]oscalTypes_1_1_2.Finding, error)
func GenerateAssessmentResults ¶
func GenerateAssessmentResults(findingMap map[string]oscalTypes_1_1_2.Finding, observations []oscalTypes_1_1_2.Observation) (*oscalTypes_1_1_2.AssessmentResults, error)
func GenerateFindingsMap ¶
func GenerateFindingsMap(findings []oscalTypes_1_1_2.Finding) map[string]oscalTypes_1_1_2.Finding
func GetOscalModel ¶ added in v0.4.0
func GetOscalModel(model *oscalTypes_1_1_2.OscalModels) (modelType string, err error)
func IdentifyResults ¶ added in v0.4.0
func IdentifyResults(assessmentMap map[string]*oscalTypes_1_1_2.AssessmentResults) (map[string]*oscalTypes_1_1_2.Result, error)
IdentifyResults produces a map containing the threshold result and a result used for comparison
func MergeAssessmentResults ¶ added in v0.3.0
func MergeAssessmentResults(original *oscalTypes_1_1_2.AssessmentResults, latest *oscalTypes_1_1_2.AssessmentResults) (*oscalTypes_1_1_2.AssessmentResults, error)
func MergeComponentDefinitions ¶ added in v0.3.0
func MergeComponentDefinitions(original *oscalTypes_1_1_2.ComponentDefinition, latest *oscalTypes_1_1_2.ComponentDefinition) (*oscalTypes_1_1_2.ComponentDefinition, error)
This function should perform a merge of two component-definitions where maintaining the original component-definition is the primary concern.
func MergeOscalModels ¶ added in v0.3.0
func MergeOscalModels(existingModel *oscalTypes_1_1_2.OscalModels, newModel *oscalTypes_1_1_2.OscalModels, modelType string) (*oscalTypes_1_1_2.OscalModels, error)
func NewAssessmentResults ¶
func NewAssessmentResults(data []byte) (*oscalTypes_1_1_2.AssessmentResults, error)
NewAssessmentResults creates a new assessment results object from the given data.
func NewCatalog ¶ added in v0.3.0
func NewCatalog(data []byte) (catalog *oscalTypes_1_1_2.Catalog, err error)
NewCatalog creates a new catalog object from the given data.
func NewOscalComponentDefinition ¶
func NewOscalComponentDefinition(data []byte) (componentDefinition *oscalTypes_1_1_2.ComponentDefinition, err error)
NewOscalComponentDefinition consumes a byte array and returns a new single OscalComponentDefinitionModel object Standard use is to read a file from the filesystem and pass the []byte to this function
func NewOscalModel ¶ added in v0.3.0
func NewOscalModel(data []byte) (*oscalTypes_1_1_2.OscalModels, error)
func UpdateProps ¶ added in v0.4.0
func UpdateProps(name string, namespace string, value string, props *[]oscalTypes_1_1_2.Property)
UpdateProps updates a property in a slice of properties or adds if not exists
func WriteOscalModel ¶ added in v0.3.0
func WriteOscalModel(filePath string, model *oscalTypes_1_1_2.OscalModels) error
WriteOscalModel takes a path and writes content to a file while performing checks for existing content supports both json and yaml
Types ¶
type Requirement ¶ added in v0.4.0
type Requirement struct { ImplementedRequirement *oscalTypes_1_1_2.ImplementedRequirementControlImplementation Component *oscalTypes_1_1_2.DefinedComponent ControlImplementation *oscalTypes_1_1_2.ControlImplementationSet }