Files
wehub-resource-sync 48b3ccf279
gitleaks / gitleaks (push) Has been skipped
Test / test (ubuntu-latest) (push) Failing after 0s
Test / test (windows-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:12:29 +08:00

29 lines
939 B
Go

package sources
// Fragment represents a fragment of a source with its meta data
type Fragment struct {
// Raw is the raw content of the fragment
Raw string
Bytes []byte
// FilePath is the path to the file if applicable.
// The path separator MUST be normalized to `/`.
FilePath string
SymlinkFile string
// WindowsFilePath is the path with the original separator.
// This provides a backwards-compatible solution to https://github.com/gitleaks/gitleaks/issues/1565.
WindowsFilePath string `json:"-"` // TODO: remove this in v9.
// CommitSHA is the SHA of the commit if applicable
CommitSHA string // TODO: remove this in v9 and use CommitInfo instead
// StartLine is the line number this fragment starts on
StartLine int
// CommitInfo captures additional information about the git commit if applicable
CommitInfo *CommitInfo
InheritedFromFinding bool // Indicates if this fragment is inherited from a finding
}