mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f50577be1c | ||
|
|
c358ae9310 | ||
|
|
9554258d02 | ||
|
|
95ee2cc30e | ||
|
|
79a35f0c27 | ||
|
|
7a021cda9e | ||
|
|
447f7a04cb | ||
|
|
e5b62cbc7c | ||
|
|
6739a34f74 | ||
|
|
e502bf29de | ||
|
|
51b504bf99 |
No files matched your search
@@ -1,6 +1,11 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
1.17.0
|
||||||
|
----
|
||||||
|
- Default regex added to search: slack, telegram.
|
||||||
|
- Default whitelisting: bin, doc, jpeg, gif
|
||||||
|
|
||||||
1.16.1
|
1.16.1
|
||||||
----
|
----
|
||||||
- Fixing default ssh auth logic
|
- Fixing default ssh auth logic
|
||||||
|
|||||||
@@ -143,12 +143,8 @@ func auditGithubRepos() ([]Leak, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if opts.Disk {
|
if opts.Disk {
|
||||||
ownerDir, err = ioutil.TempDir(dir, opts.GithubUser)
|
ownerDir, _ = ioutil.TempDir(dir, opts.GithubUser)
|
||||||
os.RemoveAll(ownerDir)
|
|
||||||
}
|
}
|
||||||
for _, githubRepo := range githubRepos {
|
for _, githubRepo := range githubRepos {
|
||||||
repo, err := cloneGithubRepo(githubRepo)
|
repo, err := cloneGithubRepo(githubRepo)
|
||||||
|
|||||||
@@ -20,6 +20,15 @@ regex = '''(?i)facebook.*['\"][0-9a-f]{32}['\"]'''
|
|||||||
[[regexes]]
|
[[regexes]]
|
||||||
description = "Twitter"
|
description = "Twitter"
|
||||||
regex = '''(?i)twitter.*['\"][0-9a-zA-Z]{35,44}['\"]'''
|
regex = '''(?i)twitter.*['\"][0-9a-zA-Z]{35,44}['\"]'''
|
||||||
|
[[regexes]]
|
||||||
|
description = "Telegram"
|
||||||
|
regex = '''(?i)telegram.*['\"][0-9]{1,12}+:[0-9a-zA-Z-]{32,44}['\"]'''
|
||||||
|
[[regexes]]
|
||||||
|
description = "PGP"
|
||||||
|
regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
|
||||||
|
[[regexes]]
|
||||||
|
description = "Slack token"
|
||||||
|
regex = '''xoxo[bapr]-.*'''
|
||||||
|
|
||||||
[whitelist]
|
[whitelist]
|
||||||
regexes = [
|
regexes = [
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ type entropyRange struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const defaultGithubURL = "https://api.github.com/"
|
const defaultGithubURL = "https://api.github.com/"
|
||||||
const version = "1.16.1"
|
const version = "1.17.0"
|
||||||
const errExit = 2
|
const errExit = 2
|
||||||
const leakExit = 1
|
const leakExit = 1
|
||||||
const defaultConfig = `
|
const defaultConfig = `
|
||||||
@@ -145,53 +145,61 @@ const defaultConfig = `
|
|||||||
# is set, gitleaks will load configurations from that path. If option --config-path is set, gitleaks will load
|
# is set, gitleaks will load configurations from that path. If option --config-path is set, gitleaks will load
|
||||||
# configurations from that path. Gitleaks does not whitelist anything by default.
|
# configurations from that path. Gitleaks does not whitelist anything by default.
|
||||||
|
|
||||||
|
|
||||||
title = "gitleaks config"
|
title = "gitleaks config"
|
||||||
# add regexes to the regex table
|
# add regexes to the regex table
|
||||||
[[regexes]]
|
[[regexes]]
|
||||||
description = "AWS"
|
description = "AWS"
|
||||||
regex = '''AKIA[0-9A-Z]{16}'''
|
regex = '''AKIA[0-9A-Z]{16}'''
|
||||||
[[regexes]]
|
[[regexes]]
|
||||||
description = "RKCS8"
|
description = "PKCS8"
|
||||||
regex = '''-----BEGIN PRIVATE KEY-----'''
|
regex = '''-----BEGIN PRIVATE KEY-----'''
|
||||||
[[regexes]]
|
[[regexes]]
|
||||||
description = "RSA"
|
description = "RSA"
|
||||||
regex = '''-----BEGIN RSA PRIVATE KEY-----'''
|
regex = '''-----BEGIN RSA PRIVATE KEY-----'''
|
||||||
[[regexes]]
|
[[regexes]]
|
||||||
description = "Github"
|
|
||||||
regex = '''(?i)github.*['\"][0-9a-zA-Z]{35,40}['\"]'''
|
|
||||||
[[regexes]]
|
|
||||||
description = "SSH"
|
description = "SSH"
|
||||||
regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
|
regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
|
||||||
[[regexes]]
|
[[regexes]]
|
||||||
|
description = "PGP"
|
||||||
|
regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
|
||||||
|
[[regexes]]
|
||||||
description = "Facebook"
|
description = "Facebook"
|
||||||
regex = '''(?i)facebook.*['\"][0-9a-f]{32}['\"]'''
|
regex = '''(?i)facebook.*['\"][0-9a-f]{32}['\"]'''
|
||||||
[[regexes]]
|
[[regexes]]
|
||||||
description = "Twitter"
|
description = "Twitter"
|
||||||
regex = '''(?i)twitter.*['\"][0-9a-zA-Z]{35,44}['\"]'''
|
regex = '''(?i)twitter.*['\"][0-9a-zA-Z]{35,44}['\"]'''
|
||||||
|
[[regexes]]
|
||||||
|
description = "Github"
|
||||||
|
regex = '''(?i)github.*['\"][0-9a-zA-Z]{35,40}['\"]'''
|
||||||
|
[[regexes]]
|
||||||
|
description = "Slack"
|
||||||
|
regex = '''xoxo[bapr]-.*'''
|
||||||
|
[[regexes]]
|
||||||
|
description = "Telegram"
|
||||||
|
regex = '''\d{5,}:A[a-zA-Z0-9_\-]{34,34}'''
|
||||||
|
|
||||||
[whitelist]
|
[whitelist]
|
||||||
#regexes = [
|
regexes = [
|
||||||
# "AKAIMYFAKEAWKKEY",
|
'''(?i)github.*ref.*['\"][0-9a-fA-F]{35,40}['\"]''',
|
||||||
#]
|
'''(?i)shasum.*['\"][0-9a-fA-F]{40}['\"]''',
|
||||||
|
'''(?i)githead.*['\"][0-9a-fA-F]{40}['\"]''',
|
||||||
#files = [
|
'''(?i)email_hash.*['\"][0-9a-fA-F]{40}['\"]''',
|
||||||
# "(.*?)(jpg|gif|doc|pdf|bin)$"
|
'''(?i)email_hash.*['\"][0-9a-fA-F]{32}['\"]''',
|
||||||
#]
|
'''(?i)rev.*:.*['\"][0-9a-fA-F]{40}['\"]''',
|
||||||
|
]
|
||||||
|
files = [
|
||||||
|
"(.*?)(jpg|gif|doc|pdf|bin)$"
|
||||||
|
]
|
||||||
#commits = [
|
#commits = [
|
||||||
# "BADHA5H1",
|
# "BADHA5H1",
|
||||||
# "BADHA5H2",
|
# "BADHA5H2",
|
||||||
#]
|
#]
|
||||||
|
|
||||||
#branches = [
|
#branches = [
|
||||||
# "dev/goodrepo"
|
# "dev/goodrepo"
|
||||||
#]
|
#]
|
||||||
|
|
||||||
#repos = [
|
#repos = [
|
||||||
# "mygoodrepo"
|
# "mygoodrepo"
|
||||||
#]
|
#]
|
||||||
|
|
||||||
[misc]
|
[misc]
|
||||||
#entropy = [
|
#entropy = [
|
||||||
# "3.3-4.30"
|
# "3.3-4.30"
|
||||||
|
|||||||
Reference in new issue
Block a user