Documentation
¶
Overview ¶
Package gitleaks ingests gitleaks JSON report output and normalizes it into findingspec Findings (security domain, type "secret"). It is a reference adapter: it depends only on the gitleaks report's stable JSON shape, not on the gitleaks library, so importing it stays lightweight.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(r io.Reader, opts Options) (*findingspec.FindingSet, error)
Parse decodes a gitleaks JSON report (a top-level array of findings) from r and returns a normalized FindingSet.
Types ¶
type Finding ¶
type Finding struct {
Description string `json:"Description"`
StartLine int `json:"StartLine"`
StartColumn int `json:"StartColumn"`
Match string `json:"Match"`
Secret string `json:"Secret"`
File string `json:"File"`
Commit string `json:"Commit"`
Entropy float64 `json:"Entropy"`
Date string `json:"Date"`
Tags []string `json:"Tags"`
RuleID string `json:"RuleID"`
Fingerprint string `json:"Fingerprint"`
}
Finding mirrors a single entry in a gitleaks JSON report (gitleaks v8). Only the fields used for normalization are declared; unknown fields are ignored.
Click to show internal directories.
Click to hide internal directories.