mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-27 11:44:23 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f6ebd454f |
No files matched your search
@@ -9,6 +9,12 @@ builds:
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
- "386"
|
||||
- arm
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
ldflags:
|
||||
- -s -w -X=github.com/zricethezav/gitleaks/v8/cmd.Version={{.Version}}
|
||||
archives:
|
||||
|
||||
@@ -51,6 +51,10 @@ func FromFiles(source string, cfg config.Config, outputOptions Options) ([]repor
|
||||
}
|
||||
fis := DetectFindings(cfg, b, p, "")
|
||||
for _, fi := range fis {
|
||||
// need to add 1 since line counting starts at 1
|
||||
fi.StartLine++
|
||||
fi.EndLine++
|
||||
|
||||
if outputOptions.Redact {
|
||||
fi.Redact()
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ func TestFromFiles(t *testing.T) {
|
||||
expectedFindings: []report.Finding{
|
||||
{
|
||||
Description: "AWS Access Key",
|
||||
StartLine: 19,
|
||||
EndLine: 19,
|
||||
StartLine: 20,
|
||||
EndLine: 20,
|
||||
StartColumn: 16,
|
||||
EndColumn: 35,
|
||||
Match: "AKIALALEMEL33243OLIA",
|
||||
@@ -43,8 +43,8 @@ func TestFromFiles(t *testing.T) {
|
||||
expectedFindings: []report.Finding{
|
||||
{
|
||||
Description: "AWS Access Key",
|
||||
StartLine: 19,
|
||||
EndLine: 19,
|
||||
StartLine: 20,
|
||||
EndLine: 20,
|
||||
StartColumn: 16,
|
||||
EndColumn: 35,
|
||||
Match: "AKIALALEMEL33243OLIA",
|
||||
|
||||
Reference in new issue
Block a user