mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8f236c9b3 | ||
|
|
c5fc080aa0 | ||
|
|
3bace4c735 | ||
|
|
e890a8e809 | ||
|
|
49b0b097e4 | ||
|
|
31a8e9db7a | ||
|
|
b1853bd032 | ||
|
|
cd52267113 | ||
|
|
afc89f91c0 | ||
|
|
5ae1023aa3 | ||
|
|
31650f01e7 | ||
|
|
0d471653b5 | ||
|
|
f615d0397d | ||
|
|
40e9172ab3 | ||
|
|
9033132143 | ||
|
|
1fc27eebda | ||
|
|
f4ddeda433 | ||
|
|
6210a7e832 | ||
|
|
e300b31be5 | ||
|
|
3073e45b0a | ||
|
|
d401bd337a | ||
|
|
1297b41b10 | ||
|
|
d44cb91306 | ||
|
|
efdc7749df | ||
|
|
e78a22e19c | ||
|
|
9cc19ec0f8 | ||
|
|
05c165deb2 | ||
|
|
f6a87ca58c | ||
|
|
73a3cf8afb | ||
|
|
d196b83ca6 | ||
|
|
35f2ea5da2 |
No files matched your search
@@ -19,14 +19,21 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
|
||||||
with:
|
with:
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
@@ -41,8 +48,9 @@ jobs:
|
|||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8
|
||||||
with:
|
with:
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|||||||
@@ -1,27 +1,11 @@
|
|||||||
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:
|
||||||
@@ -30,7 +14,13 @@ jobs:
|
|||||||
- 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.18
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: go build -v ./...
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
|
- name: Validate Config
|
||||||
|
run: cd cmd/generate/config && go run main.go
|
||||||
+653
@@ -0,0 +1,653 @@
|
|||||||
|
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
|
||||||
|
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
|
||||||
+103
@@ -0,0 +1,103 @@
|
|||||||
|
# Contribution guidelines
|
||||||
|
|
||||||
|
## General
|
||||||
|
|
||||||
|
### Issues
|
||||||
|
|
||||||
|
If you have a feature or bug fix you would like to contribute please check if
|
||||||
|
there are any open issues describing your proposed addition. If there are open
|
||||||
|
issues, make a comment stating you are working on fixing or implementing said
|
||||||
|
issue. If not, then please open an issue describing your addition. Make sure to
|
||||||
|
link your PR to an issue.
|
||||||
|
|
||||||
|
### Pull Requests
|
||||||
|
|
||||||
|
Fill out the template as best you can. Make sure your tests pass. If you see a
|
||||||
|
PR that isn't one you opened and want it introduced in the next release,
|
||||||
|
give it a :thumbsup: on the PR description.
|
||||||
|
|
||||||
|
## Adding new Gitleaks rules
|
||||||
|
|
||||||
|
If you want to add a new rule to the [default Gitleaks configuration](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) then follow these steps.
|
||||||
|
|
||||||
|
1. Create a `cmd/generate/config/rules/{provider}.go` file.
|
||||||
|
This file is used to generate a new Gitleaks rule.
|
||||||
|
Let's look at `beamer.go` for example. Comments have been added for context.
|
||||||
|
|
||||||
|
```golang
|
||||||
|
func Beamer() *config.Rule {
|
||||||
|
// Define Rule
|
||||||
|
r := config.Rule{
|
||||||
|
// Human redable description of the rule
|
||||||
|
Description: "Beamer API token",
|
||||||
|
|
||||||
|
// Unique ID for the rule
|
||||||
|
RuleID: "beamer-api-token",
|
||||||
|
|
||||||
|
// Regex capture group for the actual secret
|
||||||
|
SecretGroup: 1,
|
||||||
|
|
||||||
|
|
||||||
|
// Regex used for detecting secrets. See regex section below for more details
|
||||||
|
Regex: generateSemiGenericRegex([]string{"beamer"}, `b_[a-z0-9=_\-]{44}`),
|
||||||
|
|
||||||
|
// Keywords used for string matching on fragments (think of this as a prefilter)
|
||||||
|
Keywords: []string{"beamer"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("beamer", "b_"+secrets.NewSecret(alphaNumericExtended("44"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Feel free to use this example as a template when writing new rules.
|
||||||
|
This file should be fairly self-explanatory except for a few items;
|
||||||
|
regex and secret generation. To help with maintence, _most_ rules should
|
||||||
|
be uniform. The functions,
|
||||||
|
[`generateSemiGenericRegex`](https://github.com/zricethezav/gitleaks/blob/master/cmd/generate/config/rules/rule.go#L31) and [`generateUniqueTokenRegex`](https://github.com/zricethezav/gitleaks/blob/master/cmd/generate/config/rules/rule.go#L44) will generate rules
|
||||||
|
that follow defined patterns.
|
||||||
|
|
||||||
|
The function signatures look like this:
|
||||||
|
|
||||||
|
```golang
|
||||||
|
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp
|
||||||
|
|
||||||
|
func generateUniqueTokenRegex(secretRegex string) *regexp.Regexp
|
||||||
|
```
|
||||||
|
|
||||||
|
`generateSemiGenericRegex` accepts a list of identifiers and a regex.
|
||||||
|
The list of identifiers _should_ match the list of `Keywords` in the rule
|
||||||
|
definition above. Both `identifiers` in the `generateSemiGenericRegex`
|
||||||
|
function _and_ `Keywords` act as filters for Gitleaks telling the program
|
||||||
|
"_at least one of these strings must be present to be considered a leak_"
|
||||||
|
|
||||||
|
`generateUniqueToken` just accepts a regex. If you are writing a rule for a
|
||||||
|
token that is unique enough not to require an identifier then you can use
|
||||||
|
this function. For example, Pulumi's API Token has the prefix `pul-` which is
|
||||||
|
unique enough to use `generateUniqueToken`. But something like Beamer's API
|
||||||
|
token that has a `b_` prefix is not unqiue enough to use `generateUniqueToken`,
|
||||||
|
so instead we use `generateSemiGenericRegex` and require a `beamer`
|
||||||
|
identifier is part of the rule.
|
||||||
|
If a token's prefix has more than `3` characters then you could
|
||||||
|
probably get away with using `generateUniqueToken`.
|
||||||
|
|
||||||
|
Last thing you'll want to hit before we move on from this file is the
|
||||||
|
validation part. You can use `generateSampleSecret` to create a secret for the
|
||||||
|
true positives (`tps` in the example above) used in `validate`.
|
||||||
|
|
||||||
|
1. Update `cmd/generate/config/main.go`. Add a line like
|
||||||
|
`configRules = append(configRules, rules.Beamer())` in `main()`. Try and keep
|
||||||
|
this alphabetically pretty please.
|
||||||
|
|
||||||
|
1. Change directories into `cmd/generate/config` and run `go run main.go`
|
||||||
|
|
||||||
|
```
|
||||||
|
cd cmd/generate/config && go run main.go
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Check out your new rules in `config/gitleaks.toml` and see if everything looks good.
|
||||||
|
|
||||||
|
1. Open a PR
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
# gitleaks
|
# gitleaks
|
||||||
|
|
||||||
```
|
```
|
||||||
┌─○───┐
|
┌─○───┐
|
||||||
│ │╲ │
|
│ │╲ │
|
||||||
@@ -7,7 +8,6 @@
|
|||||||
└─░───┘
|
└─░───┘
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
<p align="left">
|
<p align="left">
|
||||||
<p align="left">
|
<p align="left">
|
||||||
<a href="https://github.com/zricethezav/gitleaks/actions/workflows/test.yml">
|
<a href="https://github.com/zricethezav/gitleaks/actions/workflows/test.yml">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<img src="https://img.shields.io/docker/pulls/zricethezav/gitleaks.svg" />
|
<img src="https://img.shields.io/docker/pulls/zricethezav/gitleaks.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.jit.io/jit-open-source-gitleaks?utm_source=github&utm_medium=badge&utm_campaign=GitleaksReadme&utm_id=oss&items=item-secret-detection">
|
<a href="https://www.jit.io/jit-open-source-gitleaks?utm_source=github&utm_medium=badge&utm_campaign=GitleaksReadme&utm_id=oss&items=item-secret-detection">
|
||||||
<img src="https://img.shields.io/badge/Secured%20by-Jit-B8287F?style=?style=plastic" />
|
<img src="https://img.shields.io/badge/Secured%20by-Jit-B8287F?style=?style=plastic" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/zricethezav/gitleaks-action">
|
<a href="https://github.com/zricethezav/gitleaks-action">
|
||||||
<img alt="gitleaks badge" src="https://img.shields.io/badge/protected%20by-gitleaks-blue">
|
<img alt="gitleaks badge" src="https://img.shields.io/badge/protected%20by-gitleaks-blue">
|
||||||
@@ -30,10 +30,14 @@
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
[](https://asciinema.org/a/455683)
|
| Demos |
|
||||||
|
| ----------- |
|
||||||
|
| CLI [](https://asciinema.org/a/455683)|
|
||||||
|
| [Github-Action](https://github.com/gitleaks/gitleaks-action) |
|
||||||
|
|
||||||
## 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.
|
|
||||||
|
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).
|
||||||
|
|
||||||
### MacOS
|
### MacOS
|
||||||
|
|
||||||
@@ -42,31 +46,41 @@ brew install gitleaks
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
#### DockerHub
|
#### DockerHub
|
||||||
|
|
||||||
```bash
|
```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
|
#### ghcr.io
|
||||||
|
|
||||||
```bash
|
```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/
|
1. Download and install Go from https://golang.org/dl/
|
||||||
2. Clone the repo
|
2. Clone the repo
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/zricethezav/gitleaks.git
|
git clone https://github.com/zricethezav/gitleaks.git
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Build the binary
|
3. Build the binary
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd gitleaks
|
cd gitleaks
|
||||||
make build
|
make build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Github Action
|
### Github Action
|
||||||
|
|
||||||
Check out the official [Gitleaks GitHub Action](https://github.com/gitleaks/gitleaks-action)
|
Check out the official [Gitleaks GitHub Action](https://github.com/gitleaks/gitleaks-action)
|
||||||
|
|
||||||
```
|
```
|
||||||
name: gitleaks
|
name: gitleaks
|
||||||
on: [pull_request, push, workflow_dispatch]
|
on: [pull_request, push, workflow_dispatch]
|
||||||
@@ -85,8 +99,10 @@ jobs:
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Pre-Commit
|
### Pre-Commit
|
||||||
|
|
||||||
1. Install pre-commit from https://pre-commit.com/#install
|
1. Install pre-commit from https://pre-commit.com/#install
|
||||||
2. Create a `.pre-commit-config.yaml` file at the root of your repository with the following content:
|
2. Create a `.pre-commit-config.yaml` file at the root of your repository with the following content:
|
||||||
|
|
||||||
```
|
```
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/zricethezav/gitleaks
|
- repo: https://github.com/zricethezav/gitleaks
|
||||||
@@ -94,22 +110,27 @@ jobs:
|
|||||||
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. Install with `pre-commit install`
|
||||||
4. Now you're all set!
|
4. Now you're all set!
|
||||||
|
|
||||||
```
|
```
|
||||||
➜ git commit -m "this commit contains a secret"
|
➜ git commit -m "this commit contains a secret"
|
||||||
Detect hardcoded secrets.................................................Failed
|
Detect hardcoded secrets.................................................Failed
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: to disable the gitleaks pre-commit hook you can prepend `SKIP=gitleaks` to the commit command
|
Note: to disable the gitleaks pre-commit hook you can prepend `SKIP=gitleaks` to the commit command
|
||||||
and it will skip running gitleaks
|
and it will skip running gitleaks
|
||||||
|
|
||||||
```
|
```
|
||||||
➜ SKIP=gitleaks git commit -m "skip gitleaks check"
|
➜ SKIP=gitleaks git commit -m "skip gitleaks check"
|
||||||
Detect hardcoded secrets................................................Skipped
|
Detect hardcoded secrets................................................Skipped
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```
|
```
|
||||||
Usage:
|
Usage:
|
||||||
gitleaks [command]
|
gitleaks [command]
|
||||||
@@ -141,9 +162,12 @@ Use "gitleaks [command] --help" for more information about a command.
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Commands
|
### Commands
|
||||||
|
|
||||||
There are two commands you will use to detect secrets; `detect` and `protect`.
|
There are two commands you will use to detect secrets; `detect` and `protect`.
|
||||||
|
|
||||||
#### Detect
|
#### Detect
|
||||||
The `detect` command is used to scan repos, directories, and files. This command can be used on developer machines and in CI environments.
|
|
||||||
|
The `detect` command is used to scan repos, directories, and files. This command can be used on developer machines and in CI environments.
|
||||||
|
|
||||||
When running `detect` on a git repository, gitleaks will parse the output of a `git log -p` command (you can see how this executed
|
When running `detect` on a git repository, gitleaks will parse the output of a `git log -p` command (you can see how this executed
|
||||||
[here](https://github.com/zricethezav/gitleaks/blob/7240e16769b92d2a1b137c17d6bf9d55a8562899/git/git.go#L17-L25)).
|
[here](https://github.com/zricethezav/gitleaks/blob/7240e16769b92d2a1b137c17d6bf9d55a8562899/git/git.go#L17-L25)).
|
||||||
@@ -155,6 +179,7 @@ See the `git log` [documentation](https://git-scm.com/docs/git-log) for more inf
|
|||||||
You can scan files and directories by using the `--no-git` option.
|
You can scan files and directories by using the `--no-git` option.
|
||||||
|
|
||||||
#### Protect
|
#### Protect
|
||||||
|
|
||||||
The `protect` command is used to uncommitted changes in a git repo. This command should be used on developer machines in accordance with
|
The `protect` command is used to uncommitted changes in a git repo. This command should be used on developer machines in accordance with
|
||||||
[shifting left on security](https://cloud.google.com/architecture/devops/devops-tech-shifting-left-on-security).
|
[shifting left on security](https://cloud.google.com/architecture/devops/devops-tech-shifting-left-on-security).
|
||||||
When running `protect` on a git repository, gitleaks will parse the output of a `git diff` command (you can see how this executed
|
When running `protect` on a git repository, gitleaks will parse the output of a `git diff` command (you can see how this executed
|
||||||
@@ -165,8 +190,10 @@ 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.
|
||||||
|
|
||||||
### 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:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"Description": "AWS",
|
"Description": "AWS",
|
||||||
@@ -188,15 +215,19 @@ Example output:
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We can use the following format to verify the leak:
|
We can use the following format to verify the leak:
|
||||||
|
|
||||||
```
|
```
|
||||||
git log -L {StartLine,EndLine}:{File} {Commit}
|
git log -L {StartLine,EndLine}:{File} {Commit}
|
||||||
```
|
```
|
||||||
|
|
||||||
So in this example it would look like:
|
So in this example it would look like:
|
||||||
|
|
||||||
```
|
```
|
||||||
git log -L 37,37:checks_test.go ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
|
git log -L 37,37:checks_test.go ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
|
||||||
```
|
```
|
||||||
|
|
||||||
Which gives us:
|
Which gives us:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -215,15 +246,34 @@ diff --git a/checks_test.go b/checks_test.go
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Pre-Commit hook
|
## Pre-Commit hook
|
||||||
|
|
||||||
You can run Gitleaks as a pre-commit hook by copying the example `pre-commit.py` script into
|
You can run Gitleaks as a pre-commit hook by copying the example `pre-commit.py` script into
|
||||||
your `.git/hooks/` directory.
|
your `.git/hooks/` directory.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Gitleaks offers a configuration format you can follow to write your own secret detection rules:
|
Gitleaks offers a configuration format you can follow to write your own secret detection rules:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# Title for the gitleaks configuration file.
|
# Title for the gitleaks configuration file.
|
||||||
title = "Gitleaks title"
|
title = "Gitleaks title"
|
||||||
|
|
||||||
|
# Extend the base (this) configuration. When you extend a configuration
|
||||||
|
# the base rules take precendence over the extended rules. I.e, if there are
|
||||||
|
# duplicate rules in both the base configuration and the extended configuration
|
||||||
|
# the base rules will override the extended rules.
|
||||||
|
# Another thing to know with extending configurations is you can chain together
|
||||||
|
# multiple configuration files to a depth of 2. Allowlist arrays are appended
|
||||||
|
# and can contain duplicates.
|
||||||
|
# useDefault and path can NOT be used at the same time. Choose one.
|
||||||
|
[extend]
|
||||||
|
# useDefault will extend the base configuration with the default gitleaks config:
|
||||||
|
# https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
|
||||||
|
useDefault = true
|
||||||
|
# or you can supply a path to a configuration. Path is relative to where gitleaks
|
||||||
|
# was invoked, not the location of the base config.
|
||||||
|
path = "common_config.toml"
|
||||||
|
|
||||||
# An array of tables that contain information that define instructions
|
# An array of tables that contain information that define instructions
|
||||||
# on how to detect secrets
|
# on how to detect secrets
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -306,24 +356,39 @@ stopwords = [
|
|||||||
'''endpoint''',
|
'''endpoint''',
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
Refer to the default [gitleaks config](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) for examples and advice on writing regular expressions for secret detection.
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 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.
|
||||||
|
|
||||||
## Sponsorships
|
## Sponsorships
|
||||||
|
|
||||||
<p align="left">
|
<p align="left">
|
||||||
<a href="https://www.tines.com/?utm_source=oss&utm_medium=sponsorship&utm_campaign=gitleaks">
|
<a href="https://www.tines.com/?utm_source=oss&utm_medium=sponsorship&utm_campaign=gitleaks">
|
||||||
<img alt="Tines Sponsorship" src="https://user-images.githubusercontent.com/15034943/146411864-4878f936-b4f7-49a0-b625-f9f40c704bfa.png" width=200>
|
<img alt="Tines Sponsorship" src="https://user-images.githubusercontent.com/15034943/146411864-4878f936-b4f7-49a0-b625-f9f40c704bfa.png" width=200>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Exit Codes
|
## Exit Codes
|
||||||
|
|
||||||
You can always set the exit code when leaks are encountered with the --exit-code flag. Default exit codes below:
|
You can always set the exit code when leaks are encountered with the --exit-code flag. Default exit codes below:
|
||||||
|
|
||||||
```
|
```
|
||||||
0 - no leaks present
|
0 - no leaks present
|
||||||
1 - leaks or error encountered
|
1 - leaks or error encountered
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ func runDetect(cmd *cobra.Command, args []string) {
|
|||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for a .gitleaksignore file
|
||||||
|
if info, err := os.Stat(filepath.Join(source, ".gitleaksignore")); !os.IsNotExist(err) && !info.IsDir() {
|
||||||
|
detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore"))
|
||||||
|
}
|
||||||
|
|
||||||
// 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 {
|
||||||
|
|||||||
@@ -16,9 +16,11 @@ const (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
configRules := []*config.Rule{}
|
configRules := []*config.Rule{}
|
||||||
|
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())
|
||||||
configRules = append(configRules, rules.AgeSecretKey())
|
configRules = append(configRules, rules.AgeSecretKey())
|
||||||
|
configRules = append(configRules, rules.Airtable())
|
||||||
configRules = append(configRules, rules.AlgoliaApiKey())
|
configRules = append(configRules, rules.AlgoliaApiKey())
|
||||||
configRules = append(configRules, rules.AlibabaAccessKey())
|
configRules = append(configRules, rules.AlibabaAccessKey())
|
||||||
configRules = append(configRules, rules.AlibabaSecretKey())
|
configRules = append(configRules, rules.AlibabaSecretKey())
|
||||||
@@ -28,41 +30,60 @@ func main() {
|
|||||||
configRules = append(configRules, rules.AWS())
|
configRules = append(configRules, rules.AWS())
|
||||||
configRules = append(configRules, rules.BitBucketClientID())
|
configRules = append(configRules, rules.BitBucketClientID())
|
||||||
configRules = append(configRules, rules.BitBucketClientSecret())
|
configRules = append(configRules, rules.BitBucketClientSecret())
|
||||||
|
configRules = append(configRules, rules.BittrexAccessKey())
|
||||||
|
configRules = append(configRules, rules.BittrexSecretKey())
|
||||||
configRules = append(configRules, rules.Beamer())
|
configRules = append(configRules, rules.Beamer())
|
||||||
|
configRules = append(configRules, rules.CodecovAccessToken())
|
||||||
|
configRules = append(configRules, rules.CoinbaseAccessToken())
|
||||||
configRules = append(configRules, rules.Clojars())
|
configRules = append(configRules, rules.Clojars())
|
||||||
|
configRules = append(configRules, rules.ConfluentAccessToken())
|
||||||
|
configRules = append(configRules, rules.ConfluentSecretKey())
|
||||||
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.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())
|
||||||
|
configRules = append(configRules, rules.Doppler())
|
||||||
configRules = append(configRules, rules.DropBoxAPISecret())
|
configRules = append(configRules, rules.DropBoxAPISecret())
|
||||||
configRules = append(configRules, rules.DropBoxLongLivedAPIToken())
|
configRules = append(configRules, rules.DropBoxLongLivedAPIToken())
|
||||||
configRules = append(configRules, rules.DropBoxShortLivedAPIToken())
|
configRules = append(configRules, rules.DropBoxShortLivedAPIToken())
|
||||||
configRules = append(configRules, rules.Doppler())
|
configRules = append(configRules, rules.DroneciAccessToken())
|
||||||
configRules = append(configRules, rules.Duffel())
|
configRules = append(configRules, rules.Duffel())
|
||||||
configRules = append(configRules, rules.Dynatrace())
|
configRules = append(configRules, rules.Dynatrace())
|
||||||
configRules = append(configRules, rules.EasyPost())
|
configRules = append(configRules, rules.EasyPost())
|
||||||
configRules = append(configRules, rules.EasyPostTestAPI())
|
configRules = append(configRules, rules.EasyPostTestAPI())
|
||||||
|
configRules = append(configRules, rules.EtsyAccessToken())
|
||||||
configRules = append(configRules, rules.Facebook())
|
configRules = append(configRules, rules.Facebook())
|
||||||
configRules = append(configRules, rules.FastlyAPIToken())
|
configRules = append(configRules, rules.FastlyAPIToken())
|
||||||
configRules = append(configRules, rules.FinicityClientSecret())
|
configRules = append(configRules, rules.FinicityClientSecret())
|
||||||
configRules = append(configRules, rules.FinicityAPIToken())
|
configRules = append(configRules, rules.FinicityAPIToken())
|
||||||
|
configRules = append(configRules, rules.FlickrAccessToken())
|
||||||
|
configRules = append(configRules, rules.FinnhubAccessToken())
|
||||||
configRules = append(configRules, rules.FlutterwavePublicKey())
|
configRules = append(configRules, rules.FlutterwavePublicKey())
|
||||||
configRules = append(configRules, rules.FlutterwaveSecretKey())
|
configRules = append(configRules, rules.FlutterwaveSecretKey())
|
||||||
configRules = append(configRules, rules.FlutterwaveEncKey())
|
configRules = append(configRules, rules.FlutterwaveEncKey())
|
||||||
configRules = append(configRules, rules.FrameIO())
|
configRules = append(configRules, rules.FrameIO())
|
||||||
|
configRules = append(configRules, rules.FreshbooksAccessToken())
|
||||||
configRules = append(configRules, rules.GoCardless())
|
configRules = append(configRules, rules.GoCardless())
|
||||||
// TODO figure out what makes sense for GCP
|
// TODO figure out what makes sense for GCP
|
||||||
// configRules = append(configRules, rules.GCPServiceAccount())
|
// configRules = append(configRules, rules.GCPServiceAccount())
|
||||||
|
configRules = append(configRules, rules.GCPAPIKey())
|
||||||
configRules = append(configRules, rules.GitHubPat())
|
configRules = append(configRules, rules.GitHubPat())
|
||||||
configRules = append(configRules, rules.GitHubOauth())
|
configRules = append(configRules, rules.GitHubOauth())
|
||||||
configRules = append(configRules, rules.GitHubApp())
|
configRules = append(configRules, rules.GitHubApp())
|
||||||
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.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.KucoinAccessToken())
|
||||||
|
configRules = append(configRules, rules.KucoinSecretKey())
|
||||||
|
configRules = append(configRules, rules.LaunchDarklyAccessToken())
|
||||||
configRules = append(configRules, rules.LinearAPIToken())
|
configRules = append(configRules, rules.LinearAPIToken())
|
||||||
configRules = append(configRules, rules.LinearClientSecret())
|
configRules = append(configRules, rules.LinearClientSecret())
|
||||||
configRules = append(configRules, rules.LinkedinClientID())
|
configRules = append(configRules, rules.LinkedinClientID())
|
||||||
@@ -74,12 +95,19 @@ func main() {
|
|||||||
configRules = append(configRules, rules.MailGunPrivateAPIToken())
|
configRules = append(configRules, rules.MailGunPrivateAPIToken())
|
||||||
configRules = append(configRules, rules.MailGunSigningKey())
|
configRules = append(configRules, rules.MailGunSigningKey())
|
||||||
configRules = append(configRules, rules.MapBox())
|
configRules = append(configRules, rules.MapBox())
|
||||||
|
configRules = append(configRules, rules.MattermostAccessToken())
|
||||||
configRules = append(configRules, rules.MessageBirdAPIToken())
|
configRules = append(configRules, rules.MessageBirdAPIToken())
|
||||||
configRules = append(configRules, rules.MessageBirdClientID())
|
configRules = append(configRules, rules.MessageBirdClientID())
|
||||||
|
configRules = append(configRules, rules.NetlifyAccessToken())
|
||||||
configRules = append(configRules, rules.NewRelicUserID())
|
configRules = append(configRules, rules.NewRelicUserID())
|
||||||
configRules = append(configRules, rules.NewRelicUserKey())
|
configRules = append(configRules, rules.NewRelicUserKey())
|
||||||
configRules = append(configRules, rules.NewRelicBrowserAPIKey())
|
configRules = append(configRules, rules.NewRelicBrowserAPIKey())
|
||||||
configRules = append(configRules, rules.NPM())
|
configRules = append(configRules, rules.NPM())
|
||||||
|
configRules = append(configRules, rules.NytimesAccessToken())
|
||||||
|
configRules = append(configRules, rules.OktaAccessToken())
|
||||||
|
configRules = append(configRules, rules.PlaidAccessID())
|
||||||
|
configRules = append(configRules, rules.PlaidSecretKey())
|
||||||
|
configRules = append(configRules, rules.PlaidAccessToken())
|
||||||
configRules = append(configRules, rules.PlanetScalePassword())
|
configRules = append(configRules, rules.PlanetScalePassword())
|
||||||
configRules = append(configRules, rules.PlanetScaleAPIToken())
|
configRules = append(configRules, rules.PlanetScaleAPIToken())
|
||||||
configRules = append(configRules, rules.PlanetScaleOAuthToken())
|
configRules = append(configRules, rules.PlanetScaleOAuthToken())
|
||||||
@@ -88,33 +116,56 @@ func main() {
|
|||||||
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.RubyGemsAPIToken())
|
||||||
|
configRules = append(configRules, rules.RapidAPIAccessToken())
|
||||||
|
configRules = append(configRules, rules.SendbirdAccessID())
|
||||||
|
configRules = append(configRules, rules.SendbirdAccessToken())
|
||||||
configRules = append(configRules, rules.SendGridAPIToken())
|
configRules = append(configRules, rules.SendGridAPIToken())
|
||||||
configRules = append(configRules, rules.SendInBlueAPIToken())
|
configRules = append(configRules, rules.SendInBlueAPIToken())
|
||||||
|
configRules = append(configRules, rules.SentryAccessToken())
|
||||||
configRules = append(configRules, rules.ShippoAPIToken())
|
configRules = append(configRules, rules.ShippoAPIToken())
|
||||||
configRules = append(configRules, rules.ShopifyAccessToken())
|
configRules = append(configRules, rules.ShopifyAccessToken())
|
||||||
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())
|
||||||
|
configRules = append(configRules, rules.SquareAccessToken())
|
||||||
|
configRules = append(configRules, rules.SquareSpaceAccessToken())
|
||||||
|
configRules = append(configRules, rules.SumoLogicAccessID())
|
||||||
|
configRules = append(configRules, rules.SumoLogicAccessToken())
|
||||||
|
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())
|
||||||
configRules = append(configRules, rules.Twitter())
|
configRules = append(configRules, rules.TwitterAPIKey())
|
||||||
|
configRules = append(configRules, rules.TwitterAPISecret())
|
||||||
|
configRules = append(configRules, rules.TwitterAccessToken())
|
||||||
|
configRules = append(configRules, rules.TwitterAccessSecret())
|
||||||
|
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.YandexAWSAccessToken())
|
||||||
|
configRules = append(configRules, rules.YandexAccessToken())
|
||||||
|
configRules = append(configRules, rules.ZendeskSecretKey())
|
||||||
configRules = append(configRules, rules.GenericCredential())
|
configRules = append(configRules, rules.GenericCredential())
|
||||||
|
|
||||||
// ensure rules have unique ids
|
// ensure rules have unique ids
|
||||||
ruleLookUp := make(map[string]bool)
|
ruleLookUp := make(map[string]config.Rule)
|
||||||
for _, rule := range configRules {
|
for _, rule := range configRules {
|
||||||
// check if rule is in ruleLookUp
|
// check if rule is in ruleLookUp
|
||||||
if _, ok := ruleLookUp[rule.RuleID]; ok {
|
if _, ok := ruleLookUp[rule.RuleID]; ok {
|
||||||
log.Fatal().Msgf("rule id %s is not unique", rule.RuleID)
|
log.Fatal().Msgf("rule id %s is not unique", rule.RuleID)
|
||||||
}
|
}
|
||||||
ruleLookUp[rule.RuleID] = true
|
// TODO: eventually change all the signatures to get ride of this
|
||||||
|
// nasty dereferencing.
|
||||||
|
ruleLookUp[rule.RuleID] = *rule
|
||||||
}
|
}
|
||||||
config := config.Config{
|
config := config.Config{
|
||||||
Rules: configRules,
|
Rules: ruleLookUp,
|
||||||
}
|
}
|
||||||
tmpl, err := template.ParseFiles(templatePath)
|
tmpl, err := template.ParseFiles(templatePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdafruitAPIKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Adafruit API Key",
|
||||||
|
RuleID: "adafruit-api-key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"adafruit"}, alphaNumericExtendedShort("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"adafruit"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("adafruit", secrets.NewSecret(alphaNumericExtendedShort("32"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
func AdobeClientID() *config.Rule {
|
func AdobeClientID() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Adobe Client ID (Oauth Web)",
|
Description: "Adobe Client ID (OAuth Web)",
|
||||||
RuleID: "adobe-client-id",
|
RuleID: "adobe-client-id",
|
||||||
Regex: generateSemiGenericRegex([]string{"adobe"}, hex("32")),
|
Regex: generateSemiGenericRegex([]string{"adobe"}, hex("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Airtable() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Airtable API Key",
|
||||||
|
RuleID: "airtable-api-key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"airtable"}, alphaNumeric("17")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"airtable"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("airtable", secrets.NewSecret(alphaNumeric("17"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -10,9 +10,10 @@ func Atlassian() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Atlassian API token",
|
Description: "Atlassian API token",
|
||||||
RuleID: "atlassian-api-token",
|
RuleID: "atlassian-api-token",
|
||||||
Regex: generateSemiGenericRegex([]string{"atlassian", "confluence"}, alphaNumeric("24")),
|
Regex: generateSemiGenericRegex([]string{
|
||||||
|
"atlassian", "confluence", "jira"}, alphaNumeric("24")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"atlassian", "confluence"},
|
Keywords: []string{"atlassian", "confluence", "jira"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
func BitBucketClientID() *config.Rule {
|
func BitBucketClientID() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "BitBucket Client ID",
|
Description: "Bitbucket Client ID",
|
||||||
RuleID: "bitbucket-client-id",
|
RuleID: "bitbucket-client-id",
|
||||||
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumeric("32")),
|
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumeric("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
@@ -25,7 +25,7 @@ func BitBucketClientID() *config.Rule {
|
|||||||
func BitBucketClientSecret() *config.Rule {
|
func BitBucketClientSecret() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "BitBucket Client Secret",
|
Description: "Bitbucket Client Secret",
|
||||||
RuleID: "bitbucket-client-secret",
|
RuleID: "bitbucket-client-secret",
|
||||||
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumericExtended("64")),
|
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumericExtended("64")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func BittrexAccessKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Bittrex Access Key",
|
||||||
|
RuleID: "bittrex-access-key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"bittrex"}, alphaNumeric("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"bittrex"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("bittrex", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func BittrexSecretKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Bittrex Secret Key",
|
||||||
|
RuleID: "bittrex-secret-key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"bittrex"}, alphaNumeric("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"bittrex"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("bittrex", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
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 CodecovAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "codecov-access-token",
|
||||||
|
Description: "Codecov Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"codecov"}, alphaNumeric("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"codecov",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("codecov", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func CoinbaseAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "coinbase-access-token",
|
||||||
|
Description: "Coinbase Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"coinbase"},
|
||||||
|
alphaNumericExtendedShort("64")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"coinbase",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("coinbase",
|
||||||
|
secrets.NewSecret(alphaNumericExtendedShort("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -1,20 +1,23 @@
|
|||||||
|
# This file has been auto-generated. Do not edit manually.
|
||||||
|
# If you would like to contribute new rules, please use
|
||||||
|
# cmd/generate/config/main.go and follow the contributing guidelines
|
||||||
|
# at https://github.com/zricethezav/gitleaks/blob/master/CONTRIBUTING.md
|
||||||
|
|
||||||
# This is the default gitleaks configuration file.
|
# This is the default gitleaks configuration file.
|
||||||
# Rules and allowlists are defined within this file.
|
# Rules and allowlists are defined within this file.
|
||||||
# Rules instruct gitleaks on what should be considered a secret.
|
# Rules instruct gitleaks on what should be considered a secret.
|
||||||
# Allowlists instruct gitleaks on what is allowed, i.e. not a secret.
|
# Allowlists instruct gitleaks on what is allowed, i.e. not a secret.
|
||||||
|
|
||||||
title = "gitleaks config"
|
title = "gitleaks config"
|
||||||
|
|
||||||
[allowlist]
|
[allowlist]
|
||||||
description = "global allow lists"
|
description = "global allow lists"
|
||||||
regexes = [
|
|
||||||
'''219-09-9999''',
|
|
||||||
'''078-05-1120''',
|
|
||||||
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
|
|
||||||
]
|
|
||||||
paths = [
|
paths = [
|
||||||
'''gitleaks.toml''',
|
'''gitleaks.toml''',
|
||||||
'''(.*?)(jpg|gif|doc|pdf|bin|svg|socket)$''',
|
'''(.*?)(jpg|gif|doc|docx|zip|xls|pdf|bin|svg|socket)$''',
|
||||||
'''(go.mod|go.sum)$'''
|
'''(go.mod|go.sum)$''',
|
||||||
|
'''node_modules''',
|
||||||
|
'''vendor''',
|
||||||
]
|
]
|
||||||
|
|
||||||
{{ range $i, $rule := .Rules }}[[rules]]
|
{{ range $i, $rule := .Rules }}[[rules]]
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ConfluentSecretKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "confluent-secret-key",
|
||||||
|
Description: "Confluent Secret Key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("64")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"confluent",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func ConfluentAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "confluent-access-token",
|
||||||
|
Description: "Confluent Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("16")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"confluent",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("16"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func DatadogtokenAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "datadog-access-token",
|
||||||
|
Description: "Datadog Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"datadog"},
|
||||||
|
alphaNumeric("40")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"datadog",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("datadog", secrets.NewSecret(alphaNumeric("40"))),
|
||||||
|
}
|
||||||
|
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 DroneciAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "droneci-access-token",
|
||||||
|
Description: "Droneci Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"droneci"}, alphaNumeric("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"droneci",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("droneci", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
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 EtsyAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "etsy-access-token",
|
||||||
|
Description: "Etsy Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"etsy"}, alphaNumeric("24")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"etsy",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("etsy", secrets.NewSecret(alphaNumeric("24"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
func Facebook() *config.Rule {
|
func Facebook() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "facebook",
|
Description: "Facebook",
|
||||||
RuleID: "facebook",
|
RuleID: "facebook",
|
||||||
Regex: generateSemiGenericRegex([]string{"facebook"}, hex("32")),
|
Regex: generateSemiGenericRegex([]string{"facebook"}, hex("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FinnhubAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "finnhub-access-token",
|
||||||
|
Description: "Finnhub Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"finnhub"}, alphaNumeric("20")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"finnhub",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("finnhub", secrets.NewSecret(alphaNumeric("20"))),
|
||||||
|
}
|
||||||
|
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 FlickrAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "flickr-access-token",
|
||||||
|
Description: "Flickr Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"flickr"}, alphaNumeric("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"flickr",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("flickr", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
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 FreshbooksAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "freshbooks-access-token",
|
||||||
|
Description: "Freshbooks Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"freshbooks"}, alphaNumeric("64")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"freshbooks",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("freshbooks", secrets.NewSecret(alphaNumeric("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package rules
|
|||||||
import (
|
import (
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -22,3 +23,22 @@ func GCPServiceAccount() *config.Rule {
|
|||||||
}
|
}
|
||||||
return validate(r, tps, nil)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GCPAPIKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "gcp-api-key",
|
||||||
|
Description: "GCP API key",
|
||||||
|
Regex: generateUniqueTokenRegex(`AIza[0-9A-Za-z\\-_]{35}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"AIza",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("gcp", secrets.NewSecret(`AIza[0-9A-Za-z\\-_]{35}`)),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -18,6 +18,7 @@ func GenericCredential() *config.Rule {
|
|||||||
"passwd",
|
"passwd",
|
||||||
"password",
|
"password",
|
||||||
"auth",
|
"auth",
|
||||||
|
"access",
|
||||||
}, `[0-9a-z\-_.=]{10,150}`),
|
}, `[0-9a-z\-_.=]{10,150}`),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
@@ -29,6 +30,7 @@ func GenericCredential() *config.Rule {
|
|||||||
"passwd",
|
"passwd",
|
||||||
"password",
|
"password",
|
||||||
"auth",
|
"auth",
|
||||||
|
"access",
|
||||||
},
|
},
|
||||||
Entropy: 3.5,
|
Entropy: 3.5,
|
||||||
Allowlist: config.Allowlist{
|
Allowlist: config.Allowlist{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
func Gitlab() *config.Rule {
|
func Gitlab() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Gitlab Personal Access Token",
|
Description: "GitLab Personal Access Token",
|
||||||
RuleID: "gitlab-pat",
|
RuleID: "gitlab-pat",
|
||||||
Regex: regexp.MustCompile(`glpat-[0-9a-zA-Z\-\_]{20}`),
|
Regex: regexp.MustCompile(`glpat-[0-9a-zA-Z\-\_]{20}`),
|
||||||
Keywords: []string{"glpat-"},
|
Keywords: []string{"glpat-"},
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GitterAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "gitter-access-token",
|
||||||
|
Description: "Gitter Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"gitter"},
|
||||||
|
alphaNumericExtendedShort("40")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"gitter",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("gitter",
|
||||||
|
secrets.NewSecret(alphaNumericExtendedShort("40"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -9,8 +9,7 @@ func Heroku() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Heroku API Key",
|
Description: "Heroku API Key",
|
||||||
RuleID: "heroku-api-key",
|
RuleID: "heroku-api-key",
|
||||||
Regex: generateSemiGenericRegex([]string{"heroku"},
|
Regex: generateSemiGenericRegex([]string{"heroku"}, hex8_4_4_4_12()),
|
||||||
`[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}`),
|
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"heroku"},
|
Keywords: []string{"heroku"},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
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,27 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func KrakenAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "kraken-access-token",
|
||||||
|
Description: "Kraken Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"kraken"},
|
||||||
|
alphaNumericExtendedLong("80,90")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"kraken",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("kraken",
|
||||||
|
secrets.NewSecret(alphaNumericExtendedLong("80,90"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func KucoinAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "kucoin-access-token",
|
||||||
|
Description: "Kucoin Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"kucoin"}, hex("24")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"kucoin",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("kucoin", secrets.NewSecret(hex("24"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func KucoinSecretKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "kucoin-secret-key",
|
||||||
|
Description: "Kucoin Secret Key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"kucoin"}, hex8_4_4_4_12()),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"kucoin",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("kucoin", secrets.NewSecret(hex8_4_4_4_12())),
|
||||||
|
}
|
||||||
|
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 LaunchDarklyAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "launchdarkly-access-token",
|
||||||
|
Description: "Launchdarkly Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"launchdarkly"}, alphaNumericExtended("40")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"launchdarkly",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("launchdarkly", secrets.NewSecret(alphaNumericExtended("40"))),
|
||||||
|
}
|
||||||
|
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 MattermostAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "mattermost-access-token",
|
||||||
|
Description: "Mattermost Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"mattermost"}, alphaNumeric("26")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"mattermost",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("mattermost", secrets.NewSecret(alphaNumeric("26"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -41,7 +41,7 @@ func MessageBirdClientID() *config.Rule {
|
|||||||
"messagebird",
|
"messagebird",
|
||||||
"message-bird",
|
"message-bird",
|
||||||
"message_bird",
|
"message_bird",
|
||||||
}, `[a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12}`),
|
}, hex8_4_4_4_12()),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"messagebird",
|
"messagebird",
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NetlifyAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "netlify-access-token",
|
||||||
|
Description: "Netlify Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"netlify"},
|
||||||
|
alphaNumericExtended("40,46")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"netlify",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("netlify", secrets.NewSecret(alphaNumericExtended("40,46"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NytimesAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "nytimes-access-token",
|
||||||
|
Description: "Nytimes Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{
|
||||||
|
"nytimes", "new-york-times,", "newyorktimes"},
|
||||||
|
alphaNumericExtended("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"nytimes",
|
||||||
|
"new-york-times",
|
||||||
|
"newyorktimes",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("nytimes", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func OktaAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "okta-access-token",
|
||||||
|
Description: "Okta Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"okta"},
|
||||||
|
alphaNumericExtended("42")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"okta",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("okta", secrets.NewSecret(alphaNumeric("42"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func PlaidAccessID() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "plaid-client-id",
|
||||||
|
Description: "Plaid Client ID",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"plaid"}, alphaNumeric("24")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"plaid",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("plaid", secrets.NewSecret(alphaNumeric("24"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func PlaidSecretKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "plaid-secret-key",
|
||||||
|
Description: "Plaid Secret key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"plaid"}, alphaNumeric("30")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"plaid",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("plaid", secrets.NewSecret(alphaNumeric("30"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func PlaidAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "plaid-api-token",
|
||||||
|
Description: "Plaid API Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"plaid"},
|
||||||
|
fmt.Sprintf("access-(?:sandbox|development|production)-%s", hex8_4_4_4_12())),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"plaid",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("plaid", secrets.NewSecret(fmt.Sprintf("access-(?:sandbox|development|production)-%s", hex8_4_4_4_12()))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func RapidAPIAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "rapidapi-access-token",
|
||||||
|
Description: "RapidAPI Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"rapidapi"},
|
||||||
|
alphaNumericExtendedShort("50")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"rapidapi",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("rapidapi",
|
||||||
|
secrets.NewSecret(alphaNumericExtendedShort("50"))),
|
||||||
|
}
|
||||||
|
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 {
|
||||||
@@ -62,18 +62,20 @@ func validate(r config.Rule, truePositives []string, falsePositives []string) *c
|
|||||||
}
|
}
|
||||||
r.Keywords = keywords
|
r.Keywords = keywords
|
||||||
|
|
||||||
|
rules := make(map[string]config.Rule)
|
||||||
|
rules[r.RuleID] = r
|
||||||
d := detect.NewDetector(config.Config{
|
d := detect.NewDetector(config.Config{
|
||||||
Rules: []*config.Rule{&r},
|
Rules: rules,
|
||||||
Keywords: keywords,
|
Keywords: keywords,
|
||||||
})
|
})
|
||||||
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
|
||||||
@@ -91,6 +93,18 @@ func alphaNumeric(size string) string {
|
|||||||
return fmt.Sprintf(`[a-z0-9]{%s}`, size)
|
return fmt.Sprintf(`[a-z0-9]{%s}`, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func alphaNumericExtendedShort(size string) string {
|
||||||
|
return fmt.Sprintf(`[a-z0-9_-]{%s}`, size)
|
||||||
|
}
|
||||||
|
|
||||||
func alphaNumericExtended(size string) string {
|
func alphaNumericExtended(size string) string {
|
||||||
return fmt.Sprintf(`[a-z0-9=_\-]{%s}`, size)
|
return fmt.Sprintf(`[a-z0-9=_\-]{%s}`, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func alphaNumericExtendedLong(size string) string {
|
||||||
|
return fmt.Sprintf(`[a-z0-9\/=_\+\-]{%s}`, size)
|
||||||
|
}
|
||||||
|
|
||||||
|
func hex8_4_4_4_12() string {
|
||||||
|
return `[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SendbirdAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "sendbird-access-token",
|
||||||
|
Description: "Sendbird Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"sendbird"}, hex("40")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"sendbird",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("sendbird", secrets.NewSecret(hex("40"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SendbirdAccessID() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "sendbird-access-id",
|
||||||
|
Description: "Sendbird Access ID",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"sendbird"}, hex8_4_4_4_12()),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"sendbird",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("sendbird", secrets.NewSecret(hex8_4_4_4_12())),
|
||||||
|
}
|
||||||
|
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 SentryAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "sentry-access-token",
|
||||||
|
Description: "Sentry Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"sentry"}, hex("64")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"sentry",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("sentry", secrets.NewSecret(hex("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SquareAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "square-access-token",
|
||||||
|
Description: "Square Access Token",
|
||||||
|
Regex: generateUniqueTokenRegex(`sq0atp-[0-9A-Za-z\-_]{22}`),
|
||||||
|
Keywords: []string{"sq0atp-"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("square", secrets.NewSecret(`sq0atp-[0-9A-Za-z\-_]{22}`)),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SquareSecret() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "square-secret",
|
||||||
|
Description: "Square Secret",
|
||||||
|
Regex: generateUniqueTokenRegex(`sq0csp-[0-9A-Za-z\\-_]{43}`),
|
||||||
|
Keywords: []string{"sq0csp-"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("square", secrets.NewSecret(`sq0csp-[0-9A-Za-z\\-_]{43}`)),
|
||||||
|
}
|
||||||
|
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 SquareSpaceAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "squarespace-access-token",
|
||||||
|
Description: "Squarespace Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"squarespace"}, hex8_4_4_4_12()),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"squarespace",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("squarespace", secrets.NewSecret(hex8_4_4_4_12())),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -229,7 +229,7 @@ var DefaultStopWords = []string{
|
|||||||
"gaia",
|
"gaia",
|
||||||
"display",
|
"display",
|
||||||
"universal",
|
"universal",
|
||||||
"function",
|
"func",
|
||||||
"metadata",
|
"metadata",
|
||||||
"hipchat",
|
"hipchat",
|
||||||
"under",
|
"under",
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SumoLogicAccessID() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "sumologic-access-id",
|
||||||
|
Description: "SumoLogic Access ID",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"sumo"},
|
||||||
|
alphaNumeric("14")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"sumo",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("sumo", secrets.NewSecret(alphaNumeric("14"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SumoLogicAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "sumologic-access-token",
|
||||||
|
Description: "SumoLogic Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"sumo"},
|
||||||
|
alphaNumeric("64")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"sumo",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("sumo", secrets.NewSecret(alphaNumeric("64"))),
|
||||||
|
}
|
||||||
|
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 TravisCIAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "travisci-access-token",
|
||||||
|
Description: "Travis CI Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"travis"}, alphaNumeric("22")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"travis",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("travis", secrets.NewSecret(alphaNumeric("22"))),
|
||||||
|
}
|
||||||
|
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 TrelloAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "trello-access-token",
|
||||||
|
Description: "Trello Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"trello"}, `[a-zA-Z-0-9]{32}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"trello",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("trello", secrets.NewSecret(`[a-zA-Z-0-9]{32}`)),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -5,20 +5,87 @@ import (
|
|||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Twitter() *config.Rule {
|
func TwitterAPIKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "twitter",
|
Description: "Twitter API Key",
|
||||||
RuleID: "twitter",
|
RuleID: "twitter-api-key",
|
||||||
Regex: generateSemiGenericRegex([]string{"twitter"}, hex("35,44")),
|
Regex: generateSemiGenericRegex([]string{"twitter"}, alphaNumeric("25")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"twitter"},
|
Keywords: []string{"twitter"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"twitterToken := \"" + secrets.NewSecret(hex("36")) + "aaaa\"",
|
generateSampleSecret("twitter", secrets.NewSecret(alphaNumeric("25"))),
|
||||||
"twitterToken := `" + secrets.NewSecret(hex("36")) + "aaaa`",
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TwitterAPISecret() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Twitter API Secret",
|
||||||
|
RuleID: "twitter-api-secret",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"twitter"}, alphaNumeric("50")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"twitter"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("twitter", secrets.NewSecret(alphaNumeric("50"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TwitterBearerToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Twitter Bearer Token",
|
||||||
|
RuleID: "twitter-bearer-token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"twitter"}, "A{22}[a-zA-Z0-9%]{80,100}"),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"twitter"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("twitter", secrets.NewSecret("A{22}[a-zA-Z0-9%]{80,100}")),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TwitterAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Twitter Access Token",
|
||||||
|
RuleID: "twitter-access-token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"twitter"}, "[0-9]{15,25}-[a-zA-Z0-9]{20,40}"),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"twitter"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("twitter", secrets.NewSecret("[0-9]{15,25}-[a-zA-Z0-9]{20,40}")),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TwitterAccessSecret() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Twitter Access Secret",
|
||||||
|
RuleID: "twitter-access-secret",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"twitter"}, alphaNumeric("45")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{"twitter"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("twitter", secrets.NewSecret(alphaNumeric("45"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps, nil)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func YandexAWSAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "yandex-aws-access-token",
|
||||||
|
Description: "Yandex AWS Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"yandex"},
|
||||||
|
`YC[a-zA-Z0-9_\-]{38}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"yandex",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("yandex",
|
||||||
|
secrets.NewSecret(`YC[a-zA-Z0-9_\-]{38}`)),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func YandexAPIKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "yandex-api-key",
|
||||||
|
Description: "Yandex API Key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"yandex"},
|
||||||
|
`AQVN[A-Za-z0-9_\-]{35,38}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"yandex",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("yandex",
|
||||||
|
secrets.NewSecret(`AQVN[A-Za-z0-9_\-]{35,38}`)),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func YandexAccessToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "yandex-access-token",
|
||||||
|
Description: "Yandex Access Token",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"yandex"},
|
||||||
|
`t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"yandex",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("yandex",
|
||||||
|
secrets.NewSecret(`t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2}`)),
|
||||||
|
}
|
||||||
|
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 ZendeskSecretKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "zendesk-secret-key",
|
||||||
|
Description: "Zendesk Secret Key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"zendesk"}, alphaNumeric("40")),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"zendesk",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("zendesk", secrets.NewSecret(alphaNumeric("40"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
+12
-10
@@ -19,13 +19,13 @@ const banner = `
|
|||||||
│╲
|
│╲
|
||||||
│ ○
|
│ ○
|
||||||
○ ░
|
○ ░
|
||||||
░ gitleaks
|
░ gitleaks
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
const configDescription = `config file path
|
const configDescription = `config file path
|
||||||
order of precedence:
|
order of precedence:
|
||||||
1. --config/-c
|
1. --config/-c
|
||||||
2. env var GITLEAKS_CONFIG
|
2. env var GITLEAKS_CONFIG
|
||||||
3. (--source/-s)/.gitleaks.toml
|
3. (--source/-s)/.gitleaks.toml
|
||||||
If none of the three options are used, then gitleaks will use the default config`
|
If none of the three options are used, then gitleaks will use the default config`
|
||||||
@@ -42,7 +42,7 @@ 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("log-level", "l", "info", "log level (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().Bool("redact", false, "redact secrets from logs and stdout")
|
rootCmd.PersistentFlags().Bool("redact", false, "redact secrets from logs and stdout")
|
||||||
err := viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))
|
err := viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))
|
||||||
@@ -58,6 +58,8 @@ func initLog() {
|
|||||||
log.Fatal().Msg(err.Error())
|
log.Fatal().Msg(err.Error())
|
||||||
}
|
}
|
||||||
switch strings.ToLower(ll) {
|
switch strings.ToLower(ll) {
|
||||||
|
case "trace":
|
||||||
|
zerolog.SetGlobalLevel(zerolog.TraceLevel)
|
||||||
case "debug":
|
case "debug":
|
||||||
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||||
case "info":
|
case "info":
|
||||||
@@ -81,11 +83,11 @@ func initConfig() {
|
|||||||
}
|
}
|
||||||
if cfgPath != "" {
|
if cfgPath != "" {
|
||||||
viper.SetConfigFile(cfgPath)
|
viper.SetConfigFile(cfgPath)
|
||||||
log.Debug().Msgf("Using gitleaks config %s from `--config`", cfgPath)
|
log.Debug().Msgf("using gitleaks config %s from `--config`", cfgPath)
|
||||||
} else if os.Getenv("GITLEAKS_CONFIG") != "" {
|
} else if os.Getenv("GITLEAKS_CONFIG") != "" {
|
||||||
envPath := os.Getenv("GITLEAKS_CONFIG")
|
envPath := os.Getenv("GITLEAKS_CONFIG")
|
||||||
viper.SetConfigFile(envPath)
|
viper.SetConfigFile(envPath)
|
||||||
log.Debug().Msgf("Using gitleaks config from GITLEAKS_CONFIG env var: %s", envPath)
|
log.Debug().Msgf("using gitleaks config from GITLEAKS_CONFIG env var: %s", envPath)
|
||||||
} else {
|
} else {
|
||||||
source, err := rootCmd.Flags().GetString("source")
|
source, err := rootCmd.Flags().GetString("source")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -97,7 +99,7 @@ func initConfig() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !fileInfo.IsDir() {
|
if !fileInfo.IsDir() {
|
||||||
log.Debug().Msgf("Unable to load gitleaks config from %s since --source=%s is a file, using default config",
|
log.Debug().Msgf("unable to load gitleaks config from %s since --source=%s is a file, using default config",
|
||||||
filepath.Join(source, ".gitleaks.toml"), source)
|
filepath.Join(source, ".gitleaks.toml"), source)
|
||||||
viper.SetConfigType("toml")
|
viper.SetConfigType("toml")
|
||||||
if err = viper.ReadConfig(strings.NewReader(config.DefaultConfig)); err != nil {
|
if err = viper.ReadConfig(strings.NewReader(config.DefaultConfig)); err != nil {
|
||||||
@@ -107,14 +109,14 @@ func initConfig() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if _, err := os.Stat(filepath.Join(source, ".gitleaks.toml")); os.IsNotExist(err) {
|
if _, err := os.Stat(filepath.Join(source, ".gitleaks.toml")); os.IsNotExist(err) {
|
||||||
log.Debug().Msgf("No gitleaks config found in path %s, using default gitleaks config", filepath.Join(source, ".gitleaks.toml"))
|
log.Debug().Msgf("no gitleaks config found in path %s, using default gitleaks config", filepath.Join(source, ".gitleaks.toml"))
|
||||||
viper.SetConfigType("toml")
|
viper.SetConfigType("toml")
|
||||||
if err = viper.ReadConfig(strings.NewReader(config.DefaultConfig)); err != nil {
|
if err = viper.ReadConfig(strings.NewReader(config.DefaultConfig)); err != nil {
|
||||||
log.Fatal().Msgf("err reading default config toml %s", err.Error())
|
log.Fatal().Msgf("err reading default config toml %s", err.Error())
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
log.Debug().Msgf("Using existing gitleaks config %s from `(--source)/.gitleaks.toml`", filepath.Join(source, ".gitleaks.toml"))
|
log.Debug().Msgf("using existing gitleaks config %s from `(--source)/.gitleaks.toml`", filepath.Join(source, ".gitleaks.toml"))
|
||||||
}
|
}
|
||||||
|
|
||||||
viper.AddConfigPath(source)
|
viper.AddConfigPath(source)
|
||||||
@@ -122,7 +124,7 @@ func initConfig() {
|
|||||||
viper.SetConfigType("toml")
|
viper.SetConfigType("toml")
|
||||||
}
|
}
|
||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
log.Fatal().Msgf("Unable to load gitleaks config, err: %s", err)
|
log.Fatal().Msgf("unable to load gitleaks config, err: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+127
-9
@@ -5,16 +5,26 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed gitleaks.toml
|
//go:embed gitleaks.toml
|
||||||
var DefaultConfig string
|
var DefaultConfig string
|
||||||
|
|
||||||
|
// use to keep track of how many configs we can extend
|
||||||
|
// yea I know, globals bad
|
||||||
|
var extendDepth int
|
||||||
|
|
||||||
|
const maxExtendDepth = 2
|
||||||
|
|
||||||
// ViperConfig is the config struct used by the Viper config package
|
// ViperConfig is the config struct used by the Viper config package
|
||||||
// to parse the config file. This struct does not include regular expressions.
|
// to parse the config file. This struct does not include regular expressions.
|
||||||
// It is used as an intermediary to convert the Viper config to the Config struct.
|
// It is used as an intermediary to convert the Viper config to the Config struct.
|
||||||
type ViperConfig struct {
|
type ViperConfig struct {
|
||||||
Description string
|
Description string
|
||||||
|
Extend Extend
|
||||||
Rules []struct {
|
Rules []struct {
|
||||||
ID string
|
ID string
|
||||||
Description string
|
Description string
|
||||||
@@ -42,18 +52,32 @@ type ViperConfig struct {
|
|||||||
|
|
||||||
// Config is a configuration struct that contains rules and an allowlist if present.
|
// Config is a configuration struct that contains rules and an allowlist if present.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
Extend Extend
|
||||||
Path string
|
Path string
|
||||||
Description string
|
Description string
|
||||||
Rules []*Rule
|
Rules map[string]Rule
|
||||||
Allowlist Allowlist
|
Allowlist Allowlist
|
||||||
Keywords []string
|
Keywords []string
|
||||||
|
|
||||||
|
// used to keep sarif results consistent
|
||||||
|
orderedRules []string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extend is a struct that allows users to define how they want their
|
||||||
|
// configuration extended by other configuration files.
|
||||||
|
type Extend struct {
|
||||||
|
Path string
|
||||||
|
URL string
|
||||||
|
UseDefault bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vc *ViperConfig) Translate() (Config, error) {
|
func (vc *ViperConfig) Translate() (Config, error) {
|
||||||
var (
|
var (
|
||||||
rules []*Rule
|
keywords []string
|
||||||
keywords []string
|
orderedRules []string
|
||||||
)
|
)
|
||||||
|
rulesMap := make(map[string]Rule)
|
||||||
|
|
||||||
for _, r := range vc.Rules {
|
for _, r := range vc.Rules {
|
||||||
var allowlistRegexes []*regexp.Regexp
|
var allowlistRegexes []*regexp.Regexp
|
||||||
for _, a := range r.Allowlist.Regexes {
|
for _, a := range r.Allowlist.Regexes {
|
||||||
@@ -88,7 +112,7 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
|||||||
} else {
|
} else {
|
||||||
configPathRegex = regexp.MustCompile(r.Path)
|
configPathRegex = regexp.MustCompile(r.Path)
|
||||||
}
|
}
|
||||||
r := &Rule{
|
r := Rule{
|
||||||
Description: r.Description,
|
Description: r.Description,
|
||||||
RuleID: r.ID,
|
RuleID: r.ID,
|
||||||
Regex: configRegex,
|
Regex: configRegex,
|
||||||
@@ -104,10 +128,12 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
|||||||
StopWords: r.Allowlist.StopWords,
|
StopWords: r.Allowlist.StopWords,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
orderedRules = append(orderedRules, r.RuleID)
|
||||||
|
|
||||||
if r.Regex != nil && r.SecretGroup > r.Regex.NumSubexp() {
|
if r.Regex != nil && r.SecretGroup > r.Regex.NumSubexp() {
|
||||||
return Config{}, fmt.Errorf("%s invalid regex secret group %d, max regex secret group %d", r.Description, r.SecretGroup, r.Regex.NumSubexp())
|
return Config{}, fmt.Errorf("%s invalid regex secret group %d, max regex secret group %d", r.Description, r.SecretGroup, r.Regex.NumSubexp())
|
||||||
}
|
}
|
||||||
rules = append(rules, r)
|
rulesMap[r.RuleID] = r
|
||||||
}
|
}
|
||||||
var allowlistRegexes []*regexp.Regexp
|
var allowlistRegexes []*regexp.Regexp
|
||||||
for _, a := range vc.Allowlist.Regexes {
|
for _, a := range vc.Allowlist.Regexes {
|
||||||
@@ -117,15 +143,107 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
|||||||
for _, a := range vc.Allowlist.Paths {
|
for _, a := range vc.Allowlist.Paths {
|
||||||
allowlistPaths = append(allowlistPaths, regexp.MustCompile(a))
|
allowlistPaths = append(allowlistPaths, regexp.MustCompile(a))
|
||||||
}
|
}
|
||||||
return Config{
|
c := Config{
|
||||||
Description: vc.Description,
|
Description: vc.Description,
|
||||||
Rules: rules,
|
Extend: vc.Extend,
|
||||||
|
Rules: rulesMap,
|
||||||
Allowlist: Allowlist{
|
Allowlist: Allowlist{
|
||||||
Regexes: allowlistRegexes,
|
Regexes: allowlistRegexes,
|
||||||
Paths: allowlistPaths,
|
Paths: allowlistPaths,
|
||||||
Commits: vc.Allowlist.Commits,
|
Commits: vc.Allowlist.Commits,
|
||||||
StopWords: vc.Allowlist.StopWords,
|
StopWords: vc.Allowlist.StopWords,
|
||||||
},
|
},
|
||||||
Keywords: keywords,
|
Keywords: keywords,
|
||||||
}, nil
|
orderedRules: orderedRules,
|
||||||
|
}
|
||||||
|
|
||||||
|
if maxExtendDepth != extendDepth {
|
||||||
|
// disallow both usedefault and path from being set
|
||||||
|
if c.Extend.Path != "" && c.Extend.UseDefault {
|
||||||
|
log.Fatal().Msg("unable to load config due to extend.path and extend.useDefault being set")
|
||||||
|
}
|
||||||
|
if c.Extend.UseDefault {
|
||||||
|
c.extendDefault()
|
||||||
|
} else if c.Extend.Path != "" {
|
||||||
|
c.extendPath()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return c, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Config) OrderedRules() []Rule {
|
||||||
|
var orderedRules []Rule
|
||||||
|
for _, id := range c.orderedRules {
|
||||||
|
if _, ok := c.Rules[id]; ok {
|
||||||
|
orderedRules = append(orderedRules, c.Rules[id])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return orderedRules
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Config) extendDefault() {
|
||||||
|
extendDepth++
|
||||||
|
viper.SetConfigType("toml")
|
||||||
|
if err := viper.ReadConfig(strings.NewReader(DefaultConfig)); err != nil {
|
||||||
|
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defaultViperConfig := ViperConfig{}
|
||||||
|
if err := viper.Unmarshal(&defaultViperConfig); err != nil {
|
||||||
|
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
cfg, err := defaultViperConfig.Translate()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Debug().Msg("extending config with default config")
|
||||||
|
c.extend(cfg)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Config) extendPath() {
|
||||||
|
extendDepth++
|
||||||
|
viper.SetConfigFile(c.Extend.Path)
|
||||||
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
|
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
extensionViperConfig := ViperConfig{}
|
||||||
|
if err := viper.Unmarshal(&extensionViperConfig); err != nil {
|
||||||
|
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
cfg, err := extensionViperConfig.Translate()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Debug().Msgf("extending config with %s", c.Extend.Path)
|
||||||
|
c.extend(cfg)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Config) extendURL() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Config) extend(extensionConfig Config) {
|
||||||
|
for ruleID, rule := range extensionConfig.Rules {
|
||||||
|
if _, ok := c.Rules[ruleID]; !ok {
|
||||||
|
log.Trace().Msgf("adding %s to base config", ruleID)
|
||||||
|
c.Rules[ruleID] = rule
|
||||||
|
c.Keywords = append(c.Keywords, rule.Keywords...)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// append allowlists, not attempting to merge
|
||||||
|
c.Allowlist.Commits = append(c.Allowlist.Commits,
|
||||||
|
extensionConfig.Allowlist.Commits...)
|
||||||
|
c.Allowlist.Paths = append(c.Allowlist.Paths,
|
||||||
|
extensionConfig.Allowlist.Paths...)
|
||||||
|
c.Allowlist.Regexes = append(c.Allowlist.Regexes,
|
||||||
|
extensionConfig.Allowlist.Regexes...)
|
||||||
}
|
}
|
||||||
+67
-43
@@ -20,72 +20,68 @@ func TestTranslate(t *testing.T) {
|
|||||||
{
|
{
|
||||||
cfgName: "allow_aws_re",
|
cfgName: "allow_aws_re",
|
||||||
cfg: Config{
|
cfg: Config{
|
||||||
Rules: []*Rule{
|
Rules: map[string]Rule{"aws-access-key": {
|
||||||
{
|
Description: "AWS Access Key",
|
||||||
Description: "AWS Access Key",
|
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
Tags: []string{"key", "AWS"},
|
||||||
Tags: []string{"key", "AWS"},
|
Keywords: []string{},
|
||||||
Keywords: []string{},
|
RuleID: "aws-access-key",
|
||||||
RuleID: "aws-access-key",
|
Allowlist: Allowlist{
|
||||||
Allowlist: Allowlist{
|
Regexes: []*regexp.Regexp{
|
||||||
Regexes: []*regexp.Regexp{
|
regexp.MustCompile("AKIALALEMEL33243OLIA"),
|
||||||
regexp.MustCompile("AKIALALEMEL33243OLIA"),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cfgName: "allow_commit",
|
cfgName: "allow_commit",
|
||||||
cfg: Config{
|
cfg: Config{
|
||||||
Rules: []*Rule{
|
Rules: map[string]Rule{"aws-access-key": {
|
||||||
{
|
Description: "AWS Access Key",
|
||||||
Description: "AWS Access Key",
|
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
Tags: []string{"key", "AWS"},
|
||||||
Tags: []string{"key", "AWS"},
|
Keywords: []string{},
|
||||||
Keywords: []string{},
|
RuleID: "aws-access-key",
|
||||||
RuleID: "aws-access-key",
|
Allowlist: Allowlist{
|
||||||
Allowlist: Allowlist{
|
Commits: []string{"allowthiscommit"},
|
||||||
Commits: []string{"allowthiscommit"},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cfgName: "allow_path",
|
cfgName: "allow_path",
|
||||||
cfg: Config{
|
cfg: Config{
|
||||||
Rules: []*Rule{
|
Rules: map[string]Rule{"aws-access-key": {
|
||||||
{
|
Description: "AWS Access Key",
|
||||||
Description: "AWS Access Key",
|
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
Tags: []string{"key", "AWS"},
|
||||||
Tags: []string{"key", "AWS"},
|
Keywords: []string{},
|
||||||
Keywords: []string{},
|
RuleID: "aws-access-key",
|
||||||
RuleID: "aws-access-key",
|
Allowlist: Allowlist{
|
||||||
Allowlist: Allowlist{
|
Paths: []*regexp.Regexp{
|
||||||
Paths: []*regexp.Regexp{
|
regexp.MustCompile(".go"),
|
||||||
regexp.MustCompile(".go"),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cfgName: "entropy_group",
|
cfgName: "entropy_group",
|
||||||
cfg: Config{
|
cfg: Config{
|
||||||
Rules: []*Rule{
|
Rules: map[string]Rule{"discord-api-key": {
|
||||||
{
|
Description: "Discord API key",
|
||||||
Description: "Discord API key",
|
Regex: regexp.MustCompile(`(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{64})['\"]`),
|
||||||
Regex: regexp.MustCompile(`(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{64})['\"]`),
|
RuleID: "discord-api-key",
|
||||||
RuleID: "discord-api-key",
|
Allowlist: Allowlist{},
|
||||||
Allowlist: Allowlist{},
|
Entropy: 3.5,
|
||||||
Entropy: 3.5,
|
SecretGroup: 3,
|
||||||
SecretGroup: 3,
|
Tags: []string{},
|
||||||
Tags: []string{},
|
Keywords: []string{},
|
||||||
Keywords: []string{},
|
},
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -94,6 +90,34 @@ func TestTranslate(t *testing.T) {
|
|||||||
cfg: Config{},
|
cfg: Config{},
|
||||||
wantError: fmt.Errorf("Discord API key invalid regex secret group 5, max regex secret group 3"),
|
wantError: fmt.Errorf("Discord API key invalid regex secret group 5, max regex secret group 3"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
cfgName: "base",
|
||||||
|
cfg: Config{
|
||||||
|
Rules: map[string]Rule{
|
||||||
|
"aws-access-key": {
|
||||||
|
Description: "AWS Access Key",
|
||||||
|
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||||
|
Tags: []string{"key", "AWS"},
|
||||||
|
Keywords: []string{},
|
||||||
|
RuleID: "aws-access-key",
|
||||||
|
},
|
||||||
|
"aws-secret-key": {
|
||||||
|
Description: "AWS Secret Key",
|
||||||
|
Regex: regexp.MustCompile(`(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}`),
|
||||||
|
Tags: []string{"key", "AWS"},
|
||||||
|
Keywords: []string{},
|
||||||
|
RuleID: "aws-secret-key",
|
||||||
|
},
|
||||||
|
"aws-secret-key-again": {
|
||||||
|
Description: "AWS Secret Key",
|
||||||
|
Regex: regexp.MustCompile(`(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}`),
|
||||||
|
Tags: []string{"key", "AWS"},
|
||||||
|
Keywords: []string{},
|
||||||
|
RuleID: "aws-secret-key-again",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|||||||
+940
-500
File diff suppressed because it is too large.
Load diff
+35
-6
@@ -1,6 +1,7 @@
|
|||||||
package detect
|
package detect
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
@@ -64,6 +65,9 @@ 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
|
||||||
|
|
||||||
|
// gitleaksIgnore
|
||||||
|
gitleaksIgnore map[string]bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fragment contains the data to be scanned
|
// Fragment contains the data to be scanned
|
||||||
@@ -96,11 +100,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 +128,23 @@ 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
|
||||||
|
}
|
||||||
|
|
||||||
// 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))
|
||||||
@@ -136,7 +158,7 @@ func (d *Detector) DetectString(content string) []report.Finding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// detectRule scans the given fragment for the given rule and returns a list of findings
|
// detectRule scans the given fragment for the given rule and returns a list of findings
|
||||||
func (d *Detector) detectRule(fragment Fragment, rule *config.Rule) []report.Finding {
|
func (d *Detector) detectRule(fragment Fragment, rule config.Rule) []report.Finding {
|
||||||
var findings []report.Finding
|
var findings []report.Finding
|
||||||
|
|
||||||
// check if filepath or commit is allowed for this rule
|
// check if filepath or commit is allowed for this rule
|
||||||
@@ -428,6 +450,13 @@ 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) {
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
|
||||||
d.findingMutex.Lock()
|
d.findingMutex.Lock()
|
||||||
d.findings = append(d.findings, finding)
|
d.findings = append(d.findings, finding)
|
||||||
if d.Verbose {
|
if d.Verbose {
|
||||||
|
|||||||
@@ -114,6 +114,72 @@ 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",
|
||||||
|
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",
|
||||||
|
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",
|
||||||
|
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{
|
||||||
@@ -301,6 +367,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",
|
||||||
@@ -319,6 +386,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",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -344,6 +412,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",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+7
-1
@@ -85,18 +85,24 @@ func listenForStdErr(stderr io.ReadCloser) {
|
|||||||
scanner := bufio.NewScanner(stderr)
|
scanner := bufio.NewScanner(stderr)
|
||||||
errEncountered := false
|
errEncountered := false
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
// if git throws the following error:
|
// if git throws one of the following errors:
|
||||||
//
|
//
|
||||||
// exhaustive rename detection was skipped due to too many files.
|
// exhaustive rename detection was skipped due to too many files.
|
||||||
// you may want to set your diff.renameLimit variable to at least
|
// you may want to set your diff.renameLimit variable to at least
|
||||||
// (some large number) and retry the command.
|
// (some large number) and retry the command.
|
||||||
//
|
//
|
||||||
|
// inexact rename detection was skipped due to too many files.
|
||||||
|
// you may want to set your diff.renameLimit variable to at least
|
||||||
|
// (some large number) and retry the command.
|
||||||
|
//
|
||||||
// we skip exiting the program as git log -p/git diff will continue
|
// we skip exiting the program as git log -p/git diff will continue
|
||||||
// to send data to stdout and finish executing. This next bit of
|
// to send data to stdout and finish executing. This next bit of
|
||||||
// code prevents gitleaks from stopping mid scan if this error is
|
// code prevents gitleaks from stopping mid scan if this error is
|
||||||
// encountered
|
// encountered
|
||||||
if strings.Contains(scanner.Text(),
|
if strings.Contains(scanner.Text(),
|
||||||
"exhaustive rename detection was skipped") ||
|
"exhaustive rename detection was skipped") ||
|
||||||
|
strings.Contains(scanner.Text(),
|
||||||
|
"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") {
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -30,6 +30,7 @@ func augmentGitFinding(finding report.Finding, textFragment *gitdiff.TextFragmen
|
|||||||
}
|
}
|
||||||
finding.Date = f.PatchHeader.AuthorDate.UTC().Format(time.RFC3339)
|
finding.Date = f.PatchHeader.AuthorDate.UTC().Format(time.RFC3339)
|
||||||
}
|
}
|
||||||
|
finding.Fingerprint = fmt.Sprintf("%s:%s:%s:%d", finding.Commit, finding.File, finding.RuleID, finding.StartLine)
|
||||||
return finding
|
return finding
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ func filter(findings []report.Finding, redact bool) []report.Finding {
|
|||||||
|
|
||||||
genericMatch := strings.Replace(f.Match, f.Secret, "REDACTED", -1)
|
genericMatch := strings.Replace(f.Match, f.Secret, "REDACTED", -1)
|
||||||
betterMatch := strings.Replace(fPrime.Match, fPrime.Secret, "REDACTED", -1)
|
betterMatch := strings.Replace(fPrime.Match, fPrime.Secret, "REDACTED", -1)
|
||||||
log.Debug().Msgf("skipping %s finding (%s), %s rule takes precendence (%s)", f.RuleID, genericMatch, fPrime.RuleID, betterMatch)
|
log.Trace().Msgf("skipping %s finding (%s), %s rule takes precendence (%s)", f.RuleID, genericMatch, fPrime.RuleID, betterMatch)
|
||||||
include = false
|
include = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,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
|
||||||
@@ -44,6 +45,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
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ func TestWriteCSV(t *testing.T) {
|
|||||||
Author: "John Doe",
|
Author: "John Doe",
|
||||||
Email: "johndoe@gmail.com",
|
Email: "johndoe@gmail.com",
|
||||||
Date: "10-19-2003",
|
Date: "10-19-2003",
|
||||||
|
Fingerprint: "fingerprint",
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ 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.
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ func hasEmptyRules(tool Tool) bool {
|
|||||||
func getRules(cfg config.Config) []Rules {
|
func getRules(cfg config.Config) []Rules {
|
||||||
// TODO for _, rule := range cfg.Rules {
|
// TODO for _, rule := range cfg.Rules {
|
||||||
var rules []Rules
|
var rules []Rules
|
||||||
for _, rule := range cfg.Rules {
|
for _, rule := range cfg.OrderedRules() {
|
||||||
shortDescription := ShortDescription{
|
shortDescription := ShortDescription{
|
||||||
Text: rule.Description,
|
Text: rule.Description,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package report
|
package report
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -27,7 +28,7 @@ func TestWriteSarif(t *testing.T) {
|
|||||||
findings: []Finding{
|
findings: []Finding{
|
||||||
{
|
{
|
||||||
|
|
||||||
Description: "",
|
Description: "A test rule",
|
||||||
RuleID: "test-rule",
|
RuleID: "test-rule",
|
||||||
Match: "line containing secret",
|
Match: "line containing secret",
|
||||||
Secret: "a secret",
|
Secret: "a secret",
|
||||||
@@ -73,6 +74,7 @@ func TestWriteSarif(t *testing.T) {
|
|||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
err = writeSarif(cfg, test.findings, tmpfile)
|
err = writeSarif(cfg, test.findings, tmpfile)
|
||||||
|
fmt.Println(cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Remove(tmpfile.Name())
|
os.Remove(tmpfile.Name())
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os,sys
|
"""Helper script to be used as a pre-commit hook."""
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
def gitleaksEnabled():
|
def gitleaksEnabled():
|
||||||
|
"""Determine if the pre-commit hook for gitleaks is enabled."""
|
||||||
out = subprocess.getoutput("git config --bool hooks.gitleaks")
|
out = subprocess.getoutput("git config --bool hooks.gitleaks")
|
||||||
if out == "false":
|
if out == "false":
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
if gitleaksEnabled():
|
if gitleaksEnabled():
|
||||||
exitCode = os.WEXITSTATUS(os.system('gitleaks protect -v --staged'))
|
exitCode = os.WEXITSTATUS(os.system('gitleaks protect -v --staged'))
|
||||||
if exitCode == 1:
|
if exitCode == 1:
|
||||||
@@ -18,5 +23,5 @@ To disable the gitleaks precommit hook run the following command:
|
|||||||
''')
|
''')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
print('gitleaks precommit disabled (enable with `git config hooks.gitleaks true`)')
|
print('gitleaks precommit disabled\
|
||||||
|
(enable with `git config hooks.gitleaks true`)')
|
||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
title = "gitleaks config"
|
||||||
|
|
||||||
|
[extend]
|
||||||
|
path="../testdata/config/extend_1.toml"
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "AWS Secret Key"
|
||||||
|
id = "aws-secret-key"
|
||||||
|
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||||
|
tags = ["key", "AWS"]
|
||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
title = "gitleaks extended 1"
|
||||||
|
|
||||||
|
[extend]
|
||||||
|
path="../testdata/config/extend_2.toml"
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "AWS Access Key"
|
||||||
|
id = "aws-access-key"
|
||||||
|
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
|
||||||
|
tags = ["key", "AWS"]
|
||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
title = "gitleaks extended 2"
|
||||||
|
|
||||||
|
[extend]
|
||||||
|
path="../testdata/config/extend_3.toml"
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "AWS Secret Key"
|
||||||
|
id = "aws-secret-key-again"
|
||||||
|
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||||
|
tags = ["key", "AWS"]
|
||||||
Vendored
+9
@@ -0,0 +1,9 @@
|
|||||||
|
title = "gitleaks extended 3"
|
||||||
|
|
||||||
|
## This should not be loaded since we can only extend configs to a depth of 3
|
||||||
|
|
||||||
|
[[rules]]
|
||||||
|
description = "AWS Secret Key"
|
||||||
|
id = "aws-secret-key-again-again"
|
||||||
|
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||||
|
tags = ["key", "AWS"]
|
||||||
Vendored
+51
@@ -9,162 +9,213 @@ title = "gitleaks config"
|
|||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "AWS Secret Key"
|
description = "AWS Secret Key"
|
||||||
|
id = "aws-secret-key"
|
||||||
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||||
tags = ["key", "AWS"]
|
tags = ["key", "AWS"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "AWS MWS key"
|
description = "AWS MWS key"
|
||||||
|
id = "aws-mws-key"
|
||||||
regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
|
regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
|
||||||
tags = ["key", "AWS", "MWS"]
|
tags = ["key", "AWS", "MWS"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Facebook Secret Key"
|
description = "Facebook Secret Key"
|
||||||
|
id = "facebook-secret-key"
|
||||||
regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
|
regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
|
||||||
tags = ["key", "Facebook"]
|
tags = ["key", "Facebook"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Facebook Client ID"
|
description = "Facebook Client ID"
|
||||||
|
id = "facebook-client-id"
|
||||||
regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
|
regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
|
||||||
tags = ["key", "Facebook"]
|
tags = ["key", "Facebook"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitter Secret Key"
|
description = "Twitter Secret Key"
|
||||||
|
id = "twitter-secret-key"
|
||||||
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]'''
|
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]'''
|
||||||
tags = ["key", "Twitter"]
|
tags = ["key", "Twitter"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Twitter Client ID"
|
description = "Twitter Client ID"
|
||||||
|
id = "twitter-client-id"
|
||||||
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]'''
|
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]'''
|
||||||
tags = ["client", "Twitter"]
|
tags = ["client", "Twitter"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Github Personal Access Token"
|
description = "Github Personal Access Token"
|
||||||
|
id = "github-pat"
|
||||||
regex = '''ghp_[0-9a-zA-Z]{36}'''
|
regex = '''ghp_[0-9a-zA-Z]{36}'''
|
||||||
tags = ["key", "Github"]
|
tags = ["key", "Github"]
|
||||||
[[rules]]
|
[[rules]]
|
||||||
description = "Github OAuth Access Token"
|
description = "Github OAuth Access Token"
|
||||||
|
id = "github-oauth"
|
||||||
regex = '''gho_[0-9a-zA-Z]{36}'''
|
regex = '''gho_[0-9a-zA-Z]{36}'''
|
||||||
tags = ["key", "Github"]
|
tags = ["key", "Github"]
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "github-app"
|
||||||
description = "Github App Token"
|
description = "Github App Token"
|
||||||
regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
|
regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
|
||||||
tags = ["key", "Github"]
|
tags = ["key", "Github"]
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "github-refresh"
|
||||||
description = "Github Refresh Token"
|
description = "Github Refresh Token"
|
||||||
regex = '''ghr_[0-9a-zA-Z]{76}'''
|
regex = '''ghr_[0-9a-zA-Z]{76}'''
|
||||||
tags = ["key", "Github"]
|
tags = ["key", "Github"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "linkedin-client"
|
||||||
description = "LinkedIn Client ID"
|
description = "LinkedIn Client ID"
|
||||||
regex = '''(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}'''
|
regex = '''(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}'''
|
||||||
tags = ["client", "LinkedIn"]
|
tags = ["client", "LinkedIn"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "linkedin-secret"
|
||||||
description = "LinkedIn Secret Key"
|
description = "LinkedIn Secret Key"
|
||||||
regex = '''(?i)linkedin(.{0,20})?[0-9a-z]{16}'''
|
regex = '''(?i)linkedin(.{0,20})?[0-9a-z]{16}'''
|
||||||
tags = ["secret", "LinkedIn"]
|
tags = ["secret", "LinkedIn"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "slack"
|
||||||
description = "Slack"
|
description = "Slack"
|
||||||
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
|
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
|
||||||
tags = ["key", "Slack"]
|
tags = ["key", "Slack"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "apkey"
|
||||||
description = "Asymmetric Private Key"
|
description = "Asymmetric Private Key"
|
||||||
regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'''
|
regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'''
|
||||||
tags = ["key", "AsymmetricPrivateKey"]
|
tags = ["key", "AsymmetricPrivateKey"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "google"
|
||||||
description = "Google API key"
|
description = "Google API key"
|
||||||
regex = '''AIza[0-9A-Za-z\-_]{35}'''
|
regex = '''AIza[0-9A-Za-z\-_]{35}'''
|
||||||
tags = ["key", "Google"]
|
tags = ["key", "Google"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "google"
|
||||||
description = "Google (GCP) Service Account"
|
description = "Google (GCP) Service Account"
|
||||||
regex = '''"type": "service_account"'''
|
regex = '''"type": "service_account"'''
|
||||||
tags = ["key", "Google"]
|
tags = ["key", "Google"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "heroku"
|
||||||
description = "Heroku API key"
|
description = "Heroku API key"
|
||||||
regex = '''(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
|
regex = '''(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
|
||||||
tags = ["key", "Heroku"]
|
tags = ["key", "Heroku"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "mailchimp"
|
||||||
description = "MailChimp API key"
|
description = "MailChimp API key"
|
||||||
regex = '''(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}'''
|
regex = '''(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}'''
|
||||||
tags = ["key", "Mailchimp"]
|
tags = ["key", "Mailchimp"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "mailgun"
|
||||||
description = "Mailgun API key"
|
description = "Mailgun API key"
|
||||||
regex = '''((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}'''
|
regex = '''((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}'''
|
||||||
tags = ["key", "Mailgun"]
|
tags = ["key", "Mailgun"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "paypal"
|
||||||
description = "PayPal Braintree access token"
|
description = "PayPal Braintree access token"
|
||||||
regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
|
regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
|
||||||
tags = ["key", "Paypal"]
|
tags = ["key", "Paypal"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "piacatic"
|
||||||
description = "Picatic API key"
|
description = "Picatic API key"
|
||||||
regex = '''sk_live_[0-9a-z]{32}'''
|
regex = '''sk_live_[0-9a-z]{32}'''
|
||||||
tags = ["key", "Picatic"]
|
tags = ["key", "Picatic"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "sendgrid"
|
||||||
description = "SendGrid API Key"
|
description = "SendGrid API Key"
|
||||||
regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}'''
|
regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}'''
|
||||||
tags = ["key", "SendGrid"]
|
tags = ["key", "SendGrid"]
|
||||||
|
|
||||||
[[rules]]
|
[[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]]
|
||||||
|
id = "slack-webhook"
|
||||||
description = "Slack Webhook"
|
description = "Slack Webhook"
|
||||||
regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
|
regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
|
||||||
tags = ["key", "slack"]
|
tags = ["key", "slack"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "stripe"
|
||||||
description = "Stripe API key"
|
description = "Stripe API key"
|
||||||
regex = '''(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}'''
|
regex = '''(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}'''
|
||||||
tags = ["key", "Stripe"]
|
tags = ["key", "Stripe"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "square"
|
||||||
description = "Square access token"
|
description = "Square access token"
|
||||||
regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
|
regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
|
||||||
tags = ["key", "square"]
|
tags = ["key", "square"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "square-oauth"
|
||||||
description = "Square OAuth secret"
|
description = "Square OAuth secret"
|
||||||
regex = '''sq0csp-[0-9A-Za-z\-_]{43}'''
|
regex = '''sq0csp-[0-9A-Za-z\-_]{43}'''
|
||||||
tags = ["key", "square"]
|
tags = ["key", "square"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "twilio"
|
||||||
description = "Twilio API key"
|
description = "Twilio API key"
|
||||||
regex = '''(?i)twilio(.{0,20})?SK[0-9a-f]{32}'''
|
regex = '''(?i)twilio(.{0,20})?SK[0-9a-f]{32}'''
|
||||||
tags = ["key", "twilio"]
|
tags = ["key", "twilio"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "dynatrace"
|
||||||
description = "Dynatrace ttoken"
|
description = "Dynatrace ttoken"
|
||||||
regex = '''dt0[a-zA-Z]{1}[0-9]{2}\.[A-Z0-9]{24}\.[A-Z0-9]{64}'''
|
regex = '''dt0[a-zA-Z]{1}[0-9]{2}\.[A-Z0-9]{24}\.[A-Z0-9]{64}'''
|
||||||
tags = ["key", "Dynatrace"]
|
tags = ["key", "Dynatrace"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "shopify"
|
||||||
description = "Shopify shared secret"
|
description = "Shopify shared secret"
|
||||||
regex = '''shpss_[a-fA-F0-9]{32}'''
|
regex = '''shpss_[a-fA-F0-9]{32}'''
|
||||||
tags = ["key", "Shopify"]
|
tags = ["key", "Shopify"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "shopify-access"
|
||||||
description = "Shopify access token"
|
description = "Shopify access token"
|
||||||
regex = '''shpat_[a-fA-F0-9]{32}'''
|
regex = '''shpat_[a-fA-F0-9]{32}'''
|
||||||
tags = ["key", "Shopify"]
|
tags = ["key", "Shopify"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "shopify-custom"
|
||||||
description = "Shopify custom app access token"
|
description = "Shopify custom app access token"
|
||||||
regex = '''shpca_[a-fA-F0-9]{32}'''
|
regex = '''shpca_[a-fA-F0-9]{32}'''
|
||||||
tags = ["key", "Shopify"]
|
tags = ["key", "Shopify"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "shopify-private"
|
||||||
description = "Shopify private app access token"
|
description = "Shopify private app access token"
|
||||||
regex = '''shppa_[a-fA-F0-9]{32}'''
|
regex = '''shppa_[a-fA-F0-9]{32}'''
|
||||||
tags = ["key", "Shopify"]
|
tags = ["key", "Shopify"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
id = "pypi"
|
||||||
description = "PyPI upload token"
|
description = "PyPI upload token"
|
||||||
regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}'''
|
regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}'''
|
||||||
tags = ["key", "pypi"]
|
tags = ["key", "pypi"]
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
RuleID,Commit,File,Secret,Match,StartLine,EndLine,StartColumn,EndColumn,Author,Message,Date,Email
|
RuleID,Commit,File,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
|
||||||
|
+2
-1
@@ -15,6 +15,7 @@
|
|||||||
"Date": "10-19-2003",
|
"Date": "10-19-2003",
|
||||||
"Message": "opps",
|
"Message": "opps",
|
||||||
"Tags": [],
|
"Tags": [],
|
||||||
"RuleID": "test-rule"
|
"RuleID": "test-rule",
|
||||||
|
"Fingerprint": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
+53
-39
@@ -16,231 +16,245 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "aws-secret-key",
|
||||||
"name": "AWS Secret Key",
|
"name": "AWS Secret Key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)aws_(.{0,20})?=?.[\\'\\\"0-9a-zA-Z\\/+]{40}"
|
"text": "(?i)aws_(.{0,20})?=?.[\\'\\\"0-9a-zA-Z\\/+]{40}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "aws-mws-key",
|
||||||
"name": "AWS MWS key",
|
"name": "AWS MWS key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
|
"text": "amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "facebook-secret-key",
|
||||||
"name": "Facebook Secret Key",
|
"name": "Facebook Secret Key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)(facebook|fb)(.{0,20})?(?-i)['\\\"][0-9a-f]{32}['\\\"]"
|
"text": "(?i)(facebook|fb)(.{0,20})?(?-i)['\\\"][0-9a-f]{32}['\\\"]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "facebook-client-id",
|
||||||
"name": "Facebook Client ID",
|
"name": "Facebook Client ID",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)(facebook|fb)(.{0,20})?['\\\"][0-9]{13,17}['\\\"]"
|
"text": "(?i)(facebook|fb)(.{0,20})?['\\\"][0-9]{13,17}['\\\"]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "twitter-secret-key",
|
||||||
"name": "Twitter Secret Key",
|
"name": "Twitter Secret Key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{35,44}['\\\"]"
|
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{35,44}['\\\"]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "twitter-client-id",
|
||||||
"name": "Twitter Client ID",
|
"name": "Twitter Client ID",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{18,25}['\\\"]"
|
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{18,25}['\\\"]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "github-pat",
|
||||||
"name": "Github Personal Access Token",
|
"name": "Github Personal Access Token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "ghp_[0-9a-zA-Z]{36}"
|
"text": "ghp_[0-9a-zA-Z]{36}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "github-oauth",
|
||||||
"name": "Github OAuth Access Token",
|
"name": "Github OAuth Access Token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "gho_[0-9a-zA-Z]{36}"
|
"text": "gho_[0-9a-zA-Z]{36}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "github-app",
|
||||||
"name": "Github App Token",
|
"name": "Github App Token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(ghu|ghs)_[0-9a-zA-Z]{36}"
|
"text": "(ghu|ghs)_[0-9a-zA-Z]{36}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "github-refresh",
|
||||||
"name": "Github Refresh Token",
|
"name": "Github Refresh Token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "ghr_[0-9a-zA-Z]{76}"
|
"text": "ghr_[0-9a-zA-Z]{76}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "linkedin-client",
|
||||||
"name": "LinkedIn Client ID",
|
"name": "LinkedIn Client ID",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}"
|
"text": "(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "linkedin-secret",
|
||||||
"name": "LinkedIn Secret Key",
|
"name": "LinkedIn Secret Key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)linkedin(.{0,20})?[0-9a-z]{16}"
|
"text": "(?i)linkedin(.{0,20})?[0-9a-z]{16}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "slack",
|
||||||
"name": "Slack",
|
"name": "Slack",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "xox[baprs]-([0-9a-zA-Z]{10,48})?"
|
"text": "xox[baprs]-([0-9a-zA-Z]{10,48})?"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "apkey",
|
||||||
"name": "Asymmetric Private Key",
|
"name": "Asymmetric Private Key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----"
|
"text": "-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "google",
|
||||||
"name": "Google API key",
|
|
||||||
"shortDescription": {
|
|
||||||
"text": "AIza[0-9A-Za-z\\-_]{35}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "",
|
|
||||||
"name": "Google (GCP) Service Account",
|
"name": "Google (GCP) Service Account",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "\"type\": \"service_account\""
|
"text": "\"type\": \"service_account\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "google",
|
||||||
|
"name": "Google (GCP) Service Account",
|
||||||
|
"shortDescription": {
|
||||||
|
"text": "\"type\": \"service_account\""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "heroku",
|
||||||
"name": "Heroku API key",
|
"name": "Heroku API key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
|
"text": "(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "mailchimp",
|
||||||
"name": "MailChimp API key",
|
"name": "MailChimp API key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}"
|
"text": "(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "mailgun",
|
||||||
"name": "Mailgun API key",
|
"name": "Mailgun API key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}"
|
"text": "((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "paypal",
|
||||||
"name": "PayPal Braintree access token",
|
"name": "PayPal Braintree access token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}"
|
"text": "access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "piacatic",
|
||||||
"name": "Picatic API key",
|
"name": "Picatic API key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "sk_live_[0-9a-z]{32}"
|
"text": "sk_live_[0-9a-z]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "sendgrid",
|
||||||
"name": "SendGrid API Key",
|
"name": "SendGrid API Key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}"
|
"text": "SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"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",
|
||||||
"name": "Slack Webhook",
|
"name": "Slack Webhook",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}"
|
"text": "https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "stripe",
|
||||||
"name": "Stripe API key",
|
"name": "Stripe API key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}"
|
"text": "(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "square",
|
||||||
"name": "Square access token",
|
"name": "Square access token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "sq0atp-[0-9A-Za-z\\-_]{22}"
|
"text": "sq0atp-[0-9A-Za-z\\-_]{22}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "square-oauth",
|
||||||
"name": "Square OAuth secret",
|
"name": "Square OAuth secret",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "sq0csp-[0-9A-Za-z\\-_]{43}"
|
"text": "sq0csp-[0-9A-Za-z\\-_]{43}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "twilio",
|
||||||
"name": "Twilio API key",
|
"name": "Twilio API key",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "(?i)twilio(.{0,20})?SK[0-9a-f]{32}"
|
"text": "(?i)twilio(.{0,20})?SK[0-9a-f]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "dynatrace",
|
||||||
"name": "Dynatrace ttoken",
|
"name": "Dynatrace ttoken",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "dt0[a-zA-Z]{1}[0-9]{2}\\.[A-Z0-9]{24}\\.[A-Z0-9]{64}"
|
"text": "dt0[a-zA-Z]{1}[0-9]{2}\\.[A-Z0-9]{24}\\.[A-Z0-9]{64}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "shopify",
|
||||||
"name": "Shopify shared secret",
|
"name": "Shopify shared secret",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "shpss_[a-fA-F0-9]{32}"
|
"text": "shpss_[a-fA-F0-9]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "shopify-access",
|
||||||
"name": "Shopify access token",
|
"name": "Shopify access token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "shpat_[a-fA-F0-9]{32}"
|
"text": "shpat_[a-fA-F0-9]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "shopify-custom",
|
||||||
"name": "Shopify custom app access token",
|
"name": "Shopify custom app access token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "shpca_[a-fA-F0-9]{32}"
|
"text": "shpca_[a-fA-F0-9]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "shopify-private",
|
||||||
"name": "Shopify private app access token",
|
"name": "Shopify private app access token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "shppa_[a-fA-F0-9]{32}"
|
"text": "shppa_[a-fA-F0-9]{32}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "",
|
"id": "pypi",
|
||||||
"name": "PyPI upload token",
|
"name": "PyPI upload token",
|
||||||
"shortDescription": {
|
"shortDescription": {
|
||||||
"text": "pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}"
|
"text": "pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}"
|
||||||
|
|||||||
Reference in new issue
Block a user