gitleaks

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFieldName = "gitleaks"
View Source
const ConfigType = "Gitleaks Config"
View Source
const ReportType = "Gitleaks Scan Report"

Variables

This section is empty.

Functions

func NewValidator

func NewValidator() gcv.Validator[Finding, Config]

func NoSecretsRule

func NoSecretsRule(findings []Finding, config Config) error

Types

type Config

type Config struct {
	SecretsAllowed bool `yaml:"secretsAllowed" json:"secretsAllowed"`
}

type Finding

type Finding report.Finding

type ReportDecoder

type ReportDecoder struct {
	bytes.Buffer
}

Gitleaks reports are just an array of findings. No findings is '[]' literally

func NewReportDecoder

func NewReportDecoder() *ReportDecoder

func (*ReportDecoder) Decode

func (d *ReportDecoder) Decode() (any, error)

func (*ReportDecoder) DecodeFrom

func (d *ReportDecoder) DecodeFrom(r io.Reader) (any, error)

func (*ReportDecoder) FileType

func (d *ReportDecoder) FileType() string

type ScanReport

type ScanReport []Finding

func (ScanReport) String

func (r ScanReport) String() string

Jump to

Keyboard shortcuts

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