Documentation
¶
Overview ¶
Package ingress parses repository changes before policy and analysis stages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileChange ¶
type FileChange struct {
Path string `json:"path"`
OldPath string `json:"old_path,omitempty"`
NewFile bool `json:"new_file,omitempty"`
Deleted bool `json:"deleted,omitempty"`
Ranges []LineRange `json:"ranges"`
}
FileChange records changed line ranges and file operation metadata.
func ParseUnifiedDiff ¶
func ParseUnifiedDiff(diff string) ([]FileChange, error)
ParseUnifiedDiff extracts new-file line ranges from a unified diff.
type SecretFinding ¶
type SecretFinding struct {
Kind string `json:"kind"`
Line int `json:"line"`
Value string `json:"value"`
}
SecretFinding describes a likely credential in source text.
func ScanSecrets ¶
func ScanSecrets(source []byte) []SecretFinding
ScanSecrets returns concrete credential-pattern hits and high-entropy tokens. The function avoids returning surrounding source context, only the matched value.
func ScanUnifiedDiffSecrets ¶
func ScanUnifiedDiffSecrets(diff string) []SecretFinding
ScanUnifiedDiffSecrets checks added lines only, skipping unified-diff metadata.
Click to show internal directories.
Click to hide internal directories.