Documentation
¶
Overview ¶
Package gitleaks provides data model, decoder, and validator for Gitleaks secret detection report
Index ¶
Constants ¶
View Source
const ConfigFieldName = "gitleaks"
ConfigFieldName field name for config map
View Source
const ConfigType = "Gitleaks Config"
ConfigType in plain text
View Source
const ReportType = "Gitleaks Scan Report"
ReportType in plain text
Variables ¶
This section is empty.
Functions ¶
func NewValidator ¶
NewValidator implementation of the generic validator
func NoSecretsRule ¶
NoSecretsRule deny if no secrets are allowed and count of secrets > 0
Types ¶
type Config ¶
type Config struct {
SecretsAllowed bool `json:"secretsAllowed" yaml:"secretsAllowed"`
}
Config data model
type ReportDecoder ¶
ReportDecoder reports are just an array of findings. No findings is '[]' literally
func NewReportDecoder ¶
func NewReportDecoder() *ReportDecoder
NewReportDecoder custom decoder with specific rules to handle empty findings reports
func (*ReportDecoder) Decode ¶
func (d *ReportDecoder) Decode() (any, error)
Decode from internal buffer
func (*ReportDecoder) DecodeFrom ¶
func (d *ReportDecoder) DecodeFrom(r io.Reader) (any, error)
DecodeFrom ...
type ScanReport ¶
type ScanReport []Finding
ScanReport a slice of findings
func (ScanReport) String ¶
func (r ScanReport) String() string
String a formatted table of detected secrets
Click to show internal directories.
Click to hide internal directories.