compliance

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Copyright (C) 2026 l3montree GmbH This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPolicyFsToModel

func ConvertPolicyFsToModel(policy PolicyFS) models.Policy

func LoadControlsIntoDB added in v1.10.0

func LoadControlsIntoDB(db shared.DB) error

func ValidateOSCAL added in v1.10.0

func ValidateOSCAL(oscalDoc any) error

schema matching its detected model type and version.

Types

type PolicyEvaluation

type PolicyEvaluation struct {
	models.Policy
	Compliant           *bool          `json:"compliant"`
	Violations          []string       `json:"violations"`
	RawEvaluationResult map[string]any `json:"rawEvaluationResult"`
}

func Eval

func Eval(p models.Policy, input any) PolicyEvaluation

type PolicyFS

type PolicyFS struct {
	PolicyMetadata
	Content string
}

func GetCommunityManagedPoliciesFromFS

func GetCommunityManagedPoliciesFromFS() []PolicyFS

func NewPolicy

func NewPolicy(filename string, content string) (*PolicyFS, error)

type PolicyMetadata

type PolicyMetadata struct {
	Title                string   `yaml:"title" json:"title"`
	Description          string   `yaml:"description" json:"description"`
	Priority             int      `yaml:"priority" json:"priority"`
	Tags                 []string `yaml:"tags" json:"tags"`
	RelatedResources     []string `yaml:"relatedResources" json:"relatedResources"`
	ComplianceFrameworks []string `yaml:"complianceFrameworks" json:"complianceFrameworks"`
	Filename             string   `json:"filename"`
	Content              string   `json:"content"`
	PredicateType        string   `yaml:"predicateType" json:"predicateType"`
}

Jump to

Keyboard shortcuts

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