defaultRules

package
v0.0.0-...-8873498 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubJob

type GithubJob struct {
	Steps []GithubStep `json:"steps"`
}

type GithubStep

type GithubStep struct {
	Uses string         `json:"uses"`
	Run  string         `json:"run"`
	With map[string]any `json:"with"`
}

type GithubWorkflow

type GithubWorkflow struct {
	Jobs map[string]GithubJob `json:"jobs"`
}

type GitlabStageScript

type GitlabStageScript struct {
	Script string `json:"script"`
}

type GitlabStageScripts

type GitlabStageScripts struct {
	Scripts []string `json:"script"`
}

type JfrogPipeline

type JfrogPipeline struct {
	Steps []JfrogPipelineStep `json:"steps"`
}

type JfrogPipelineFile

type JfrogPipelineFile struct {
	Pipelines []JfrogPipeline `json:"pipelines"`
}

type JfrogPipelineStep

type JfrogPipelineStep struct {
	Execution JfrogPipelineStepExecution `json:"execution"`
}

type JfrogPipelineStepExecution

type JfrogPipelineStepExecution struct {
	OnExecute []string `json:"onExecute"`
}

type Rule

type Rule struct {
	Description          string                 `json:"description"`
	UniqueId             int                    `json:"uniqueId" validate:"required"`
	Schema               map[string]interface{} `json:"schema"`
	FailureMessage       string                 `json:"failureMessage" validate:"required"`
	EnabledByDefault     bool                   `json:"enabledByDefault"`
	InCodeImplementation bool                   `json:"inCodeImplementation"`
}

type SchemaError

type SchemaError struct {
	OwnerName       string
	RepositryName   string
	WorkflowRelPath string
	CiCdPlatform    string
	ErrorLevel      int
	ScmPlatform     string
}

func EnsureCodeCoverageChecker

func EnsureCodeCoverageChecker(githubData map[string]*githubConnector.GithubOwner, gitlabData map[string]*gitlabConnector.GitlabGroup) ([]*SchemaError, error)

func EnsureCodeQualityScanner

func EnsureCodeQualityScanner(githubData map[string]*githubConnector.GithubOwner, gitlabData map[string]*gitlabConnector.GitlabGroup) ([]*SchemaError, error)

func EnsureLinter

func EnsureLinter(githubData map[string]*githubConnector.GithubOwner, gitlabData map[string]*gitlabConnector.GitlabGroup) ([]*SchemaError, error)

func EnsureScaScanner

func EnsureScaScanner(githubData map[string]*githubConnector.GithubOwner, gitlabData map[string]*gitlabConnector.GitlabGroup) ([]*SchemaError, error)

func EnsureSecretsScanner

func EnsureSecretsScanner(githubData map[string]*githubConnector.GithubOwner, gitlabData map[string]*gitlabConnector.GitlabGroup) ([]*SchemaError, error)

func EnsureTerraformScanner

func EnsureTerraformScanner(githubData map[string]*githubConnector.GithubOwner, gitlabData map[string]*gitlabConnector.GitlabGroup) ([]*SchemaError, error)

func Validate

func Validate(rule *Rule, githubData map[string]*githubConnector.GithubOwner, gitlabData map[string]*gitlabConnector.GitlabGroup) ([]*SchemaError, error)

Jump to

Keyboard shortcuts

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