mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ef704f28f | ||
|
|
7cfebca510 | ||
|
|
6d801ed61c | ||
|
|
e15ab0dc2a | ||
|
|
c39e7640e2 | ||
|
|
c0caab0355 | ||
|
|
81c92c78ca | ||
|
|
bf031592b8 | ||
|
|
acce01f233 | ||
|
|
2678a54290 | ||
|
|
289b757158 | ||
|
|
c02d830494 | ||
|
|
67b0a29ab6 | ||
|
|
f710d680dd | ||
|
|
eb2bfe5e16 | ||
|
|
55d1da131a | ||
|
|
177e9f4fc2 | ||
|
|
e93d8cb696 | ||
|
|
db43f9a342 | ||
|
|
9b15f0d33e | ||
|
|
817aa7b8d0 | ||
|
|
33082a9967 | ||
|
|
7dbfe8db2f | ||
|
|
fc98cbf159 | ||
|
|
3f0293dab0 | ||
|
|
4f6ee2bcf1 | ||
|
|
62020539f4 | ||
|
|
c8681e4858 | ||
|
|
b93459160a | ||
|
|
8622c39e88 | ||
|
|
96eed6aa0f | ||
|
|
7d9dd260f4 | ||
|
|
e47867d802 | ||
|
|
adf512e2ac | ||
|
|
e35cb6707a | ||
|
|
b6b7cfb6d3 | ||
|
|
1b3f10cb79 | ||
|
|
6748a89bf4 | ||
|
|
6f6e057042 | ||
|
|
b8f236c9b3 | ||
|
|
c5fc080aa0 | ||
|
|
3bace4c735 | ||
|
|
e890a8e809 | ||
|
|
49b0b097e4 | ||
|
|
31a8e9db7a | ||
|
|
b1853bd032 | ||
|
|
cd52267113 |
No files matched your search
+13
-23
@@ -1,36 +1,26 @@
|
|||||||
name: Test
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "*"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "*"
|
- "*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: 1.17
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: go build -v ./...
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17
|
go-version: 1.19
|
||||||
|
|
||||||
- name: Test
|
- name: Build
|
||||||
run: make test
|
run: go build -v ./...
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: make test
|
||||||
|
|
||||||
|
- name: Validate Config
|
||||||
|
run: cd cmd/generate/config && go run main.go
|
||||||
+752
@@ -0,0 +1,752 @@
|
|||||||
|
418edf165dbb63d6f46993ae8f8818ffd87ea582:cmd/generate/config/rules/jwt.go:jwt:17
|
||||||
|
418edf165dbb63d6f46993ae8f8818ffd87ea582:cmd/generate/config/rules/jwt.go:jwt:19
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:46
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:48
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:50
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:52
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:54
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:55
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:56
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:57
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:22
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:24
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:28
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:29
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-sensitive-url:164
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-sensitive-url:170
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:120
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:126
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:142
|
||||||
|
31650f01e76858ce7a0490943426e84a0824bbc8:config/config_test.go:aws-access-token:31
|
||||||
|
5ed010c944ccc715cb9245abafd4e97d98d75e9f:config/config_test.go:aws-access-token:31
|
||||||
|
ad7509e3b47331ce9586743ace635422843b695b:cmd/generate/config/rules/privatekey.go:private-key:22
|
||||||
|
717cf1b10be1625875199eca8cdf48883348985f:README.md:aws-access-token:23
|
||||||
|
3474c58c9e25fe2b1cee855a35bd1bf8a8c0fae8:cmd/generate/config/rules/generic.go:clojars-api-token:38
|
||||||
|
a42b32bdf11b6f4ea5c32ec76a1731b4b0c5e52a:cmd/generate/config/rules/generic.go:generic-api-key:40
|
||||||
|
a42b32bdf11b6f4ea5c32ec76a1731b4b0c5e52a:cmd/generate/config/rules/generic.go:generic-api-key:41
|
||||||
|
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:50
|
||||||
|
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:60
|
||||||
|
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:61
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:pypi-upload-token:29
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:51
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:73
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:81
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:89
|
||||||
|
33082a996774ba4c8ad4ba26fd219d77497eb960:README.md:sidekiq-secret:43
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:98
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:235
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:236
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:253
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:254
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:278
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:279
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:343
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:344
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:362
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:363
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:pypi-upload-token:27
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:49
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:71
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:79
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:87
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:120
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:96
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:128
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:118
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:150
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:126
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:166
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:175
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:183
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:238
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:239
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:256
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:257
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:281
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:282
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:356
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:357
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:375
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:376
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:148
|
||||||
|
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:27
|
||||||
|
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:32
|
||||||
|
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:33
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:164
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:173
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:181
|
||||||
|
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:43
|
||||||
|
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:60
|
||||||
|
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:85
|
||||||
|
b8141713e89f5acec500c7a62415f0f1cb7234dc:README.md:discord-client-secret:273
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:aws-access-token:130
|
||||||
|
b8141713e89f5acec500c7a62415f0f1cb7234dc:README.md:discord-client-secret:289
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:discord-client-secret:251
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:discord-client-secret:267
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/detect_test.go:aws-access-token:33
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/files_test.go:aws-access-token:32
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/files_test.go:aws-access-token:50
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:config/config_test.go:generic-api-key:133
|
||||||
|
80d29764a0bc0f269607d3eb7b2774a0f31e5da3:detect/detect_test.go:aws-access-token:123
|
||||||
|
80d29764a0bc0f269607d3eb7b2774a0f31e5da3:testdata/config/allow_global_aws_re.toml:aws-access-token:8
|
||||||
|
4acd7a3c8d20b7116a32f9bbade6a3cf15f741e4:detect/detect_test.go:aws-access-token:117
|
||||||
|
f0b8d26c9988af725132c100dda5051586a3026e:README.md:discord-client-secret:225
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:config/config_test.go:generic-api-key:144
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:121
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:122
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:157
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:aws-access-token:31
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:32
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:33
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:50
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:51
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:42
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:44
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:58
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:60
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:82
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:83
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:generic-api-key:133
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/config/allow_aws_re.toml:aws-access-token:9
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:generic-api-key:144
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small-branch-foo.txt:aws-access-token:15
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/repos/nogit/main.go:aws-access-token:20
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small.txt:aws-access-token:15
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small.txt:aws-access-token:44
|
||||||
|
3a3e13c3b5f85b0116cf2a0cd92529baf22d0ac9:testdata/repos/with_square_and_google/env:generic-api-key:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:scan/unstaged_test.go:aws-access-token:38
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_208ae46.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_208ae46.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_ae8db4a2_208ae46.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_ae8db4a2_208ae46.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_depth_1.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_depth_1.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:5
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:26
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:31
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:40
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:46
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:52
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:59
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:74
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:80
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:95
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:109
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_unstaged.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:generic-api-key:6
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:aws-access-token:9
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:aws-access-token:13
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:54
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:56
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:37
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:39
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:aws-access-token:37
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:aws-access-token:39
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:aws-access-token:37
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:aws-access-token:39
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:generic-api-key:6
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:aws-access-token:9
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:aws-access-token:13
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_repos/test_dir_2/env:generic-api-key:1
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_repos/test_dir_2/env:generic-api-key:3
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_dir_one_google_leak_and_square_leak.json:generic-api-key:3
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_dir_one_google_leak_and_square_leak.json:generic-api-key:20
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:35
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:37
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:259
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:261
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:339
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:51
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:83
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:85
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:131
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:133
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:147
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:149
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:179
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:227
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:229
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:323
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:355
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:357
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_file1_aws_leak.json:aws-access-token:3
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_file1_aws_leak.json:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:3
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:17
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:19
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_repos/test_dir_1/server.test.py:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_repos/test_dir_1/server.test2.py:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:99
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:101
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:115
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:117
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:131
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:133
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:147
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:149
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:163
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:165
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:179
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:181
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:195
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:197
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:211
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:213
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:83
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:85
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:99
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:101
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:115
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:117
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:131
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:133
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:147
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:149
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:163
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:165
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:179
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:259
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:261
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:181
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:195
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:197
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:339
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:341
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:3
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:5
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:18
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:20
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:33
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:35
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:259
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:261
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_to_from.json:aws-access-token:3
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_to_from.json:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:323
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:325
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:18
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:20
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:examples/simple_regex_and_allowlist_config.toml:aws-access-token:12
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:3
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:5
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:18
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:20
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_configs/aws_key_aws_allowlisted.toml:aws-access-token:7
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak.json:aws-access-token:185
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:185
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_repo_nine_aws_leak.json:aws-access-token:3
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_repo_nine_aws_leak.json:aws-access-token:5
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:78
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:80
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:138
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:140
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:153
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:155
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:168
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:170
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:138
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:140
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:153
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:155
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:168
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:170
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:3
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:5
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:18
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:20
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:33
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:35
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_repos/test_repo_8/dummy.txt:aws-access-token:2
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_repos/test_repo_8/dummy.txt:aws-access-token:6
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:48
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak.json:aws-access-token:48
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:33
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak.json:aws-access-token:93
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:78
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:18
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_three_leaks.json:aws-access-token:48
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:78
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks.json:aws-access-token:33
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:3
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:4
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:16
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:17
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_since_date.json:aws-access-token:3
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_since_date.json:aws-access-token:4
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_until_date.json:aws-access-token:3
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_until_date.json:aws-access-token:4
|
||||||
|
0d7c18cb39c60efb62a6c7b351f95d46ebe1f63e:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:172
|
||||||
|
0d7c18cb39c60efb62a6c7b351f95d46ebe1f63e:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:173
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:3
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:4
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:16
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:17
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:29
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:30
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:42
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:43
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:55
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:56
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:3
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:4
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:16
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:17
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:29
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:30
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:42
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:43
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:55
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:56
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:68
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:69
|
||||||
|
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_local_repo_seven_aws_leak_uncommitted.json:aws-access-token:3
|
||||||
|
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_local_repo_seven_aws_leak_uncommitted.json:aws-access-token:4
|
||||||
|
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_repos/test_repo_7/file:aws-access-token:5
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:94
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:95
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:134
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:160
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:94
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:133
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:134
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:172
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:173
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:3
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:4
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:16
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:17
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:29
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:30
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:42
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:43
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:55
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:56
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:68
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:69
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:81
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:82
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:94
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:95
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:107
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:108
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:120
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:121
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:133
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:134
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:146
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:147
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:159
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:160
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:172
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:173
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:185
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:186
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:29
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:30
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:42
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:224
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:225
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:211
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:212
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:263
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:264
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:237
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:238
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:276
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:277
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:316
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:342
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:95
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:121
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:3
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:4
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:29
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:30
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:42
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:146
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:147
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:380
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:381
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:406
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:407
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:445
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:446
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:68
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:69
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:172
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:173
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:68
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:69
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:95
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_owner_aws_leak.json:aws-access-token:120
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_owner_aws_leak.json:aws-access-token:121
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks.json:aws-access-token:107
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks.json:aws-access-token:108
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:94
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:95
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_three_leaks.json:aws-access-token:81
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_three_leaks.json:aws-access-token:82
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:audit/util.go:aws-access-token:66
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:55
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:56
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:55
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:56
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak.json:aws-access-token:276
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak.json:aws-access-token:277
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:16
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:17
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:146
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:147
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six.json:aws-access-token:31
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six.json:aws-access-token:33
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_filepath.json:aws-access-token:3
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_filepath.json:aws-access-token:4
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_path_globally_whitelisted.json:aws-access-token:3
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_path_globally_whitelisted.json:aws-access-token:4
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_repos/test_repo_6/server.test.py:aws-access-token:5
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:55
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:56
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:68
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:69
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_repos/test_repo_6/config/application.properties:aws-access-token:3
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:133
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:134
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:250
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:251
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:263
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:264
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:3
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:4
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:16
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:17
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:3
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:4
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:16
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:17
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:42
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:43
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:68
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:69
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:94
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_repos/test_repo_5/secrets.py:aws-access-token:1
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_repos/test_repo_5/secrets.py:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:3
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:16
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:17
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:29
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:30
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:42
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:43
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:3
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:29
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:30
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:3
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:16
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:17
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:29
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:30
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:42
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:43
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:55
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:56
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:68
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:69
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:81
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:82
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:107
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:108
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:94
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:95
|
||||||
|
6e1c41b536a514e1d17768eb42ebf5d87e61247d:examples/simple_regex_and_whitelist_config.toml:aws-access-token:4
|
||||||
|
6e1c41b536a514e1d17768eb42ebf5d87e61247d:examples/simple_regex_and_whitelist_config.toml:aws-access-token:12
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:211
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:212
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:audit/util.go:aws-access-token:90
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:237
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:238
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_configs/aws_key_aws_whitelisted.toml:aws-access-token:6
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_regex_whitelist.json.got:aws-access-token:3
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_regex_whitelist.json.got:aws-access-token:4
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:315
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:316
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:341
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:342
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:445
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:446
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:471
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:472
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:549
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:550
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:575
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:576
|
||||||
|
e446ba073804cf714316c5dc00d0ac41917b31f7:test_data/test_regex_entropy.json:aws-access-token:3
|
||||||
|
e446ba073804cf714316c5dc00d0ac41917b31f7:test_data/test_regex_entropy.json:aws-access-token:4
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:241
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:242
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:255
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:256
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:269
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:270
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:283
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:284
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:297
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:298
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:311
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:312
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:325
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:326
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:339
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:340
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:353
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:354
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:367
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:368
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:audit/audit_test.go:aws-access-token:207
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_entropy.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:31
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:32
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:45
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:46
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:59
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:60
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:73
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:74
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:87
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:88
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:101
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:102
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_repos/test_repo_1/server.test.py:aws-access-token:5
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:31
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:32
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:45
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:46
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:59
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:60
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:73
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:74
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:31
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:32
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:45
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:46
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:59
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:60
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:73
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:74
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:87
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:88
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:101
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:102
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:115
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:116
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:129
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:130
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:143
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:144
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:157
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:158
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:171
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:172
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:185
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:186
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:199
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:200
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:213
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:214
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:227
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:228
|
||||||
|
7bd55e33b504f76fc2aec27f4f479a5fb2606480:src/constants.go:private-key:32
|
||||||
|
e79ffc6ae8f66931d687407e07bc0632fb262091:src/constants.go:private-key:23
|
||||||
|
2b995fda446e03b7660c327fec41265f03199c71:config.go:private-key:28
|
||||||
|
1f80d14f3f069118a2e578d83bbc8440495fc906:main.go:private-key:118
|
||||||
|
fe977ea8577b739c34a0071ba34e98cf6b6fad38:checks_test.go:aws-access-token:52
|
||||||
|
4b4fa00b69a9a2e5f7619b1ff1dd6d160f588aec:README.md:aws-access-token:25
|
||||||
|
4b4fa00b69a9a2e5f7619b1ff1dd6d160f588aec:README.md:aws-access-token:27
|
||||||
|
2186f2299990290e4e19cf3b28906e2ec369d01e:main.go:private-key:44
|
||||||
|
9f694531b203663588c68c82dbbfb34d4f71863f:main.go:private-key:44
|
||||||
|
1e250f1a14eab6f457d61f5d7650b47c6ff43334:checks_test.go:aws-access-token:19
|
||||||
|
1e250f1a14eab6f457d61f5d7650b47c6ff43334:config.yml:private-key:2
|
||||||
|
bc26e979c5911cf647c1bede0b3700ebaaa454c8:checks_test.go:aws-access-token:36
|
||||||
|
8f352bd840f028b481dc725b77d2f4904b77913b:checks_test.go:aws-access-token:34
|
||||||
|
ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29:checks_test.go:aws-access-token:37
|
||||||
|
06c9e824d5985c8e8789321ae70de7ace3b093dc:main.go:aws-access-token:15
|
||||||
|
6d801ed61cf4d75d176cbf9062ec6ad706c9d1eb:detect/detect_test.go:private-key:567
|
||||||
|
6d801ed61cf4d75d176cbf9062ec6ad706c9d1eb:testdata/repos/symlinks/source_file/id_ed25519:private-key:1
|
||||||
|
acce01f2338434a78f6a4a06a097b0fd23280484:README.md:aws-access-token:218
|
||||||
|
README.md:aws-access-token:204
|
||||||
|
README.md:aws-access-token:205
|
||||||
|
README.md:aws-access-token:244
|
||||||
|
cmd/generate/config/rules/privatekey.go:private-key:19
|
||||||
|
cmd/generate/config/rules/generic.go:clojars-api-token:43
|
||||||
|
cmd/generate/config/rules/generic.go:generic-api-key:45
|
||||||
|
cmd/generate/config/rules/generic.go:generic-api-key:46
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:22
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:24
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:28
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:29
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:46
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:48
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:50
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:52
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:54
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:55
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:56
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:57
|
||||||
|
config/config_test.go:aws-access-token:31
|
||||||
|
detect/detect_test.go:sidekiq-secret:120
|
||||||
|
detect/detect_test.go:sidekiq-secret:126
|
||||||
|
detect/detect_test.go:sidekiq-secret:142
|
||||||
|
detect/detect_test.go:aws-access-token:50
|
||||||
|
detect/detect_test.go:aws-access-token:60
|
||||||
|
detect/detect_test.go:aws-access-token:61
|
||||||
|
detect/detect_test.go:aws-access-token:98
|
||||||
|
detect/detect_test.go:aws-access-token:104
|
||||||
|
detect/detect_test.go:aws-access-token:105
|
||||||
|
detect/detect_test.go:aws-access-token:186
|
||||||
|
detect/detect_test.go:aws-access-token:194
|
||||||
|
detect/detect_test.go:aws-access-token:202
|
||||||
|
detect/detect_test.go:aws-access-token:288
|
||||||
|
detect/detect_test.go:aws-access-token:296
|
||||||
|
detect/detect_test.go:aws-access-token:359
|
||||||
|
detect/detect_test.go:aws-access-token:360
|
||||||
|
detect/detect_test.go:aws-access-token:378
|
||||||
|
detect/detect_test.go:aws-access-token:379
|
||||||
|
detect/detect_test.go:aws-access-token:404
|
||||||
|
detect/detect_test.go:aws-access-token:405
|
||||||
|
detect/detect_test.go:aws-access-token:480
|
||||||
|
detect/detect_test.go:aws-access-token:481
|
||||||
|
detect/detect_test.go:aws-access-token:499
|
||||||
|
detect/detect_test.go:aws-access-token:500
|
||||||
|
detect/detect_test.go:sidekiq-sensitive-url:164
|
||||||
|
detect/detect_test.go:sidekiq-sensitive-url:170
|
||||||
|
detect/detect_test.go:pypi-upload-token:76
|
||||||
|
detect/detect_test.go:pypi-upload-token:82
|
||||||
|
detect/detect_test.go:pypi-upload-token:83
|
||||||
|
detect/detect_test.go:discord-api-token:211
|
||||||
|
detect/detect_test.go:discord-api-token:233
|
||||||
|
detect/detect_test.go:discord-api-token:241
|
||||||
|
detect/detect_test.go:discord-api-token:263
|
||||||
|
detect/detect_test.go:discord-api-token:279
|
||||||
|
testdata/config/allow_aws_re.toml:aws-access-token:9
|
||||||
|
testdata/config/allow_global_aws_re.toml:aws-access-token:8
|
||||||
|
testdata/expected/git/small-branch-foo.txt:aws-access-token:15
|
||||||
|
testdata/expected/git/small.txt:aws-access-token:15
|
||||||
|
testdata/expected/git/small.txt:aws-access-token:44
|
||||||
|
testdata/repos/nogit/main.go:aws-access-token:20
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:513
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:492
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:414
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:388
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:366
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:discord-api-token:255
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:discord-api-token:224
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-sensitive-url:177
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-secret:154
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-secret:130
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:107
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:pypi-upload-token:84
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:62
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:62
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:pypi-upload-token:84
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:107
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-secret:130
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-secret:154
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-sensitive-url:177
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:discord-api-token:224
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:discord-api-token:255
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:366
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:388
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:414
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:492
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:513
|
||||||
|
bfbc39eb185a217ead81a7174026f1c55f963660:cmd/generate/config/rules/jwt.go:jwt:17
|
||||||
|
bfbc39eb185a217ead81a7174026f1c55f963660:cmd/generate/config/rules/jwt.go:jwt:19
|
||||||
|
acce01f2338434a78f6a4a06a097b0fd23280484:README.md:aws-access-token:220
|
||||||
|
99d620c719020fa24baa831299f0c964da79875e:detect/detect_test.go:aws-access-token:514
|
||||||
|
111c8b47b65627db117bd20be85ff0aee8961eb9:detect/detect_test.go:private-key:567
|
||||||
|
99d620c719020fa24baa831299f0c964da79875e:detect/detect_test.go:aws-access-token:512
|
||||||
|
99d620c719020fa24baa831299f0c964da79875e:detect/detect_test.go:aws-access-token:513
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.18 AS build
|
FROM golang:1.19 AS build
|
||||||
WORKDIR /go/src/github.com/zricethezav/gitleaks
|
WORKDIR /go/src/github.com/zricethezav/gitleaks
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN VERSION=$(git describe --tags --abbrev=0) && \
|
RUN VERSION=$(git describe --tags --abbrev=0) && \
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# gitleaks
|
# Gitleaks
|
||||||
|
|
||||||
```
|
```
|
||||||
┌─○───┐
|
┌─○───┐
|
||||||
@@ -30,49 +30,49 @@
|
|||||||
|
|
||||||
Gitleaks is a SAST tool for **detecting** and **preventing** hardcoded secrets like passwords, api keys, and tokens in git repos. Gitleaks is an **easy-to-use, all-in-one solution** for detecting secrets, past or present, in your code.
|
Gitleaks is a SAST tool for **detecting** and **preventing** hardcoded secrets like passwords, api keys, and tokens in git repos. Gitleaks is an **easy-to-use, all-in-one solution** for detecting secrets, past or present, in your code.
|
||||||
|
|
||||||
| Demos |
|
```
|
||||||
| ----------- |
|
➜ ~/code(master) gitleaks detect --source . -v
|
||||||
| CLI [](https://asciinema.org/a/455683)|
|
|
||||||
| [Github-Action](https://github.com/gitleaks/gitleaks-action) |
|
○
|
||||||
|
│╲
|
||||||
|
│ ○
|
||||||
|
○ ░
|
||||||
|
░ gitleaks
|
||||||
|
|
||||||
|
|
||||||
|
Finding: "export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef",
|
||||||
|
Secret: cafebabe:deadbeef
|
||||||
|
RuleID: sidekiq-secret
|
||||||
|
Entropy: 2.609850
|
||||||
|
File: cmd/generate/config/rules/sidekiq.go
|
||||||
|
Line: 23
|
||||||
|
Commit: cd5226711335c68be1e720b318b7bc3135a30eb2
|
||||||
|
Author: John
|
||||||
|
Email: john@users.noreply.github.com
|
||||||
|
Date: 2022-08-03T12:31:40Z
|
||||||
|
Fingerprint: cd5226711335c68be1e720b318b7bc3135a30eb2:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
|
||||||
|
```
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
Gitleaks can be installed using Homebrew, Docker, or Go. Gitleaks is also available in binary form for many popular platforms and OS types on the [releases page](https://github.com/zricethezav/gitleaks/releases). In addition, Gitleaks can be implemented as a pre-commit hook directly in your repo or as a GitHub action using [Gitleaks-Action](https://github.com/gitleaks/gitleaks-action) (see demo above).
|
Gitleaks can be installed using Homebrew, Docker, or Go. Gitleaks is also available in binary form for many popular platforms and OS types on the [releases page](https://github.com/zricethezav/gitleaks/releases). In addition, Gitleaks can be implemented as a pre-commit hook directly in your repo or as a GitHub action using [Gitleaks-Action](https://github.com/gitleaks/gitleaks-action).
|
||||||
|
|
||||||
### MacOS
|
### Installing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# MacOS
|
||||||
brew install gitleaks
|
brew install gitleaks
|
||||||
```
|
|
||||||
|
|
||||||
### Docker
|
# Docker (DockerHub)
|
||||||
|
|
||||||
#### DockerHub
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker pull zricethezav/gitleaks:latest
|
docker pull zricethezav/gitleaks:latest
|
||||||
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
||||||
```
|
|
||||||
|
|
||||||
#### ghcr.io
|
# Docker (ghcr.io)
|
||||||
|
|
||||||
```bash
|
|
||||||
docker pull ghcr.io/zricethezav/gitleaks:latest
|
docker pull ghcr.io/zricethezav/gitleaks:latest
|
||||||
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
||||||
```
|
|
||||||
|
|
||||||
### From Source
|
# From Source
|
||||||
|
|
||||||
1. Download and install Go from https://golang.org/dl/
|
|
||||||
2. Clone the repo
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/zricethezav/gitleaks.git
|
git clone https://github.com/zricethezav/gitleaks.git
|
||||||
```
|
|
||||||
|
|
||||||
3. Build the binary
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd gitleaks
|
cd gitleaks
|
||||||
make build
|
make build
|
||||||
```
|
```
|
||||||
@@ -106,15 +106,16 @@ jobs:
|
|||||||
```
|
```
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/zricethezav/gitleaks
|
- repo: https://github.com/zricethezav/gitleaks
|
||||||
rev: v8.2.0
|
rev: v8.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: gitleaks
|
- id: gitleaks
|
||||||
```
|
```
|
||||||
|
|
||||||
for a [native execution of GitLeaks](https://github.com/zricethezav/gitleaks/releases) or use the [`gitleaks-docker` pre-commit ID](https://github.com/zricethezav/gitleaks/blob/master/.pre-commit-hooks.yaml) for executing GitLeaks using the [official Docker images](#docker)
|
for a [native execution of GitLeaks](https://github.com/zricethezav/gitleaks/releases) or use the [`gitleaks-docker` pre-commit ID](https://github.com/zricethezav/gitleaks/blob/master/.pre-commit-hooks.yaml) for executing GitLeaks using the [official Docker images](#docker)
|
||||||
|
|
||||||
3. Install with `pre-commit install`
|
3. Auto-update the config to the latest repos' versions by executing `pre-commit autoupdate`
|
||||||
4. Now you're all set!
|
4. Install with `pre-commit install`
|
||||||
|
5. Now you're all set!
|
||||||
|
|
||||||
```
|
```
|
||||||
➜ git commit -m "this commit contains a secret"
|
➜ git commit -m "this commit contains a secret"
|
||||||
@@ -137,26 +138,29 @@ Usage:
|
|||||||
|
|
||||||
Available Commands:
|
Available Commands:
|
||||||
completion generate the autocompletion script for the specified shell
|
completion generate the autocompletion script for the specified shell
|
||||||
detect Detect secrets in code
|
detect detect secrets in code
|
||||||
help Help about any command
|
help Help about any command
|
||||||
protect Protect secrets in code
|
protect protect secrets in code
|
||||||
version Display gitleaks version
|
version display gitleaks version
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-c, --config string config file path
|
-b, --baseline-path string path to baseline with issues that can be ignored
|
||||||
order of precedence:
|
-c, --config string config file path
|
||||||
1. --config/-c
|
order of precedence:
|
||||||
2. env var GITLEAKS_CONFIG
|
1. --config/-c
|
||||||
3. (--source/-s)/.gitleaks.toml
|
2. env var GITLEAKS_CONFIG
|
||||||
If none of the three options are used, then gitleaks will use the default config
|
3. (--source/-s)/.gitleaks.toml
|
||||||
--exit-code string exit code when leaks have been encountered (default: 1)
|
If none of the three options are used, then gitleaks will use the default config
|
||||||
-h, --help help for gitleaks
|
--exit-code int exit code when leaks have been encountered (default 1)
|
||||||
-l, --log-level string log level (debug, info, warn, error, fatal) (default "info")
|
-h, --help help for gitleaks
|
||||||
--redact redact secrets from logs and stdout
|
-l, --log-level string log level (trace, debug, info, warn, error, fatal) (default "info")
|
||||||
-f, --report-format string output format (json, csv, sarif)
|
--max-target-megabytes int files larger than this will be skipped
|
||||||
-r, --report-path string report file
|
--no-banner suppress banner
|
||||||
-s, --source string path to source (git repo, directory, file)
|
--redact redact secrets from logs and stdout
|
||||||
-v, --verbose show verbose output from scan
|
-f, --report-format string output format (json, csv, sarif) (default "json")
|
||||||
|
-r, --report-path string report file
|
||||||
|
-s, --source string path to source (default: $PWD) (default ".")
|
||||||
|
-v, --verbose show verbose output from scan
|
||||||
|
|
||||||
Use "gitleaks [command] --help" for more information about a command.
|
Use "gitleaks [command] --help" for more information about a command.
|
||||||
```
|
```
|
||||||
@@ -189,31 +193,40 @@ as a pre-commit.
|
|||||||
|
|
||||||
**NOTE**: the `protect` command can only be used on git repos, running `protect` on files or directories will result in an error message.
|
**NOTE**: the `protect` command can only be used on git repos, running `protect` on files or directories will result in an error message.
|
||||||
|
|
||||||
|
### Creating a baseline
|
||||||
|
|
||||||
|
When scanning large repositories or repositories with a long history, it can be convenient to use a baseline. When using a baseline,
|
||||||
|
gitleaks will ignore any old findings that are present in the baseline. A baseline can be any gitleaks report. To create a gitleaks report, run gitleaks with the `--report-path` parameter.
|
||||||
|
|
||||||
|
```
|
||||||
|
gitleaks detect --report-path gitleaks-report.json # This will save the report in a file called gitleaks-report.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Once as baseline is created it can be applied when running the detect command again:
|
||||||
|
|
||||||
|
```
|
||||||
|
gitleaks detect --baseline-path gitleaks-report.json --report-path findings.json
|
||||||
|
```
|
||||||
|
|
||||||
|
After running the detect command with the --baseline-path parameter, report output (findings.json) will only contain new issues.
|
||||||
|
|
||||||
### Verify Findings
|
### Verify Findings
|
||||||
|
|
||||||
You can verify a finding found by gitleaks using a `git log` command.
|
You can verify a finding found by gitleaks using a `git log` command.
|
||||||
Example output:
|
Example output:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
Finding: aws_secret="AKIAIMNOJVGFDXXXE4OA"
|
||||||
"Description": "AWS",
|
RuleID: aws-access-token
|
||||||
"StartLine": 37,
|
Secret AKIAIMNOJVGFDXXXE4OA
|
||||||
"EndLine": 37,
|
Entropy: 3.65
|
||||||
"StartColumn": 19,
|
File: checks_test.go
|
||||||
"EndColumn": 38,
|
Line: 37
|
||||||
"Match": "\t\t\"aws_secret= \\\"AKIAIMNOJVGFDXXXE4OA\\\"\": true,",
|
Commit: ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
|
||||||
"Secret": "AKIAIMNOJVGFDXXXE4OA",
|
Author: Zachary Rice
|
||||||
"File": "checks_test.go",
|
Email: z@email.com
|
||||||
"Commit": "ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29",
|
Date: 2018-01-28T17:39:00Z
|
||||||
"Entropy": 0,
|
Fingerprint: ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29:checks_test.go:aws-access-token:37
|
||||||
"Author": "zricethezav",
|
|
||||||
"Email": "thisispublicanyways@gmail.com",
|
|
||||||
"Date": "2018-01-28 17:39:00 -0500 -0500",
|
|
||||||
"Message": "[update] entropy check",
|
|
||||||
"Tags": [],
|
|
||||||
"RuleID": "aws-access-token"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We can use the following format to verify the leak:
|
We can use the following format to verify the leak:
|
||||||
@@ -359,6 +372,23 @@ stopwords = [
|
|||||||
|
|
||||||
Refer to the default [gitleaks config](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) for examples or follow the [contributing guidelines](https://github.com/zricethezav/gitleaks/blob/master/README.md).
|
Refer to the default [gitleaks config](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) for examples or follow the [contributing guidelines](https://github.com/zricethezav/gitleaks/blob/master/README.md).
|
||||||
|
|
||||||
|
### Additional Configuration
|
||||||
|
|
||||||
|
#### gitleaks:allow
|
||||||
|
|
||||||
|
If you are knowingly committing a test secret that gitleaks will catch you can add a `gitleaks:allow` comment to that line which will instruct gitleaks
|
||||||
|
to ignore that secret. Ex:
|
||||||
|
|
||||||
|
```
|
||||||
|
class CustomClass:
|
||||||
|
discord_client_secret = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ' #gitleaks:allow
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### .gitleaksignore
|
||||||
|
|
||||||
|
You can ignore specific findings by creating a `.gitleaksignore` file at the root of your repo. In release v8.10.0 Gitleaks added a `Fingerprint` value to the Gitleaks report. Each leak, or finding, has a Fingerprint that uniquely identifies a secret. Add this fingerprint to the `.gitleaksignore` file to ignore that specific secret. See Gitleaks' [.gitleaksignore](https://github.com/zricethezav/gitleaks/blob/master/.gitleaksignore) for an example. Note: this feature is expirmental and is subject to change in the future.
|
||||||
|
|
||||||
## Secured by Jit
|
## Secured by Jit
|
||||||
|
|
||||||
We use [Jit](https://www.jit.io/jit-open-source-gitleaks?utm_source=github&utm_medium=readme&utm_campaign=GitleaksReadme&utm_id=oss&items=item-secret-detection) to secure our codebase, to achieve fully automated, full-stack continuous security using the world's best OSS security tools.
|
We use [Jit](https://www.jit.io/jit-open-source-gitleaks?utm_source=github&utm_medium=readme&utm_campaign=GitleaksReadme&utm_id=oss&items=item-secret-detection) to secure our codebase, to achieve fully automated, full-stack continuous security using the world's best OSS security tools.
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
## Who uses Gitleaks?
|
||||||
|
|
||||||
|
As the Gitleaks Community grows, we'd like to keep a list of our users.
|
||||||
|
|
||||||
|
Here's a running list of some organizations using Gitleaks[^1]:
|
||||||
|
|
||||||
|
1. [GitLab](https://docs.gitlab.com/ee/user/application_security/secret_detection/)
|
||||||
|
1. [Gitleaks](https://gitleaks.io)
|
||||||
|
1. [GoReleaser](https://goreleaser.com)
|
||||||
|
2. [Trendyol](https://trendyol.com)
|
||||||
|
|
||||||
|
Feel free to [add yours](https://github.com/zricethezav/gitleaks/edit/master/USERS.md)!
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hey! Thanks for looking into this file!
|
||||||
|
If you're going to edit it, please:
|
||||||
|
- keep a-z ordering :)
|
||||||
|
- edit only the USERS.md file at the repository's root folder
|
||||||
|
-->
|
||||||
|
|
||||||
|
[^1]: Entries were either added by the companies themselves or by the maintainers after seeing it in the wild.
|
||||||
|
You can see all public repositories using Gitleaks or Gitleaks-Action by [searching on GitHub](https://github.com/search?q=gitleaks).
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Shout out to GoReleaser for this template: https://github.com/goreleaser/goreleaser/blob/main/USERS.md
|
||||||
|
-->
|
||||||
+91
-17
@@ -18,6 +18,9 @@ func init() {
|
|||||||
rootCmd.AddCommand(detectCmd)
|
rootCmd.AddCommand(detectCmd)
|
||||||
detectCmd.Flags().String("log-opts", "", "git log options")
|
detectCmd.Flags().String("log-opts", "", "git log options")
|
||||||
detectCmd.Flags().Bool("no-git", false, "treat git repo as a regular directory and scan those files, --log-opts has no effect on the scan when --no-git is set")
|
detectCmd.Flags().Bool("no-git", false, "treat git repo as a regular directory and scan those files, --log-opts has no effect on the scan when --no-git is set")
|
||||||
|
detectCmd.Flags().Bool("pipe", false, "scan input from stdin, ex: `cat some_file | gitleaks detect --pipe`")
|
||||||
|
detectCmd.Flags().Bool("follow-symlinks", false, "scan files that are symlinks to other files")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var detectCmd = &cobra.Command{
|
var detectCmd = &cobra.Command{
|
||||||
@@ -51,11 +54,11 @@ func runDetect(cmd *cobra.Command, args []string) {
|
|||||||
detector := detect.NewDetector(cfg)
|
detector := detect.NewDetector(cfg)
|
||||||
detector.Config.Path, err = cmd.Flags().GetString("config")
|
detector.Config.Path, err = cmd.Flags().GetString("config")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
source, err := cmd.Flags().GetString("source")
|
source, err := cmd.Flags().GetString("source")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
// if config path is not set, then use the {source}/.gitleaks.toml path.
|
// if config path is not set, then use the {source}/.gitleaks.toml path.
|
||||||
// note that there may not be a `{source}/.gitleaks.toml` file, this is ok.
|
// note that there may not be a `{source}/.gitleaks.toml` file, this is ok.
|
||||||
@@ -64,23 +67,50 @@ func runDetect(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
// set verbose flag
|
// set verbose flag
|
||||||
if detector.Verbose, err = cmd.Flags().GetBool("verbose"); err != nil {
|
if detector.Verbose, err = cmd.Flags().GetBool("verbose"); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
// set redact flag
|
// set redact flag
|
||||||
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
|
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
if detector.MaxTargetMegaBytes, err = cmd.Flags().GetInt("max-target-megabytes"); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
|
||||||
|
if fileExists(filepath.Join(source, ".gitleaksignore")) {
|
||||||
|
if err = detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore")); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("could not call AddGitleaksIgnore")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore findings from the baseline (an existing report in json format generated earlier)
|
||||||
|
baselinePath, _ := cmd.Flags().GetString("baseline-path")
|
||||||
|
if baselinePath != "" {
|
||||||
|
err = detector.AddBaseline(baselinePath)
|
||||||
|
if err != nil {
|
||||||
|
log.Error().Msgf("Could not load baseline. The path must point of a gitleaks report generated using the default format: %s", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set follow symlinks flag
|
||||||
|
if detector.FollowSymlinks, err = cmd.Flags().GetBool("follow-symlinks"); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
|
|
||||||
// set exit code
|
// set exit code
|
||||||
exitCode, err := cmd.Flags().GetInt("exit-code")
|
exitCode, err := cmd.Flags().GetInt("exit-code")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("could not get exit code")
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine what type of scan:
|
// determine what type of scan:
|
||||||
// - git: scan the history of the repo
|
// - git: scan the history of the repo
|
||||||
// - no-git: scan files by treating the repo as a plain directory
|
// - no-git: scan files by treating the repo as a plain directory
|
||||||
noGit, err := cmd.Flags().GetBool("no-git")
|
noGit, err := cmd.Flags().GetBool("no-git")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("could not call GetBool() for no-git")
|
||||||
|
}
|
||||||
|
fromPipe, err := cmd.Flags().GetBool("pipe")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err)
|
||||||
}
|
}
|
||||||
@@ -90,39 +120,83 @@ func runDetect(cmd *cobra.Command, args []string) {
|
|||||||
findings, err = detector.DetectFiles(source)
|
findings, err = detector.DetectFiles(source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// don't exit on error, just log it
|
// don't exit on error, just log it
|
||||||
log.Error().Err(err)
|
log.Error().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
|
} else if fromPipe {
|
||||||
} else {
|
findings, err = detector.DetectReader(os.Stdin, 10)
|
||||||
logOpts, err := cmd.Flags().GetString("log-opts")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
// log fatal to exit, no need to continue since a report
|
||||||
|
// will not be generated when scanning from a pipe...for now
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var logOpts string
|
||||||
|
logOpts, err = cmd.Flags().GetString("log-opts")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
findings, err = detector.DetectGit(source, logOpts, detect.DetectType)
|
findings, err = detector.DetectGit(source, logOpts, detect.DetectType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// don't exit on error, just log it
|
// don't exit on error, just log it
|
||||||
log.Error().Err(err)
|
log.Error().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// log info about the scan
|
// log info about the scan
|
||||||
log.Info().Msgf("scan completed in %s", time.Since(start))
|
if err == nil {
|
||||||
if len(findings) != 0 {
|
log.Info().Msgf("scan completed in %s", FormatDuration(time.Since(start)))
|
||||||
log.Warn().Msgf("leaks found: %d", len(findings))
|
if len(findings) != 0 {
|
||||||
|
log.Warn().Msgf("leaks found: %d", len(findings))
|
||||||
|
} else {
|
||||||
|
log.Info().Msg("no leaks found")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Info().Msg("no leaks found")
|
log.Warn().Msgf("partial scan completed in %s", FormatDuration(time.Since(start)))
|
||||||
|
if len(findings) != 0 {
|
||||||
|
log.Warn().Msgf("%d leaks found in partial scan", len(findings))
|
||||||
|
} else {
|
||||||
|
log.Warn().Msg("no leaks found in partial scan")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// write report if desired
|
// write report if desired
|
||||||
reportPath, _ := cmd.Flags().GetString("report-path")
|
reportPath, _ := cmd.Flags().GetString("report-path")
|
||||||
ext, _ := cmd.Flags().GetString("report-format")
|
ext, _ := cmd.Flags().GetString("report-format")
|
||||||
if reportPath != "" {
|
if reportPath != "" {
|
||||||
if err = report.Write(findings, cfg, ext, reportPath); err != nil {
|
if err := report.Write(findings, cfg, ext, reportPath); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("could not write")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
if len(findings) != 0 {
|
if len(findings) != 0 {
|
||||||
os.Exit(exitCode)
|
os.Exit(exitCode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func fileExists(fileName string) bool {
|
||||||
|
// check for a .gitleaksignore file
|
||||||
|
info, err := os.Stat(fileName)
|
||||||
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if info != nil && err == nil {
|
||||||
|
if !info.IsDir() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func FormatDuration(d time.Duration) string {
|
||||||
|
scale := 100 * time.Second
|
||||||
|
// look for the max scale that is smaller than d
|
||||||
|
for scale > d {
|
||||||
|
scale = scale / 10
|
||||||
|
}
|
||||||
|
return d.Round(scale / 100).String()
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
configRules := []*config.Rule{}
|
var configRules []*config.Rule
|
||||||
configRules = append(configRules, rules.AdafruitAPIKey())
|
configRules = append(configRules, rules.AdafruitAPIKey())
|
||||||
configRules = append(configRules, rules.AdobeClientID())
|
configRules = append(configRules, rules.AdobeClientID())
|
||||||
configRules = append(configRules, rules.AdobeClientSecret())
|
configRules = append(configRules, rules.AdobeClientSecret())
|
||||||
@@ -41,6 +41,9 @@ func main() {
|
|||||||
configRules = append(configRules, rules.Contentful())
|
configRules = append(configRules, rules.Contentful())
|
||||||
configRules = append(configRules, rules.Databricks())
|
configRules = append(configRules, rules.Databricks())
|
||||||
configRules = append(configRules, rules.DatadogtokenAccessToken())
|
configRules = append(configRules, rules.DatadogtokenAccessToken())
|
||||||
|
configRules = append(configRules, rules.DigitalOceanPAT())
|
||||||
|
configRules = append(configRules, rules.DigitalOceanOAuthToken())
|
||||||
|
configRules = append(configRules, rules.DigitalOceanRefreshToken())
|
||||||
configRules = append(configRules, rules.DiscordAPIToken())
|
configRules = append(configRules, rules.DiscordAPIToken())
|
||||||
configRules = append(configRules, rules.DiscordClientID())
|
configRules = append(configRules, rules.DiscordClientID())
|
||||||
configRules = append(configRules, rules.DiscordClientSecret())
|
configRules = append(configRules, rules.DiscordClientSecret())
|
||||||
@@ -75,10 +78,14 @@ func main() {
|
|||||||
configRules = append(configRules, rules.GitHubRefresh())
|
configRules = append(configRules, rules.GitHubRefresh())
|
||||||
configRules = append(configRules, rules.Gitlab())
|
configRules = append(configRules, rules.Gitlab())
|
||||||
configRules = append(configRules, rules.GitterAccessToken())
|
configRules = append(configRules, rules.GitterAccessToken())
|
||||||
|
configRules = append(configRules, rules.GrafanaApiKey())
|
||||||
|
configRules = append(configRules, rules.GrafanaCloudApiToken())
|
||||||
|
configRules = append(configRules, rules.GrafanaServiceAccountToken())
|
||||||
configRules = append(configRules, rules.Hashicorp())
|
configRules = append(configRules, rules.Hashicorp())
|
||||||
configRules = append(configRules, rules.Heroku())
|
configRules = append(configRules, rules.Heroku())
|
||||||
configRules = append(configRules, rules.HubSpot())
|
configRules = append(configRules, rules.HubSpot())
|
||||||
configRules = append(configRules, rules.Intercom())
|
configRules = append(configRules, rules.Intercom())
|
||||||
|
configRules = append(configRules, rules.JWT())
|
||||||
configRules = append(configRules, rules.KrakenAccessToken())
|
configRules = append(configRules, rules.KrakenAccessToken())
|
||||||
configRules = append(configRules, rules.KucoinAccessToken())
|
configRules = append(configRules, rules.KucoinAccessToken())
|
||||||
configRules = append(configRules, rules.KucoinSecretKey())
|
configRules = append(configRules, rules.KucoinSecretKey())
|
||||||
@@ -111,11 +118,13 @@ func main() {
|
|||||||
configRules = append(configRules, rules.PlanetScaleAPIToken())
|
configRules = append(configRules, rules.PlanetScaleAPIToken())
|
||||||
configRules = append(configRules, rules.PlanetScaleOAuthToken())
|
configRules = append(configRules, rules.PlanetScaleOAuthToken())
|
||||||
configRules = append(configRules, rules.PostManAPI())
|
configRules = append(configRules, rules.PostManAPI())
|
||||||
|
configRules = append(configRules, rules.Prefect())
|
||||||
configRules = append(configRules, rules.PrivateKey())
|
configRules = append(configRules, rules.PrivateKey())
|
||||||
configRules = append(configRules, rules.PulumiAPIToken())
|
configRules = append(configRules, rules.PulumiAPIToken())
|
||||||
configRules = append(configRules, rules.PyPiUploadToken())
|
configRules = append(configRules, rules.PyPiUploadToken())
|
||||||
configRules = append(configRules, rules.RubyGemsAPIToken())
|
|
||||||
configRules = append(configRules, rules.RapidAPIAccessToken())
|
configRules = append(configRules, rules.RapidAPIAccessToken())
|
||||||
|
configRules = append(configRules, rules.ReadMe())
|
||||||
|
configRules = append(configRules, rules.RubyGemsAPIToken())
|
||||||
configRules = append(configRules, rules.SendbirdAccessID())
|
configRules = append(configRules, rules.SendbirdAccessID())
|
||||||
configRules = append(configRules, rules.SendbirdAccessToken())
|
configRules = append(configRules, rules.SendbirdAccessToken())
|
||||||
configRules = append(configRules, rules.SendGridAPIToken())
|
configRules = append(configRules, rules.SendGridAPIToken())
|
||||||
@@ -126,6 +135,8 @@ func main() {
|
|||||||
configRules = append(configRules, rules.ShopifyCustomAccessToken())
|
configRules = append(configRules, rules.ShopifyCustomAccessToken())
|
||||||
configRules = append(configRules, rules.ShopifyPrivateAppAccessToken())
|
configRules = append(configRules, rules.ShopifyPrivateAppAccessToken())
|
||||||
configRules = append(configRules, rules.ShopifySharedSecret())
|
configRules = append(configRules, rules.ShopifySharedSecret())
|
||||||
|
configRules = append(configRules, rules.SidekiqSecret())
|
||||||
|
configRules = append(configRules, rules.SidekiqSensitiveUrl())
|
||||||
configRules = append(configRules, rules.SlackAccessToken())
|
configRules = append(configRules, rules.SlackAccessToken())
|
||||||
configRules = append(configRules, rules.SlackWebHook())
|
configRules = append(configRules, rules.SlackWebHook())
|
||||||
configRules = append(configRules, rules.StripeAccessToken())
|
configRules = append(configRules, rules.StripeAccessToken())
|
||||||
@@ -133,6 +144,8 @@ func main() {
|
|||||||
configRules = append(configRules, rules.SquareSpaceAccessToken())
|
configRules = append(configRules, rules.SquareSpaceAccessToken())
|
||||||
configRules = append(configRules, rules.SumoLogicAccessID())
|
configRules = append(configRules, rules.SumoLogicAccessID())
|
||||||
configRules = append(configRules, rules.SumoLogicAccessToken())
|
configRules = append(configRules, rules.SumoLogicAccessToken())
|
||||||
|
configRules = append(configRules, rules.TeamsWebhook())
|
||||||
|
configRules = append(configRules, rules.TelegramBotToken())
|
||||||
configRules = append(configRules, rules.TravisCIAccessToken())
|
configRules = append(configRules, rules.TravisCIAccessToken())
|
||||||
configRules = append(configRules, rules.Twilio())
|
configRules = append(configRules, rules.Twilio())
|
||||||
configRules = append(configRules, rules.TwitchAPIToken())
|
configRules = append(configRules, rules.TwitchAPIToken())
|
||||||
@@ -142,6 +155,8 @@ func main() {
|
|||||||
configRules = append(configRules, rules.TwitterAccessSecret())
|
configRules = append(configRules, rules.TwitterAccessSecret())
|
||||||
configRules = append(configRules, rules.TwitterBearerToken())
|
configRules = append(configRules, rules.TwitterBearerToken())
|
||||||
configRules = append(configRules, rules.Typeform())
|
configRules = append(configRules, rules.Typeform())
|
||||||
|
configRules = append(configRules, rules.VaultBatchToken())
|
||||||
|
configRules = append(configRules, rules.VaultServiceToken())
|
||||||
configRules = append(configRules, rules.YandexAPIKey())
|
configRules = append(configRules, rules.YandexAPIKey())
|
||||||
configRules = append(configRules, rules.YandexAWSAccessToken())
|
configRules = append(configRules, rules.YandexAWSAccessToken())
|
||||||
configRules = append(configRules, rules.YandexAccessToken())
|
configRules = append(configRules, rules.YandexAccessToken())
|
||||||
@@ -159,9 +174,7 @@ func main() {
|
|||||||
// nasty dereferencing.
|
// nasty dereferencing.
|
||||||
ruleLookUp[rule.RuleID] = *rule
|
ruleLookUp[rule.RuleID] = *rule
|
||||||
}
|
}
|
||||||
config := config.Config{
|
|
||||||
Rules: ruleLookUp,
|
|
||||||
}
|
|
||||||
tmpl, err := template.ParseFiles(templatePath)
|
tmpl, err := template.ParseFiles(templatePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("Failed to parse template")
|
log.Fatal().Err(err).Msg("Failed to parse template")
|
||||||
@@ -171,6 +184,9 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("Failed to create rules.toml")
|
log.Fatal().Err(err).Msg("Failed to create rules.toml")
|
||||||
}
|
}
|
||||||
tmpl.Execute(f, config)
|
|
||||||
|
if err = tmpl.Execute(f, config.Config{Rules: ruleLookUp}); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("could not execute template")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func DigitalOceanPAT() *config.Rule {
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "DigitalOcean Personal Access Token",
|
||||||
|
RuleID: "digitalocean-pat",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`dop_v1_[a-f0-9]{64}`),
|
||||||
|
Keywords: []string{"dop_v1_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("do", "dop_v1_"+secrets.NewSecret(hex("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DigitalOceanOAuthToken() *config.Rule {
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "DigitalOcean OAuth Access Token",
|
||||||
|
RuleID: "digitalocean-access-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`doo_v1_[a-f0-9]{64}`),
|
||||||
|
Keywords: []string{"doo_v1_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("do", "doo_v1_"+secrets.NewSecret(hex("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DigitalOceanRefreshToken() *config.Rule {
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "DigitalOcean OAuth Refresh Token",
|
||||||
|
RuleID: "digitalocean-refresh-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`dor_v1_[a-f0-9]{64}`),
|
||||||
|
Keywords: []string{"dor_v1_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("do", "dor_v1_"+secrets.NewSecret(hex("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GrafanaApiKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Grafana api key (or Grafana cloud api key)",
|
||||||
|
RuleID: "grafana-api-key",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`eyJrIjoi[A-Za-z0-9]{70,400}={0,2}`),
|
||||||
|
Keywords: []string{"eyJrIjoi"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("grafana-api-key",
|
||||||
|
"eyJrIjoi"+
|
||||||
|
secrets.NewSecret(alphaNumeric("70"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GrafanaCloudApiToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Grafana cloud api token",
|
||||||
|
RuleID: "grafana-cloud-api-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`glc_[A-Za-z0-9+/]{32,400}={0,2}`),
|
||||||
|
Keywords: []string{"glc_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("grafana-cloud-api-token",
|
||||||
|
"glc_"+
|
||||||
|
secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GrafanaServiceAccountToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Grafana service account token",
|
||||||
|
RuleID: "grafana-service-account-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8}`),
|
||||||
|
Keywords: []string{"glsa_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("grafana-service-account-token",
|
||||||
|
"glsa_"+
|
||||||
|
secrets.NewSecret(alphaNumeric("32"))+
|
||||||
|
"_"+
|
||||||
|
secrets.NewSecret((hex("8")))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JWT() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "JSON Web Token",
|
||||||
|
RuleID: "jwt",
|
||||||
|
Regex: generateUniqueTokenRegex(`ey[0-9a-z]{30,34}\.ey[0-9a-z-\/_]{30,500}\.[0-9a-zA-Z-\/_]{10,200}`),
|
||||||
|
Keywords: []string{"ey"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{`eyJhbGciOieeeiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwic3ViZSI6IjEyMzQ1Njc4OTAiLCJuYW1lZWEiOiJKb2huIERvZSIsInN1ZmV3YWZiIjoiMTIzNDU2Nzg5MCIsIm5hbWVmZWF3ZnciOiJKb2huIERvZSIsIm5hbWVhZmV3ZmEiOiJKb2huIERvZSIsInN1ZndhZndlYWIiOiIxMjM0NTY3ODkwIiwibmFtZWZ3YWYiOiJKb2huIERvZSIsInN1YmZ3YWYiOiIxMjM0NTY3ODkwIiwibmFtZndhZSI6IkpvaG4gRG9lIiwiaWZ3YWZhYXQiOjE1MTYyMzkwMjJ9.a_5icKBDo-8EjUlrfvz2k2k-FYaindQ0DEYNrlsnRG0`, // gitleaks:allow
|
||||||
|
`JWT := eyJhbGciOieeeiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwic3ViZSI6IjEyMzQ1Njc4OTAiLCJuYW1lZWEiOiJKb2huIERvZSIsInN1ZmV3YWZiIjoiMTIzNDU2Nzg5MCIsIm5hbWVmZWF3ZnciOiJKb2huIERvZSIsIm5hbWVhZmV3ZmEiOiJKb2huIERvZSIsInN1ZndhZndlYWIiOiIxMjM0NTY3ODkwIiwibmFtZWZ3YWYiOiJKb2huIERvZSIsInN1YmZ3YWYiOiIxMjM0NTY3ODkwIiwibmFtZndhZSI6IkpvaG4gRG9lIiwiaWZ3YWZhYXQiOjE1MTYyMzkwMjJ9.a_5icKBDo-8EjUlrfvz2k2k-FYaindQ0DEYNrlsnRG0`, // gitleaks:allow
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Prefect() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "prefect-api-token",
|
||||||
|
Description: "Prefect API token",
|
||||||
|
Regex: generateUniqueTokenRegex(`pnu_[a-z0-9]{36}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"pnu_",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("api-token", "pnu_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ func PrivateKey() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Private Key",
|
Description: "Private Key",
|
||||||
RuleID: "private-key",
|
RuleID: "private-key",
|
||||||
Regex: regexp.MustCompile(`(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY-----[\s\S-]*KEY----`),
|
Regex: regexp.MustCompile(`(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY----`),
|
||||||
Keywords: []string{"-----BEGIN"},
|
Keywords: []string{"-----BEGIN"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ReadMe() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "readme-api-token",
|
||||||
|
Description: "Readme API token",
|
||||||
|
Regex: generateUniqueTokenRegex(`rdme_[a-z0-9]{70}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"rdme_",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("api-token", "rdme_"+secrets.NewSecret(alphaNumeric("70"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ const (
|
|||||||
// \x60 = `
|
// \x60 = `
|
||||||
secretPrefixUnique = `\b(`
|
secretPrefixUnique = `\b(`
|
||||||
secretPrefix = `(?:'|\"|\s|=|\x60){0,5}(`
|
secretPrefix = `(?:'|\"|\s|=|\x60){0,5}(`
|
||||||
secretSuffix = `)(?:['|\"|\n|\r|\s|\x60]|$)`
|
secretSuffix = `)(?:['|\"|\n|\r|\s|\x60|;]|$)`
|
||||||
)
|
)
|
||||||
|
|
||||||
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp {
|
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp {
|
||||||
@@ -70,12 +70,12 @@ func validate(r config.Rule, truePositives []string, falsePositives []string) *c
|
|||||||
})
|
})
|
||||||
for _, tp := range truePositives {
|
for _, tp := range truePositives {
|
||||||
if len(d.DetectString(tp)) != 1 {
|
if len(d.DetectString(tp)) != 1 {
|
||||||
log.Fatal().Msgf("Failed to validate (tp) %s %s", r.RuleID, tp)
|
log.Fatal().Msgf("Failed to validate. For rule ID [%s], true positive [%s] was not detected by regexp [%s]", r.RuleID, tp, r.Regex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, fp := range falsePositives {
|
for _, fp := range falsePositives {
|
||||||
if len(d.DetectString(fp)) != 0 {
|
if len(d.DetectString(fp)) != 0 {
|
||||||
log.Fatal().Msgf("Failed to validate (fp) %s", r.RuleID)
|
log.Fatal().Msgf("Failed to validate (fp) [%s]", r.RuleID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &r
|
return &r
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"regexp"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SidekiqSecret() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Sidekiq Secret",
|
||||||
|
RuleID: "sidekiq-secret",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateSemiGenericRegex([]string{"BUNDLE_ENTERPRISE__CONTRIBSYS__COM", "BUNDLE_GEMS__CONTRIBSYS__COM"},
|
||||||
|
`[a-f0-9]{8}:[a-f0-9]{8}`),
|
||||||
|
Keywords: []string{"BUNDLE_ENTERPRISE__CONTRIBSYS__COM", "BUNDLE_GEMS__CONTRIBSYS__COM"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
"BUNDLE_ENTERPRISE__CONTRIBSYS__COM: cafebabe:deadbeef",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM = cafebabe:deadbeef",
|
||||||
|
"BUNDLE_GEMS__CONTRIBSYS__COM: \"cafebabe:deadbeef\"",
|
||||||
|
"export BUNDLE_GEMS__CONTRIBSYS__COM=\"cafebabe:deadbeef\"",
|
||||||
|
"export BUNDLE_GEMS__CONTRIBSYS__COM = \"cafebabe:deadbeef\"",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef && echo 'hello world'",
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SidekiqSensitiveUrl() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Sidekiq Sensitive URL",
|
||||||
|
RuleID: "sidekiq-sensitive-url",
|
||||||
|
SecretGroup: 2,
|
||||||
|
Regex: regexp.MustCompile(`(?i)\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)`),
|
||||||
|
Keywords: []string{"gems.contribsys.com", "enterprise.contribsys.com"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
"https://cafebabe:deadbeef@gems.contribsys.com/",
|
||||||
|
"https://cafebabe:deadbeef@gems.contribsys.com",
|
||||||
|
"https://cafeb4b3:d3adb33f@enterprise.contribsys.com/",
|
||||||
|
"https://cafeb4b3:d3adb33f@enterprise.contribsys.com",
|
||||||
|
"http://cafebabe:deadbeef@gems.contribsys.com/",
|
||||||
|
"http://cafebabe:deadbeef@gems.contribsys.com",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com/",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com#heading1",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com?param1=true¶m2=false",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80/path?param1=true¶m2=false#heading1",
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -36,7 +36,7 @@ func SlackWebHook() *config.Rule {
|
|||||||
Description: "Slack Webhook",
|
Description: "Slack Webhook",
|
||||||
RuleID: "slack-web-hook",
|
RuleID: "slack-web-hook",
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(
|
||||||
`https:\/\/hooks.slack.com\/services\/[A-Za-z0-9+\/]{44,46}`),
|
`https:\/\/hooks.slack.com\/(services|workflows)\/[A-Za-z0-9+\/]{44,46}`),
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"hooks.slack.com",
|
"hooks.slack.com",
|
||||||
},
|
},
|
||||||
@@ -44,7 +44,8 @@ func SlackWebHook() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"https://hooks.slack.com/services/" + secrets.NewSecret(alphaNumeric("44")), // gitleaks:allow
|
"https://hooks.slack.com/services/" + secrets.NewSecret(alphaNumeric("44")), // gitleaks:allow
|
||||||
|
"https://hooks.slack.com/workflows/" + secrets.NewSecret(alphaNumeric("44")), // gitleaks:allow
|
||||||
}
|
}
|
||||||
return validate(r, tps, nil)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@ func SquareAccessToken() *config.Rule {
|
|||||||
RuleID: "square-access-token",
|
RuleID: "square-access-token",
|
||||||
Description: "Square Access Token",
|
Description: "Square Access Token",
|
||||||
Regex: generateUniqueTokenRegex(`sq0atp-[0-9A-Za-z\-_]{22}`),
|
Regex: generateUniqueTokenRegex(`sq0atp-[0-9A-Za-z\-_]{22}`),
|
||||||
|
Keywords: []string{"sq0atp-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
@@ -26,6 +27,7 @@ func SquareSecret() *config.Rule {
|
|||||||
RuleID: "square-secret",
|
RuleID: "square-secret",
|
||||||
Description: "Square Secret",
|
Description: "Square Secret",
|
||||||
Regex: generateUniqueTokenRegex(`sq0csp-[0-9A-Za-z\\-_]{43}`),
|
Regex: generateUniqueTokenRegex(`sq0csp-[0-9A-Za-z\\-_]{43}`),
|
||||||
|
Keywords: []string{"sq0csp-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"regexp"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TeamsWebhook() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Microsoft Teams Webhook",
|
||||||
|
RuleID: "microsoft-teams-webhook",
|
||||||
|
Regex: regexp.MustCompile(
|
||||||
|
`https:\/\/[a-z0-9]+\.webhook\.office\.com\/webhookb2\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\/IncomingWebhook\/[a-z0-9]{32}\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}`),
|
||||||
|
Keywords: []string{
|
||||||
|
"webhook.office.com",
|
||||||
|
"webhookb2",
|
||||||
|
"IncomingWebhook",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
"https://mycompany.webhook.office.com/webhookb2/" + secrets.NewSecret(`[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\/IncomingWebhook\/[a-z0-9]{32}\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}`), // gitleaks:allow
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"regexp"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TelegramBotToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Telegram Bot API Token",
|
||||||
|
RuleID: "telegram-bot-api-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: regexp.MustCompile(`(?i)(?:^|[^0-9])([0-9]{5,16}:A[a-zA-Z0-9_\-]{34})(?:$|[^a-zA-Z0-9_\-])`),
|
||||||
|
Keywords: []string{
|
||||||
|
"telegram",
|
||||||
|
"api",
|
||||||
|
"bot",
|
||||||
|
"token",
|
||||||
|
"url",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
validToken := secrets.NewSecret(numeric("8") + ":A" + alphaNumericExtendedShort("34"))
|
||||||
|
minToken := secrets.NewSecret(numeric("5") + ":A" + alphaNumericExtendedShort("34"))
|
||||||
|
maxToken := secrets.NewSecret(numeric("16") + ":A" + alphaNumericExtendedShort("34"))
|
||||||
|
tps := []string{
|
||||||
|
// variable assigment
|
||||||
|
generateSampleSecret("telegram", validToken),
|
||||||
|
// URL contaning token
|
||||||
|
generateSampleSecret("url", "https://api.telegram.org/bot"+validToken+"/sendMessage"),
|
||||||
|
// object constructor
|
||||||
|
`const bot = new Telegraf("` + validToken + `")`,
|
||||||
|
// .env
|
||||||
|
`API_TOKEN = ` + validToken,
|
||||||
|
// YAML
|
||||||
|
`bot: ` + validToken,
|
||||||
|
// Token with min bot_id
|
||||||
|
generateSampleSecret("telegram", minToken),
|
||||||
|
// Token with max bot_id
|
||||||
|
generateSampleSecret("telegram", maxToken),
|
||||||
|
}
|
||||||
|
|
||||||
|
tooSmallToken := secrets.NewSecret(numeric("4") + ":A" + alphaNumericExtendedShort("34"))
|
||||||
|
tooBigToken := secrets.NewSecret(numeric("17") + ":A" + alphaNumericExtendedShort("34"))
|
||||||
|
fps := []string{
|
||||||
|
// Token with too small bot_id
|
||||||
|
generateSampleSecret("telegram", tooSmallToken),
|
||||||
|
// Token with too big bot_id
|
||||||
|
generateSampleSecret("telegram", tooBigToken),
|
||||||
|
}
|
||||||
|
|
||||||
|
return validate(r, tps, fps)
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func VaultServiceToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Vault Service Token",
|
||||||
|
RuleID: "vault-service-token",
|
||||||
|
Regex: generateUniqueTokenRegex(`hvs\.[a-z0-9_-]{90,100}`),
|
||||||
|
Keywords: []string{"hvs"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("vault", "hvs."+secrets.NewSecret(alphaNumericExtendedShort("90"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func VaultBatchToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Vault Batch Token",
|
||||||
|
RuleID: "vault-batch-token",
|
||||||
|
Regex: generateUniqueTokenRegex(`hvb\.[a-z0-9_-]{138,212}`),
|
||||||
|
Keywords: []string{"hvb"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("vault", "hvb."+secrets.NewSecret(alphaNumericExtendedShort("138"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
+13
-8
@@ -16,6 +16,7 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
protectCmd.Flags().Bool("staged", false, "detect secrets in a --staged state")
|
protectCmd.Flags().Bool("staged", false, "detect secrets in a --staged state")
|
||||||
|
protectCmd.Flags().String("log-opts", "", "git log options")
|
||||||
rootCmd.AddCommand(protectCmd)
|
rootCmd.AddCommand(protectCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,11 +47,11 @@ func runProtect(cmd *cobra.Command, args []string) {
|
|||||||
detector := detect.NewDetector(cfg)
|
detector := detect.NewDetector(cfg)
|
||||||
detector.Config.Path, err = cmd.Flags().GetString("config")
|
detector.Config.Path, err = cmd.Flags().GetString("config")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
source, err := cmd.Flags().GetString("source")
|
source, err := cmd.Flags().GetString("source")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
// if config path is not set, then use the {source}/.gitleaks.toml path.
|
// if config path is not set, then use the {source}/.gitleaks.toml path.
|
||||||
// note that there may not be a `{source}/.gitleaks.toml` file, this is ok.
|
// note that there may not be a `{source}/.gitleaks.toml` file, this is ok.
|
||||||
@@ -59,17 +60,21 @@ func runProtect(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
// set verbose flag
|
// set verbose flag
|
||||||
if detector.Verbose, err = cmd.Flags().GetBool("verbose"); err != nil {
|
if detector.Verbose, err = cmd.Flags().GetBool("verbose"); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
// set redact flag
|
// set redact flag
|
||||||
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
|
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
|
||||||
|
if detector.MaxTargetMegaBytes, err = cmd.Flags().GetInt("max-target-megabytes"); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
|
|
||||||
// get log options for git scan
|
// get log options for git scan
|
||||||
logOpts, err := cmd.Flags().GetString("log-opts")
|
logOpts, err := cmd.Flags().GetString("log-opts")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
|
|
||||||
// start git scan
|
// start git scan
|
||||||
@@ -81,11 +86,11 @@ func runProtect(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// don't exit on error, just log it
|
// don't exit on error, just log it
|
||||||
log.Error().Err(err)
|
log.Error().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
|
|
||||||
// log info about the scan
|
// log info about the scan
|
||||||
log.Info().Msgf("scan completed in %s", time.Since(start))
|
log.Info().Msgf("scan completed in %s", FormatDuration(time.Since(start)))
|
||||||
if len(findings) != 0 {
|
if len(findings) != 0 {
|
||||||
log.Warn().Msgf("leaks found: %d", len(findings))
|
log.Warn().Msgf("leaks found: %d", len(findings))
|
||||||
} else {
|
} else {
|
||||||
@@ -96,7 +101,7 @@ func runProtect(cmd *cobra.Command, args []string) {
|
|||||||
ext, _ := cmd.Flags().GetString("report-format")
|
ext, _ := cmd.Flags().GetString("report-format")
|
||||||
if reportPath != "" {
|
if reportPath != "" {
|
||||||
if err = report.Write(findings, cfg, ext, reportPath); err != nil {
|
if err = report.Write(findings, cfg, ext, reportPath); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(findings) != 0 {
|
if len(findings) != 0 {
|
||||||
|
|||||||
+10
-1
@@ -42,9 +42,12 @@ func init() {
|
|||||||
rootCmd.PersistentFlags().StringP("source", "s", ".", "path to source (default: $PWD)")
|
rootCmd.PersistentFlags().StringP("source", "s", ".", "path to source (default: $PWD)")
|
||||||
rootCmd.PersistentFlags().StringP("report-path", "r", "", "report file")
|
rootCmd.PersistentFlags().StringP("report-path", "r", "", "report file")
|
||||||
rootCmd.PersistentFlags().StringP("report-format", "f", "json", "output format (json, csv, sarif)")
|
rootCmd.PersistentFlags().StringP("report-format", "f", "json", "output format (json, csv, sarif)")
|
||||||
|
rootCmd.PersistentFlags().StringP("baseline-path", "b", "", "path to baseline with issues that can be ignored")
|
||||||
rootCmd.PersistentFlags().StringP("log-level", "l", "info", "log level (trace, debug, info, warn, error, fatal)")
|
rootCmd.PersistentFlags().StringP("log-level", "l", "info", "log level (trace, debug, info, warn, error, fatal)")
|
||||||
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "show verbose output from scan")
|
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "show verbose output from scan")
|
||||||
|
rootCmd.PersistentFlags().Int("max-target-megabytes", 0, "files larger than this will be skipped")
|
||||||
rootCmd.PersistentFlags().Bool("redact", false, "redact secrets from logs and stdout")
|
rootCmd.PersistentFlags().Bool("redact", false, "redact secrets from logs and stdout")
|
||||||
|
rootCmd.PersistentFlags().Bool("no-banner", false, "suppress banner")
|
||||||
err := viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))
|
err := viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Msgf("err binding config %s", err.Error())
|
log.Fatal().Msgf("err binding config %s", err.Error())
|
||||||
@@ -76,7 +79,13 @@ func initLog() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func initConfig() {
|
func initConfig() {
|
||||||
fmt.Fprint(os.Stderr, banner)
|
hideBanner, err := rootCmd.Flags().GetBool("no-banner")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Msg(err.Error())
|
||||||
|
}
|
||||||
|
if !hideBanner {
|
||||||
|
_, _ = fmt.Fprint(os.Stderr, banner)
|
||||||
|
}
|
||||||
cfgPath, err := rootCmd.Flags().GetString("config")
|
cfgPath, err := rootCmd.Flags().GetString("config")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Msg(err.Error())
|
log.Fatal().Msg(err.Error())
|
||||||
|
|||||||
+237
-103
@@ -23,7 +23,7 @@ paths = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Adafruit API Key"
|
description = "Adafruit API Key"
|
||||||
id = "adafruit-api-key"
|
id = "adafruit-api-key"
|
||||||
regex = '''(?i)(?:adafruit)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:adafruit)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"adafruit",
|
"adafruit",
|
||||||
@@ -32,7 +32,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Adobe Client ID (OAuth Web)"
|
description = "Adobe Client ID (OAuth Web)"
|
||||||
id = "adobe-client-id"
|
id = "adobe-client-id"
|
||||||
regex = '''(?i)(?:adobe)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:adobe)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"adobe",
|
"adobe",
|
||||||
@@ -41,7 +41,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Adobe Client Secret"
|
description = "Adobe Client Secret"
|
||||||
id = "adobe-client-secret"
|
id = "adobe-client-secret"
|
||||||
regex = '''(?i)\b((p8e-)(?i)[a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b((p8e-)(?i)[a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"p8e-",
|
"p8e-",
|
||||||
]
|
]
|
||||||
@@ -57,7 +57,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Airtable API Key"
|
description = "Airtable API Key"
|
||||||
id = "airtable-api-key"
|
id = "airtable-api-key"
|
||||||
regex = '''(?i)(?:airtable)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{17})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:airtable)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{17})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"airtable",
|
"airtable",
|
||||||
@@ -66,7 +66,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Algolia API Key"
|
description = "Algolia API Key"
|
||||||
id = "algolia-api-key"
|
id = "algolia-api-key"
|
||||||
regex = '''(?i)(?:algolia)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:algolia)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"algolia",
|
"algolia",
|
||||||
]
|
]
|
||||||
@@ -74,7 +74,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Alibaba AccessKey ID"
|
description = "Alibaba AccessKey ID"
|
||||||
id = "alibaba-access-key-id"
|
id = "alibaba-access-key-id"
|
||||||
regex = '''(?i)\b((LTAI)(?i)[a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b((LTAI)(?i)[a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"ltai",
|
"ltai",
|
||||||
]
|
]
|
||||||
@@ -82,7 +82,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Alibaba Secret Key"
|
description = "Alibaba Secret Key"
|
||||||
id = "alibaba-secret-key"
|
id = "alibaba-secret-key"
|
||||||
regex = '''(?i)(?:alibaba)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:alibaba)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"alibaba",
|
"alibaba",
|
||||||
@@ -91,7 +91,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Asana Client ID"
|
description = "Asana Client ID"
|
||||||
id = "asana-client-id"
|
id = "asana-client-id"
|
||||||
regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9]{16})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"asana",
|
"asana",
|
||||||
@@ -100,7 +100,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Asana Client Secret"
|
description = "Asana Client Secret"
|
||||||
id = "asana-client-secret"
|
id = "asana-client-secret"
|
||||||
regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"asana",
|
"asana",
|
||||||
@@ -109,7 +109,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Atlassian API token"
|
description = "Atlassian API token"
|
||||||
id = "atlassian-api-token"
|
id = "atlassian-api-token"
|
||||||
regex = '''(?i)(?:atlassian|confluence|jira)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:atlassian|confluence|jira)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"atlassian","confluence","jira",
|
"atlassian","confluence","jira",
|
||||||
@@ -126,7 +126,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Beamer API token"
|
description = "Beamer API token"
|
||||||
id = "beamer-api-token"
|
id = "beamer-api-token"
|
||||||
regex = '''(?i)(?:beamer)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(b_[a-z0-9=_\-]{44})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:beamer)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(b_[a-z0-9=_\-]{44})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"beamer",
|
"beamer",
|
||||||
@@ -135,7 +135,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Bitbucket Client ID"
|
description = "Bitbucket Client ID"
|
||||||
id = "bitbucket-client-id"
|
id = "bitbucket-client-id"
|
||||||
regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"bitbucket",
|
"bitbucket",
|
||||||
@@ -144,7 +144,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Bitbucket Client Secret"
|
description = "Bitbucket Client Secret"
|
||||||
id = "bitbucket-client-secret"
|
id = "bitbucket-client-secret"
|
||||||
regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"bitbucket",
|
"bitbucket",
|
||||||
@@ -153,7 +153,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Bittrex Access Key"
|
description = "Bittrex Access Key"
|
||||||
id = "bittrex-access-key"
|
id = "bittrex-access-key"
|
||||||
regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"bittrex",
|
"bittrex",
|
||||||
@@ -162,7 +162,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Bittrex Secret Key"
|
description = "Bittrex Secret Key"
|
||||||
id = "bittrex-secret-key"
|
id = "bittrex-secret-key"
|
||||||
regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"bittrex",
|
"bittrex",
|
||||||
@@ -179,7 +179,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Codecov Access Token"
|
description = "Codecov Access Token"
|
||||||
id = "codecov-access-token"
|
id = "codecov-access-token"
|
||||||
regex = '''(?i)(?:codecov)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:codecov)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"codecov",
|
"codecov",
|
||||||
@@ -188,7 +188,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Coinbase Access Token"
|
description = "Coinbase Access Token"
|
||||||
id = "coinbase-access-token"
|
id = "coinbase-access-token"
|
||||||
regex = '''(?i)(?:coinbase)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:coinbase)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"coinbase",
|
"coinbase",
|
||||||
@@ -197,7 +197,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Confluent Access Token"
|
description = "Confluent Access Token"
|
||||||
id = "confluent-access-token"
|
id = "confluent-access-token"
|
||||||
regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"confluent",
|
"confluent",
|
||||||
@@ -206,7 +206,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Confluent Secret Key"
|
description = "Confluent Secret Key"
|
||||||
id = "confluent-secret-key"
|
id = "confluent-secret-key"
|
||||||
regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"confluent",
|
"confluent",
|
||||||
@@ -215,7 +215,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Contentful delivery API token"
|
description = "Contentful delivery API token"
|
||||||
id = "contentful-delivery-api-token"
|
id = "contentful-delivery-api-token"
|
||||||
regex = '''(?i)(?:contentful)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{43})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:contentful)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"contentful",
|
"contentful",
|
||||||
@@ -224,7 +224,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Databricks API token"
|
description = "Databricks API token"
|
||||||
id = "databricks-api-token"
|
id = "databricks-api-token"
|
||||||
regex = '''(?i)\b(dapi[a-h0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(dapi[a-h0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"dapi",
|
"dapi",
|
||||||
]
|
]
|
||||||
@@ -232,16 +232,43 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Datadog Access Token"
|
description = "Datadog Access Token"
|
||||||
id = "datadog-access-token"
|
id = "datadog-access-token"
|
||||||
regex = '''(?i)(?:datadog)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:datadog)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"datadog",
|
"datadog",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "DigitalOcean OAuth Access Token"
|
||||||
|
id = "digitalocean-access-token"
|
||||||
|
regex = '''(?i)\b(doo_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"doo_v1_",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "DigitalOcean Personal Access Token"
|
||||||
|
id = "digitalocean-pat"
|
||||||
|
regex = '''(?i)\b(dop_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"dop_v1_",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "DigitalOcean OAuth Refresh Token"
|
||||||
|
id = "digitalocean-refresh-token"
|
||||||
|
regex = '''(?i)\b(dor_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"dor_v1_",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Discord API key"
|
description = "Discord API key"
|
||||||
id = "discord-api-token"
|
id = "discord-api-token"
|
||||||
regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"discord",
|
"discord",
|
||||||
@@ -250,7 +277,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Discord client ID"
|
description = "Discord client ID"
|
||||||
id = "discord-client-id"
|
id = "discord-client-id"
|
||||||
regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9]{18})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9]{18})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"discord",
|
"discord",
|
||||||
@@ -259,7 +286,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Discord client secret"
|
description = "Discord client secret"
|
||||||
id = "discord-client-secret"
|
id = "discord-client-secret"
|
||||||
regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"discord",
|
"discord",
|
||||||
@@ -276,7 +303,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Droneci Access Token"
|
description = "Droneci Access Token"
|
||||||
id = "droneci-access-token"
|
id = "droneci-access-token"
|
||||||
regex = '''(?i)(?:droneci)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:droneci)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"droneci",
|
"droneci",
|
||||||
@@ -285,7 +312,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Dropbox API secret"
|
description = "Dropbox API secret"
|
||||||
id = "dropbox-api-token"
|
id = "dropbox-api-token"
|
||||||
regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{15})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{15})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"dropbox",
|
"dropbox",
|
||||||
@@ -294,7 +321,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Dropbox long lived API token"
|
description = "Dropbox long lived API token"
|
||||||
id = "dropbox-long-lived-api-token"
|
id = "dropbox-long-lived-api-token"
|
||||||
regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"dropbox",
|
"dropbox",
|
||||||
]
|
]
|
||||||
@@ -302,7 +329,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Dropbox short lived API token"
|
description = "Dropbox short lived API token"
|
||||||
id = "dropbox-short-lived-api-token"
|
id = "dropbox-short-lived-api-token"
|
||||||
regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(sl\.[a-z0-9\-=_]{135})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(sl\.[a-z0-9\-=_]{135})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"dropbox",
|
"dropbox",
|
||||||
]
|
]
|
||||||
@@ -342,7 +369,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Etsy Access Token"
|
description = "Etsy Access Token"
|
||||||
id = "etsy-access-token"
|
id = "etsy-access-token"
|
||||||
regex = '''(?i)(?:etsy)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:etsy)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"etsy",
|
"etsy",
|
||||||
@@ -351,7 +378,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Facebook"
|
description = "Facebook"
|
||||||
id = "facebook"
|
id = "facebook"
|
||||||
regex = '''(?i)(?:facebook)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:facebook)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"facebook",
|
"facebook",
|
||||||
@@ -360,7 +387,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Fastly API key"
|
description = "Fastly API key"
|
||||||
id = "fastly-api-token"
|
id = "fastly-api-token"
|
||||||
regex = '''(?i)(?:fastly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:fastly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"fastly",
|
"fastly",
|
||||||
@@ -369,7 +396,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Finicity API token"
|
description = "Finicity API token"
|
||||||
id = "finicity-api-token"
|
id = "finicity-api-token"
|
||||||
regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"finicity",
|
"finicity",
|
||||||
@@ -378,7 +405,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Finicity Client Secret"
|
description = "Finicity Client Secret"
|
||||||
id = "finicity-client-secret"
|
id = "finicity-client-secret"
|
||||||
regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"finicity",
|
"finicity",
|
||||||
@@ -387,7 +414,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Finnhub Access Token"
|
description = "Finnhub Access Token"
|
||||||
id = "finnhub-access-token"
|
id = "finnhub-access-token"
|
||||||
regex = '''(?i)(?:finnhub)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:finnhub)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"finnhub",
|
"finnhub",
|
||||||
@@ -396,7 +423,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Flickr Access Token"
|
description = "Flickr Access Token"
|
||||||
id = "flickr-access-token"
|
id = "flickr-access-token"
|
||||||
regex = '''(?i)(?:flickr)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:flickr)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"flickr",
|
"flickr",
|
||||||
@@ -437,7 +464,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Freshbooks Access Token"
|
description = "Freshbooks Access Token"
|
||||||
id = "freshbooks-access-token"
|
id = "freshbooks-access-token"
|
||||||
regex = '''(?i)(?:freshbooks)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:freshbooks)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"freshbooks",
|
"freshbooks",
|
||||||
@@ -446,7 +473,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "GCP API key"
|
description = "GCP API key"
|
||||||
id = "gcp-api-key"
|
id = "gcp-api-key"
|
||||||
regex = '''(?i)\b(AIza[0-9A-Za-z\\-_]{35})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(AIza[0-9A-Za-z\\-_]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"aiza",
|
"aiza",
|
||||||
@@ -455,13 +482,16 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Generic API Key"
|
description = "Generic API Key"
|
||||||
id = "generic-api-key"
|
id = "generic-api-key"
|
||||||
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
entropy = 3.5
|
entropy = 3.5
|
||||||
keywords = [
|
keywords = [
|
||||||
"key","api","token","secret","client","passwd","password","auth","access",
|
"key","api","token","secret","client","passwd","password","auth","access",
|
||||||
]
|
]
|
||||||
[rules.allowlist]
|
[rules.allowlist]
|
||||||
|
paths = [
|
||||||
|
'''Database.refactorlog'''
|
||||||
|
]
|
||||||
stopwords= [
|
stopwords= [
|
||||||
"client",
|
"client",
|
||||||
"endpoint",
|
"endpoint",
|
||||||
@@ -1981,7 +2011,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Gitter Access Token"
|
description = "Gitter Access Token"
|
||||||
id = "gitter-access-token"
|
id = "gitter-access-token"
|
||||||
regex = '''(?i)(?:gitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:gitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"gitter",
|
"gitter",
|
||||||
@@ -1990,12 +2020,39 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "GoCardless API token"
|
description = "GoCardless API token"
|
||||||
id = "gocardless-api-token"
|
id = "gocardless-api-token"
|
||||||
regex = '''(?i)(?:gocardless)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(live_(?i)[a-z0-9\-_=]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:gocardless)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(live_(?i)[a-z0-9\-_=]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"live_","gocardless",
|
"live_","gocardless",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Grafana api key (or Grafana cloud api key)"
|
||||||
|
id = "grafana-api-key"
|
||||||
|
regex = '''(?i)\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"eyjrijoi",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Grafana cloud api token"
|
||||||
|
id = "grafana-cloud-api-token"
|
||||||
|
regex = '''(?i)\b(glc_[A-Za-z0-9+/]{32,400}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"glc_",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Grafana service account token"
|
||||||
|
id = "grafana-service-account-token"
|
||||||
|
regex = '''(?i)\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"glsa_",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "HashiCorp Terraform user/org API token"
|
description = "HashiCorp Terraform user/org API token"
|
||||||
id = "hashicorp-tf-api-token"
|
id = "hashicorp-tf-api-token"
|
||||||
@@ -2007,7 +2064,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Heroku API Key"
|
description = "Heroku API Key"
|
||||||
id = "heroku-api-key"
|
id = "heroku-api-key"
|
||||||
regex = '''(?i)(?:heroku)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:heroku)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"heroku",
|
"heroku",
|
||||||
@@ -2016,7 +2073,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "HubSpot API Token"
|
description = "HubSpot API Token"
|
||||||
id = "hubspot-api-key"
|
id = "hubspot-api-key"
|
||||||
regex = '''(?i)(?:hubspot)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:hubspot)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"hubspot",
|
"hubspot",
|
||||||
@@ -2025,16 +2082,24 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Intercom API Token"
|
description = "Intercom API Token"
|
||||||
id = "intercom-api-key"
|
id = "intercom-api-key"
|
||||||
regex = '''(?i)(?:intercom)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{60})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:intercom)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{60})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"intercom",
|
"intercom",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "JSON Web Token"
|
||||||
|
id = "jwt"
|
||||||
|
regex = '''(?i)\b(ey[0-9a-z]{30,34}\.ey[0-9a-z-\/_]{30,500}\.[0-9a-zA-Z-\/_]{10,200})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
keywords = [
|
||||||
|
"ey",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Kraken Access Token"
|
description = "Kraken Access Token"
|
||||||
id = "kraken-access-token"
|
id = "kraken-access-token"
|
||||||
regex = '''(?i)(?:kraken)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9\/=_\+\-]{80,90})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:kraken)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9\/=_\+\-]{80,90})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"kraken",
|
"kraken",
|
||||||
@@ -2043,7 +2108,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Kucoin Access Token"
|
description = "Kucoin Access Token"
|
||||||
id = "kucoin-access-token"
|
id = "kucoin-access-token"
|
||||||
regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{24})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"kucoin",
|
"kucoin",
|
||||||
@@ -2052,7 +2117,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Kucoin Secret Key"
|
description = "Kucoin Secret Key"
|
||||||
id = "kucoin-secret-key"
|
id = "kucoin-secret-key"
|
||||||
regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"kucoin",
|
"kucoin",
|
||||||
@@ -2061,7 +2126,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Launchdarkly Access Token"
|
description = "Launchdarkly Access Token"
|
||||||
id = "launchdarkly-access-token"
|
id = "launchdarkly-access-token"
|
||||||
regex = '''(?i)(?:launchdarkly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:launchdarkly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"launchdarkly",
|
"launchdarkly",
|
||||||
@@ -2078,7 +2143,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Linear Client Secret"
|
description = "Linear Client Secret"
|
||||||
id = "linear-client-secret"
|
id = "linear-client-secret"
|
||||||
regex = '''(?i)(?:linear)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:linear)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"linear",
|
"linear",
|
||||||
@@ -2087,7 +2152,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "LinkedIn Client ID"
|
description = "LinkedIn Client ID"
|
||||||
id = "linkedin-client-id"
|
id = "linkedin-client-id"
|
||||||
regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"linkedin","linked-in",
|
"linkedin","linked-in",
|
||||||
@@ -2096,7 +2161,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "LinkedIn Client secret"
|
description = "LinkedIn Client secret"
|
||||||
id = "linkedin-client-secret"
|
id = "linkedin-client-secret"
|
||||||
regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"linkedin","linked-in",
|
"linkedin","linked-in",
|
||||||
@@ -2105,7 +2170,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Lob API Key"
|
description = "Lob API Key"
|
||||||
id = "lob-api-key"
|
id = "lob-api-key"
|
||||||
regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}((live|test)_[a-f0-9]{35})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}((live|test)_[a-f0-9]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"test_","live_",
|
"test_","live_",
|
||||||
@@ -2114,7 +2179,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Lob Publishable API Key"
|
description = "Lob Publishable API Key"
|
||||||
id = "lob-pub-api-key"
|
id = "lob-pub-api-key"
|
||||||
regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}((test|live)_pub_[a-f0-9]{31})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}((test|live)_pub_[a-f0-9]{31})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"test_pub","live_pub","_pub",
|
"test_pub","live_pub","_pub",
|
||||||
@@ -2123,7 +2188,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Mailchimp API key"
|
description = "Mailchimp API key"
|
||||||
id = "mailchimp-api-key"
|
id = "mailchimp-api-key"
|
||||||
regex = '''(?i)(?:mailchimp)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32}-us20)(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:mailchimp)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32}-us20)(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"mailchimp",
|
"mailchimp",
|
||||||
@@ -2132,7 +2197,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Mailgun private API token"
|
description = "Mailgun private API token"
|
||||||
id = "mailgun-private-api-token"
|
id = "mailgun-private-api-token"
|
||||||
regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(key-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(key-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"mailgun",
|
"mailgun",
|
||||||
@@ -2141,7 +2206,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Mailgun public validation key"
|
description = "Mailgun public validation key"
|
||||||
id = "mailgun-pub-key"
|
id = "mailgun-pub-key"
|
||||||
regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(pubkey-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(pubkey-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"mailgun",
|
"mailgun",
|
||||||
@@ -2150,7 +2215,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Mailgun webhook signing key"
|
description = "Mailgun webhook signing key"
|
||||||
id = "mailgun-signing-key"
|
id = "mailgun-signing-key"
|
||||||
regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"mailgun",
|
"mailgun",
|
||||||
@@ -2159,7 +2224,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "MapBox API token"
|
description = "MapBox API token"
|
||||||
id = "mapbox-api-token"
|
id = "mapbox-api-token"
|
||||||
regex = '''(?i)(?:mapbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(pk\.[a-z0-9]{60}\.[a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:mapbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(pk\.[a-z0-9]{60}\.[a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"mapbox",
|
"mapbox",
|
||||||
@@ -2168,7 +2233,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Mattermost Access Token"
|
description = "Mattermost Access Token"
|
||||||
id = "mattermost-access-token"
|
id = "mattermost-access-token"
|
||||||
regex = '''(?i)(?:mattermost)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{26})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:mattermost)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{26})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"mattermost",
|
"mattermost",
|
||||||
@@ -2177,7 +2242,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "MessageBird API token"
|
description = "MessageBird API token"
|
||||||
id = "messagebird-api-token"
|
id = "messagebird-api-token"
|
||||||
regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"messagebird","message-bird","message_bird",
|
"messagebird","message-bird","message_bird",
|
||||||
@@ -2186,16 +2251,24 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "MessageBird client ID"
|
description = "MessageBird client ID"
|
||||||
id = "messagebird-client-id"
|
id = "messagebird-client-id"
|
||||||
regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"messagebird","message-bird","message_bird",
|
"messagebird","message-bird","message_bird",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Microsoft Teams Webhook"
|
||||||
|
id = "microsoft-teams-webhook"
|
||||||
|
regex = '''https:\/\/[a-z0-9]+\.webhook\.office\.com\/webhookb2\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\/IncomingWebhook\/[a-z0-9]{32}\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}'''
|
||||||
|
keywords = [
|
||||||
|
"webhook.office.com","webhookb2","incomingwebhook",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Netlify Access Token"
|
description = "Netlify Access Token"
|
||||||
id = "netlify-access-token"
|
id = "netlify-access-token"
|
||||||
regex = '''(?i)(?:netlify)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40,46})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:netlify)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40,46})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"netlify",
|
"netlify",
|
||||||
@@ -2204,7 +2277,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "New Relic ingest browser API token"
|
description = "New Relic ingest browser API token"
|
||||||
id = "new-relic-browser-api-token"
|
id = "new-relic-browser-api-token"
|
||||||
regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(NRJS-[a-f0-9]{19})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(NRJS-[a-f0-9]{19})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"nrjs-",
|
"nrjs-",
|
||||||
@@ -2213,7 +2286,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "New Relic user API ID"
|
description = "New Relic user API ID"
|
||||||
id = "new-relic-user-api-id"
|
id = "new-relic-user-api-id"
|
||||||
regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"new-relic","newrelic","new_relic",
|
"new-relic","newrelic","new_relic",
|
||||||
@@ -2222,7 +2295,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "New Relic user API Key"
|
description = "New Relic user API Key"
|
||||||
id = "new-relic-user-api-key"
|
id = "new-relic-user-api-key"
|
||||||
regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(NRAK-[a-z0-9]{27})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(NRAK-[a-z0-9]{27})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"nrak",
|
"nrak",
|
||||||
@@ -2231,7 +2304,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "npm access token"
|
description = "npm access token"
|
||||||
id = "npm-access-token"
|
id = "npm-access-token"
|
||||||
regex = '''(?i)\b(npm_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(npm_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"npm_",
|
"npm_",
|
||||||
@@ -2240,7 +2313,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Nytimes Access Token"
|
description = "Nytimes Access Token"
|
||||||
id = "nytimes-access-token"
|
id = "nytimes-access-token"
|
||||||
regex = '''(?i)(?:nytimes|new-york-times,|newyorktimes)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:nytimes|new-york-times,|newyorktimes)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"nytimes","new-york-times","newyorktimes",
|
"nytimes","new-york-times","newyorktimes",
|
||||||
@@ -2249,7 +2322,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Okta Access Token"
|
description = "Okta Access Token"
|
||||||
id = "okta-access-token"
|
id = "okta-access-token"
|
||||||
regex = '''(?i)(?:okta)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{42})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:okta)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{42})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"okta",
|
"okta",
|
||||||
@@ -2258,7 +2331,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Plaid API Token"
|
description = "Plaid API Token"
|
||||||
id = "plaid-api-token"
|
id = "plaid-api-token"
|
||||||
regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"plaid",
|
"plaid",
|
||||||
@@ -2267,7 +2340,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Plaid Client ID"
|
description = "Plaid Client ID"
|
||||||
id = "plaid-client-id"
|
id = "plaid-client-id"
|
||||||
regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"plaid",
|
"plaid",
|
||||||
@@ -2276,7 +2349,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Plaid Secret key"
|
description = "Plaid Secret key"
|
||||||
id = "plaid-secret-key"
|
id = "plaid-secret-key"
|
||||||
regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"plaid",
|
"plaid",
|
||||||
@@ -2285,7 +2358,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "PlanetScale API token"
|
description = "PlanetScale API token"
|
||||||
id = "planetscale-api-token"
|
id = "planetscale-api-token"
|
||||||
regex = '''(?i)\b(pscale_tkn_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(pscale_tkn_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"pscale_tkn_",
|
"pscale_tkn_",
|
||||||
@@ -2294,7 +2367,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "PlanetScale OAuth token"
|
description = "PlanetScale OAuth token"
|
||||||
id = "planetscale-oauth-token"
|
id = "planetscale-oauth-token"
|
||||||
regex = '''(?i)\b(pscale_oauth_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(pscale_oauth_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"pscale_oauth_",
|
"pscale_oauth_",
|
||||||
@@ -2303,7 +2376,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "PlanetScale password"
|
description = "PlanetScale password"
|
||||||
id = "planetscale-password"
|
id = "planetscale-password"
|
||||||
regex = '''(?i)\b(pscale_pw_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(pscale_pw_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"pscale_pw_",
|
"pscale_pw_",
|
||||||
@@ -2312,16 +2385,25 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Postman API token"
|
description = "Postman API token"
|
||||||
id = "postman-api-token"
|
id = "postman-api-token"
|
||||||
regex = '''(?i)\b(PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"pmak-",
|
"pmak-",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Prefect API token"
|
||||||
|
id = "prefect-api-token"
|
||||||
|
regex = '''(?i)\b(pnu_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"pnu_",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Private Key"
|
description = "Private Key"
|
||||||
id = "private-key"
|
id = "private-key"
|
||||||
regex = '''(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY-----[\s\S-]*KEY----'''
|
regex = '''(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY----'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"-----begin",
|
"-----begin",
|
||||||
]
|
]
|
||||||
@@ -2329,7 +2411,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Pulumi API token"
|
description = "Pulumi API token"
|
||||||
id = "pulumi-api-token"
|
id = "pulumi-api-token"
|
||||||
regex = '''(?i)\b(pul-[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(pul-[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"pul-",
|
"pul-",
|
||||||
@@ -2346,16 +2428,25 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "RapidAPI Access Token"
|
description = "RapidAPI Access Token"
|
||||||
id = "rapidapi-access-token"
|
id = "rapidapi-access-token"
|
||||||
regex = '''(?i)(?:rapidapi)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{50})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:rapidapi)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"rapidapi",
|
"rapidapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Readme API token"
|
||||||
|
id = "readme-api-token"
|
||||||
|
regex = '''(?i)\b(rdme_[a-z0-9]{70})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"rdme_",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Rubygem API token"
|
description = "Rubygem API token"
|
||||||
id = "rubygems-api-token"
|
id = "rubygems-api-token"
|
||||||
regex = '''(?i)\b(rubygems_[a-f0-9]{48})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(rubygems_[a-f0-9]{48})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"rubygems_",
|
"rubygems_",
|
||||||
@@ -2364,7 +2455,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Sendbird Access ID"
|
description = "Sendbird Access ID"
|
||||||
id = "sendbird-access-id"
|
id = "sendbird-access-id"
|
||||||
regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"sendbird",
|
"sendbird",
|
||||||
@@ -2373,7 +2464,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Sendbird Access Token"
|
description = "Sendbird Access Token"
|
||||||
id = "sendbird-access-token"
|
id = "sendbird-access-token"
|
||||||
regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"sendbird",
|
"sendbird",
|
||||||
@@ -2382,7 +2473,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "SendGrid API token"
|
description = "SendGrid API token"
|
||||||
id = "sendgrid-api-token"
|
id = "sendgrid-api-token"
|
||||||
regex = '''(?i)\b(SG\.(?i)[a-z0-9=_\-\.]{66})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(SG\.(?i)[a-z0-9=_\-\.]{66})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"sg.",
|
"sg.",
|
||||||
@@ -2391,7 +2482,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Sendinblue API token"
|
description = "Sendinblue API token"
|
||||||
id = "sendinblue-api-token"
|
id = "sendinblue-api-token"
|
||||||
regex = '''(?i)\b(xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"xkeysib-",
|
"xkeysib-",
|
||||||
@@ -2400,7 +2491,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Sentry Access Token"
|
description = "Sentry Access Token"
|
||||||
id = "sentry-access-token"
|
id = "sentry-access-token"
|
||||||
regex = '''(?i)(?:sentry)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:sentry)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"sentry",
|
"sentry",
|
||||||
@@ -2409,7 +2500,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Shippo API token"
|
description = "Shippo API token"
|
||||||
id = "shippo-api-token"
|
id = "shippo-api-token"
|
||||||
regex = '''(?i)\b(shippo_(live|test)_[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(shippo_(live|test)_[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"shippo_",
|
"shippo_",
|
||||||
@@ -2447,6 +2538,24 @@ keywords = [
|
|||||||
"shpss_",
|
"shpss_",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Sidekiq Secret"
|
||||||
|
id = "sidekiq-secret"
|
||||||
|
regex = '''(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"bundle_enterprise__contribsys__com","bundle_gems__contribsys__com",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Sidekiq Sensitive URL"
|
||||||
|
id = "sidekiq-sensitive-url"
|
||||||
|
regex = '''(?i)\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)'''
|
||||||
|
secretGroup = 2
|
||||||
|
keywords = [
|
||||||
|
"gems.contribsys.com","enterprise.contribsys.com",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Slack token"
|
description = "Slack token"
|
||||||
id = "slack-access-token"
|
id = "slack-access-token"
|
||||||
@@ -2458,7 +2567,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Slack Webhook"
|
description = "Slack Webhook"
|
||||||
id = "slack-web-hook"
|
id = "slack-web-hook"
|
||||||
regex = '''https:\/\/hooks.slack.com\/services\/[A-Za-z0-9+\/]{44,46}'''
|
regex = '''https:\/\/hooks.slack.com\/(services|workflows)\/[A-Za-z0-9+\/]{44,46}'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"hooks.slack.com",
|
"hooks.slack.com",
|
||||||
]
|
]
|
||||||
@@ -2466,15 +2575,15 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Square Access Token"
|
description = "Square Access Token"
|
||||||
id = "square-access-token"
|
id = "square-access-token"
|
||||||
regex = '''(?i)\b(sq0atp-[0-9A-Za-z\-_]{22})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)\b(sq0atp-[0-9A-Za-z\-_]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = [
|
keywords = [
|
||||||
|
"sq0atp-",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Squarespace Access Token"
|
description = "Squarespace Access Token"
|
||||||
id = "squarespace-access-token"
|
id = "squarespace-access-token"
|
||||||
regex = '''(?i)(?:squarespace)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:squarespace)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"squarespace",
|
"squarespace",
|
||||||
@@ -2491,7 +2600,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "SumoLogic Access ID"
|
description = "SumoLogic Access ID"
|
||||||
id = "sumologic-access-id"
|
id = "sumologic-access-id"
|
||||||
regex = '''(?i)(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"sumo",
|
"sumo",
|
||||||
@@ -2500,16 +2609,25 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "SumoLogic Access Token"
|
description = "SumoLogic Access Token"
|
||||||
id = "sumologic-access-token"
|
id = "sumologic-access-token"
|
||||||
regex = '''(?i)(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"sumo",
|
"sumo",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Telegram Bot API Token"
|
||||||
|
id = "telegram-bot-api-token"
|
||||||
|
regex = '''(?i)(?:^|[^0-9])([0-9]{5,16}:A[a-zA-Z0-9_\-]{34})(?:$|[^a-zA-Z0-9_\-])'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"telegram","api","bot","token","url",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Travis CI Access Token"
|
description = "Travis CI Access Token"
|
||||||
id = "travisci-access-token"
|
id = "travisci-access-token"
|
||||||
regex = '''(?i)(?:travis)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:travis)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"travis",
|
"travis",
|
||||||
@@ -2526,7 +2644,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitch API token"
|
description = "Twitch API token"
|
||||||
id = "twitch-api-token"
|
id = "twitch-api-token"
|
||||||
regex = '''(?i)(?:twitch)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:twitch)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"twitch",
|
"twitch",
|
||||||
@@ -2535,7 +2653,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitter Access Secret"
|
description = "Twitter Access Secret"
|
||||||
id = "twitter-access-secret"
|
id = "twitter-access-secret"
|
||||||
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{45})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{45})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"twitter",
|
"twitter",
|
||||||
@@ -2544,7 +2662,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitter Access Token"
|
description = "Twitter Access Token"
|
||||||
id = "twitter-access-token"
|
id = "twitter-access-token"
|
||||||
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"twitter",
|
"twitter",
|
||||||
@@ -2553,7 +2671,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitter API Key"
|
description = "Twitter API Key"
|
||||||
id = "twitter-api-key"
|
id = "twitter-api-key"
|
||||||
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"twitter",
|
"twitter",
|
||||||
@@ -2562,7 +2680,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitter API Secret"
|
description = "Twitter API Secret"
|
||||||
id = "twitter-api-secret"
|
id = "twitter-api-secret"
|
||||||
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{50})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"twitter",
|
"twitter",
|
||||||
@@ -2571,7 +2689,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitter Bearer Token"
|
description = "Twitter Bearer Token"
|
||||||
id = "twitter-bearer-token"
|
id = "twitter-bearer-token"
|
||||||
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"twitter",
|
"twitter",
|
||||||
@@ -2580,16 +2698,32 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Typeform API token"
|
description = "Typeform API token"
|
||||||
id = "typeform-api-token"
|
id = "typeform-api-token"
|
||||||
regex = '''(?i)(?:typeform)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(tfp_[a-z0-9\-_\.=]{59})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:typeform)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(tfp_[a-z0-9\-_\.=]{59})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"tfp_",
|
"tfp_",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Vault Batch Token"
|
||||||
|
id = "vault-batch-token"
|
||||||
|
regex = '''(?i)\b(hvb\.[a-z0-9_-]{138,212})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
keywords = [
|
||||||
|
"hvb",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Vault Service Token"
|
||||||
|
id = "vault-service-token"
|
||||||
|
regex = '''(?i)\b(hvs\.[a-z0-9_-]{90,100})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
keywords = [
|
||||||
|
"hvs",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Yandex Access Token"
|
description = "Yandex Access Token"
|
||||||
id = "yandex-access-token"
|
id = "yandex-access-token"
|
||||||
regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"yandex",
|
"yandex",
|
||||||
@@ -2598,7 +2732,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Yandex API Key"
|
description = "Yandex API Key"
|
||||||
id = "yandex-api-key"
|
id = "yandex-api-key"
|
||||||
regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(AQVN[A-Za-z0-9_\-]{35,38})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(AQVN[A-Za-z0-9_\-]{35,38})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"yandex",
|
"yandex",
|
||||||
@@ -2607,7 +2741,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Yandex AWS Access Token"
|
description = "Yandex AWS Access Token"
|
||||||
id = "yandex-aws-access-token"
|
id = "yandex-aws-access-token"
|
||||||
regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(YC[a-zA-Z0-9_\-]{38})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(YC[a-zA-Z0-9_\-]{38})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"yandex",
|
"yandex",
|
||||||
@@ -2616,7 +2750,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Zendesk Secret Key"
|
description = "Zendesk Secret Key"
|
||||||
id = "zendesk-secret-key"
|
id = "zendesk-secret-key"
|
||||||
regex = '''(?i)(?:zendesk)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60]|$)'''
|
regex = '''(?i)(?:zendesk)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
secretGroup = 1
|
secretGroup = 1
|
||||||
keywords = [
|
keywords = [
|
||||||
"zendesk",
|
"zendesk",
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package detect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/report"
|
||||||
|
)
|
||||||
|
|
||||||
|
func IsNew(finding report.Finding, baseline []report.Finding) bool {
|
||||||
|
// Explicitly testing each property as it gives significantly better performance in comparison to cmp.Equal(). Drawback is that
|
||||||
|
// the code requires maintanance if/when the Finding struct changes
|
||||||
|
for _, b := range baseline {
|
||||||
|
|
||||||
|
if finding.Author == b.Author &&
|
||||||
|
finding.Commit == b.Commit &&
|
||||||
|
finding.Date == b.Date &&
|
||||||
|
finding.Description == b.Description &&
|
||||||
|
finding.Email == b.Email &&
|
||||||
|
finding.EndColumn == b.EndColumn &&
|
||||||
|
finding.EndLine == b.EndLine &&
|
||||||
|
finding.Entropy == b.Entropy &&
|
||||||
|
finding.File == b.File &&
|
||||||
|
// Omit checking finding.Fingerprint - if the format of the fingerprint changes, the users will see unexpected behaviour
|
||||||
|
finding.Match == b.Match &&
|
||||||
|
finding.Message == b.Message &&
|
||||||
|
finding.RuleID == b.RuleID &&
|
||||||
|
finding.Secret == b.Secret &&
|
||||||
|
finding.StartColumn == b.StartColumn &&
|
||||||
|
finding.StartLine == b.StartLine {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func LoadBaseline(baselinePath string) ([]report.Finding, error) {
|
||||||
|
var previousFindings []report.Finding
|
||||||
|
jsonFile, err := os.Open(baselinePath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("could not open %s", baselinePath)
|
||||||
|
}
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
if cerr := jsonFile.Close(); cerr != nil {
|
||||||
|
log.Warn().Err(cerr).Msg("problem closing jsonFile handle")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
bytes, err := io.ReadAll(jsonFile)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("could not read data from the file %s", baselinePath)
|
||||||
|
}
|
||||||
|
|
||||||
|
err = json.Unmarshal(bytes, &previousFindings)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("the format of the file %s is not supported", baselinePath)
|
||||||
|
}
|
||||||
|
|
||||||
|
return previousFindings, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
package detect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/report"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestIsNew(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
findings report.Finding
|
||||||
|
baseline []report.Finding
|
||||||
|
expect bool
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
findings: report.Finding{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "0000",
|
||||||
|
},
|
||||||
|
baseline: []report.Finding{
|
||||||
|
{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "0000",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
expect: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
findings: report.Finding{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "0000",
|
||||||
|
},
|
||||||
|
baseline: []report.Finding{
|
||||||
|
{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "0002",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
expect: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
findings: report.Finding{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "0000",
|
||||||
|
Tags: []string{"a", "b"},
|
||||||
|
},
|
||||||
|
baseline: []report.Finding{
|
||||||
|
{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "0000",
|
||||||
|
Tags: []string{"a", "c"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
expect: false, // Updated tags doesn't make it a new finding
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, test := range tests {
|
||||||
|
assert.Equal(t, test.expect, IsNew(test.findings, test.baseline))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestFileLoadBaseline(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
Filename string
|
||||||
|
ExpectedError error
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
Filename: "../testdata/baseline/baseline.csv",
|
||||||
|
ExpectedError: errors.New("the format of the file ../testdata/baseline/baseline.csv is not supported"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Filename: "../testdata/baseline/baseline.sarif",
|
||||||
|
ExpectedError: errors.New("the format of the file ../testdata/baseline/baseline.sarif is not supported"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Filename: "../testdata/baseline/notfound.json",
|
||||||
|
ExpectedError: errors.New("could not open ../testdata/baseline/notfound.json"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, test := range tests {
|
||||||
|
_, err := LoadBaseline(test.Filename)
|
||||||
|
assert.Equal(t, test.ExpectedError.Error(), err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestIgnoreIssuesInBaseline(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
findings []report.Finding
|
||||||
|
baseline []report.Finding
|
||||||
|
expectCount int
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
findings: []report.Finding{
|
||||||
|
{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "5",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
baseline: []report.Finding{
|
||||||
|
{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "5",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
expectCount: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
findings: []report.Finding{
|
||||||
|
{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "5",
|
||||||
|
Fingerprint: "a",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
baseline: []report.Finding{
|
||||||
|
{
|
||||||
|
Author: "a",
|
||||||
|
Commit: "5",
|
||||||
|
Fingerprint: "b",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
expectCount: 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, test := range tests {
|
||||||
|
d, _ := NewDetectorDefaultConfig()
|
||||||
|
d.baseline = test.baseline
|
||||||
|
for _, finding := range test.findings {
|
||||||
|
d.addFinding(finding)
|
||||||
|
}
|
||||||
|
assert.Equal(t, test.expectCount, len(d.findings))
|
||||||
|
}
|
||||||
|
}
|
||||||
+158
-13
@@ -1,21 +1,24 @@
|
|||||||
package detect
|
package detect
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"io/fs"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/h2non/filetype"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
"github.com/zricethezav/gitleaks/v8/detect/git"
|
"github.com/zricethezav/gitleaks/v8/detect/git"
|
||||||
"github.com/zricethezav/gitleaks/v8/report"
|
"github.com/zricethezav/gitleaks/v8/report"
|
||||||
|
|
||||||
"github.com/fatih/semgroup"
|
"github.com/fatih/semgroup"
|
||||||
"github.com/gitleaks/go-gitdiff/gitdiff"
|
"github.com/gitleaks/go-gitdiff/gitdiff"
|
||||||
"github.com/h2non/filetype"
|
|
||||||
ahocorasick "github.com/petar-dambovaliev/aho-corasick"
|
ahocorasick "github.com/petar-dambovaliev/aho-corasick"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
@@ -48,6 +51,12 @@ type Detector struct {
|
|||||||
// verbose is a flag to print findings
|
// verbose is a flag to print findings
|
||||||
Verbose bool
|
Verbose bool
|
||||||
|
|
||||||
|
// files larger than this will be skipped
|
||||||
|
MaxTargetMegaBytes int
|
||||||
|
|
||||||
|
// followSymlinks is a flag to enable scanning symlink files
|
||||||
|
FollowSymlinks bool
|
||||||
|
|
||||||
// commitMap is used to keep track of commits that have been scanned.
|
// commitMap is used to keep track of commits that have been scanned.
|
||||||
// This is only used for logging purposes and git scans.
|
// This is only used for logging purposes and git scans.
|
||||||
commitMap map[string]bool
|
commitMap map[string]bool
|
||||||
@@ -64,6 +73,15 @@ type Detector struct {
|
|||||||
// prefilter is a ahocorasick struct used for doing efficient string
|
// prefilter is a ahocorasick struct used for doing efficient string
|
||||||
// matching given a set of words (keywords from the rules in the config)
|
// matching given a set of words (keywords from the rules in the config)
|
||||||
prefilter ahocorasick.AhoCorasick
|
prefilter ahocorasick.AhoCorasick
|
||||||
|
|
||||||
|
// a list of known findings that should be ignored
|
||||||
|
baseline []report.Finding
|
||||||
|
|
||||||
|
// path to baseline
|
||||||
|
baselinePath string
|
||||||
|
|
||||||
|
// gitleaksIgnore
|
||||||
|
gitleaksIgnore map[string]bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fragment contains the data to be scanned
|
// Fragment contains the data to be scanned
|
||||||
@@ -72,7 +90,8 @@ type Fragment struct {
|
|||||||
Raw string
|
Raw string
|
||||||
|
|
||||||
// FilePath is the path to the file if applicable
|
// FilePath is the path to the file if applicable
|
||||||
FilePath string
|
FilePath string
|
||||||
|
SymlinkFile string
|
||||||
|
|
||||||
// CommitSHA is the SHA of the commit if applicable
|
// CommitSHA is the SHA of the commit if applicable
|
||||||
CommitSHA string
|
CommitSHA string
|
||||||
@@ -96,11 +115,12 @@ func NewDetector(cfg config.Config) *Detector {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return &Detector{
|
return &Detector{
|
||||||
commitMap: make(map[string]bool),
|
commitMap: make(map[string]bool),
|
||||||
findingMutex: &sync.Mutex{},
|
gitleaksIgnore: make(map[string]bool),
|
||||||
findings: make([]report.Finding, 0),
|
findingMutex: &sync.Mutex{},
|
||||||
Config: cfg,
|
findings: make([]report.Finding, 0),
|
||||||
prefilter: builder.Build(cfg.Keywords),
|
Config: cfg,
|
||||||
|
prefilter: builder.Build(cfg.Keywords),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,6 +143,35 @@ func NewDetectorDefaultConfig() (*Detector, error) {
|
|||||||
return NewDetector(cfg), nil
|
return NewDetector(cfg), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *Detector) AddGitleaksIgnore(gitleaksIgnorePath string) error {
|
||||||
|
log.Debug().Msg("found .gitleaksignore file")
|
||||||
|
file, err := os.Open(gitleaksIgnorePath)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
defer file.Close()
|
||||||
|
scanner := bufio.NewScanner(file)
|
||||||
|
|
||||||
|
for scanner.Scan() {
|
||||||
|
d.gitleaksIgnore[scanner.Text()] = true
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d *Detector) AddBaseline(baselinePath string) error {
|
||||||
|
if baselinePath != "" {
|
||||||
|
baseline, err := LoadBaseline(baselinePath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
d.baseline = baseline
|
||||||
|
}
|
||||||
|
d.baselinePath = baselinePath
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// DetectBytes scans the given bytes and returns a list of findings
|
// DetectBytes scans the given bytes and returns a list of findings
|
||||||
func (d *Detector) DetectBytes(content []byte) []report.Finding {
|
func (d *Detector) DetectBytes(content []byte) []report.Finding {
|
||||||
return d.DetectString(string(content))
|
return d.DetectString(string(content))
|
||||||
@@ -151,6 +200,7 @@ func (d *Detector) detectRule(fragment Fragment, rule config.Rule) []report.Find
|
|||||||
finding := report.Finding{
|
finding := report.Finding{
|
||||||
Description: rule.Description,
|
Description: rule.Description,
|
||||||
File: fragment.FilePath,
|
File: fragment.FilePath,
|
||||||
|
SymlinkFile: fragment.SymlinkFile,
|
||||||
RuleID: rule.RuleID,
|
RuleID: rule.RuleID,
|
||||||
Match: fmt.Sprintf("file detected: %s", fragment.FilePath),
|
Match: fmt.Sprintf("file detected: %s", fragment.FilePath),
|
||||||
Tags: rule.Tags,
|
Tags: rule.Tags,
|
||||||
@@ -171,6 +221,15 @@ func (d *Detector) detectRule(fragment Fragment, rule config.Rule) []report.Find
|
|||||||
return findings
|
return findings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If flag configure and raw data size bigger then the flag
|
||||||
|
if d.MaxTargetMegaBytes > 0 {
|
||||||
|
rawLength := len(fragment.Raw) / 1000000
|
||||||
|
if rawLength > d.MaxTargetMegaBytes {
|
||||||
|
log.Debug().Msgf("skipping file: %s scan due to size: %d", fragment.FilePath, rawLength)
|
||||||
|
return findings
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
matchIndices := rule.Regex.FindAllStringIndex(fragment.Raw, -1)
|
matchIndices := rule.Regex.FindAllStringIndex(fragment.Raw, -1)
|
||||||
for _, matchIndex := range matchIndices {
|
for _, matchIndex := range matchIndices {
|
||||||
// extract secret from match
|
// extract secret from match
|
||||||
@@ -182,9 +241,14 @@ func (d *Detector) detectRule(fragment Fragment, rule config.Rule) []report.Find
|
|||||||
// value is set for this rule
|
// value is set for this rule
|
||||||
loc := location(fragment, matchIndex)
|
loc := location(fragment, matchIndex)
|
||||||
|
|
||||||
|
if matchIndex[1] > loc.endLineIndex {
|
||||||
|
loc.endLineIndex = matchIndex[1]
|
||||||
|
}
|
||||||
|
|
||||||
finding := report.Finding{
|
finding := report.Finding{
|
||||||
Description: rule.Description,
|
Description: rule.Description,
|
||||||
File: fragment.FilePath,
|
File: fragment.FilePath,
|
||||||
|
SymlinkFile: fragment.SymlinkFile,
|
||||||
RuleID: rule.RuleID,
|
RuleID: rule.RuleID,
|
||||||
StartLine: loc.startLine,
|
StartLine: loc.startLine,
|
||||||
EndLine: loc.endLine,
|
EndLine: loc.endLine,
|
||||||
@@ -193,6 +257,7 @@ func (d *Detector) detectRule(fragment Fragment, rule config.Rule) []report.Find
|
|||||||
Secret: secret,
|
Secret: secret,
|
||||||
Match: secret,
|
Match: secret,
|
||||||
Tags: rule.Tags,
|
Tags: rule.Tags,
|
||||||
|
Line: fragment.Raw[loc.startLineIndex:loc.endLineIndex],
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(fragment.Raw[loc.startLineIndex:loc.endLineIndex],
|
if strings.Contains(fragment.Raw[loc.startLineIndex:loc.endLineIndex],
|
||||||
@@ -319,15 +384,24 @@ func (d *Detector) DetectGit(source string, logOpts string, gitScanType GitScanT
|
|||||||
if err := s.Wait(); err != nil {
|
if err := s.Wait(); err != nil {
|
||||||
return d.findings, err
|
return d.findings, err
|
||||||
}
|
}
|
||||||
log.Debug().Msgf("%d commits scanned. Note: this number might be smaller than expected due to commits with no additions", len(d.commitMap))
|
log.Info().Msgf("%d commits scanned.", len(d.commitMap))
|
||||||
|
log.Debug().Msg("Note: this number might be smaller than expected due to commits with no additions")
|
||||||
|
if git.ErrEncountered {
|
||||||
|
return d.findings, fmt.Errorf("%s", "git error encountered, see logs")
|
||||||
|
}
|
||||||
return d.findings, nil
|
return d.findings, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type scanTarget struct {
|
||||||
|
Path string
|
||||||
|
Symlink string
|
||||||
|
}
|
||||||
|
|
||||||
// DetectFiles accepts a path to a source directory or file and begins a scan of the
|
// DetectFiles accepts a path to a source directory or file and begins a scan of the
|
||||||
// file or directory.
|
// file or directory.
|
||||||
func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
||||||
s := semgroup.NewGroup(context.Background(), 4)
|
s := semgroup.NewGroup(context.Background(), 4)
|
||||||
paths := make(chan string)
|
paths := make(chan scanTarget)
|
||||||
s.Go(func() error {
|
s.Go(func() error {
|
||||||
defer close(paths)
|
defer close(paths)
|
||||||
return filepath.Walk(source,
|
return filepath.Walk(source,
|
||||||
@@ -338,8 +412,29 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
|||||||
if fInfo.Name() == ".git" && fInfo.IsDir() {
|
if fInfo.Name() == ".git" && fInfo.IsDir() {
|
||||||
return filepath.SkipDir
|
return filepath.SkipDir
|
||||||
}
|
}
|
||||||
|
if fInfo.Size() == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if fInfo.Mode().IsRegular() {
|
if fInfo.Mode().IsRegular() {
|
||||||
paths <- path
|
paths <- scanTarget{
|
||||||
|
Path: path,
|
||||||
|
Symlink: "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if fInfo.Mode().Type() == fs.ModeSymlink && d.FollowSymlinks {
|
||||||
|
realPath, err := filepath.EvalSymlinks(path)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
realPathFileInfo, _ := os.Stat(realPath)
|
||||||
|
if realPathFileInfo.IsDir() {
|
||||||
|
log.Debug().Msgf("found symlinked directory: %s -> %s [skipping]", path, realPath)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
paths <- scanTarget{
|
||||||
|
Path: realPath,
|
||||||
|
Symlink: path,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
@@ -347,7 +442,7 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
|||||||
for pa := range paths {
|
for pa := range paths {
|
||||||
p := pa
|
p := pa
|
||||||
s.Go(func() error {
|
s.Go(func() error {
|
||||||
b, err := os.ReadFile(p)
|
b, err := os.ReadFile(p.Path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -362,7 +457,10 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
|||||||
|
|
||||||
fragment := Fragment{
|
fragment := Fragment{
|
||||||
Raw: string(b),
|
Raw: string(b),
|
||||||
FilePath: p,
|
FilePath: p.Path,
|
||||||
|
}
|
||||||
|
if p.Symlink != "" {
|
||||||
|
fragment.SymlinkFile = p.Symlink
|
||||||
}
|
}
|
||||||
for _, finding := range d.Detect(fragment) {
|
for _, finding := range d.Detect(fragment) {
|
||||||
// need to add 1 since line counting starts at 1
|
// need to add 1 since line counting starts at 1
|
||||||
@@ -382,6 +480,36 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
|||||||
return d.findings, nil
|
return d.findings, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DetectReader accepts an io.Reader and a buffer size for the reader in KB
|
||||||
|
func (d *Detector) DetectReader(r io.Reader, bufSize int) ([]report.Finding, error) {
|
||||||
|
reader := bufio.NewReader(r)
|
||||||
|
buf := make([]byte, 0, 1000*bufSize)
|
||||||
|
findings := []report.Finding{}
|
||||||
|
|
||||||
|
for {
|
||||||
|
n, err := reader.Read(buf[:cap(buf)])
|
||||||
|
buf = buf[:n]
|
||||||
|
if err != nil {
|
||||||
|
if err != io.EOF {
|
||||||
|
return findings, err
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment := Fragment{
|
||||||
|
Raw: string(buf),
|
||||||
|
}
|
||||||
|
for _, finding := range d.Detect(fragment) {
|
||||||
|
findings = append(findings, finding)
|
||||||
|
if d.Verbose {
|
||||||
|
printFinding(finding)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return findings, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Detect scans the given fragment and returns a list of findings
|
// Detect scans the given fragment and returns a list of findings
|
||||||
func (d *Detector) Detect(fragment Fragment) []report.Finding {
|
func (d *Detector) Detect(fragment Fragment) []report.Finding {
|
||||||
var findings []report.Finding
|
var findings []report.Finding
|
||||||
@@ -391,7 +519,7 @@ func (d *Detector) Detect(fragment Fragment) []report.Finding {
|
|||||||
|
|
||||||
// check if filepath is allowed
|
// check if filepath is allowed
|
||||||
if fragment.FilePath != "" && (d.Config.Allowlist.PathAllowed(fragment.FilePath) ||
|
if fragment.FilePath != "" && (d.Config.Allowlist.PathAllowed(fragment.FilePath) ||
|
||||||
fragment.FilePath == d.Config.Path) {
|
fragment.FilePath == d.Config.Path || (d.baselinePath != "" && fragment.FilePath == d.baselinePath)) {
|
||||||
return findings
|
return findings
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,6 +556,23 @@ func (d *Detector) Detect(fragment Fragment) []report.Finding {
|
|||||||
|
|
||||||
// addFinding synchronously adds a finding to the findings slice
|
// addFinding synchronously adds a finding to the findings slice
|
||||||
func (d *Detector) addFinding(finding report.Finding) {
|
func (d *Detector) addFinding(finding report.Finding) {
|
||||||
|
if finding.Commit == "" {
|
||||||
|
finding.Fingerprint = fmt.Sprintf("%s:%s:%d", finding.File, finding.RuleID, finding.StartLine)
|
||||||
|
} else {
|
||||||
|
finding.Fingerprint = fmt.Sprintf("%s:%s:%s:%d", finding.Commit, finding.File, finding.RuleID, finding.StartLine)
|
||||||
|
}
|
||||||
|
// check if we should ignore this finding
|
||||||
|
if _, ok := d.gitleaksIgnore[finding.Fingerprint]; ok {
|
||||||
|
log.Debug().Msgf("ignoring finding with Fingerprint %s",
|
||||||
|
finding.Fingerprint)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if d.baseline != nil && !IsNew(finding, d.baseline) {
|
||||||
|
log.Debug().Msgf("baseline duplicate -- ignoring finding with Fingerprint %s", finding.Fingerprint)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
d.findingMutex.Lock()
|
d.findingMutex.Lock()
|
||||||
d.findings = append(d.findings, finding)
|
d.findings = append(d.findings, finding)
|
||||||
if d.Verbose {
|
if d.Verbose {
|
||||||
|
|||||||
+144
-4
@@ -36,10 +36,9 @@ func TestDetect(t *testing.T) {
|
|||||||
fragment: Fragment{
|
fragment: Fragment{
|
||||||
Raw: `awsToken := \
|
Raw: `awsToken := \
|
||||||
|
|
||||||
\"AKIALALEMEL33243OKIA\ // gitleaks:allow"
|
\"AKIALALEMEL33243OKIA\ // gitleaks:allow"
|
||||||
|
|
||||||
|
`,
|
||||||
`,
|
|
||||||
FilePath: "tmp.go",
|
FilePath: "tmp.go",
|
||||||
},
|
},
|
||||||
expectedFindings: []report.Finding{},
|
expectedFindings: []report.Finding{},
|
||||||
@@ -60,6 +59,7 @@ func TestDetect(t *testing.T) {
|
|||||||
Secret: "AKIALALEMEL33243OKIA",
|
Secret: "AKIALALEMEL33243OKIA",
|
||||||
Match: "AKIALALEMEL33243OKIA",
|
Match: "AKIALALEMEL33243OKIA",
|
||||||
File: "tmp.go",
|
File: "tmp.go",
|
||||||
|
Line: `awsToken := \"AKIALALEMEL33243OKIA\"`,
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
StartLine: 0,
|
StartLine: 0,
|
||||||
@@ -81,6 +81,7 @@ func TestDetect(t *testing.T) {
|
|||||||
Description: "PyPI upload token",
|
Description: "PyPI upload token",
|
||||||
Secret: "pypi-AgEIcHlwaS5vcmcAAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAAB",
|
Secret: "pypi-AgEIcHlwaS5vcmcAAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAAB",
|
||||||
Match: "pypi-AgEIcHlwaS5vcmcAAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAAB",
|
Match: "pypi-AgEIcHlwaS5vcmcAAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAAB",
|
||||||
|
Line: `pypi-AgEIcHlwaS5vcmcAAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAA-AAAAAAAAAAB`,
|
||||||
File: "tmp.go",
|
File: "tmp.go",
|
||||||
RuleID: "pypi-upload-token",
|
RuleID: "pypi-upload-token",
|
||||||
Tags: []string{"key", "pypi"},
|
Tags: []string{"key", "pypi"},
|
||||||
@@ -103,6 +104,7 @@ func TestDetect(t *testing.T) {
|
|||||||
Description: "AWS Access Key",
|
Description: "AWS Access Key",
|
||||||
Secret: "AKIALALEMEL33243OLIA",
|
Secret: "AKIALALEMEL33243OLIA",
|
||||||
Match: "AKIALALEMEL33243OLIA",
|
Match: "AKIALALEMEL33243OLIA",
|
||||||
|
Line: `awsToken := \"AKIALALEMEL33243OLIA\"`,
|
||||||
File: "tmp.go",
|
File: "tmp.go",
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
@@ -114,6 +116,75 @@ func TestDetect(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
cfgName: "simple",
|
||||||
|
fragment: Fragment{
|
||||||
|
Raw: `export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;`,
|
||||||
|
FilePath: "tmp.sh",
|
||||||
|
},
|
||||||
|
expectedFindings: []report.Finding{
|
||||||
|
{
|
||||||
|
Description: "Sidekiq Secret",
|
||||||
|
Match: "BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;",
|
||||||
|
Secret: "cafebabe:deadbeef",
|
||||||
|
Line: `export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;`,
|
||||||
|
File: "tmp.sh",
|
||||||
|
RuleID: "sidekiq-secret",
|
||||||
|
Tags: []string{},
|
||||||
|
Entropy: 2.6098502,
|
||||||
|
StartLine: 1,
|
||||||
|
EndLine: 1,
|
||||||
|
StartColumn: 8,
|
||||||
|
EndColumn: 60,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cfgName: "simple",
|
||||||
|
fragment: Fragment{
|
||||||
|
Raw: `echo hello1; export BUNDLE_ENTERPRISE__CONTRIBSYS__COM="cafebabe:deadbeef" && echo hello2`,
|
||||||
|
FilePath: "tmp.sh",
|
||||||
|
},
|
||||||
|
expectedFindings: []report.Finding{
|
||||||
|
{
|
||||||
|
Description: "Sidekiq Secret",
|
||||||
|
Match: "BUNDLE_ENTERPRISE__CONTRIBSYS__COM=\"cafebabe:deadbeef\"",
|
||||||
|
Secret: "cafebabe:deadbeef",
|
||||||
|
File: "tmp.sh",
|
||||||
|
Line: `echo hello1; export BUNDLE_ENTERPRISE__CONTRIBSYS__COM="cafebabe:deadbeef" && echo hello2`,
|
||||||
|
RuleID: "sidekiq-secret",
|
||||||
|
Tags: []string{},
|
||||||
|
Entropy: 2.6098502,
|
||||||
|
StartLine: 1,
|
||||||
|
EndLine: 1,
|
||||||
|
StartColumn: 21,
|
||||||
|
EndColumn: 74,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cfgName: "simple",
|
||||||
|
fragment: Fragment{
|
||||||
|
Raw: `url = "http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80/path?param1=true¶m2=false#heading1"`,
|
||||||
|
FilePath: "tmp.sh",
|
||||||
|
},
|
||||||
|
expectedFindings: []report.Finding{
|
||||||
|
{
|
||||||
|
Description: "Sidekiq Sensitive URL",
|
||||||
|
Match: "http://cafeb4b3:d3adb33f@enterprise.contribsys.com:",
|
||||||
|
Secret: "cafeb4b3:d3adb33f",
|
||||||
|
File: "tmp.sh",
|
||||||
|
Line: `url = "http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80/path?param1=true¶m2=false#heading1"`,
|
||||||
|
RuleID: "sidekiq-sensitive-url",
|
||||||
|
Tags: []string{},
|
||||||
|
Entropy: 2.984234,
|
||||||
|
StartLine: 1,
|
||||||
|
EndLine: 1,
|
||||||
|
StartColumn: 8,
|
||||||
|
EndColumn: 58,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
cfgName: "allow_aws_re",
|
cfgName: "allow_aws_re",
|
||||||
fragment: Fragment{
|
fragment: Fragment{
|
||||||
@@ -150,6 +221,7 @@ func TestDetect(t *testing.T) {
|
|||||||
Description: "Discord API key",
|
Description: "Discord API key",
|
||||||
Match: "Discord_Public_Key = \"e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5\"",
|
Match: "Discord_Public_Key = \"e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5\"",
|
||||||
Secret: "e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5",
|
Secret: "e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5",
|
||||||
|
Line: `const Discord_Public_Key = "e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5"`,
|
||||||
File: "tmp.go",
|
File: "tmp.go",
|
||||||
RuleID: "discord-api-key",
|
RuleID: "discord-api-key",
|
||||||
Tags: []string{},
|
Tags: []string{},
|
||||||
@@ -180,6 +252,7 @@ func TestDetect(t *testing.T) {
|
|||||||
Description: "Generic API Key",
|
Description: "Generic API Key",
|
||||||
Match: "Key = \"e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5\"",
|
Match: "Key = \"e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5\"",
|
||||||
Secret: "e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5",
|
Secret: "e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5",
|
||||||
|
Line: `const Discord_Public_Key = "e7322523fb86ed64c836a979cf8465fbd436378c653c1db38f9ae87bc62a6fd5"`,
|
||||||
File: "tmp.py",
|
File: "tmp.py",
|
||||||
RuleID: "generic-api-key",
|
RuleID: "generic-api-key",
|
||||||
Tags: []string{},
|
Tags: []string{},
|
||||||
@@ -290,6 +363,7 @@ func TestFromGit(t *testing.T) {
|
|||||||
EndLine: 20,
|
EndLine: 20,
|
||||||
StartColumn: 19,
|
StartColumn: 19,
|
||||||
EndColumn: 38,
|
EndColumn: 38,
|
||||||
|
Line: "\n awsToken := \"AKIALALEMEL33243OLIA\"",
|
||||||
Secret: "AKIALALEMEL33243OLIA",
|
Secret: "AKIALALEMEL33243OLIA",
|
||||||
Match: "AKIALALEMEL33243OLIA",
|
Match: "AKIALALEMEL33243OLIA",
|
||||||
File: "main.go",
|
File: "main.go",
|
||||||
@@ -301,6 +375,7 @@ func TestFromGit(t *testing.T) {
|
|||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
Entropy: 3.0841837,
|
Entropy: 3.0841837,
|
||||||
|
Fingerprint: "1b6da43b82b22e4eaa10bcf8ee591e91abbfc587:main.go:aws-access-key:20",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Description: "AWS Access Key",
|
Description: "AWS Access Key",
|
||||||
@@ -310,6 +385,7 @@ func TestFromGit(t *testing.T) {
|
|||||||
EndColumn: 36,
|
EndColumn: 36,
|
||||||
Secret: "AKIALALEMEL33243OLIA",
|
Secret: "AKIALALEMEL33243OLIA",
|
||||||
Match: "AKIALALEMEL33243OLIA",
|
Match: "AKIALALEMEL33243OLIA",
|
||||||
|
Line: "\n\taws_token := \"AKIALALEMEL33243OLIA\"",
|
||||||
File: "foo/foo.go",
|
File: "foo/foo.go",
|
||||||
Date: "2021-11-02T23:48:06Z",
|
Date: "2021-11-02T23:48:06Z",
|
||||||
Commit: "491504d5a31946ce75e22554cc34203d8e5ff3ca",
|
Commit: "491504d5a31946ce75e22554cc34203d8e5ff3ca",
|
||||||
@@ -319,6 +395,7 @@ func TestFromGit(t *testing.T) {
|
|||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
Entropy: 3.0841837,
|
Entropy: 3.0841837,
|
||||||
|
Fingerprint: "491504d5a31946ce75e22554cc34203d8e5ff3ca:foo/foo.go:aws-access-key:9",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -334,6 +411,7 @@ func TestFromGit(t *testing.T) {
|
|||||||
StartColumn: 17,
|
StartColumn: 17,
|
||||||
EndColumn: 36,
|
EndColumn: 36,
|
||||||
Secret: "AKIALALEMEL33243OLIA",
|
Secret: "AKIALALEMEL33243OLIA",
|
||||||
|
Line: "\n\taws_token := \"AKIALALEMEL33243OLIA\"",
|
||||||
Match: "AKIALALEMEL33243OLIA",
|
Match: "AKIALALEMEL33243OLIA",
|
||||||
Date: "2021-11-02T23:48:06Z",
|
Date: "2021-11-02T23:48:06Z",
|
||||||
File: "foo/foo.go",
|
File: "foo/foo.go",
|
||||||
@@ -344,6 +422,7 @@ func TestFromGit(t *testing.T) {
|
|||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
Entropy: 3.0841837,
|
Entropy: 3.0841837,
|
||||||
|
Fingerprint: "491504d5a31946ce75e22554cc34203d8e5ff3ca:foo/foo.go:aws-access-key:9",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -391,7 +470,7 @@ func TestFromGit(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestFromGit tests the FromGit function
|
// TestFromFiles tests the FromFiles function
|
||||||
func TestFromFiles(t *testing.T) {
|
func TestFromFiles(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
cfgName string
|
cfgName string
|
||||||
@@ -410,10 +489,13 @@ func TestFromFiles(t *testing.T) {
|
|||||||
EndColumn: 35,
|
EndColumn: 35,
|
||||||
Match: "AKIALALEMEL33243OLIA",
|
Match: "AKIALALEMEL33243OLIA",
|
||||||
Secret: "AKIALALEMEL33243OLIA",
|
Secret: "AKIALALEMEL33243OLIA",
|
||||||
|
Line: "\n\tawsToken := \"AKIALALEMEL33243OLIA\"",
|
||||||
File: "../testdata/repos/nogit/main.go",
|
File: "../testdata/repos/nogit/main.go",
|
||||||
|
SymlinkFile: "",
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
Entropy: 3.0841837,
|
Entropy: 3.0841837,
|
||||||
|
Fingerprint: "../testdata/repos/nogit/main.go:aws-access-key:20",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -429,10 +511,12 @@ func TestFromFiles(t *testing.T) {
|
|||||||
EndColumn: 35,
|
EndColumn: 35,
|
||||||
Match: "AKIALALEMEL33243OLIA",
|
Match: "AKIALALEMEL33243OLIA",
|
||||||
Secret: "AKIALALEMEL33243OLIA",
|
Secret: "AKIALALEMEL33243OLIA",
|
||||||
|
Line: "\n\tawsToken := \"AKIALALEMEL33243OLIA\"",
|
||||||
File: "../testdata/repos/nogit/main.go",
|
File: "../testdata/repos/nogit/main.go",
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
Entropy: 3.0841837,
|
Entropy: 3.0841837,
|
||||||
|
Fingerprint: "../testdata/repos/nogit/main.go:aws-access-key:20",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -454,6 +538,7 @@ func TestFromFiles(t *testing.T) {
|
|||||||
}
|
}
|
||||||
cfg, _ := vc.Translate()
|
cfg, _ := vc.Translate()
|
||||||
detector := NewDetector(cfg)
|
detector := NewDetector(cfg)
|
||||||
|
detector.FollowSymlinks = true
|
||||||
findings, err := detector.DetectFiles(tt.source)
|
findings, err := detector.DetectFiles(tt.source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
@@ -463,6 +548,61 @@ func TestFromFiles(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDetectWithSymlinks(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
cfgName string
|
||||||
|
source string
|
||||||
|
expectedFindings []report.Finding
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
source: filepath.Join(repoBasePath, "symlinks/file_symlink"),
|
||||||
|
cfgName: "simple",
|
||||||
|
expectedFindings: []report.Finding{
|
||||||
|
{
|
||||||
|
Description: "Asymmetric Private Key",
|
||||||
|
StartLine: 1,
|
||||||
|
EndLine: 1,
|
||||||
|
StartColumn: 1,
|
||||||
|
EndColumn: 35,
|
||||||
|
Match: "-----BEGIN OPENSSH PRIVATE KEY-----",
|
||||||
|
Secret: "-----BEGIN OPENSSH PRIVATE KEY-----",
|
||||||
|
Line: "-----BEGIN OPENSSH PRIVATE KEY-----",
|
||||||
|
File: "../testdata/repos/symlinks/source_file/id_ed25519",
|
||||||
|
SymlinkFile: "../testdata/repos/symlinks/file_symlink/symlinked_id_ed25519",
|
||||||
|
RuleID: "apkey",
|
||||||
|
Tags: []string{"key", "AsymmetricPrivateKey"},
|
||||||
|
Entropy: 3.587164,
|
||||||
|
Fingerprint: "../testdata/repos/symlinks/source_file/id_ed25519:apkey:1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
viper.AddConfigPath(configPath)
|
||||||
|
viper.SetConfigName("simple")
|
||||||
|
viper.SetConfigType("toml")
|
||||||
|
err := viper.ReadInConfig()
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var vc config.ViperConfig
|
||||||
|
err = viper.Unmarshal(&vc)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
cfg, _ := vc.Translate()
|
||||||
|
detector := NewDetector(cfg)
|
||||||
|
detector.FollowSymlinks = true
|
||||||
|
findings, err := detector.DetectFiles(tt.source)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
assert.ElementsMatch(t, tt.expectedFindings, findings)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func moveDotGit(from, to string) error {
|
func moveDotGit(from, to string) error {
|
||||||
repoDirs, err := os.ReadDir("../testdata/repos")
|
repoDirs, err := os.ReadDir("../testdata/repos")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+17
-14
@@ -3,7 +3,6 @@ package git
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -13,6 +12,8 @@ import (
|
|||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var ErrEncountered bool
|
||||||
|
|
||||||
// GitLog returns a channel of gitdiff.File objects from the
|
// GitLog returns a channel of gitdiff.File objects from the
|
||||||
// git log -p command for the given source.
|
// git log -p command for the given source.
|
||||||
func GitLog(source string, logOpts string) (<-chan *gitdiff.File, error) {
|
func GitLog(source string, logOpts string) (<-chan *gitdiff.File, error) {
|
||||||
@@ -37,15 +38,16 @@ func GitLog(source string, logOpts string) (<-chan *gitdiff.File, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go listenForStdErr(stderr)
|
||||||
|
|
||||||
if err := cmd.Start(); err != nil {
|
if err := cmd.Start(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
go listenForStdErr(stderr)
|
|
||||||
// HACK: to avoid https://github.com/zricethezav/gitleaks/issues/722
|
// HACK: to avoid https://github.com/zricethezav/gitleaks/issues/722
|
||||||
time.Sleep(50 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
|
|
||||||
return gitdiff.Parse(stdout)
|
return gitdiff.Parse(cmd, stdout)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GitDiff returns a channel of gitdiff.File objects from
|
// GitDiff returns a channel of gitdiff.File objects from
|
||||||
@@ -68,22 +70,22 @@ func GitDiff(source string, staged bool) (<-chan *gitdiff.File, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go listenForStdErr(stderr)
|
||||||
|
|
||||||
if err := cmd.Start(); err != nil {
|
if err := cmd.Start(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
go listenForStdErr(stderr)
|
|
||||||
// HACK: to avoid https://github.com/zricethezav/gitleaks/issues/722
|
// HACK: to avoid https://github.com/zricethezav/gitleaks/issues/722
|
||||||
time.Sleep(50 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
|
|
||||||
return gitdiff.Parse(stdout)
|
return gitdiff.Parse(cmd, stdout)
|
||||||
}
|
}
|
||||||
|
|
||||||
// listenForStdErr listens for stderr output from git and prints it to stdout
|
// listenForStdErr listens for stderr output from git and prints it to stdout
|
||||||
// then exits with exit code 1
|
// then exits with exit code 1
|
||||||
func listenForStdErr(stderr io.ReadCloser) {
|
func listenForStdErr(stderr io.ReadCloser) {
|
||||||
scanner := bufio.NewScanner(stderr)
|
scanner := bufio.NewScanner(stderr)
|
||||||
errEncountered := false
|
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
// if git throws one of the following errors:
|
// if git throws one of the following errors:
|
||||||
//
|
//
|
||||||
@@ -105,14 +107,15 @@ func listenForStdErr(stderr io.ReadCloser) {
|
|||||||
"inexact rename detection was skipped") ||
|
"inexact rename detection was skipped") ||
|
||||||
strings.Contains(scanner.Text(),
|
strings.Contains(scanner.Text(),
|
||||||
"you may want to set your diff.renameLimit") {
|
"you may want to set your diff.renameLimit") {
|
||||||
|
|
||||||
log.Warn().Msg(scanner.Text())
|
log.Warn().Msg(scanner.Text())
|
||||||
} else {
|
} else {
|
||||||
log.Error().Msg(scanner.Text())
|
log.Error().Msgf("[git] %s", scanner.Text())
|
||||||
errEncountered = true
|
|
||||||
|
// asynchronously set this error flag to true so that we can
|
||||||
|
// capture a log message and exit with a non-zero exit code
|
||||||
|
// This value should get set before the `git` command exits so it's
|
||||||
|
// safe-ish, although I know I know, bad practice.
|
||||||
|
ErrEncountered = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if errEncountered {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+3
-1
@@ -21,6 +21,9 @@ func location(fragment Fragment, matchIndex []int) Location {
|
|||||||
start := matchIndex[0]
|
start := matchIndex[0]
|
||||||
end := matchIndex[1]
|
end := matchIndex[1]
|
||||||
|
|
||||||
|
// default startLineIndex to 0
|
||||||
|
location.startLineIndex = 0
|
||||||
|
|
||||||
for lineNum, pair := range fragment.newlineIndices {
|
for lineNum, pair := range fragment.newlineIndices {
|
||||||
_lineNum = lineNum
|
_lineNum = lineNum
|
||||||
newLineByteIndex := pair[0]
|
newLineByteIndex := pair[0]
|
||||||
@@ -48,7 +51,6 @@ func location(fragment Fragment, matchIndex []int) Location {
|
|||||||
location.endColumn = (end - prevNewLine)
|
location.endColumn = (end - prevNewLine)
|
||||||
location.startLine = _lineNum + 1
|
location.startLine = _lineNum + 1
|
||||||
location.endLine = _lineNum + 1
|
location.endLine = _lineNum + 1
|
||||||
location.startLineIndex = start
|
|
||||||
|
|
||||||
// search for new line byte index
|
// search for new line byte index
|
||||||
i := 0
|
i := 0
|
||||||
|
|||||||
+59
-4
@@ -1,12 +1,14 @@
|
|||||||
package detect
|
package detect
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
// "encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/charmbracelet/lipgloss"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/report"
|
"github.com/zricethezav/gitleaks/v8/report"
|
||||||
|
|
||||||
"github.com/gitleaks/go-gitdiff/gitdiff"
|
"github.com/gitleaks/go-gitdiff/gitdiff"
|
||||||
@@ -90,9 +92,62 @@ func filter(findings []report.Finding, redact bool) []report.Finding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func printFinding(f report.Finding) {
|
func printFinding(f report.Finding) {
|
||||||
var b []byte
|
// trim all whitespace and tabs from the line
|
||||||
b, _ = json.MarshalIndent(f, "", " ")
|
f.Line = strings.TrimSpace(f.Line)
|
||||||
fmt.Println(string(b))
|
// trim all whitespace and tabs from the secret
|
||||||
|
f.Secret = strings.TrimSpace(f.Secret)
|
||||||
|
// trim all whitespace and tabs from the match
|
||||||
|
f.Match = strings.TrimSpace(f.Match)
|
||||||
|
|
||||||
|
matchInLineIDX := strings.Index(f.Line, f.Match)
|
||||||
|
secretInMatchIdx := strings.Index(f.Match, f.Secret)
|
||||||
|
|
||||||
|
start := f.Line[0:matchInLineIDX]
|
||||||
|
startMatchIdx := 0
|
||||||
|
if matchInLineIDX > 20 {
|
||||||
|
startMatchIdx = matchInLineIDX - 20
|
||||||
|
start = "..." + f.Line[startMatchIdx:matchInLineIDX]
|
||||||
|
}
|
||||||
|
|
||||||
|
matchBeginning := lipgloss.NewStyle().SetString(f.Match[0:secretInMatchIdx]).Foreground(lipgloss.Color("#f5d445"))
|
||||||
|
secret := lipgloss.NewStyle().SetString(f.Secret).
|
||||||
|
Bold(true).
|
||||||
|
Italic(true).
|
||||||
|
Foreground(lipgloss.Color("#f05c07"))
|
||||||
|
matchEnd := lipgloss.NewStyle().SetString(f.Match[secretInMatchIdx+len(f.Secret):]).Foreground(lipgloss.Color("#f5d445"))
|
||||||
|
lineEnd := f.Line[matchInLineIDX+len(f.Match):]
|
||||||
|
if len(f.Secret) > 100 {
|
||||||
|
secret = lipgloss.NewStyle().SetString(f.Secret[0:100] + "...").
|
||||||
|
Bold(true).
|
||||||
|
Italic(true).
|
||||||
|
Foreground(lipgloss.Color("#f05c07"))
|
||||||
|
}
|
||||||
|
if len(lineEnd) > 20 {
|
||||||
|
lineEnd = lineEnd[0:20] + "..."
|
||||||
|
}
|
||||||
|
|
||||||
|
finding := fmt.Sprintf("%s%s%s%s%s\n", strings.TrimPrefix(strings.TrimLeft(start, " "), "\n"), matchBeginning, secret, matchEnd, lineEnd)
|
||||||
|
fmt.Printf("%-12s %s", "Finding:", finding)
|
||||||
|
fmt.Printf("%-12s %s\n", "Secret:", secret)
|
||||||
|
fmt.Printf("%-12s %s\n", "RuleID:", f.RuleID)
|
||||||
|
fmt.Printf("%-12s %f\n", "Entropy:", f.Entropy)
|
||||||
|
if f.File == "" {
|
||||||
|
fmt.Println("")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Printf("%-12s %s\n", "File:", f.File)
|
||||||
|
fmt.Printf("%-12s %d\n", "Line:", f.StartLine)
|
||||||
|
if f.Commit == "" {
|
||||||
|
fmt.Printf("%-12s %s\n", "Fingerprint:", f.Fingerprint)
|
||||||
|
fmt.Println("")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Printf("%-12s %s\n", "Commit:", f.Commit)
|
||||||
|
fmt.Printf("%-12s %s\n", "Author:", f.Author)
|
||||||
|
fmt.Printf("%-12s %s\n", "Email:", f.Email)
|
||||||
|
fmt.Printf("%-12s %s\n", "Date:", f.Date)
|
||||||
|
fmt.Printf("%-12s %s\n", "Fingerprint:", f.Fingerprint)
|
||||||
|
fmt.Println("")
|
||||||
}
|
}
|
||||||
|
|
||||||
func containsDigit(s string) bool {
|
func containsDigit(s string) bool {
|
||||||
|
|||||||
@@ -1,20 +1,30 @@
|
|||||||
module github.com/zricethezav/gitleaks/v8
|
module github.com/zricethezav/gitleaks/v8
|
||||||
|
|
||||||
go 1.17
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/charmbracelet/lipgloss v0.5.0
|
||||||
github.com/fatih/semgroup v1.2.0
|
github.com/fatih/semgroup v1.2.0
|
||||||
github.com/gitleaks/go-gitdiff v0.7.6
|
github.com/gitleaks/go-gitdiff v0.8.0
|
||||||
|
github.com/h2non/filetype v1.1.3
|
||||||
github.com/rs/zerolog v1.26.1
|
github.com/rs/zerolog v1.26.1
|
||||||
github.com/spf13/cobra v1.2.1
|
github.com/spf13/cobra v1.2.1
|
||||||
github.com/spf13/viper v1.8.1
|
github.com/spf13/viper v1.8.1
|
||||||
github.com/stretchr/testify v1.7.0
|
github.com/stretchr/testify v1.7.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||||
|
github.com/mattn/go-runewidth v0.0.13 // indirect
|
||||||
|
github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68 // indirect
|
||||||
|
github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0 // indirect
|
||||||
|
github.com/rivo/uniseg v0.2.0 // indirect
|
||||||
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
||||||
github.com/h2non/filetype v1.1.3
|
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||||
github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb
|
github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj
|
|||||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||||
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
|
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
|
github.com/charmbracelet/lipgloss v0.5.0 h1:lulQHuVeodSgDez+3rGiuxlPVXSnhth442DATR2/8t8=
|
||||||
|
github.com/charmbracelet/lipgloss v0.5.0/go.mod h1:EZLha/HbzEt7cYqdFPovlqy5FZPj0xFhg5SaqxScmgs=
|
||||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||||
@@ -72,8 +74,8 @@ github.com/fatih/semgroup v1.2.0/go.mod h1:1KAD4iIYfXjE4U13B48VM4z9QUwV5Tt8O4rS8
|
|||||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
github.com/gitleaks/go-gitdiff v0.7.6 h1:atcfoNPD9erzPs9C89a+i2Y+EUmR2QKB5QHJTfB4n60=
|
github.com/gitleaks/go-gitdiff v0.8.0 h1:7aExTZm+K/M/EQKOyYcub8rIAdWK6ONxPGuRzxmWW+0=
|
||||||
github.com/gitleaks/go-gitdiff v0.7.6/go.mod h1:pKz0X4YzCKZs30BL+weqBIG7mx0jl4tF1uXV9ZyNvrA=
|
github.com/gitleaks/go-gitdiff v0.8.0/go.mod h1:pKz0X4YzCKZs30BL+weqBIG7mx0jl4tF1uXV9ZyNvrA=
|
||||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
@@ -183,12 +185,19 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
|
|||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
|
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||||
|
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||||
github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb h1:w1g9wNDIE/pHSTmAaUhv4TZQuPBS6GV3mMz5hkgziIU=
|
github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb h1:w1g9wNDIE/pHSTmAaUhv4TZQuPBS6GV3mMz5hkgziIU=
|
||||||
github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4=
|
github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4=
|
||||||
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
||||||
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||||
|
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||||
|
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||||
|
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||||
|
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
|
||||||
|
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
@@ -202,6 +211,10 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
|
|||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
|
github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68 h1:y1p/ycavWjGT9FnmSjdbWUlLGvcxrY0Rw3ATltrxOhk=
|
||||||
|
github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ=
|
||||||
|
github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0 h1:STjmj0uFfRryL9fzRA/OupNppeAID6QJYPMavTL7jtY=
|
||||||
|
github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs=
|
||||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||||
github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
|
github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
|
||||||
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||||
@@ -214,6 +227,9 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
|
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
|
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||||
|
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||||
@@ -414,6 +430,7 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 h1:WecRHqgE09JBkh/584XIE6PMz5KKE/vER4izNUi30AQ=
|
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 h1:WecRHqgE09JBkh/584XIE6PMz5KKE/vER4izNUi30AQ=
|
||||||
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
|||||||
err := cw.Write([]string{"RuleID",
|
err := cw.Write([]string{"RuleID",
|
||||||
"Commit",
|
"Commit",
|
||||||
"File",
|
"File",
|
||||||
|
"SymlinkFile",
|
||||||
"Secret",
|
"Secret",
|
||||||
"Match",
|
"Match",
|
||||||
"StartLine",
|
"StartLine",
|
||||||
@@ -26,6 +27,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
|||||||
"Message",
|
"Message",
|
||||||
"Date",
|
"Date",
|
||||||
"Email",
|
"Email",
|
||||||
|
"Fingerprint",
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -34,6 +36,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
|||||||
err = cw.Write([]string{f.RuleID,
|
err = cw.Write([]string{f.RuleID,
|
||||||
f.Commit,
|
f.Commit,
|
||||||
f.File,
|
f.File,
|
||||||
|
f.SymlinkFile,
|
||||||
f.Secret,
|
f.Secret,
|
||||||
f.Match,
|
f.Match,
|
||||||
strconv.Itoa(f.StartLine),
|
strconv.Itoa(f.StartLine),
|
||||||
@@ -44,6 +47,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
|||||||
f.Message,
|
f.Message,
|
||||||
f.Date,
|
f.Date,
|
||||||
f.Email,
|
f.Email,
|
||||||
|
f.Fingerprint,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -28,10 +28,12 @@ func TestWriteCSV(t *testing.T) {
|
|||||||
EndColumn: 2,
|
EndColumn: 2,
|
||||||
Message: "opps",
|
Message: "opps",
|
||||||
File: "auth.py",
|
File: "auth.py",
|
||||||
|
SymlinkFile: "",
|
||||||
Commit: "0000000000000000",
|
Commit: "0000000000000000",
|
||||||
Author: "John Doe",
|
Author: "John Doe",
|
||||||
Email: "johndoe@gmail.com",
|
Email: "johndoe@gmail.com",
|
||||||
Date: "10-19-2003",
|
Date: "10-19-2003",
|
||||||
|
Fingerprint: "fingerprint",
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
{
|
{
|
||||||
|
|||||||
+10
-4
@@ -13,6 +13,8 @@ type Finding struct {
|
|||||||
StartColumn int
|
StartColumn int
|
||||||
EndColumn int
|
EndColumn int
|
||||||
|
|
||||||
|
Line string `json:"-"`
|
||||||
|
|
||||||
Match string
|
Match string
|
||||||
|
|
||||||
// Secret contains the full content of what is matched in
|
// Secret contains the full content of what is matched in
|
||||||
@@ -20,9 +22,9 @@ type Finding struct {
|
|||||||
Secret string
|
Secret string
|
||||||
|
|
||||||
// File is the name of the file containing the finding
|
// File is the name of the file containing the finding
|
||||||
File string
|
File string
|
||||||
|
SymlinkFile string
|
||||||
Commit string
|
Commit string
|
||||||
|
|
||||||
// Entropy is the shannon entropy of Value
|
// Entropy is the shannon entropy of Value
|
||||||
Entropy float32
|
Entropy float32
|
||||||
@@ -35,10 +37,14 @@ type Finding struct {
|
|||||||
|
|
||||||
// Rule is the name of the rule that was matched
|
// Rule is the name of the rule that was matched
|
||||||
RuleID string
|
RuleID string
|
||||||
|
|
||||||
|
// unique identifer
|
||||||
|
Fingerprint string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redact removes sensitive information from a finding.
|
// Redact removes sensitive information from a finding.
|
||||||
func (f *Finding) Redact() {
|
func (f *Finding) Redact() {
|
||||||
|
f.Line = strings.Replace(f.Line, f.Secret, "REDACTED", -1)
|
||||||
f.Match = strings.Replace(f.Match, f.Secret, "REDACTED", -1)
|
f.Match = strings.Replace(f.Match, f.Secret, "REDACTED", -1)
|
||||||
f.Secret = "REDACT"
|
f.Secret = "REDACTED"
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ func TestRedact(t *testing.T) {
|
|||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
for _, f := range test.findings {
|
for _, f := range test.findings {
|
||||||
f.Redact()
|
f.Redact()
|
||||||
if f.Secret != "REDACT" {
|
if f.Secret != "REDACTED" {
|
||||||
t.Error("redact not redacting: ", f.Secret)
|
t.Error("redact not redacting: ", f.Secret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ func TestWriteJSON(t *testing.T) {
|
|||||||
EndColumn: 2,
|
EndColumn: 2,
|
||||||
Message: "opps",
|
Message: "opps",
|
||||||
File: "auth.py",
|
File: "auth.py",
|
||||||
|
SymlinkFile: "",
|
||||||
Commit: "0000000000000000",
|
Commit: "0000000000000000",
|
||||||
Author: "John Doe",
|
Author: "John Doe",
|
||||||
Email: "johndoe@gmail.com",
|
Email: "johndoe@gmail.com",
|
||||||
|
|||||||
+5
-1
@@ -109,11 +109,15 @@ func getResults(findings []Finding) []Results {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getLocation(f Finding) []Locations {
|
func getLocation(f Finding) []Locations {
|
||||||
|
uri := f.File
|
||||||
|
if f.SymlinkFile != "" {
|
||||||
|
uri = f.SymlinkFile
|
||||||
|
}
|
||||||
return []Locations{
|
return []Locations{
|
||||||
{
|
{
|
||||||
PhysicalLocation: PhysicalLocation{
|
PhysicalLocation: PhysicalLocation{
|
||||||
ArtifactLocation: ArtifactLocation{
|
ArtifactLocation: ArtifactLocation{
|
||||||
URI: f.File,
|
URI: uri,
|
||||||
},
|
},
|
||||||
Region: Region{
|
Region: Region{
|
||||||
StartLine: f.StartLine,
|
StartLine: f.StartLine,
|
||||||
|
|||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
RuleID,Commit,File,Secret,Match,StartLine,EndLine,StartColumn,EndColumn,Author,Message,Date,Email,Fingerprint
|
||||||
|
1,b,c,f,s,m,s,e,s,e,a,m,f,r,f
|
||||||
|
Vendored
+40
@@ -0,0 +1,40 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Description": "PyPI upload token",
|
||||||
|
"StartLine": 32,
|
||||||
|
"EndLine": 32,
|
||||||
|
"StartColumn": 21,
|
||||||
|
"EndColumn": 106,
|
||||||
|
"Match": "************************",
|
||||||
|
"Secret": "************************",
|
||||||
|
"File": "detect/detect_test.go",
|
||||||
|
"Commit": "9326f35380636bcbe61e94b0584d1618c4b5c2c2",
|
||||||
|
"Entropy": 1.9606875,
|
||||||
|
"Author": "****",
|
||||||
|
"Email": "****",
|
||||||
|
"Date": "2022-03-07T14:33:06Z",
|
||||||
|
"Message": "Escape - character in regex character groups (#802)\n\n* fix char escape\n\n* add test\n\n* fix verbosity in make test",
|
||||||
|
"Tags": [],
|
||||||
|
"RuleID": "pypi-upload-token",
|
||||||
|
"Fingerprint": "9326f35380636bcbe61e94b0584d1618c4b5c2c2:detect/detect_test.go:pypi-upload-token:32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Description": "PyPI upload token",
|
||||||
|
"StartLine": 33,
|
||||||
|
"EndLine": 33,
|
||||||
|
"StartColumn": 21,
|
||||||
|
"EndColumn": 106,
|
||||||
|
"Match": "************************",
|
||||||
|
"Secret": "************************",
|
||||||
|
"File": "detect/detect_test.go",
|
||||||
|
"Commit": "9326f35380636bcbe61e94b0584d1618c4b5c2c2",
|
||||||
|
"Entropy": 1.9606875,
|
||||||
|
"Author": "****",
|
||||||
|
"Email": "****",
|
||||||
|
"Date": "2022-03-07T14:33:06Z",
|
||||||
|
"Message": "Escape - character in regex character groups (#802)\n\n* fix char escape\n\n* add test\n\n* fix verbosity in make test",
|
||||||
|
"Tags": [],
|
||||||
|
"RuleID": "pypi-upload-token",
|
||||||
|
"Fingerprint": "9326f35380636bcbe61e94b0584d1618c4b5c2c2:detect/detect_test.go:pypi-upload-token:33"
|
||||||
|
}
|
||||||
|
]
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
|
||||||
|
"version": "2.1.0",
|
||||||
|
"runs": [
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+18
@@ -136,6 +136,24 @@ title = "gitleaks config"
|
|||||||
regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}'''
|
regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}'''
|
||||||
tags = ["key", "SendGrid"]
|
tags = ["key", "SendGrid"]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Sidekiq Secret"
|
||||||
|
id = "sidekiq-secret"
|
||||||
|
regex = '''(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
secretGroup = 1
|
||||||
|
keywords = [
|
||||||
|
"bundle_enterprise__contribsys__com","bundle_gems__contribsys__com",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "Sidekiq Sensitive URL"
|
||||||
|
id = "sidekiq-sensitive-url"
|
||||||
|
regex = '''(?i)\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)'''
|
||||||
|
secretGroup = 2
|
||||||
|
keywords = [
|
||||||
|
"gems.contribsys.com","enterprise.contribsys.com",
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-webhook"
|
id = "slack-webhook"
|
||||||
description = "Slack Webhook"
|
description = "Slack Webhook"
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
RuleID,Commit,File,Secret,Match,StartLine,EndLine,StartColumn,EndColumn,Author,Message,Date,Email
|
RuleID,Commit,File,SymlinkFile,Secret,Match,StartLine,EndLine,StartColumn,EndColumn,Author,Message,Date,Email,Fingerprint
|
||||||
test-rule,0000000000000000,auth.py,a secret,line containing secret,1,2,1,2,John Doe,opps,10-19-2003,johndoe@gmail.com
|
test-rule,0000000000000000,auth.py,,a secret,line containing secret,1,2,1,2,John Doe,opps,10-19-2003,johndoe@gmail.com,fingerprint
|
||||||
|
+3
-1
@@ -8,6 +8,7 @@
|
|||||||
"Match": "line containing secret",
|
"Match": "line containing secret",
|
||||||
"Secret": "a secret",
|
"Secret": "a secret",
|
||||||
"File": "auth.py",
|
"File": "auth.py",
|
||||||
|
"SymlinkFile": "",
|
||||||
"Commit": "0000000000000000",
|
"Commit": "0000000000000000",
|
||||||
"Entropy": 0,
|
"Entropy": 0,
|
||||||
"Author": "John Doe",
|
"Author": "John Doe",
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
"Date": "10-19-2003",
|
"Date": "10-19-2003",
|
||||||
"Message": "opps",
|
"Message": "opps",
|
||||||
"Tags": [],
|
"Tags": [],
|
||||||
"RuleID": "test-rule"
|
"RuleID": "test-rule",
|
||||||
|
"Fingerprint": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
+14
@@ -169,6 +169,20 @@
|
|||||||
"text": "SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}"
|
"text": "SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "sidekiq-secret",
|
||||||
|
"name": "Sidekiq Secret",
|
||||||
|
"shortDescription": {
|
||||||
|
"text": "(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\\-_\\t .]{0,20})(?:[\\s|']|[\\s|\"]){0,3}(?:=|\u003e|:=|\\|\\|:|\u003c=|=\u003e|:)(?:'|\\\"|\\s|=|\\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\\\"|\\n|\\r|\\s|\\x60|;]|$)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sidekiq-sensitive-url",
|
||||||
|
"name": "Sidekiq Sensitive URL",
|
||||||
|
"shortDescription": {
|
||||||
|
"text": "(?i)\\b(http(?:s??):\\/\\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "slack-webhook",
|
"id": "slack-webhook",
|
||||||
"name": "Slack Webhook",
|
"name": "Slack Webhook",
|
||||||
|
|||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
../source_file/id_ed25519
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACA8YWKYztuuvxUIMomc3zv0OdXCT57Cc2cRYu3TMbX9XAAAAJDiKO3C4ijt
|
||||||
|
wgAAAAtzc2gtZWQyNTUxOQAAACA8YWKYztuuvxUIMomc3zv0OdXCT57Cc2cRYu3TMbX9XA
|
||||||
|
AAAECzmj8DGxg5YHtBK4AmBttMXDQHsPAaCyYHQjJ4YujRBTxhYpjO266/FQgyiZzfO/Q5
|
||||||
|
1cJPnsJzZxFi7dMxtf1cAAAADHJvb3RAZGV2aG9zdAE=
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
||||||
Reference in new issue
Block a user