gatecheck

package
v0.0.7-pre Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorValidation = errors.New("report failed validation")

Functions

This section is empty.

Types

type Artifact

type Artifact interface {
	Validate() error
	fmt.Stringer
}

type Config

type Config struct {
	ProjectName string           `yaml:"projectName" json:"projectName"`
	Grype       *grype.Config    `yaml:"grype,omitempty" json:"grype,omitempty"`
	Semgrep     *semgrep.Config  `yaml:"semgrep,omitempty" json:"semgrep,omitempty"`
	Gitleaks    *gitleaks.Config `yaml:"gitleaks,omitempty" json:"gitleaks,omitempty"`
}

func NewConfig

func NewConfig(projectName string) *Config

type Report

type Report struct {
	ProjectName string `json:"projectName"`
	PipelineId  string `json:"pipelineId"`
	PipelineUrl string `json:"pipelineUrl"`
	Timestamp   string `json:"timestamp"`
	Artifacts   struct {
		Grype    *grype.Artifact    `json:"grype,omitempty"`
		Semgrep  *semgrep.Artifact  `json:"semgrep,omitempty"`
		Gitleaks *gitleaks.Artifact `json:"gitleaks,omitempty"`
	} `json:"artifacts"`
}

func NewReport

func NewReport(projectName string) *Report

func (Report) String

func (r Report) String() string

func (Report) Validate

func (r Report) Validate() error

Validate calls the validate function for each artifact

func (Report) WithConfig

func (r Report) WithConfig(c *Config) *Report

WithConfig will configure each Artifact if the config is defined

func (Report) WithSettings

func (r Report) WithSettings(s Settings) *Report

type Settings

type Settings struct {
	ProjectName string
	PipelineId  string
	PipelineUrl string
}

Jump to

Keyboard shortcuts

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