mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
Merge remote-tracking branch 'upstream/master' into bugfix/whitelist-checks
This commit is contained in:
3 files changed
+9
No files matched your search
@@ -128,6 +128,8 @@ From C-U at Home:
|
|||||||
|
|
||||||
<b>Donate</b>: https://www.cuathome.us/give/
|
<b>Donate</b>: https://www.cuathome.us/give/
|
||||||
|
|
||||||
|
#### Speaking of Community
|
||||||
|
Please read this https://corruptcu.com/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -29,6 +29,9 @@ regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
|
|||||||
[[regexes]]
|
[[regexes]]
|
||||||
description = "Slack token"
|
description = "Slack token"
|
||||||
regex = '''xox[baprs]-.*'''
|
regex = '''xox[baprs]-.*'''
|
||||||
|
[[regexes]]
|
||||||
|
description = "Strip API Key"
|
||||||
|
regex = '''(?i)(sk|pk)_(test|live)_[0-9a-zA-Z]{10,32}'''
|
||||||
|
|
||||||
[whitelist]
|
[whitelist]
|
||||||
regexes = [
|
regexes = [
|
||||||
|
|||||||
@@ -346,6 +346,10 @@ func run() ([]Leak, error) {
|
|||||||
// writeReport writes a report to a file specified in the --report= option.
|
// writeReport writes a report to a file specified in the --report= option.
|
||||||
// Default format for report is JSON. You can use the --csv option to write the report as a csv
|
// Default format for report is JSON. You can use the --csv option to write the report as a csv
|
||||||
func writeReport(leaks []Leak) error {
|
func writeReport(leaks []Leak) error {
|
||||||
|
if len(leaks) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
log.Infof("writing report to %s", opts.Report)
|
log.Infof("writing report to %s", opts.Report)
|
||||||
if strings.HasSuffix(opts.Report, ".csv") {
|
if strings.HasSuffix(opts.Report, ".csv") {
|
||||||
|
|||||||
Reference in new issue
Block a user