checkmodels

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetsData

type AssetsData struct {
	AuthorizedUser    *models.User
	Organization      *models.Organization
	Repository        *models.Repository
	BranchProtections *models.Protection
	Users             []*models.User
	Pipelines         []*pipelineModels.Pipeline
	Registry          *models.PackageRegistry
}

type Check

type Check struct {
	CheckMetadataMap
	Action CheckAction
	ScannerType
}

type CheckAction

type CheckAction func(*CheckData) ([]*CheckRunResult, error)

type CheckData

type CheckData struct {
	Configuration  *config.Configuration
	AssetsMetadata *AssetsData
}

type CheckIdToCheckResultMap

type CheckIdToCheckResultMap map[string]CheckResult

type CheckMetadata

type CheckMetadata struct {
	Title       string
	Type        CheckType
	Entity      EntityType
	Description string
	Remediation string
	Url         string
	Severity    string
	ScannerType
}

type CheckMetadataMap

type CheckMetadataMap struct {
	ID     string
	Name   string
	Url    string
	Checks map[string]CheckMetadata
}

type CheckResult

type CheckResult struct {
	Status  ResultStatus `json:"status,omitempty"`
	Details string       `json:"details,omitempty"`
}

type CheckRunResult

type CheckRunResult struct {
	ID       string
	Metadata CheckMetadata
	Result   *CheckResult
}

func ToCheckRunResult

func ToCheckRunResult(id string, metadata CheckMetadata, sectionUrl string, result *CheckResult) *CheckRunResult

type CheckType

type CheckType string
const (
	SCM CheckType = "SCM"
)

type EntityType

type EntityType string
const (
	Organization EntityType = "Organization"
	Repository   EntityType = "Repository"
)

type RegoCustomModule

type RegoCustomModule struct {
	Name    string
	Content string
}

type ResultStatus

type ResultStatus string
const (
	Passed  ResultStatus = "Passed"
	Failed  ResultStatus = "Failed"
	Unknown ResultStatus = "Unknown"
)

type ScannerType

type ScannerType string
const (
	Rego   ScannerType = "Rego"
	Custom ScannerType = "Custom"
)

Jump to

Keyboard shortcuts

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