mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
add tags support for csv and sarif formats (#1176)
* add tags support for csv and sarif formats * add tests
This commit is contained in:
1 parent
3f894cbafc
commit
86197b0848
6 files changed
+22
-3
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/csv"
|
||||
"io"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// writeCsv writes the list of findings to a writeCloser.
|
||||
@@ -28,6 +29,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
||||
"Date",
|
||||
"Email",
|
||||
"Fingerprint",
|
||||
"Tags",
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -48,6 +50,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
||||
f.Date,
|
||||
f.Email,
|
||||
f.Fingerprint,
|
||||
strings.Join(f.Tags, " "),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user