Documentation
¶
Overview ¶
Package scanfile detects secrets in local files and editor buffers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NormalizedFinding ¶
type NormalizedFinding struct {
DetectorClass string `json:"detectorClass"`
Severity string `json:"severity"`
File string `json:"file"`
StartLine int `json:"startLine"`
EndLine int `json:"endLine"`
StartColumn int `json:"startColumn"`
EndColumn int `json:"endColumn"`
CWE string `json:"cwe"`
Message string `json:"message"`
Fingerprint string `json:"fingerprint"`
}
NormalizedFinding describes a secret without its value. Lines and UTF-16 columns are 1-based. EndColumn includes the last character of the secret.
func ScanContent ¶
func ScanContent(content []byte, filePath string, repository string) []NormalizedFinding
ScanContent scans a file or buffer for secrets without network access. filePath labels each finding and selects path exclusions. repository is part of the fingerprint. Rule names can differ from platform secret types, so fingerprints do not guarantee correlation with platform findings.
Click to show internal directories.
Click to hide internal directories.