mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51ca0f89b9 | ||
|
|
81cf30855c | ||
|
|
bd8b145bea | ||
|
|
839f114f2b | ||
|
|
63c3076ea2 | ||
|
|
b5a726e96a | ||
|
|
56079dc9ea | ||
|
|
9c6650d14a | ||
|
|
6fa63f41d8 | ||
|
|
fe9fb37c36 | ||
|
|
c3b7a98911 | ||
|
|
6c4a88c5a4 | ||
|
|
27481a9071 | ||
|
|
9701bf1724 | ||
|
|
a5b9c24779 | ||
|
|
db79d8194f | ||
|
|
8a31f4a4be | ||
|
|
6b0c303b26 | ||
|
|
1fb3a77eb8 | ||
|
|
765bcd5854 | ||
|
|
11c2ad01a4 | ||
|
|
e55d3975ec | ||
|
|
2dd9946052 | ||
|
|
4b5e8e1829 | ||
|
|
343e69399b | ||
|
|
0060ab636a | ||
|
|
025908808f | ||
|
|
088f8b8074 | ||
|
|
afdccad46f | ||
|
|
e002920355 | ||
|
|
d805fb9144 | ||
|
|
391d4d75f6 | ||
|
|
f77493274a | ||
|
|
7f229faf12 | ||
|
|
d0733f96f3 | ||
|
|
6ef704f28f | ||
|
|
7cfebca510 | ||
|
|
6d801ed61c | ||
|
|
e15ab0dc2a | ||
|
|
c39e7640e2 | ||
|
|
c0caab0355 | ||
|
|
81c92c78ca | ||
|
|
bf031592b8 | ||
|
|
acce01f233 | ||
|
|
2678a54290 | ||
|
|
289b757158 | ||
|
|
c02d830494 | ||
|
|
67b0a29ab6 | ||
|
|
f710d680dd | ||
|
|
eb2bfe5e16 | ||
|
|
55d1da131a | ||
|
|
177e9f4fc2 | ||
|
|
e93d8cb696 | ||
|
|
db43f9a342 | ||
|
|
9b15f0d33e | ||
|
|
817aa7b8d0 | ||
|
|
33082a9967 | ||
|
|
7dbfe8db2f | ||
|
|
fc98cbf159 | ||
|
|
3f0293dab0 | ||
|
|
4f6ee2bcf1 | ||
|
|
62020539f4 | ||
|
|
c8681e4858 | ||
|
|
b93459160a | ||
|
|
8622c39e88 | ||
|
|
96eed6aa0f | ||
|
|
7d9dd260f4 | ||
|
|
e47867d802 | ||
|
|
adf512e2ac | ||
|
|
e35cb6707a | ||
|
|
b6b7cfb6d3 | ||
|
|
1b3f10cb79 | ||
|
|
6748a89bf4 | ||
|
|
6f6e057042 | ||
|
|
b8f236c9b3 | ||
|
|
c5fc080aa0 | ||
|
|
3bace4c735 | ||
|
|
e890a8e809 | ||
|
|
49b0b097e4 | ||
|
|
31a8e9db7a | ||
|
|
b1853bd032 | ||
|
|
cd52267113 | ||
|
|
afc89f91c0 | ||
|
|
5ae1023aa3 | ||
|
|
31650f01e7 | ||
|
|
0d471653b5 | ||
|
|
f615d0397d | ||
|
|
40e9172ab3 | ||
|
|
9033132143 | ||
|
|
1fc27eebda | ||
|
|
f4ddeda433 | ||
|
|
6210a7e832 | ||
|
|
e300b31be5 | ||
|
|
3073e45b0a | ||
|
|
d401bd337a | ||
|
|
1297b41b10 | ||
|
|
d44cb91306 | ||
|
|
efdc7749df | ||
|
|
e78a22e19c | ||
|
|
9cc19ec0f8 | ||
|
|
05c165deb2 | ||
|
|
f6a87ca58c | ||
|
|
73a3cf8afb | ||
|
|
d196b83ca6 | ||
|
|
35f2ea5da2 | ||
|
|
70028079b4 | ||
|
|
c14af5ffdf | ||
|
|
06b1396a2a | ||
|
|
5d3f247d7d | ||
|
|
404dd8e0c0 | ||
|
|
3a1ab48818 | ||
|
|
f5c2b636f3 | ||
|
|
b5ed7ff1b2 | ||
|
|
09007da395 | ||
|
|
d51ce47d86 | ||
|
|
6919447094 | ||
|
|
c3b7932544 | ||
|
|
82e409a434 | ||
|
|
0eb57cbe4d | ||
|
|
3531887941 | ||
|
|
e9ebde73bc | ||
|
|
469cd22f61 | ||
|
|
93e72c215d | ||
|
|
865478bcdc | ||
|
|
d6c0de7c85 | ||
|
|
0266ab8958 | ||
|
|
6b7ab73a52 | ||
|
|
61ee7c58cc | ||
|
|
ad7509e3b4 | ||
|
|
a62cc52aba | ||
|
|
f93e5dc844 | ||
|
|
8481f0e9cd | ||
|
|
82f7d61593 | ||
|
|
a42b32bdf1 | ||
|
|
79638b080c | ||
|
|
3474c58c9e | ||
|
|
d8cd93cabe |
No files matched your search
@@ -0,0 +1,14 @@
|
|||||||
|
name: gitleaks
|
||||||
|
on: [push, workflow_dispatch]
|
||||||
|
jobs:
|
||||||
|
scan:
|
||||||
|
name: gitleaks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: gitleaks/gitleaks-action@v2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
|
||||||
@@ -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 }}
|
||||||
|
|||||||
+13
-23
@@ -1,36 +1,26 @@
|
|||||||
name: Test
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "*"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "*"
|
- "*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: 1.17
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: go build -v ./...
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17
|
go-version: 1.19
|
||||||
|
|
||||||
- name: Test
|
- name: Build
|
||||||
run: make test
|
run: go build -v ./...
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: make test
|
||||||
|
|
||||||
|
- name: Validate Config
|
||||||
|
run: cd cmd/generate/config && go run main.go
|
||||||
+760
@@ -0,0 +1,760 @@
|
|||||||
|
418edf165dbb63d6f46993ae8f8818ffd87ea582:cmd/generate/config/rules/jwt.go:jwt:17
|
||||||
|
418edf165dbb63d6f46993ae8f8818ffd87ea582:cmd/generate/config/rules/jwt.go:jwt:19
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:46
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:48
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:50
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:52
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:54
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:55
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:56
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:57
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:22
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:24
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:28
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:29
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-sensitive-url:164
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-sensitive-url:170
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:120
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:126
|
||||||
|
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:142
|
||||||
|
31650f01e76858ce7a0490943426e84a0824bbc8:config/config_test.go:aws-access-token:31
|
||||||
|
5ed010c944ccc715cb9245abafd4e97d98d75e9f:config/config_test.go:aws-access-token:31
|
||||||
|
ad7509e3b47331ce9586743ace635422843b695b:cmd/generate/config/rules/privatekey.go:private-key:22
|
||||||
|
717cf1b10be1625875199eca8cdf48883348985f:README.md:aws-access-token:23
|
||||||
|
3474c58c9e25fe2b1cee855a35bd1bf8a8c0fae8:cmd/generate/config/rules/generic.go:clojars-api-token:38
|
||||||
|
a42b32bdf11b6f4ea5c32ec76a1731b4b0c5e52a:cmd/generate/config/rules/generic.go:generic-api-key:40
|
||||||
|
a42b32bdf11b6f4ea5c32ec76a1731b4b0c5e52a:cmd/generate/config/rules/generic.go:generic-api-key:41
|
||||||
|
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:50
|
||||||
|
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:60
|
||||||
|
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:61
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:pypi-upload-token:29
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:51
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:73
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:81
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:89
|
||||||
|
33082a996774ba4c8ad4ba26fd219d77497eb960:README.md:sidekiq-secret:43
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:98
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:235
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:236
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:253
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:254
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:278
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:279
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:343
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:344
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:362
|
||||||
|
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:363
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:pypi-upload-token:27
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:49
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:71
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:79
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:87
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:120
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:96
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:128
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:118
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:150
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:126
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:166
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:175
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:183
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:238
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:239
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:256
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:257
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:281
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:282
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:356
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:357
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:375
|
||||||
|
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:376
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:148
|
||||||
|
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:27
|
||||||
|
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:32
|
||||||
|
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:33
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:164
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:173
|
||||||
|
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:181
|
||||||
|
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:43
|
||||||
|
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:60
|
||||||
|
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:85
|
||||||
|
b8141713e89f5acec500c7a62415f0f1cb7234dc:README.md:discord-client-secret:273
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:aws-access-token:130
|
||||||
|
b8141713e89f5acec500c7a62415f0f1cb7234dc:README.md:discord-client-secret:289
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:discord-client-secret:251
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:discord-client-secret:267
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/detect_test.go:aws-access-token:33
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/files_test.go:aws-access-token:32
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/files_test.go:aws-access-token:50
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:config/config_test.go:generic-api-key:133
|
||||||
|
80d29764a0bc0f269607d3eb7b2774a0f31e5da3:detect/detect_test.go:aws-access-token:123
|
||||||
|
80d29764a0bc0f269607d3eb7b2774a0f31e5da3:testdata/config/allow_global_aws_re.toml:aws-access-token:8
|
||||||
|
4acd7a3c8d20b7116a32f9bbade6a3cf15f741e4:detect/detect_test.go:aws-access-token:117
|
||||||
|
f0b8d26c9988af725132c100dda5051586a3026e:README.md:discord-client-secret:225
|
||||||
|
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:config/config_test.go:generic-api-key:144
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:121
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:122
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:157
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:aws-access-token:31
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:32
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:33
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:50
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:51
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:42
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:44
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:58
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:60
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:82
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:83
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:generic-api-key:133
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/config/allow_aws_re.toml:aws-access-token:9
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:generic-api-key:144
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small-branch-foo.txt:aws-access-token:15
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/repos/nogit/main.go:aws-access-token:20
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small.txt:aws-access-token:15
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small.txt:aws-access-token:44
|
||||||
|
3a3e13c3b5f85b0116cf2a0cd92529baf22d0ac9:testdata/repos/with_square_and_google/env:generic-api-key:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:scan/unstaged_test.go:aws-access-token:38
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_208ae46.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_208ae46.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_ae8db4a2_208ae46.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_ae8db4a2_208ae46.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_depth_1.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_depth_1.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:5
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:26
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:31
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:40
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:46
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:52
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:59
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:74
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:80
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:95
|
||||||
|
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:109
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_unstaged.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:generic-api-key:6
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:aws-access-token:9
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:aws-access-token:13
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:54
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:56
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:37
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:39
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:aws-access-token:37
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:aws-access-token:39
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:aws-access-token:37
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:aws-access-token:39
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:3
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:20
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:22
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:generic-api-key:5
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:generic-api-key:6
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:aws-access-token:9
|
||||||
|
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:aws-access-token:13
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_repos/test_dir_2/env:generic-api-key:1
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_repos/test_dir_2/env:generic-api-key:3
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_dir_one_google_leak_and_square_leak.json:generic-api-key:3
|
||||||
|
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_dir_one_google_leak_and_square_leak.json:generic-api-key:20
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:35
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:37
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:259
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:261
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:339
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:51
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:83
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:85
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:131
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:133
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:147
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:149
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:179
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:227
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:229
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:323
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:355
|
||||||
|
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:357
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_file1_aws_leak.json:aws-access-token:3
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_file1_aws_leak.json:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:3
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:17
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:19
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_repos/test_dir_1/server.test.py:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_repos/test_dir_1/server.test2.py:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:99
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:101
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:115
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:117
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:131
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:133
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:147
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:149
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:163
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:165
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:179
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:181
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:195
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:197
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:211
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:213
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:83
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:85
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:99
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:101
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:115
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:117
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:131
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:133
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:147
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:149
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:163
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:165
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:179
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:259
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:261
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:181
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:195
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:197
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:339
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:341
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:3
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:5
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:18
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:20
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:33
|
||||||
|
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:35
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:259
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:261
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_to_from.json:aws-access-token:3
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_to_from.json:aws-access-token:5
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:323
|
||||||
|
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:325
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:18
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:20
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:examples/simple_regex_and_allowlist_config.toml:aws-access-token:12
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:3
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:5
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:18
|
||||||
|
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:20
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_configs/aws_key_aws_allowlisted.toml:aws-access-token:7
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak.json:aws-access-token:185
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:185
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_repo_nine_aws_leak.json:aws-access-token:3
|
||||||
|
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_repo_nine_aws_leak.json:aws-access-token:5
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:78
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:80
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:138
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:140
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:153
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:155
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:168
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:170
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:138
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:140
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:153
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:155
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:168
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:170
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:3
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:5
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:18
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:20
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:33
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:35
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_repos/test_repo_8/dummy.txt:aws-access-token:2
|
||||||
|
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_repos/test_repo_8/dummy.txt:aws-access-token:6
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:48
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak.json:aws-access-token:48
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:33
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak.json:aws-access-token:93
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:78
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:18
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_three_leaks.json:aws-access-token:48
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:78
|
||||||
|
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks.json:aws-access-token:33
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:3
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:4
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:16
|
||||||
|
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:17
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_since_date.json:aws-access-token:3
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_since_date.json:aws-access-token:4
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_until_date.json:aws-access-token:3
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_until_date.json:aws-access-token:4
|
||||||
|
0d7c18cb39c60efb62a6c7b351f95d46ebe1f63e:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:172
|
||||||
|
0d7c18cb39c60efb62a6c7b351f95d46ebe1f63e:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:173
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:3
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:4
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:16
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:17
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:29
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:30
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:42
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:43
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:55
|
||||||
|
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:56
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:3
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:4
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:16
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:17
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:29
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:30
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:42
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:43
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:55
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:56
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:68
|
||||||
|
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:69
|
||||||
|
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_local_repo_seven_aws_leak_uncommitted.json:aws-access-token:3
|
||||||
|
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_local_repo_seven_aws_leak_uncommitted.json:aws-access-token:4
|
||||||
|
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_repos/test_repo_7/file:aws-access-token:5
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:94
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:95
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:134
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:160
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:94
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:133
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:134
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:172
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:173
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:3
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:4
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:16
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:17
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:29
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:30
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:42
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:43
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:55
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:56
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:68
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:69
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:81
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:82
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:94
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:95
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:107
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:108
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:120
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:121
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:133
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:134
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:146
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:147
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:159
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:160
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:172
|
||||||
|
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:173
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:185
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:186
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:29
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:30
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:42
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:224
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:225
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:211
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:212
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:263
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:264
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:237
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:238
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:276
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:277
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:316
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:342
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:95
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:121
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:3
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:4
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:29
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:30
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:42
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:43
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:146
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:147
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:380
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:381
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:406
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:407
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:445
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:446
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:16
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:17
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:68
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:69
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:55
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:56
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:172
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:173
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:68
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:69
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:95
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_owner_aws_leak.json:aws-access-token:120
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_owner_aws_leak.json:aws-access-token:121
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks.json:aws-access-token:107
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks.json:aws-access-token:108
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:94
|
||||||
|
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:95
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_three_leaks.json:aws-access-token:81
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_three_leaks.json:aws-access-token:82
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:audit/util.go:aws-access-token:66
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:55
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:56
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:55
|
||||||
|
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:56
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak.json:aws-access-token:276
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak.json:aws-access-token:277
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:16
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:17
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:146
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:147
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six.json:aws-access-token:31
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six.json:aws-access-token:33
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_filepath.json:aws-access-token:3
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_filepath.json:aws-access-token:4
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_path_globally_whitelisted.json:aws-access-token:3
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_path_globally_whitelisted.json:aws-access-token:4
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_repos/test_repo_6/server.test.py:aws-access-token:5
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:55
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:56
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:68
|
||||||
|
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:69
|
||||||
|
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_repos/test_repo_6/config/application.properties:aws-access-token:3
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:133
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:134
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:250
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:251
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:263
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:264
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:3
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:4
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:16
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:17
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:3
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:4
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:16
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:17
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:42
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:43
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:68
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:69
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:94
|
||||||
|
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_repos/test_repo_5/secrets.py:aws-access-token:1
|
||||||
|
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_repos/test_repo_5/secrets.py:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:3
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:16
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:17
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:29
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:30
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:42
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:43
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:3
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:29
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:30
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:3
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:4
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:16
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:17
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:29
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:30
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:42
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:43
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:55
|
||||||
|
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:56
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:68
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:69
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:81
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:82
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:107
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:108
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:94
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:95
|
||||||
|
6e1c41b536a514e1d17768eb42ebf5d87e61247d:examples/simple_regex_and_whitelist_config.toml:aws-access-token:4
|
||||||
|
6e1c41b536a514e1d17768eb42ebf5d87e61247d:examples/simple_regex_and_whitelist_config.toml:aws-access-token:12
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:211
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:212
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:audit/util.go:aws-access-token:90
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:237
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:238
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_configs/aws_key_aws_whitelisted.toml:aws-access-token:6
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_regex_whitelist.json.got:aws-access-token:3
|
||||||
|
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_regex_whitelist.json.got:aws-access-token:4
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:315
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:316
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:341
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:342
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:445
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:446
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:471
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:472
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:549
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:550
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:575
|
||||||
|
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:576
|
||||||
|
e446ba073804cf714316c5dc00d0ac41917b31f7:test_data/test_regex_entropy.json:aws-access-token:3
|
||||||
|
e446ba073804cf714316c5dc00d0ac41917b31f7:test_data/test_regex_entropy.json:aws-access-token:4
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:241
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:242
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:255
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:256
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:269
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:270
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:283
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:284
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:297
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:298
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:311
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:312
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:325
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:326
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:339
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:340
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:353
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:354
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:367
|
||||||
|
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:368
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:audit/audit_test.go:aws-access-token:207
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_entropy.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:31
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:32
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:45
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:46
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:59
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:60
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:73
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:74
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:87
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:88
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:101
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:102
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_repos/test_repo_1/server.test.py:aws-access-token:5
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:31
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:32
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:45
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:46
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:59
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:60
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:73
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:74
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:3
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:4
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:17
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:18
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:31
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:32
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:45
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:46
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:59
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:60
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:73
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:74
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:87
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:88
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:101
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:102
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:115
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:116
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:129
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:130
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:143
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:144
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:157
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:158
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:171
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:172
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:185
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:186
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:199
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:200
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:213
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:214
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:227
|
||||||
|
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:228
|
||||||
|
7bd55e33b504f76fc2aec27f4f479a5fb2606480:src/constants.go:private-key:32
|
||||||
|
e79ffc6ae8f66931d687407e07bc0632fb262091:src/constants.go:private-key:23
|
||||||
|
2b995fda446e03b7660c327fec41265f03199c71:config.go:private-key:28
|
||||||
|
1f80d14f3f069118a2e578d83bbc8440495fc906:main.go:private-key:118
|
||||||
|
fe977ea8577b739c34a0071ba34e98cf6b6fad38:checks_test.go:aws-access-token:52
|
||||||
|
4b4fa00b69a9a2e5f7619b1ff1dd6d160f588aec:README.md:aws-access-token:25
|
||||||
|
4b4fa00b69a9a2e5f7619b1ff1dd6d160f588aec:README.md:aws-access-token:27
|
||||||
|
2186f2299990290e4e19cf3b28906e2ec369d01e:main.go:private-key:44
|
||||||
|
9f694531b203663588c68c82dbbfb34d4f71863f:main.go:private-key:44
|
||||||
|
1e250f1a14eab6f457d61f5d7650b47c6ff43334:checks_test.go:aws-access-token:19
|
||||||
|
1e250f1a14eab6f457d61f5d7650b47c6ff43334:config.yml:private-key:2
|
||||||
|
bc26e979c5911cf647c1bede0b3700ebaaa454c8:checks_test.go:aws-access-token:36
|
||||||
|
8f352bd840f028b481dc725b77d2f4904b77913b:checks_test.go:aws-access-token:34
|
||||||
|
ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29:checks_test.go:aws-access-token:37
|
||||||
|
06c9e824d5985c8e8789321ae70de7ace3b093dc:main.go:aws-access-token:15
|
||||||
|
6d801ed61cf4d75d176cbf9062ec6ad706c9d1eb:detect/detect_test.go:private-key:567
|
||||||
|
6d801ed61cf4d75d176cbf9062ec6ad706c9d1eb:testdata/repos/symlinks/source_file/id_ed25519:private-key:1
|
||||||
|
acce01f2338434a78f6a4a06a097b0fd23280484:README.md:aws-access-token:218
|
||||||
|
README.md:aws-access-token:204
|
||||||
|
README.md:aws-access-token:205
|
||||||
|
README.md:aws-access-token:244
|
||||||
|
cmd/generate/config/rules/privatekey.go:private-key:19
|
||||||
|
cmd/generate/config/rules/generic.go:clojars-api-token:43
|
||||||
|
cmd/generate/config/rules/generic.go:generic-api-key:45
|
||||||
|
cmd/generate/config/rules/generic.go:generic-api-key:46
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:22
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:24
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:28
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:29
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:46
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:48
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:50
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:52
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:54
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:55
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:56
|
||||||
|
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:57
|
||||||
|
config/config_test.go:aws-access-token:31
|
||||||
|
detect/detect_test.go:sidekiq-secret:120
|
||||||
|
detect/detect_test.go:sidekiq-secret:126
|
||||||
|
detect/detect_test.go:sidekiq-secret:142
|
||||||
|
detect/detect_test.go:aws-access-token:50
|
||||||
|
detect/detect_test.go:aws-access-token:60
|
||||||
|
detect/detect_test.go:aws-access-token:61
|
||||||
|
detect/detect_test.go:aws-access-token:98
|
||||||
|
detect/detect_test.go:aws-access-token:104
|
||||||
|
detect/detect_test.go:aws-access-token:105
|
||||||
|
detect/detect_test.go:aws-access-token:186
|
||||||
|
detect/detect_test.go:aws-access-token:194
|
||||||
|
detect/detect_test.go:aws-access-token:202
|
||||||
|
detect/detect_test.go:aws-access-token:288
|
||||||
|
detect/detect_test.go:aws-access-token:296
|
||||||
|
detect/detect_test.go:aws-access-token:359
|
||||||
|
detect/detect_test.go:aws-access-token:360
|
||||||
|
detect/detect_test.go:aws-access-token:378
|
||||||
|
detect/detect_test.go:aws-access-token:379
|
||||||
|
detect/detect_test.go:aws-access-token:404
|
||||||
|
detect/detect_test.go:aws-access-token:405
|
||||||
|
detect/detect_test.go:aws-access-token:480
|
||||||
|
detect/detect_test.go:aws-access-token:481
|
||||||
|
detect/detect_test.go:aws-access-token:499
|
||||||
|
detect/detect_test.go:aws-access-token:500
|
||||||
|
detect/detect_test.go:sidekiq-sensitive-url:164
|
||||||
|
detect/detect_test.go:sidekiq-sensitive-url:170
|
||||||
|
detect/detect_test.go:pypi-upload-token:76
|
||||||
|
detect/detect_test.go:pypi-upload-token:82
|
||||||
|
detect/detect_test.go:pypi-upload-token:83
|
||||||
|
detect/detect_test.go:discord-api-token:211
|
||||||
|
detect/detect_test.go:discord-api-token:233
|
||||||
|
detect/detect_test.go:discord-api-token:241
|
||||||
|
detect/detect_test.go:discord-api-token:263
|
||||||
|
detect/detect_test.go:discord-api-token:279
|
||||||
|
testdata/config/allow_aws_re.toml:aws-access-token:9
|
||||||
|
testdata/config/allow_global_aws_re.toml:aws-access-token:8
|
||||||
|
testdata/expected/git/small-branch-foo.txt:aws-access-token:15
|
||||||
|
testdata/expected/git/small.txt:aws-access-token:15
|
||||||
|
testdata/expected/git/small.txt:aws-access-token:44
|
||||||
|
testdata/repos/nogit/main.go:aws-access-token:20
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:513
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:492
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:414
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:388
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:366
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:discord-api-token:255
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:discord-api-token:224
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-sensitive-url:177
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-secret:154
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-secret:130
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:107
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:pypi-upload-token:84
|
||||||
|
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:62
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:62
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:pypi-upload-token:84
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:107
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-secret:130
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-secret:154
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-sensitive-url:177
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:discord-api-token:224
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:discord-api-token:255
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:366
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:388
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:414
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:492
|
||||||
|
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:513
|
||||||
|
bfbc39eb185a217ead81a7174026f1c55f963660:cmd/generate/config/rules/jwt.go:jwt:17
|
||||||
|
bfbc39eb185a217ead81a7174026f1c55f963660:cmd/generate/config/rules/jwt.go:jwt:19
|
||||||
|
acce01f2338434a78f6a4a06a097b0fd23280484:README.md:aws-access-token:220
|
||||||
|
99d620c719020fa24baa831299f0c964da79875e:detect/detect_test.go:aws-access-token:514
|
||||||
|
111c8b47b65627db117bd20be85ff0aee8961eb9:detect/detect_test.go:private-key:567
|
||||||
|
99d620c719020fa24baa831299f0c964da79875e:detect/detect_test.go:aws-access-token:512
|
||||||
|
99d620c719020fa24baa831299f0c964da79875e:detect/detect_test.go:aws-access-token:513
|
||||||
|
69f161c0a0cc0f7858f7d0609d656f4edcedd84c:detect/detect_test.go:discord-api-token:326
|
||||||
|
9701bf1724d822c0d5bbb7627535dd639a37bf56:testdata/repos/staged/api/api.go:aws-access-token:7
|
||||||
|
9701bf1724d822c0d5bbb7627535dd639a37bf56:detect/detect_test.go:aws-access-token:505
|
||||||
|
9701bf1724d822c0d5bbb7627535dd639a37bf56:detect/detect_test.go:aws-access-token:506
|
||||||
|
9701bf1724d822c0d5bbb7627535dd639a37bf56:detect/detect_test.go:aws-access-token:507
|
||||||
|
9701bf1724d822c0d5bbb7627535dd639a37bf56:testdata/repos/staged/api/api.go:aws-access-token:6
|
||||||
|
9701bf1724d822c0d5bbb7627535dd639a37bf56:testdata/repos/staged/api/api.go:aws-access-token:7
|
||||||
|
|
||||||
|
|
||||||
@@ -7,5 +7,5 @@
|
|||||||
- id: gitleaks-docker
|
- id: gitleaks-docker
|
||||||
name: Detect hardcoded secrets
|
name: Detect hardcoded secrets
|
||||||
description: Detect hardcoded secrets using Gitleaks
|
description: Detect hardcoded secrets using Gitleaks
|
||||||
entry: zricethezav/gitleaks:v8.5.2 protect --verbose --redact --staged
|
entry: zricethezav/gitleaks protect --verbose --redact --staged
|
||||||
language: docker_image
|
language: docker_image
|
||||||
+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 readable 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
|
||||||
+5
-2
@@ -1,12 +1,15 @@
|
|||||||
FROM golang:1.17 AS build
|
FROM golang:1.19 AS build
|
||||||
WORKDIR /go/src/github.com/zricethezav/gitleaks
|
WORKDIR /go/src/github.com/zricethezav/gitleaks
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN VERSION=$(git describe --tags --abbrev=0) && \
|
RUN VERSION=$(git describe --tags --abbrev=0) && \
|
||||||
CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="github.com/zricethezav/gitleaks/v8/cmd.Version=${VERSION}
|
CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="github.com/zricethezav/gitleaks/v8/cmd.Version=${VERSION}
|
||||||
|
|
||||||
FROM alpine:3.14.2
|
FROM alpine:3.16
|
||||||
RUN adduser -D gitleaks && \
|
RUN adduser -D gitleaks && \
|
||||||
apk add --no-cache bash git openssh-client
|
apk add --no-cache bash git openssh-client
|
||||||
COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
|
COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
|
||||||
USER gitleaks
|
USER gitleaks
|
||||||
|
|
||||||
|
RUN git config --global --add safe.directory '*'
|
||||||
|
|
||||||
ENTRYPOINT ["gitleaks"]
|
ENTRYPOINT ["gitleaks"]
|
||||||
@@ -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">
|
||||||
@@ -16,6 +16,9 @@
|
|||||||
<a href="https://hub.docker.com/r/zricethezav/gitleaks">
|
<a href="https://hub.docker.com/r/zricethezav/gitleaks">
|
||||||
<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://github.com/zricethezav/gitleaks-action">
|
||||||
|
<img alt="gitleaks badge" src="https://img.shields.io/badge/protected%20by-gitleaks-blue">
|
||||||
|
</a>
|
||||||
<a href="https://twitter.com/intent/follow?screen_name=zricethezav">
|
<a href="https://twitter.com/intent/follow?screen_name=zricethezav">
|
||||||
<img src="https://img.shields.io/twitter/follow/zricethezav?label=Follow%20zricethezav&style=social&color=blue" alt="Follow @zricethezav" />
|
<img src="https://img.shields.io/twitter/follow/zricethezav?label=Follow%20zricethezav&style=social&color=blue" alt="Follow @zricethezav" />
|
||||||
</a>
|
</a>
|
||||||
@@ -24,113 +27,162 @@
|
|||||||
|
|
||||||
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)
|
```
|
||||||
|
➜ ~/code(master) gitleaks detect --source . -v
|
||||||
|
|
||||||
|
○
|
||||||
|
│╲
|
||||||
|
│ ○
|
||||||
|
○ ░
|
||||||
|
░ gitleaks
|
||||||
|
|
||||||
|
|
||||||
|
Finding: "export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef",
|
||||||
|
Secret: cafebabe:deadbeef
|
||||||
|
RuleID: sidekiq-secret
|
||||||
|
Entropy: 2.609850
|
||||||
|
File: cmd/generate/config/rules/sidekiq.go
|
||||||
|
Line: 23
|
||||||
|
Commit: cd5226711335c68be1e720b318b7bc3135a30eb2
|
||||||
|
Author: John
|
||||||
|
Email: john@users.noreply.github.com
|
||||||
|
Date: 2022-08-03T12:31:40Z
|
||||||
|
Fingerprint: cd5226711335c68be1e720b318b7bc3135a30eb2:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
|
||||||
|
```
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
Gitleaks can be installed using Homebrew, Docker, or Go. Gitleaks is also available in binary form for many popular platforms and OS types on the [releases page](https://github.com/zricethezav/gitleaks/releases). In addition, Gitleaks can be implemented as a pre-commit hook directly in your repo.
|
|
||||||
|
|
||||||
### MacOS
|
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).
|
||||||
|
|
||||||
|
### Installing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# MacOS
|
||||||
brew install gitleaks
|
brew install gitleaks
|
||||||
```
|
|
||||||
|
|
||||||
### Docker
|
# Docker (DockerHub)
|
||||||
#### DockerHub
|
|
||||||
```bash
|
|
||||||
docker pull zricethezav/gitleaks:latest
|
docker pull zricethezav/gitleaks:latest
|
||||||
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
||||||
```
|
|
||||||
#### ghcr.io
|
|
||||||
```bash
|
|
||||||
docker pull ghcr.io/zricethezav/gitleaks:latest
|
|
||||||
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
|
||||||
```
|
|
||||||
|
|
||||||
### From Source
|
# Docker (ghcr.io)
|
||||||
1. Download and install Go from https://golang.org/dl/
|
docker pull ghcr.io/gitleaks/gitleaks:latest
|
||||||
2. Clone the repo
|
docker run -v ${path_to_host_folder_to_scan}:/path gitleaks/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
|
||||||
```bash
|
|
||||||
git clone https://github.com/zricethezav/gitleaks.git
|
# From Source
|
||||||
```
|
git clone https://github.com/gitleaks/gitleaks.git
|
||||||
3. Build the binary
|
|
||||||
```bash
|
|
||||||
cd gitleaks
|
cd gitleaks
|
||||||
make build
|
make build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### GitHub Action
|
||||||
|
|
||||||
|
Check out the official [Gitleaks GitHub Action](https://github.com/gitleaks/gitleaks-action)
|
||||||
|
|
||||||
|
```
|
||||||
|
name: gitleaks
|
||||||
|
on: [pull_request, push, workflow_dispatch]
|
||||||
|
jobs:
|
||||||
|
scan:
|
||||||
|
name: gitleaks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: gitleaks/gitleaks-action@v2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} # Only required for Organizations, not personal accounts.
|
||||||
|
```
|
||||||
|
|
||||||
### 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/gitleaks/gitleaks
|
||||||
rev: v8.2.0
|
rev: v8.16.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: gitleaks
|
- id: gitleaks
|
||||||
```
|
```
|
||||||
|
|
||||||
for a [native execution of GitLeaks](https://github.com/zricethezav/gitleaks/releases) or use the [`gitleaks-docker` pre-commit ID](https://github.com/zricethezav/gitleaks/blob/master/.pre-commit-hooks.yaml) for executing GitLeaks using the [official Docker images](#docker)
|
for a [native execution of GitLeaks](https://github.com/zricethezav/gitleaks/releases) or use the [`gitleaks-docker` pre-commit ID](https://github.com/zricethezav/gitleaks/blob/master/.pre-commit-hooks.yaml) for executing GitLeaks using the [official Docker images](#docker)
|
||||||
|
|
||||||
3. Install with `pre-commit install`
|
3. Auto-update the config to the latest repos' versions by executing `pre-commit autoupdate`
|
||||||
4. Now you're all set!
|
4. Install with `pre-commit install`
|
||||||
|
5. Now you're all set!
|
||||||
|
|
||||||
```
|
```
|
||||||
➜ git commit -m "this commit contains a secret"
|
➜ git commit -m "this commit contains a secret"
|
||||||
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]
|
||||||
|
|
||||||
Available Commands:
|
Available Commands:
|
||||||
completion generate the autocompletion script for the specified shell
|
completion generate the autocompletion script for the specified shell
|
||||||
detect Detect secrets in code
|
detect detect secrets in code
|
||||||
help Help about any command
|
help Help about any command
|
||||||
protect Protect secrets in code
|
protect protect secrets in code
|
||||||
version Display gitleaks version
|
version display gitleaks version
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-c, --config string config file path
|
-b, --baseline-path string path to baseline with issues that can be ignored
|
||||||
order of precedence:
|
-c, --config string config file path
|
||||||
1. --config/-c
|
order of precedence:
|
||||||
2. env var GITLEAKS_CONFIG
|
1. --config/-c
|
||||||
3. (--source/-s)/.gitleaks.toml
|
2. env var GITLEAKS_CONFIG
|
||||||
If none of the three options are used, then gitleaks will use the default config
|
3. (--source/-s)/.gitleaks.toml
|
||||||
--exit-code string exit code when leaks have been encountered (default: 1)
|
If none of the three options are used, then gitleaks will use the default config
|
||||||
-h, --help help for gitleaks
|
--exit-code int exit code when leaks have been encountered (default 1)
|
||||||
-l, --log-level string log level (debug, info, warn, error, fatal) (default "info")
|
-h, --help help for gitleaks
|
||||||
--redact redact secrets from logs and stdout
|
-l, --log-level string log level (trace, debug, info, warn, error, fatal) (default "info")
|
||||||
-f, --report-format string output format (json, csv, sarif)
|
--max-target-megabytes int files larger than this will be skipped
|
||||||
-r, --report-path string report file
|
--no-color turn off color for verbose output
|
||||||
-s, --source string path to source (git repo, directory, file)
|
--no-banner suppress banner
|
||||||
-v, --verbose show verbose output from scan
|
--redact redact secrets from logs and stdout
|
||||||
|
-f, --report-format string output format (json, csv, sarif) (default "json")
|
||||||
|
-r, --report-path string report file
|
||||||
|
-s, --source string path to source (default ".")
|
||||||
|
-v, --verbose show verbose output from scan
|
||||||
|
|
||||||
Use "gitleaks [command] --help" for more information about a command.
|
Use "gitleaks [command] --help" for more information about a command.
|
||||||
```
|
```
|
||||||
|
|
||||||
### 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)).
|
||||||
[`git log -p` generates patches](https://git-scm.com/docs/git-log#_generating_patch_text_with_p) which gitleaks will use to detect secrets.
|
[`git log -p` generates patches](https://git-scm.com/docs/git-log#_generating_patch_text_with_p) which gitleaks will use to detect secrets.
|
||||||
You can configure what commits `git log` will range over by using the `--log-opts` flag. `--log-opts` accepts any option for `git log -p`.
|
You can configure what commits `git log` will range over by using the `--log-opts` flag. `--log-opts` accepts any option for `git log -p`.
|
||||||
For example, if you wanted to run gitleaks on a range of commits you could use the following command: `gitleaks --source . --log-opts="--all commitA..commitB"`.
|
For example, if you wanted to run gitleaks on a range of commits you could use the following command: `gitleaks detect --source . --log-opts="--all commitA..commitB"`.
|
||||||
See the `git log` [documentation](https://git-scm.com/docs/git-log) for more information.
|
See the `git log` [documentation](https://git-scm.com/docs/git-log) for more information.
|
||||||
|
|
||||||
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 scan 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
|
||||||
[here](https://github.com/zricethezav/gitleaks/blob/7240e16769b92d2a1b137c17d6bf9d55a8562899/git/git.go#L48-L49)). You can set the
|
[here](https://github.com/zricethezav/gitleaks/blob/7240e16769b92d2a1b137c17d6bf9d55a8562899/git/git.go#L48-L49)). You can set the
|
||||||
@@ -139,39 +191,54 @@ 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
|
### Creating a baseline
|
||||||
You can verify a finding found by gitleaks using a `git log` command.
|
|
||||||
Example output:
|
When scanning large repositories or repositories with a long history, it can be convenient to use a baseline. When using a baseline,
|
||||||
```
|
gitleaks will ignore any old findings that are present in the baseline. A baseline can be any gitleaks report. To create a gitleaks report, run gitleaks with the `--report-path` parameter.
|
||||||
{
|
|
||||||
"Description": "AWS",
|
|
||||||
"StartLine": 37,
|
|
||||||
"EndLine": 37,
|
|
||||||
"StartColumn": 19,
|
|
||||||
"EndColumn": 38,
|
|
||||||
"Match": "\t\t\"aws_secret= \\\"AKIAIMNOJVGFDXXXE4OA\\\"\": true,",
|
|
||||||
"Secret": "AKIAIMNOJVGFDXXXE4OA",
|
|
||||||
"File": "checks_test.go",
|
|
||||||
"Commit": "ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29",
|
|
||||||
"Entropy": 0,
|
|
||||||
"Author": "zricethezav",
|
|
||||||
"Email": "thisispublicanyways@gmail.com",
|
|
||||||
"Date": "2018-01-28 17:39:00 -0500 -0500",
|
|
||||||
"Message": "[update] entropy check",
|
|
||||||
"Tags": [],
|
|
||||||
"RuleID": "aws-access-token"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
gitleaks detect --report-path gitleaks-report.json # This will save the report in a file called gitleaks-report.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Once as baseline is created it can be applied when running the detect command again:
|
||||||
|
|
||||||
|
```
|
||||||
|
gitleaks detect --baseline-path gitleaks-report.json --report-path findings.json
|
||||||
|
```
|
||||||
|
|
||||||
|
After running the detect command with the --baseline-path parameter, report output (findings.json) will only contain new issues.
|
||||||
|
|
||||||
|
### Verify Findings
|
||||||
|
|
||||||
|
You can verify a finding found by gitleaks using a `git log` command.
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
```
|
||||||
|
Finding: aws_secret="AKIAIMNOJVGFDXXXE4OA"
|
||||||
|
RuleID: aws-access-token
|
||||||
|
Secret AKIAIMNOJVGFDXXXE4OA
|
||||||
|
Entropy: 3.65
|
||||||
|
File: checks_test.go
|
||||||
|
Line: 37
|
||||||
|
Commit: ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
|
||||||
|
Author: Zachary Rice
|
||||||
|
Email: z@email.com
|
||||||
|
Date: 2018-01-28T17:39:00Z
|
||||||
|
Fingerprint: ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29:checks_test.go:aws-access-token:37
|
||||||
|
```
|
||||||
|
|
||||||
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:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -190,15 +257,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]]
|
||||||
@@ -233,9 +319,9 @@ entropy = 3.5
|
|||||||
# either be part of the idenitifer or unique strings specific to the rule's regex
|
# either be part of the idenitifer or unique strings specific to the rule's regex
|
||||||
# (introduced in v8.6.0)
|
# (introduced in v8.6.0)
|
||||||
keywords = [
|
keywords = [
|
||||||
"auth",
|
"auth",
|
||||||
"password",
|
"password",
|
||||||
"token",
|
"token",
|
||||||
]
|
]
|
||||||
|
|
||||||
# You can include an allowlist table for a single rule to reduce false positives or ignore commits
|
# You can include an allowlist table for a single rule to reduce false positives or ignore commits
|
||||||
@@ -244,13 +330,24 @@ keywords = [
|
|||||||
description = "ignore commit A"
|
description = "ignore commit A"
|
||||||
commits = [ "commit-A", "commit-B"]
|
commits = [ "commit-A", "commit-B"]
|
||||||
paths = [
|
paths = [
|
||||||
'''go\.mod''',
|
'''go\.mod''',
|
||||||
'''go\.sum'''
|
'''go\.sum'''
|
||||||
]
|
]
|
||||||
|
# note: (rule) regexTarget defaults to check the _Secret_ in the finding.
|
||||||
|
# if regexTarget is not specified then _Secret_ will be used.
|
||||||
|
# Acceptable values for regexTarget are "match" and "line"
|
||||||
|
regexTarget = "match"
|
||||||
regexes = [
|
regexes = [
|
||||||
'''process''',
|
'''process''',
|
||||||
'''getenv''',
|
'''getenv''',
|
||||||
]
|
]
|
||||||
|
# note: stopwords targets the extracted secret, not the entire regex match
|
||||||
|
# like 'regexes' does. (stopwords introduced in 8.8.0)
|
||||||
|
stopwords = [
|
||||||
|
'''client''',
|
||||||
|
'''endpoint''',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
# This is a global allowlist which has a higher order of precedence than rule-specific allowlists.
|
# This is a global allowlist which has a higher order of precedence than rule-specific allowlists.
|
||||||
# If a commit listed in the `commits` field below is encountered then that commit will be skipped and no
|
# If a commit listed in the `commits` field below is encountered then that commit will be skipped and no
|
||||||
@@ -259,35 +356,59 @@ regexes = [
|
|||||||
description = "global allow list"
|
description = "global allow list"
|
||||||
commits = [ "commit-A", "commit-B", "commit-C"]
|
commits = [ "commit-A", "commit-B", "commit-C"]
|
||||||
paths = [
|
paths = [
|
||||||
'''gitleaks\.toml''',
|
'''gitleaks\.toml''',
|
||||||
'''(.*?)(jpg|gif|doc)'''
|
'''(.*?)(jpg|gif|doc)'''
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# note: (global) regexTarget defaults to check the _Secret_ in the finding.
|
||||||
|
# if regexTarget is not specified then _Secret_ will be used.
|
||||||
|
# Acceptable values for regexTarget are "match" and "line"
|
||||||
|
regexTarget = "match"
|
||||||
|
|
||||||
regexes = [
|
regexes = [
|
||||||
'''219-09-9999''',
|
'''219-09-9999''',
|
||||||
'''078-05-1120''',
|
'''078-05-1120''',
|
||||||
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
|
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
|
||||||
|
]
|
||||||
|
# note: stopwords targets the extracted secret, not the entire regex match
|
||||||
|
# like 'regexes' does. (stopwords introduced in 8.8.0)
|
||||||
|
stopwords = [
|
||||||
|
'''client''',
|
||||||
|
'''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) if you would like to contribute to the default configuration. Additionally, you can check out [this gitleaks blog post](https://blog.gitleaks.io/stop-leaking-secrets-configuration-2-3-aeed293b1fbf) which covers advanced configuration setups.
|
||||||
|
|
||||||
|
### Additional Configuration
|
||||||
|
|
||||||
|
#### gitleaks:allow
|
||||||
|
|
||||||
|
If you are knowingly committing a test secret that gitleaks will catch you can add a `gitleaks:allow` comment to that line which will instruct gitleaks
|
||||||
|
to ignore that secret. Ex:
|
||||||
|
|
||||||
|
```
|
||||||
|
class CustomClass:
|
||||||
|
discord_client_secret = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ' #gitleaks:allow
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### .gitleaksignore
|
||||||
|
|
||||||
|
You can ignore specific findings by creating a `.gitleaksignore` file at the root of your repo. In release v8.10.0 Gitleaks added a `Fingerprint` value to the Gitleaks report. Each leak, or finding, has a Fingerprint that uniquely identifies a secret. Add this fingerprint to the `.gitleaksignore` file to ignore that specific secret. See Gitleaks' [.gitleaksignore](https://github.com/zricethezav/gitleaks/blob/master/.gitleaksignore) for an example. Note: this feature is experimental and is subject to change in the future.
|
||||||
|
|
||||||
## 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>
|
|
||||||
<a href="https://www.typeform.com/">
|
|
||||||
<img src="https://user-images.githubusercontent.com/15034943/146945294-a6473d55-86b8-4f53-941e-7f185ad6b3d7.png" width=200/>
|
|
||||||
</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
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
## Who uses Gitleaks?
|
||||||
|
|
||||||
|
As the Gitleaks Community grows, we'd like to keep a list of our users.
|
||||||
|
|
||||||
|
Here's a running list of some organizations using Gitleaks[^1]:
|
||||||
|
|
||||||
|
1. [GitLab](https://docs.gitlab.com/ee/user/application_security/secret_detection/)
|
||||||
|
1. [Gitleaks](https://gitleaks.io)
|
||||||
|
1. [GoReleaser](https://goreleaser.com)
|
||||||
|
2. [Trendyol](https://trendyol.com)
|
||||||
|
|
||||||
|
Feel free to [add yours](https://github.com/zricethezav/gitleaks/edit/master/USERS.md)!
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hey! Thanks for looking into this file!
|
||||||
|
If you're going to edit it, please:
|
||||||
|
- keep a-z ordering :)
|
||||||
|
- edit only the USERS.md file at the repository's root folder
|
||||||
|
-->
|
||||||
|
|
||||||
|
[^1]: Entries were either added by the companies themselves or by the maintainers after seeing it in the wild.
|
||||||
|
You can see all public repositories using Gitleaks or Gitleaks-Action by [searching on GitHub](https://github.com/search?q=gitleaks).
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Shout out to GoReleaser for this template: https://github.com/goreleaser/goreleaser/blob/main/USERS.md
|
||||||
|
-->
|
||||||
+95
-17
@@ -18,6 +18,9 @@ func init() {
|
|||||||
rootCmd.AddCommand(detectCmd)
|
rootCmd.AddCommand(detectCmd)
|
||||||
detectCmd.Flags().String("log-opts", "", "git log options")
|
detectCmd.Flags().String("log-opts", "", "git log options")
|
||||||
detectCmd.Flags().Bool("no-git", false, "treat git repo as a regular directory and scan those files, --log-opts has no effect on the scan when --no-git is set")
|
detectCmd.Flags().Bool("no-git", false, "treat git repo as a regular directory and scan those files, --log-opts has no effect on the scan when --no-git is set")
|
||||||
|
detectCmd.Flags().Bool("pipe", false, "scan input from stdin, ex: `cat some_file | gitleaks detect --pipe`")
|
||||||
|
detectCmd.Flags().Bool("follow-symlinks", false, "scan files that are symlinks to other files")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var detectCmd = &cobra.Command{
|
var detectCmd = &cobra.Command{
|
||||||
@@ -51,11 +54,11 @@ func runDetect(cmd *cobra.Command, args []string) {
|
|||||||
detector := detect.NewDetector(cfg)
|
detector := detect.NewDetector(cfg)
|
||||||
detector.Config.Path, err = cmd.Flags().GetString("config")
|
detector.Config.Path, err = cmd.Flags().GetString("config")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
source, err := cmd.Flags().GetString("source")
|
source, err := cmd.Flags().GetString("source")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
// if config path is not set, then use the {source}/.gitleaks.toml path.
|
// if config path is not set, then use the {source}/.gitleaks.toml path.
|
||||||
// note that there may not be a `{source}/.gitleaks.toml` file, this is ok.
|
// note that there may not be a `{source}/.gitleaks.toml` file, this is ok.
|
||||||
@@ -64,23 +67,54 @@ func runDetect(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
// set verbose flag
|
// set verbose flag
|
||||||
if detector.Verbose, err = cmd.Flags().GetBool("verbose"); err != nil {
|
if detector.Verbose, err = cmd.Flags().GetBool("verbose"); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
// set redact flag
|
// set redact flag
|
||||||
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
|
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
if detector.MaxTargetMegaBytes, err = cmd.Flags().GetInt("max-target-megabytes"); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
// set color flag
|
||||||
|
if detector.NoColor, err = cmd.Flags().GetBool("no-color"); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
|
||||||
|
if fileExists(filepath.Join(source, ".gitleaksignore")) {
|
||||||
|
if err = detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore")); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("could not call AddGitleaksIgnore")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore findings from the baseline (an existing report in json format generated earlier)
|
||||||
|
baselinePath, _ := cmd.Flags().GetString("baseline-path")
|
||||||
|
if baselinePath != "" {
|
||||||
|
err = detector.AddBaseline(baselinePath, source)
|
||||||
|
if err != nil {
|
||||||
|
log.Error().Msgf("Could not load baseline. The path must point of a gitleaks report generated using the default format: %s", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set follow symlinks flag
|
||||||
|
if detector.FollowSymlinks, err = cmd.Flags().GetBool("follow-symlinks"); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
|
|
||||||
// set exit code
|
// set exit code
|
||||||
exitCode, err := cmd.Flags().GetInt("exit-code")
|
exitCode, err := cmd.Flags().GetInt("exit-code")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("could not get exit code")
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine what type of scan:
|
// determine what type of scan:
|
||||||
// - git: scan the history of the repo
|
// - git: scan the history of the repo
|
||||||
// - no-git: scan files by treating the repo as a plain directory
|
// - no-git: scan files by treating the repo as a plain directory
|
||||||
noGit, err := cmd.Flags().GetBool("no-git")
|
noGit, err := cmd.Flags().GetBool("no-git")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("could not call GetBool() for no-git")
|
||||||
|
}
|
||||||
|
fromPipe, err := cmd.Flags().GetBool("pipe")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err)
|
||||||
}
|
}
|
||||||
@@ -90,39 +124,83 @@ func runDetect(cmd *cobra.Command, args []string) {
|
|||||||
findings, err = detector.DetectFiles(source)
|
findings, err = detector.DetectFiles(source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// don't exit on error, just log it
|
// don't exit on error, just log it
|
||||||
log.Error().Err(err)
|
log.Error().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
|
} else if fromPipe {
|
||||||
} else {
|
findings, err = detector.DetectReader(os.Stdin, 10)
|
||||||
logOpts, err := cmd.Flags().GetString("log-opts")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err)
|
// log fatal to exit, no need to continue since a report
|
||||||
|
// will not be generated when scanning from a pipe...for now
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var logOpts string
|
||||||
|
logOpts, err = cmd.Flags().GetString("log-opts")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
findings, err = detector.DetectGit(source, logOpts, detect.DetectType)
|
findings, err = detector.DetectGit(source, logOpts, detect.DetectType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// don't exit on error, just log it
|
// don't exit on error, just log it
|
||||||
log.Error().Err(err)
|
log.Error().Err(err).Msg("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// log info about the scan
|
// log info about the scan
|
||||||
log.Info().Msgf("scan completed in %s", time.Since(start))
|
if err == nil {
|
||||||
if len(findings) != 0 {
|
log.Info().Msgf("scan completed in %s", FormatDuration(time.Since(start)))
|
||||||
log.Warn().Msgf("leaks found: %d", len(findings))
|
if len(findings) != 0 {
|
||||||
|
log.Warn().Msgf("leaks found: %d", len(findings))
|
||||||
|
} else {
|
||||||
|
log.Info().Msg("no leaks found")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Info().Msg("no leaks found")
|
log.Warn().Msgf("partial scan completed in %s", FormatDuration(time.Since(start)))
|
||||||
|
if len(findings) != 0 {
|
||||||
|
log.Warn().Msgf("%d leaks found in partial scan", len(findings))
|
||||||
|
} else {
|
||||||
|
log.Warn().Msg("no leaks found in partial scan")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// write report if desired
|
// write report if desired
|
||||||
reportPath, _ := cmd.Flags().GetString("report-path")
|
reportPath, _ := cmd.Flags().GetString("report-path")
|
||||||
ext, _ := cmd.Flags().GetString("report-format")
|
ext, _ := cmd.Flags().GetString("report-format")
|
||||||
if reportPath != "" {
|
if reportPath != "" {
|
||||||
if err = report.Write(findings, cfg, ext, reportPath); err != nil {
|
if err := report.Write(findings, cfg, ext, reportPath); err != nil {
|
||||||
log.Fatal().Err(err)
|
log.Fatal().Err(err).Msg("could not write")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
if len(findings) != 0 {
|
if len(findings) != 0 {
|
||||||
os.Exit(exitCode)
|
os.Exit(exitCode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func fileExists(fileName string) bool {
|
||||||
|
// check for a .gitleaksignore file
|
||||||
|
info, err := os.Stat(fileName)
|
||||||
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if info != nil && err == nil {
|
||||||
|
if !info.IsDir() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func FormatDuration(d time.Duration) string {
|
||||||
|
scale := 100 * time.Second
|
||||||
|
// look for the max scale that is smaller than d
|
||||||
|
for scale > d {
|
||||||
|
scale = scale / 10
|
||||||
|
}
|
||||||
|
return d.Round(scale / 100).String()
|
||||||
|
}
|
||||||
+90
-15
@@ -15,54 +15,86 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
configRules := []*config.Rule{}
|
var configRules []*config.Rule
|
||||||
configRules = append(configRules, rules.AgeSecretKey())
|
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.Airtable())
|
||||||
|
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())
|
||||||
configRules = append(configRules, rules.AsanaClientID())
|
configRules = append(configRules, rules.AsanaClientID())
|
||||||
configRules = append(configRules, rules.AsanaClientSecret())
|
configRules = append(configRules, rules.AsanaClientSecret())
|
||||||
configRules = append(configRules, rules.Atlassian())
|
configRules = append(configRules, rules.Atlassian())
|
||||||
|
configRules = append(configRules, rules.Authress())
|
||||||
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.DefinedNetworkingAPIToken())
|
||||||
|
configRules = append(configRules, rules.DigitalOceanPAT())
|
||||||
|
configRules = append(configRules, rules.DigitalOceanOAuthToken())
|
||||||
|
configRules = append(configRules, rules.DigitalOceanRefreshToken())
|
||||||
configRules = append(configRules, rules.DiscordAPIToken())
|
configRules = append(configRules, rules.DiscordAPIToken())
|
||||||
configRules = append(configRules, rules.DiscordClientID())
|
configRules = append(configRules, rules.DiscordClientID())
|
||||||
configRules = append(configRules, rules.DiscordClientSecret())
|
configRules = append(configRules, rules.DiscordClientSecret())
|
||||||
|
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.FlutterwaveSecretKey())
|
configRules = append(configRules, rules.FlutterwaveEncKey())
|
||||||
configRules = append(configRules, rules.FrameIO())
|
configRules = append(configRules, rules.FrameIO())
|
||||||
configRules = append(configRules, rules.GenericCredential())
|
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.GitHubFineGrainedPat())
|
||||||
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.GitlabPat())
|
||||||
|
configRules = append(configRules, rules.GitlabPipelineTriggerToken())
|
||||||
|
configRules = append(configRules, rules.GitlabRunnerRegistrationToken())
|
||||||
|
configRules = append(configRules, rules.GitterAccessToken())
|
||||||
|
configRules = append(configRules, rules.GrafanaApiKey())
|
||||||
|
configRules = append(configRules, rules.GrafanaCloudApiToken())
|
||||||
|
configRules = append(configRules, rules.GrafanaServiceAccountToken())
|
||||||
configRules = append(configRules, rules.Hashicorp())
|
configRules = append(configRules, rules.Hashicorp())
|
||||||
configRules = append(configRules, rules.Heroku())
|
configRules = append(configRules, rules.Heroku())
|
||||||
configRules = append(configRules, rules.HubSpot())
|
configRules = append(configRules, rules.HubSpot())
|
||||||
configRules = append(configRules, rules.Intercom())
|
configRules = append(configRules, rules.Intercom())
|
||||||
|
configRules = append(configRules, rules.JWT())
|
||||||
|
configRules = append(configRules, rules.KrakenAccessToken())
|
||||||
|
configRules = append(configRules, rules.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,49 +106,92 @@ 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.PlanetScaleToken())
|
configRules = append(configRules, rules.PlanetScaleAPIToken())
|
||||||
|
configRules = append(configRules, rules.PlanetScaleOAuthToken())
|
||||||
configRules = append(configRules, rules.PostManAPI())
|
configRules = append(configRules, rules.PostManAPI())
|
||||||
|
configRules = append(configRules, rules.Prefect())
|
||||||
configRules = append(configRules, rules.PrivateKey())
|
configRules = append(configRules, rules.PrivateKey())
|
||||||
configRules = append(configRules, rules.PulumiAPIToken())
|
configRules = append(configRules, rules.PulumiAPIToken())
|
||||||
configRules = append(configRules, rules.PyPiUploadToken())
|
configRules = append(configRules, rules.PyPiUploadToken())
|
||||||
|
configRules = append(configRules, rules.RapidAPIAccessToken())
|
||||||
|
configRules = append(configRules, rules.ReadMe())
|
||||||
configRules = append(configRules, rules.RubyGemsAPIToken())
|
configRules = append(configRules, rules.RubyGemsAPIToken())
|
||||||
|
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.TeamsWebhook())
|
||||||
|
configRules = append(configRules, rules.TelegramBotToken())
|
||||||
|
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())
|
||||||
|
|
||||||
config := config.Config{
|
// ensure rules have unique ids
|
||||||
Rules: configRules,
|
ruleLookUp := make(map[string]config.Rule)
|
||||||
|
for _, rule := range configRules {
|
||||||
|
// check if rule is in ruleLookUp
|
||||||
|
if _, ok := ruleLookUp[rule.RuleID]; ok {
|
||||||
|
log.Fatal().Msgf("rule id %s is not unique", rule.RuleID)
|
||||||
|
}
|
||||||
|
// TODO: eventually change all the signatures to get ride of this
|
||||||
|
// nasty dereferencing.
|
||||||
|
ruleLookUp[rule.RuleID] = *rule
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpl, err := template.ParseFiles(templatePath)
|
tmpl, err := template.ParseFiles(templatePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("Failed to parse template")
|
log.Fatal().Err(err).Msg("Failed to parse template")
|
||||||
}
|
}
|
||||||
|
|
||||||
f, err := os.Create("gitleaks.toml")
|
f, err := os.Create("../../../config/gitleaks.toml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("Failed to create rules.toml")
|
log.Fatal().Err(err).Msg("Failed to create rules.toml")
|
||||||
}
|
}
|
||||||
tmpl.Execute(f, config)
|
|
||||||
|
if err = tmpl.Execute(f, config.Config{Rules: ruleLookUp}); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("could not execute template")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO introduce skiplists:
|
|
||||||
// https://github.com/danielmiessler/SecLists/blob/master/Miscellaneous/wordlist-skipfish.fuzz.txt
|
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -1,26 +1,25 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"regexp"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
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"}, hex32),
|
Regex: generateSemiGenericRegex([]string{"adobe"}, hex("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"adobe"},
|
Keywords: []string{"adobe"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"adobeClient := \"" + sampleHex32Token + "\"",
|
generateSampleSecret("adobe", secrets.NewSecret(hex("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func AdobeClientSecret() *config.Rule {
|
func AdobeClientSecret() *config.Rule {
|
||||||
@@ -28,13 +27,13 @@ func AdobeClientSecret() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Adobe Client Secret",
|
Description: "Adobe Client Secret",
|
||||||
RuleID: "adobe-client-secret",
|
RuleID: "adobe-client-secret",
|
||||||
Regex: regexp.MustCompile(`(p8e-)(?i)[a-z0-9]{32}`),
|
Regex: generateUniqueTokenRegex(`(p8e-)(?i)[a-z0-9]{32}`),
|
||||||
Keywords: []string{"p8e-"},
|
Keywords: []string{"p8e-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"adobeClient := \"p8e-" + sampleHex32Token + "\"",
|
"adobeClient := \"p8e-" + secrets.NewSecret(hex("32")) + "\"",
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -19,5 +19,5 @@ func AgeSecretKey() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
`apiKey := "AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ`, // gitleaks:allow
|
`apiKey := "AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ`, // gitleaks:allow
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AlgoliaApiKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Algolia API Key",
|
||||||
|
RuleID: "algolia-api-key",
|
||||||
|
Regex: generateSemiGenericRegex([]string{"algolia"}, `[a-z0-9]{32}`),
|
||||||
|
Keywords: []string{"algolia"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
"algolia_key := " + secrets.NewSecret(hex("32")),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"regexp"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -11,15 +10,15 @@ func AlibabaAccessKey() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Alibaba AccessKey ID",
|
Description: "Alibaba AccessKey ID",
|
||||||
RuleID: "alibaba-access-key-id",
|
RuleID: "alibaba-access-key-id",
|
||||||
Regex: regexp.MustCompile(`(LTAI)(?i)[a-z0-9]{20}`),
|
Regex: generateUniqueTokenRegex(`(LTAI)(?i)[a-z0-9]{20}`),
|
||||||
Keywords: []string{"LTAI"},
|
Keywords: []string{"LTAI"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"alibabaKey := \"LTAI" + sampleHex20Token + "\"",
|
"alibabaKey := \"LTAI" + secrets.NewSecret(hex("20")) + "\"",
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
@@ -29,14 +28,14 @@ func AlibabaSecretKey() *config.Rule {
|
|||||||
Description: "Alibaba Secret Key",
|
Description: "Alibaba Secret Key",
|
||||||
RuleID: "alibaba-secret-key",
|
RuleID: "alibaba-secret-key",
|
||||||
Regex: generateSemiGenericRegex([]string{"alibaba"},
|
Regex: generateSemiGenericRegex([]string{"alibaba"},
|
||||||
alphaNumeric30),
|
alphaNumeric("30")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"alibaba"},
|
Keywords: []string{"alibaba"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"alibabaSecret Key:= \"" + sampleAlphaNumeric30Token + "\"",
|
generateSampleSecret("alibaba", secrets.NewSecret(alphaNumeric("30"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -9,16 +10,16 @@ func AsanaClientID() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Asana Client ID",
|
Description: "Asana Client ID",
|
||||||
RuleID: "asana-client-id",
|
RuleID: "asana-client-id",
|
||||||
Regex: generateSemiGenericRegex([]string{"asana"}, numeric16),
|
Regex: generateSemiGenericRegex([]string{"asana"}, numeric("16")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"asana"},
|
Keywords: []string{"asana"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"asanaKey := \"" + sampleNumeric16 + "\"",
|
generateSampleSecret("asana", secrets.NewSecret(numeric("16"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func AsanaClientSecret() *config.Rule {
|
func AsanaClientSecret() *config.Rule {
|
||||||
@@ -26,13 +27,14 @@ func AsanaClientSecret() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Asana Client Secret",
|
Description: "Asana Client Secret",
|
||||||
RuleID: "asana-client-secret",
|
RuleID: "asana-client-secret",
|
||||||
Regex: generateSemiGenericRegex([]string{"asana"}, alphaNumeric32),
|
Regex: generateSemiGenericRegex([]string{"asana"}, alphaNumeric("32")),
|
||||||
|
SecretGroup: 1,
|
||||||
Keywords: []string{"asana"},
|
Keywords: []string{"asana"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"asanaKey := \"" + sampleAlphaNumeric32Token + "\"",
|
generateSampleSecret("asana", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -9,14 +10,16 @@ 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"}, alphaNumeric24),
|
Regex: generateSemiGenericRegex([]string{
|
||||||
|
"atlassian", "confluence", "jira"}, alphaNumeric("24")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"atlassian"},
|
Keywords: []string{"atlassian", "confluence", "jira"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"atlassian:= \"" + sampleAlphaNumeric24Token + "\"",
|
generateSampleSecret("atlassian", secrets.NewSecret(alphaNumeric("24"))),
|
||||||
|
generateSampleSecret("confluence", secrets.NewSecret(alphaNumeric("24"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Authress() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Authress Service Client Access Key",
|
||||||
|
RuleID: "authress-service-client-access-key",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`(?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.acc_[a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120}`),
|
||||||
|
Keywords: []string{"sc_", "ext_", "scauth_", "authress_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
// https://authress.io/knowledge-base/docs/authorization/service-clients/secrets-scanning/#1-detection
|
||||||
|
service_client_id := "sc_" + alphaNumeric("10")
|
||||||
|
access_key_id := alphaNumeric("4")
|
||||||
|
account_id := "acc_" + alphaNumeric("10")
|
||||||
|
signature_key := alphaNumericExtendedShort("40")
|
||||||
|
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("authress", secrets.NewSecret(fmt.Sprintf(`%s\.%s\.%s\.%s`, service_client_id, access_key_id, account_id, signature_key))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -26,6 +26,6 @@ func AWS() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"AWSToken := \"" + "AKIALALEMEL33243OLIB" + "\""} // gitleaks:allow
|
tps := []string{generateSampleSecret("AWS", "AKIALALEMEL33243OLIB")} // gitleaks:allow
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ func Beamer() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"beamer := \"b_" + sampleAlphaNumeric32Token + "-_=_xxxxxxxx\"",
|
generateSampleSecret("beamer", "b_"+secrets.NewSecret(alphaNumericExtended("44"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,39 +1,40 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
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"}, alphaNumeric32),
|
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumeric("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"bitbucket"},
|
Keywords: []string{"bitbucket"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"bitbucket := \"" + sampleAlphaNumeric32Token + "\"",
|
generateSampleSecret("bitbucket", secrets.NewSecret(alphaNumeric("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
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"}, extendedAlphaNumeric64),
|
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumericExtended("64")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"bitbucket"},
|
Keywords: []string{"bitbucket"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"bitbucket := \"" + sampleExtendedAlphaNumeric64Token + "\"",
|
generateSampleSecret("bitbucket", secrets.NewSecret(alphaNumeric("64"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -11,13 +12,13 @@ func Clojars() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Clojars API token",
|
Description: "Clojars API token",
|
||||||
RuleID: "clojars-api-token",
|
RuleID: "clojars-api-token",
|
||||||
Regex: regexp.MustCompile(`(CLOJARS_)(?i)[a-z0-9]{60}`),
|
Regex: regexp.MustCompile(`(?i)(CLOJARS_)[a-z0-9]{60}`),
|
||||||
Keywords: []string{"clojars"},
|
Keywords: []string{"clojars"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"clojarsAPIToken := \"CLOJARS_" + sampleAlphaNumeric60Token + "\"",
|
generateSampleSecret("clojars", "CLOJARS_"+secrets.NewSecret(alphaNumeric("60"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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,24 +1,43 @@
|
|||||||
|
# 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)$''',
|
||||||
|
'''gradle.lockfile''',
|
||||||
|
'''node_modules''',
|
||||||
|
'''package-lock.json''',
|
||||||
|
'''pnpm-lock.yaml''',
|
||||||
|
'''Database.refactorlog''',
|
||||||
|
'''vendor''',
|
||||||
]
|
]
|
||||||
|
|
||||||
{{ range $i, $rule := .Rules }}[[rules]]
|
{{ range $i, $rule := .Rules }}[[rules]]
|
||||||
{{ if and $rule.SecretGroup $rule.Entropy }}description = "{{$rule.Description}}"
|
{{ if and $rule.SecretGroup $rule.Entropy $rule.Allowlist.StopWords }}description = "{{$rule.Description}}"
|
||||||
|
id = "{{$rule.RuleID}}"
|
||||||
|
regex = '''{{$rule.Regex}}'''
|
||||||
|
secretGroup = {{ $rule.SecretGroup }}
|
||||||
|
entropy = {{ $rule.Entropy}}
|
||||||
|
keywords = [
|
||||||
|
{{ range $j, $keyword := $rule.Keywords }}"{{$keyword}}",{{end}}
|
||||||
|
]
|
||||||
|
[rules.allowlist]
|
||||||
|
stopwords= [{{ range $j, $stopword := $rule.Allowlist.StopWords }}
|
||||||
|
"{{$stopword}}",{{end}}
|
||||||
|
]
|
||||||
|
{{ else if and $rule.SecretGroup $rule.Entropy }}description = "{{$rule.Description}}"
|
||||||
id = "{{$rule.RuleID}}"
|
id = "{{$rule.RuleID}}"
|
||||||
regex = '''{{$rule.Regex}}'''
|
regex = '''{{$rule.Regex}}'''
|
||||||
secretGroup = {{ $rule.SecretGroup }}
|
secretGroup = {{ $rule.SecretGroup }}
|
||||||
@@ -42,4 +61,4 @@ keywords = [
|
|||||||
{{ range $j, $keyword := $rule.Keywords }}"{{$keyword}}",{{end}}
|
{{ range $j, $keyword := $rule.Keywords }}"{{$keyword}}",{{end}}
|
||||||
]
|
]
|
||||||
|
|
||||||
{{end}}{{end}}
|
{{end}}{{end}}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -10,14 +11,14 @@ func Contentful() *config.Rule {
|
|||||||
Description: "Contentful delivery API token",
|
Description: "Contentful delivery API token",
|
||||||
RuleID: "contentful-delivery-api-token",
|
RuleID: "contentful-delivery-api-token",
|
||||||
Regex: generateSemiGenericRegex([]string{"contentful"},
|
Regex: generateSemiGenericRegex([]string{"contentful"},
|
||||||
`[a-z0-9\-=_]{43}`),
|
alphaNumericExtended("43")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"contentful"},
|
Keywords: []string{"contentful"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("contentful", sampleExtendedAlphaNumeric43Token),
|
generateSampleSecret("contentful", secrets.NewSecret(alphaNumeric("43"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"regexp"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -11,13 +10,13 @@ func Databricks() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Databricks API token",
|
Description: "Databricks API token",
|
||||||
RuleID: "databricks-api-token",
|
RuleID: "databricks-api-token",
|
||||||
Regex: regexp.MustCompile(`dapi[a-h0-9]{32}`),
|
Regex: generateUniqueTokenRegex(`dapi[a-h0-9]{32}`),
|
||||||
Keywords: []string{"dapi"},
|
Keywords: []string{"dapi"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("databricks", "dapi"+sampleHex32Token),
|
generateSampleSecret("databricks", "dapi"+secrets.NewSecret(hex("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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,32 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func DefinedNetworkingAPIToken() *config.Rule {
|
||||||
|
// Define Rule
|
||||||
|
r := config.Rule{
|
||||||
|
// Human redable description of the rule
|
||||||
|
Description: "Defined Networking API token",
|
||||||
|
|
||||||
|
// Unique ID for the rule
|
||||||
|
RuleID: "defined-networking-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{"dnkey"}, `dnkey-[a-z0-9=_\-]{26}-[a-z0-9=_\-]{52}`),
|
||||||
|
|
||||||
|
// Keywords used for string matching on fragments (think of this as a prefilter)
|
||||||
|
Keywords: []string{"dnkey"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("dnkey", "dnkey-"+secrets.NewSecret(alphaNumericExtended("26"))+"-"+secrets.NewSecret(alphaNumericExtended("52"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func DigitalOceanPAT() *config.Rule {
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "DigitalOcean Personal Access Token",
|
||||||
|
RuleID: "digitalocean-pat",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`dop_v1_[a-f0-9]{64}`),
|
||||||
|
Keywords: []string{"dop_v1_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("do", "dop_v1_"+secrets.NewSecret(hex("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DigitalOceanOAuthToken() *config.Rule {
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "DigitalOcean OAuth Access Token",
|
||||||
|
RuleID: "digitalocean-access-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`doo_v1_[a-f0-9]{64}`),
|
||||||
|
Keywords: []string{"doo_v1_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("do", "doo_v1_"+secrets.NewSecret(hex("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DigitalOceanRefreshToken() *config.Rule {
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "DigitalOcean OAuth Refresh Token",
|
||||||
|
RuleID: "digitalocean-refresh-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`dor_v1_[a-f0-9]{64}`),
|
||||||
|
Keywords: []string{"dor_v1_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("do", "dor_v1_"+secrets.NewSecret(hex("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -9,16 +10,16 @@ func DiscordAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discord API key",
|
Description: "Discord API key",
|
||||||
RuleID: "discord-api-token",
|
RuleID: "discord-api-token",
|
||||||
Regex: generateSemiGenericRegex([]string{"discord"}, hex64),
|
Regex: generateSemiGenericRegex([]string{"discord"}, hex("64")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"discord"},
|
Keywords: []string{"discord"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("discord", sampleHex64Token),
|
generateSampleSecret("discord", secrets.NewSecret(hex("64"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func DiscordClientID() *config.Rule {
|
func DiscordClientID() *config.Rule {
|
||||||
@@ -26,16 +27,16 @@ func DiscordClientID() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discord client ID",
|
Description: "Discord client ID",
|
||||||
RuleID: "discord-client-id",
|
RuleID: "discord-client-id",
|
||||||
Regex: generateSemiGenericRegex([]string{"discord"}, numeric18),
|
Regex: generateSemiGenericRegex([]string{"discord"}, numeric("18")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"discord"},
|
Keywords: []string{"discord"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("discord", sampleNumeric18),
|
generateSampleSecret("discord", secrets.NewSecret(numeric("18"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func DiscordClientSecret() *config.Rule {
|
func DiscordClientSecret() *config.Rule {
|
||||||
@@ -43,14 +44,14 @@ func DiscordClientSecret() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discord client secret",
|
Description: "Discord client secret",
|
||||||
RuleID: "discord-client-secret",
|
RuleID: "discord-client-secret",
|
||||||
Regex: generateSemiGenericRegex([]string{"discord"}, extendedAlphaNumeric32),
|
Regex: generateSemiGenericRegex([]string{"discord"}, alphaNumericExtended("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"discord"},
|
Keywords: []string{"discord"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("discord", sampleExtendedAlphaNumeric32Token),
|
generateSampleSecret("discord", secrets.NewSecret(numeric("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,9 +18,9 @@ func Doppler() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("doppler", "dp.pt."+sampleAlphaNumeric43Token),
|
generateSampleSecret("doppler", "dp.pt."+secrets.NewSecret(alphaNumeric("43"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO add additional doppler formats:
|
// TODO add additional doppler formats:
|
||||||
|
|||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -8,17 +9,17 @@ func DropBoxAPISecret() *config.Rule {
|
|||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Dropbox API secret",
|
Description: "Dropbox API secret",
|
||||||
RuleID: "doppler-api-token",
|
RuleID: "dropbox-api-token",
|
||||||
Regex: generateSemiGenericRegex([]string{"dropbox"}, alphaNumeric15),
|
Regex: generateSemiGenericRegex([]string{"dropbox"}, alphaNumeric("15")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"dropbox"},
|
Keywords: []string{"dropbox"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("dropbox", sampleAlphaNumeric15Token),
|
generateSampleSecret("dropbox", secrets.NewSecret(alphaNumeric("15"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func DropBoxShortLivedAPIToken() *config.Rule {
|
func DropBoxShortLivedAPIToken() *config.Rule {
|
||||||
|
|||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ func Duffel() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("duffel", "duffel_test_"+sampleExtendedAlphaNumeric43Token),
|
generateSampleSecret("duffel", "duffel_test_"+secrets.NewSecret(alphaNumericExtended("43"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ func Dynatrace() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("dynatrace", "dt0c01."+sampleAlphaNumeric24Token+"."+sampleAlphaNumeric64Token),
|
generateSampleSecret("dynatrace", "dt0c01."+secrets.NewSecret(alphaNumeric("24"))+"."+secrets.NewSecret(alphaNumeric("64"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -11,15 +12,15 @@ func EasyPost() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "EasyPost API token",
|
Description: "EasyPost API token",
|
||||||
RuleID: "easypost-api-token",
|
RuleID: "easypost-api-token",
|
||||||
Regex: regexp.MustCompile(`EZAK(?i)[a-z0-9]{54}`),
|
Regex: regexp.MustCompile(`\bEZAK(?i)[a-z0-9]{54}`),
|
||||||
Keywords: []string{"EZAK"},
|
Keywords: []string{"EZAK"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("EZAK", "EZAK"+sampleAlphaNumeric54Token),
|
generateSampleSecret("EZAK", "EZAK"+secrets.NewSecret(alphaNumeric("54"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func EasyPostTestAPI() *config.Rule {
|
func EasyPostTestAPI() *config.Rule {
|
||||||
@@ -27,13 +28,13 @@ func EasyPostTestAPI() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "EasyPost test API token",
|
Description: "EasyPost test API token",
|
||||||
RuleID: "easypost-test-api-token",
|
RuleID: "easypost-test-api-token",
|
||||||
Regex: regexp.MustCompile(`EZTK(?i)[a-z0-9]{54}`),
|
Regex: regexp.MustCompile(`\bEZTK(?i)[a-z0-9]{54}`),
|
||||||
Keywords: []string{"EZTK"},
|
Keywords: []string{"EZTK"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("EZTK", "EZTK"+sampleAlphaNumeric54Token),
|
generateSampleSecret("EZTK", "EZTK"+secrets.NewSecret(alphaNumeric("54"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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)
|
||||||
|
}
|
||||||
@@ -1,21 +1,23 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Facebook() *config.Rule {
|
func Facebook() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "facebook",
|
Description: "Facebook Access Token",
|
||||||
RuleID: "facebook",
|
RuleID: "facebook",
|
||||||
Regex: generateSemiGenericRegex([]string{"facebook"},
|
Regex: generateSemiGenericRegex([]string{"facebook"}, hex("32")),
|
||||||
hex32),
|
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"facebook"},
|
Keywords: []string{"facebook"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"facebookToken := \"" + sampleHex32Token + "\""}
|
tps := []string{
|
||||||
return validate(r, tps)
|
generateSampleSecret("facebook", secrets.NewSecret(hex("32"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -9,14 +10,14 @@ func FastlyAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Fastly API key",
|
Description: "Fastly API key",
|
||||||
RuleID: "fastly-api-token",
|
RuleID: "fastly-api-token",
|
||||||
Regex: generateSemiGenericRegex([]string{"fastly"}, extendedAlphaNumeric32),
|
Regex: generateSemiGenericRegex([]string{"fastly"}, alphaNumericExtended("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"fastly"},
|
Keywords: []string{"fastly"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("fastly", sampleExtendedAlphaNumeric32Token),
|
generateSampleSecret("fastly", secrets.NewSecret(alphaNumericExtended("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
"github.com/zricethezav/gitleaks/v8/detect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func FinicityClientSecret() *config.Rule {
|
func FinicityClientSecret() *config.Rule {
|
||||||
@@ -12,24 +10,16 @@ func FinicityClientSecret() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Finicity Client Secret",
|
Description: "Finicity Client Secret",
|
||||||
RuleID: "finicity-client-secret",
|
RuleID: "finicity-client-secret",
|
||||||
Regex: generateSemiGenericRegex([]string{"finicity"}, alphaNumeric20),
|
Regex: generateSemiGenericRegex([]string{"finicity"}, alphaNumeric("20")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"finicity"},
|
Keywords: []string{"finicity"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("finicity", sampleAlphaNumeric20Token),
|
generateSampleSecret("finicity", secrets.NewSecret(alphaNumeric("20"))),
|
||||||
}
|
}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate finicity-client-secret")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func FinicityAPIToken() *config.Rule {
|
func FinicityAPIToken() *config.Rule {
|
||||||
@@ -37,14 +27,14 @@ func FinicityAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Finicity API token",
|
Description: "Finicity API token",
|
||||||
RuleID: "finicity-api-token",
|
RuleID: "finicity-api-token",
|
||||||
Regex: generateSemiGenericRegex([]string{"finicity"}, hex32),
|
Regex: generateSemiGenericRegex([]string{"finicity"}, hex("32")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"finicity"},
|
Keywords: []string{"finicity"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("finicity", sampleHex32Token),
|
generateSampleSecret("finicity", secrets.NewSecret(hex("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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 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)
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,39 +18,39 @@ func FlutterwavePublicKey() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("flutterwavePubKey", "FLWPUBK_TEST-"+sampleHex32Token+"-X"),
|
generateSampleSecret("flutterwavePubKey", "FLWPUBK_TEST-"+secrets.NewSecret(hex("32"))+"-X"),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func FlutterwaveSecretKey() *config.Rule {
|
func FlutterwaveSecretKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Finicity Secret Key",
|
Description: "Flutterwave Secret Key",
|
||||||
RuleID: "flutterwave-public-key",
|
RuleID: "flutterwave-secret-key",
|
||||||
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{32}-X`),
|
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{32}-X`),
|
||||||
Keywords: []string{"FLWSECK_TEST"},
|
Keywords: []string{"FLWSECK_TEST"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("flutterwavePubKey", "FLWSECK_TEST-"+sampleHex32Token+"-X"),
|
generateSampleSecret("flutterwavePubKey", "FLWSECK_TEST-"+secrets.NewSecret(hex("32"))+"-X"),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func FlutterwaveEncKey() *config.Rule {
|
func FlutterwaveEncKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Finicity Secret Key",
|
Description: "Flutterwave Encryption Key",
|
||||||
RuleID: "flutterwave-public-key",
|
RuleID: "flutterwave-encryption-key",
|
||||||
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{12}`),
|
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{12}`),
|
||||||
Keywords: []string{"FLWSECK_TEST"},
|
Keywords: []string{"FLWSECK_TEST"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("flutterwavePubKey", "FLWSECK_TEST-"+sampleHex12Token),
|
generateSampleSecret("flutterwavePubKey", "FLWSECK_TEST-"+secrets.NewSecret(hex("12"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ func FrameIO() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("frameio", "fio-u-"+sampleExtendedAlphaNumeric64Token),
|
generateSampleSecret("frameio", "fio-u-"+secrets.NewSecret(alphaNumericExtended("64"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -20,5 +21,24 @@ func GCPServiceAccount() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
`"type": "service_account"`,
|
`"type": "service_account"`,
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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)
|
||||||
}
|
}
|
||||||
@@ -11,13 +11,14 @@ func GenericCredential() *config.Rule {
|
|||||||
Description: "Generic API Key",
|
Description: "Generic API Key",
|
||||||
Regex: generateSemiGenericRegex([]string{
|
Regex: generateSemiGenericRegex([]string{
|
||||||
"key",
|
"key",
|
||||||
"api[^Version]",
|
"api",
|
||||||
"token",
|
"token",
|
||||||
"pat",
|
|
||||||
"secret",
|
"secret",
|
||||||
"client",
|
"client",
|
||||||
|
"passwd",
|
||||||
"password",
|
"password",
|
||||||
"auth",
|
"auth",
|
||||||
|
"access",
|
||||||
}, `[0-9a-z\-_.=]{10,150}`),
|
}, `[0-9a-z\-_.=]{10,150}`),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
@@ -26,16 +27,29 @@ func GenericCredential() *config.Rule {
|
|||||||
"token",
|
"token",
|
||||||
"secret",
|
"secret",
|
||||||
"client",
|
"client",
|
||||||
"pat",
|
"passwd",
|
||||||
"password",
|
"password",
|
||||||
"auth",
|
"auth",
|
||||||
|
"access",
|
||||||
|
},
|
||||||
|
Entropy: 3.5,
|
||||||
|
Allowlist: config.Allowlist{
|
||||||
|
StopWords: DefaultStopWords,
|
||||||
},
|
},
|
||||||
Entropy: 3.7,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("generic", "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"),
|
generateSampleSecret("generic", "CLOJARS_34bf0e88955ff5a1c328d6a7491acc4f48e865a7b8dd4d70a70749037443"),
|
||||||
|
generateSampleSecret("generic", "Zf3D0LXCM3EIMbgJpUNnkRtOfOueHznB"),
|
||||||
|
`"client_id" : "0afae57f3ccfd9d7f5767067bc48b30f719e271ba470488056e37ab35d4b6506"`,
|
||||||
|
`"client_secret" : "6da89121079f83b2eb6acccf8219ea982c3d79bccc3e9c6a85856480661f8fde",`,
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
fps := []string{
|
||||||
|
`client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.client-vpn-endpoint.id`,
|
||||||
|
`password combination.
|
||||||
|
|
||||||
|
R5: Regulatory--21`,
|
||||||
|
}
|
||||||
|
return validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -16,8 +17,26 @@ func GitHubPat() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"gihubPAT := \"ghp_" + sampleAlphaNumeric36Token + "\""}
|
tps := []string{
|
||||||
return validate(r, tps)
|
generateSampleSecret("github", "ghp_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GitHubFineGrainedPat() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "GitHub Fine-Grained Personal Access Token",
|
||||||
|
RuleID: "github-fine-grained-pat",
|
||||||
|
Regex: regexp.MustCompile(`github_pat_[0-9a-zA-Z_]{82}`),
|
||||||
|
Keywords: []string{"github_pat_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("github", "github_pat_"+secrets.NewSecret(alphaNumeric("82"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GitHubOauth() *config.Rule {
|
func GitHubOauth() *config.Rule {
|
||||||
@@ -30,8 +49,10 @@ func GitHubOauth() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"gihubAuth := \"gho_" + sampleAlphaNumeric36Token + "\""}
|
tps := []string{
|
||||||
return validate(r, tps)
|
generateSampleSecret("github", "gho_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GitHubApp() *config.Rule {
|
func GitHubApp() *config.Rule {
|
||||||
@@ -44,8 +65,11 @@ func GitHubApp() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"gihubAuth := \"ghs_" + sampleAlphaNumeric36Token + "\""}
|
tps := []string{
|
||||||
return validate(r, tps)
|
generateSampleSecret("github", "ghu_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
|
generateSampleSecret("github", "ghs_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GitHubRefresh() *config.Rule {
|
func GitHubRefresh() *config.Rule {
|
||||||
@@ -58,6 +82,8 @@ func GitHubRefresh() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"gihubAuth := \"ghr_" + sampleAlphaNumeric36Token + "\""}
|
tps := []string{
|
||||||
return validate(r, tps)
|
generateSampleSecret("github", "ghr_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -3,19 +3,54 @@ 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"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Gitlab() *config.Rule {
|
func GitlabPat() *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-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"gitlabPAT := \"glpat-" + sampleAlphaNumeric20Token + "\""}
|
tps := []string{
|
||||||
return validate(r, tps)
|
generateSampleSecret("gitlab", "glpat-"+secrets.NewSecret(alphaNumeric("20"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GitlabPipelineTriggerToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "GitLab Pipeline Trigger Token",
|
||||||
|
RuleID: "gitlab-ptt",
|
||||||
|
Regex: regexp.MustCompile(`glptt-[0-9a-f]{40}`),
|
||||||
|
Keywords: []string{"glptt-"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("gitlab", "glptt-"+secrets.NewSecret(hex("40"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GitlabRunnerRegistrationToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "GitLab Runner Registration Token",
|
||||||
|
RuleID: "gitlab-rrt",
|
||||||
|
Regex: regexp.MustCompile(`GR1348941[0-9a-zA-Z\-\_]{20}`),
|
||||||
|
Keywords: []string{"GR1348941"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("gitlab", "GR1348941"+secrets.NewSecret(alphaNumeric("20"))),
|
||||||
|
}
|
||||||
|
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 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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ func GoCardless() *config.Rule {
|
|||||||
RuleID: "gocardless-api-token",
|
RuleID: "gocardless-api-token",
|
||||||
Description: "GoCardless API token",
|
Description: "GoCardless API token",
|
||||||
Regex: generateSemiGenericRegex([]string{"gocardless"}, `live_(?i)[a-z0-9\-_=]{40}`),
|
Regex: generateSemiGenericRegex([]string{"gocardless"}, `live_(?i)[a-z0-9\-_=]{40}`),
|
||||||
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"live_",
|
"live_",
|
||||||
"gocardless",
|
"gocardless",
|
||||||
@@ -18,7 +20,7 @@ func GoCardless() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("gocardless", "live_"+sampleExtendedAlphaNumeric40Token),
|
generateSampleSecret("gocardless", "live_"+secrets.NewSecret(alphaNumericExtended("40"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GrafanaApiKey() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Grafana api key (or Grafana cloud api key)",
|
||||||
|
RuleID: "grafana-api-key",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`eyJrIjoi[A-Za-z0-9]{70,400}={0,2}`),
|
||||||
|
Keywords: []string{"eyJrIjoi"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("grafana-api-key",
|
||||||
|
"eyJrIjoi"+
|
||||||
|
secrets.NewSecret(alphaNumeric("70"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GrafanaCloudApiToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Grafana cloud api token",
|
||||||
|
RuleID: "grafana-cloud-api-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`glc_[A-Za-z0-9+/]{32,400}={0,2}`),
|
||||||
|
Keywords: []string{"glc_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("grafana-cloud-api-token",
|
||||||
|
"glc_"+
|
||||||
|
secrets.NewSecret(alphaNumeric("32"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GrafanaServiceAccountToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Grafana service account token",
|
||||||
|
RuleID: "grafana-service-account-token",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateUniqueTokenRegex(`glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8}`),
|
||||||
|
Keywords: []string{"glsa_"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("grafana-service-account-token",
|
||||||
|
"glsa_"+
|
||||||
|
secrets.NewSecret(alphaNumeric("32"))+
|
||||||
|
"_"+
|
||||||
|
secrets.NewSecret((hex("8")))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ func Hashicorp() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("hashicorpToken", sampleHex14Token+".atlasv1."+sampleExtendedAlphaNumeric64Token),
|
generateSampleSecret("hashicorpToken", secrets.NewSecret(hex("14"))+".atlasv1."+secrets.NewSecret(alphaNumericExtended("60,70"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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"},
|
||||||
}
|
}
|
||||||
@@ -19,5 +18,5 @@ func Heroku() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
`const HEROKU_KEY = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
`const HEROKU_KEY = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -19,5 +19,5 @@ func HubSpot() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
`const hubspotKey = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
`const hubspotKey = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -9,14 +10,14 @@ func Intercom() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Intercom API Token",
|
Description: "Intercom API Token",
|
||||||
RuleID: "intercom-api-key",
|
RuleID: "intercom-api-key",
|
||||||
Regex: generateSemiGenericRegex([]string{"intercom"}, extendedAlphaNumeric60),
|
Regex: generateSemiGenericRegex([]string{"intercom"}, alphaNumericExtended("60")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{"intercom"},
|
Keywords: []string{"intercom"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("intercom", sampleExtendedAlphaNumeric60Token),
|
generateSampleSecret("intercom", secrets.NewSecret(alphaNumericExtended("60"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JWT() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "JSON Web Token",
|
||||||
|
RuleID: "jwt",
|
||||||
|
Regex: generateUniqueTokenRegex(`ey[0-9a-z]{30,34}\.ey[0-9a-z-\/_]{30,500}\.[0-9a-zA-Z-\/_]{10,200}={0,2}`),
|
||||||
|
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)
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,9 +18,9 @@ func LinearAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("linear", "lin_api_"+sampleAlphaNumeric40Token),
|
generateSampleSecret("linear", "lin_api_"+secrets.NewSecret(alphaNumeric("40"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func LinearClientSecret() *config.Rule {
|
func LinearClientSecret() *config.Rule {
|
||||||
@@ -27,13 +28,14 @@ func LinearClientSecret() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Linear Client Secret",
|
Description: "Linear Client Secret",
|
||||||
RuleID: "linear-client-secret",
|
RuleID: "linear-client-secret",
|
||||||
Regex: generateSemiGenericRegex([]string{"linear"}, hex32),
|
Regex: generateSemiGenericRegex([]string{"linear"}, hex("32")),
|
||||||
Keywords: []string{"linear"},
|
Keywords: []string{"linear"},
|
||||||
|
SecretGroup: 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("linear", sampleHex32Token),
|
generateSampleSecret("linear", secrets.NewSecret(hex("32"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ func LinkedinClientSecret() *config.Rule {
|
|||||||
Regex: generateSemiGenericRegex([]string{
|
Regex: generateSemiGenericRegex([]string{
|
||||||
"linkedin",
|
"linkedin",
|
||||||
"linked-in",
|
"linked-in",
|
||||||
}, alphaNumeric16),
|
}, alphaNumeric("16")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"linkedin",
|
"linkedin",
|
||||||
@@ -22,9 +23,9 @@ func LinkedinClientSecret() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("linkedin", sampleAlphaNumeric16Token),
|
generateSampleSecret("linkedin", secrets.NewSecret(alphaNumeric("16"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func LinkedinClientID() *config.Rule {
|
func LinkedinClientID() *config.Rule {
|
||||||
@@ -35,7 +36,7 @@ func LinkedinClientID() *config.Rule {
|
|||||||
Regex: generateSemiGenericRegex([]string{
|
Regex: generateSemiGenericRegex([]string{
|
||||||
"linkedin",
|
"linkedin",
|
||||||
"linked-in",
|
"linked-in",
|
||||||
}, alphaNumeric14),
|
}, alphaNumeric("14")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"linkedin",
|
"linkedin",
|
||||||
@@ -45,7 +46,7 @@ func LinkedinClientID() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("linkedin", sampleAlphaNumeric14Token),
|
generateSampleSecret("linkedin", secrets.NewSecret(alphaNumeric("14"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ func LobPubAPIToken() *config.Rule {
|
|||||||
Description: "Lob Publishable API Key",
|
Description: "Lob Publishable API Key",
|
||||||
RuleID: "lob-pub-api-key",
|
RuleID: "lob-pub-api-key",
|
||||||
Regex: generateSemiGenericRegex([]string{"lob"}, `(test|live)_pub_[a-f0-9]{31}`),
|
Regex: generateSemiGenericRegex([]string{"lob"}, `(test|live)_pub_[a-f0-9]{31}`),
|
||||||
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"test_pub",
|
"test_pub",
|
||||||
"live_pub",
|
"live_pub",
|
||||||
@@ -19,9 +21,9 @@ func LobPubAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("lob", "test_pub_"+sampleHex31Token),
|
generateSampleSecret("lob", "test_pub_"+secrets.NewSecret(hex("31"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func LobAPIToken() *config.Rule {
|
func LobAPIToken() *config.Rule {
|
||||||
@@ -34,11 +36,12 @@ func LobAPIToken() *config.Rule {
|
|||||||
"test_",
|
"test_",
|
||||||
"live_",
|
"live_",
|
||||||
},
|
},
|
||||||
|
SecretGroup: 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("lob", "test_"+sampleHex35Token),
|
generateSampleSecret("lob", "test_"+secrets.NewSecret(hex("35"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ func MailChimp() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("mailchimp", sampleHex32Token+"-us20"),
|
generateSampleSecret("mailchimp", secrets.NewSecret(hex("32"))+"-us20"),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
"github.com/zricethezav/gitleaks/v8/detect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func MailGunPrivateAPIToken() *config.Rule {
|
func MailGunPrivateAPIToken() *config.Rule {
|
||||||
@@ -21,17 +19,9 @@ func MailGunPrivateAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("mailgun", "key-"+sampleHex32Token),
|
generateSampleSecret("mailgun", "key-"+secrets.NewSecret(hex("32"))),
|
||||||
}
|
}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate mailgun-private-api-token")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func MailGunPubAPIToken() *config.Rule {
|
func MailGunPubAPIToken() *config.Rule {
|
||||||
@@ -48,17 +38,9 @@ func MailGunPubAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("mailgun", "pubkey-"+sampleHex32Token),
|
generateSampleSecret("mailgun", "pubkey-"+secrets.NewSecret(hex("32"))),
|
||||||
}
|
}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate mailgun-pub-key")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func MailGunSigningKey() *config.Rule {
|
func MailGunSigningKey() *config.Rule {
|
||||||
@@ -75,7 +57,7 @@ func MailGunSigningKey() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("mailgun", sampleHex32Token+"-00001111-22223333"),
|
generateSampleSecret("mailgun", secrets.NewSecret(hex("32"))+"-00001111-22223333"),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ func MapBox() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("mapbox", "pk."+sampleAlphaNumeric60Token+"."+sampleAlphaNumeric22Token),
|
generateSampleSecret("mapbox", "pk."+secrets.NewSecret(alphaNumeric("60"))+"."+secrets.NewSecret(alphaNumeric("22"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ func MessageBirdAPIToken() *config.Rule {
|
|||||||
"messagebird",
|
"messagebird",
|
||||||
"message-bird",
|
"message-bird",
|
||||||
"message_bird",
|
"message_bird",
|
||||||
}, alphaNumeric25),
|
}, alphaNumeric("25")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"messagebird",
|
"messagebird",
|
||||||
@@ -24,11 +25,11 @@ func MessageBirdAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("messagebird", sampleAlphaNumeric25Token),
|
generateSampleSecret("messagebird", secrets.NewSecret(alphaNumeric("25"))),
|
||||||
generateSampleSecret("message-bird", sampleAlphaNumeric25Token),
|
generateSampleSecret("message-bird", secrets.NewSecret(alphaNumeric("25"))),
|
||||||
generateSampleSecret("message_bird", sampleAlphaNumeric25Token),
|
generateSampleSecret("message_bird", secrets.NewSecret(alphaNumeric("25"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func MessageBirdClientID() *config.Rule {
|
func MessageBirdClientID() *config.Rule {
|
||||||
@@ -40,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",
|
||||||
@@ -53,5 +54,5 @@ func MessageBirdClientID() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
`const MessageBirdClientID = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
`const MessageBirdClientID = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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 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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -22,9 +23,9 @@ func NewRelicUserID() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("new-relic", "NRAK-"+sampleAlphaNumeric27Token),
|
generateSampleSecret("new-relic", "NRAK-"+secrets.NewSecret(alphaNumeric("27"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRelicUserKey() *config.Rule {
|
func NewRelicUserKey() *config.Rule {
|
||||||
@@ -36,7 +37,7 @@ func NewRelicUserKey() *config.Rule {
|
|||||||
"new-relic",
|
"new-relic",
|
||||||
"newrelic",
|
"newrelic",
|
||||||
"new_relic",
|
"new_relic",
|
||||||
}, alphaNumeric64),
|
}, alphaNumeric("64")),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"new-relic",
|
"new-relic",
|
||||||
@@ -47,9 +48,9 @@ func NewRelicUserKey() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("new-relic", sampleAlphaNumeric64Token),
|
generateSampleSecret("new-relic", secrets.NewSecret(alphaNumeric("64"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRelicBrowserAPIKey() *config.Rule {
|
func NewRelicBrowserAPIKey() *config.Rule {
|
||||||
@@ -70,7 +71,7 @@ func NewRelicBrowserAPIKey() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("new-relic", "NRJS-"+sampleHex19Token),
|
generateSampleSecret("new-relic", "NRJS-"+secrets.NewSecret(hex("19"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ func NPM() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("npmAccessToken", "npm_"+sampleAlphaNumeric36Token),
|
generateSampleSecret("npmAccessToken", "npm_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -9,7 +10,7 @@ func PlanetScalePassword() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "planetscale-password",
|
RuleID: "planetscale-password",
|
||||||
Description: "PlanetScale password",
|
Description: "PlanetScale password",
|
||||||
Regex: generateUniqueTokenRegex(`pscale_pw_(?i)[a-z0-9=\-_\.]{43}`),
|
Regex: generateUniqueTokenRegex(`pscale_pw_(?i)[a-z0-9=\-_\.]{32,64}`),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pscale_pw_",
|
"pscale_pw_",
|
||||||
@@ -18,17 +19,19 @@ func PlanetScalePassword() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("planetScalePassword", "pscale_pw_"+sampleExtendedAlphaNumeric43Token),
|
generateSampleSecret("planetScalePassword", "pscale_pw_"+secrets.NewSecret(alphaNumericExtended("32"))),
|
||||||
|
generateSampleSecret("planetScalePassword", "pscale_pw_"+secrets.NewSecret(alphaNumericExtended("43"))),
|
||||||
|
generateSampleSecret("planetScalePassword", "pscale_pw_"+secrets.NewSecret(alphaNumericExtended("64"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func PlanetScaleToken() *config.Rule {
|
func PlanetScaleAPIToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "planetscale-api-token",
|
RuleID: "planetscale-api-token",
|
||||||
Description: "PlanetScale API token",
|
Description: "PlanetScale API token",
|
||||||
Regex: generateUniqueTokenRegex(`pscale_tkn_(?i)[a-z0-9=\-_\.]{43}`),
|
Regex: generateUniqueTokenRegex(`pscale_tkn_(?i)[a-z0-9=\-_\.]{32,64}`),
|
||||||
SecretGroup: 1,
|
SecretGroup: 1,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pscale_tkn_",
|
"pscale_tkn_",
|
||||||
@@ -37,7 +40,30 @@ func PlanetScaleToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("planetScalePassword", "pscale_tkn_"+sampleExtendedAlphaNumeric43Token),
|
generateSampleSecret("planetScalePassword", "pscale_tkn_"+secrets.NewSecret(alphaNumericExtended("32"))),
|
||||||
|
generateSampleSecret("planetScalePassword", "pscale_tkn_"+secrets.NewSecret(alphaNumericExtended("43"))),
|
||||||
|
generateSampleSecret("planetScalePassword", "pscale_tkn_"+secrets.NewSecret(alphaNumericExtended("64"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func PlanetScaleOAuthToken() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "planetscale-oauth-token",
|
||||||
|
Description: "PlanetScale OAuth token",
|
||||||
|
Regex: generateUniqueTokenRegex(`pscale_oauth_(?i)[a-z0-9=\-_\.]{32,64}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"pscale_oauth_",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("planetScalePassword", "pscale_oauth_"+secrets.NewSecret(alphaNumericExtended("32"))),
|
||||||
|
generateSampleSecret("planetScalePassword", "pscale_oauth_"+secrets.NewSecret(alphaNumericExtended("43"))),
|
||||||
|
generateSampleSecret("planetScalePassword", "pscale_oauth_"+secrets.NewSecret(alphaNumericExtended("64"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ func PostManAPI() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("postmanAPItoken", "PMAK-"+sampleHex24Token+"-"+sampleHex34Token),
|
generateSampleSecret("postmanAPItoken", "PMAK-"+secrets.NewSecret(hex("24"))+"-"+secrets.NewSecret(hex("34"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Prefect() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "prefect-api-token",
|
||||||
|
Description: "Prefect API token",
|
||||||
|
Regex: generateUniqueTokenRegex(`pnu_[a-z0-9]{36}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"pnu_",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("api-token", "pnu_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -11,13 +11,21 @@ func PrivateKey() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Private Key",
|
Description: "Private Key",
|
||||||
RuleID: "private-key",
|
RuleID: "private-key",
|
||||||
Regex: regexp.MustCompile(`(?i)-----\s*?BEGIN[ A-Z0-9_-]*?PRIVATE KEY\s*?-----[\s\S]*?----\s*?END[ A-Z0-9_-]*? PRIVATE KEY\s*?-----`),
|
Regex: regexp.MustCompile(`(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY( BLOCK)?----`),
|
||||||
Keywords: []string{"-----BEGIN PRIVATE"},
|
Keywords: []string{"-----BEGIN"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{`-----BEGIN PRIVATE KEY-----
|
tps := []string{`-----BEGIN PRIVATE KEY-----
|
||||||
anything
|
anything
|
||||||
-----END PRIVATE KEY-----`} // gitleaks:allow
|
-----END PRIVATE KEY-----`,
|
||||||
return validate(r, tps)
|
`-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
abcdefghijklmnopqrstuvwxyz
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
|
`,
|
||||||
|
`-----BEGIN PRIVATE KEY BLOCK-----
|
||||||
|
anything
|
||||||
|
-----END PRIVATE KEY BLOCK-----`,
|
||||||
|
} // gitleaks:allow
|
||||||
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ func PulumiAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("pulumi-api-token", "pul-"+sampleHex40Token),
|
generateSampleSecret("pulumi-api-token", "pul-"+secrets.NewSecret(hex("40"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,8 @@ package rules
|
|||||||
import (
|
import (
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
"github.com/zricethezav/gitleaks/v8/detect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func PyPiUploadToken() *config.Rule {
|
func PyPiUploadToken() *config.Rule {
|
||||||
@@ -22,15 +20,7 @@ func PyPiUploadToken() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"pypiToken := \"pypi-AgEIcHlwaS5vcmc" + sampleHex32Token +
|
tps := []string{"pypiToken := \"pypi-AgEIcHlwaS5vcmc" + secrets.NewSecret(hex("32")) +
|
||||||
sampleHex32Token + "\""}
|
secrets.NewSecret(hex("32")) + "\""}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate pypi-upload-token")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ReadMe() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
RuleID: "readme-api-token",
|
||||||
|
Description: "Readme API token",
|
||||||
|
Regex: generateUniqueTokenRegex(`rdme_[a-z0-9]{70}`),
|
||||||
|
SecretGroup: 1,
|
||||||
|
Keywords: []string{
|
||||||
|
"rdme_",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
generateSampleSecret("api-token", "rdme_"+secrets.NewSecret(alphaNumeric("70"))),
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ func RubyGemsAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("rubygemsAPIToken", "rubygems_"+sampleHex48Token),
|
generateSampleSecret("rubygemsAPIToken", "rubygems_"+secrets.NewSecret(hex("48"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ const (
|
|||||||
|
|
||||||
// identifier prefix (just an ignore group)
|
// identifier prefix (just an ignore group)
|
||||||
identifierPrefix = `(?:`
|
identifierPrefix = `(?:`
|
||||||
identifierSuffix = `)(?:[0-9a-z\-_\s.]{0,20})(?:'|"){0,1}`
|
identifierSuffix = `)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}`
|
||||||
|
|
||||||
// commonly used assignment operators or function call
|
// commonly used assignment operators or function call
|
||||||
operator = `(?:=|>|:=|\|\|:|<=|=>|:)`
|
operator = `(?:=|>|:=|\|\|:|<=|=>|:)`
|
||||||
@@ -25,73 +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|;]|$)`
|
||||||
|
|
||||||
// secret regexes
|
|
||||||
hex = `[a-f0-9]`
|
|
||||||
hex32 = `[a-f0-9]{32}`
|
|
||||||
hex64 = `[a-f0-9]{64}`
|
|
||||||
|
|
||||||
alphaNumeric14 = `[a-z0-9]{14}`
|
|
||||||
alphaNumeric15 = `[a-z0-9]{15}`
|
|
||||||
alphaNumeric16 = `[a-z0-9]{16}`
|
|
||||||
alphaNumeric20 = `[a-z0-9]{20}`
|
|
||||||
alphaNumeric24 = `[a-z0-9]{24}`
|
|
||||||
alphaNumeric25 = `[a-z0-9]{25}`
|
|
||||||
alphaNumeric30 = `[a-z0-9]{30}`
|
|
||||||
alphaNumeric32 = `[a-z0-9]{32}`
|
|
||||||
alphaNumeric64 = `[a-z0-9]{64}`
|
|
||||||
|
|
||||||
numeric16 = `[0-9]{16}`
|
|
||||||
numeric18 = `[0-9]{18}`
|
|
||||||
|
|
||||||
extendedAlphaNumeric32 = `[a-z0-9=_\-]{32}`
|
|
||||||
extendedAlphaNumeric60 = `[a-z0-9_\-]{60}`
|
|
||||||
extendedAlphaNumeric64 = `[a-z0-9_\-]{64}`
|
|
||||||
|
|
||||||
// token examples
|
|
||||||
sampleHex12Token = `b0549eee7368` // gitleaks:allow
|
|
||||||
sampleHex14Token = `b0549eee7368aa` // gitleaks:allow
|
|
||||||
sampleHex16Token = `bbb0549eee7368aa` // gitleaks:allow
|
|
||||||
sampleHex19Token = `d0e94828b0549eee736` // gitleaks:allow
|
|
||||||
sampleHex20Token = `d0e94828b0549eee7368` // gitleaks:allow
|
|
||||||
sampleHex24Token = `d0e94828b0549eee73688888` // gitleaks:allow
|
|
||||||
sampleHex31Token = `d0e94828b0549eee7368e53f6cb41d1` // gitleaks:allow
|
|
||||||
sampleHex32Token = `d0e94828b0549eee7368e53f6cb41d17` // gitleaks:allow
|
|
||||||
sampleHex34Token = `d0e94828b0549eee7368e53f6cb41d17aa` // gitleaks:allow
|
|
||||||
sampleHex35Token = `d0e94828b0549eee7368e53f6cb41d17aaa` // gitleaks:allow
|
|
||||||
sampleHex40Token = `aaaaad0e94828b0549eee7368e53f6cb41d17aaa` // gitleaks:allow
|
|
||||||
sampleHex48Token = `aaaaaaaaaaaaad0e94828b0549eee7368e53f6cb41d17aaa` // gitleaks:allow
|
|
||||||
sampleHex64Token = `d0e94828b0549eee7368e53f6cb41d17d0e94828b0549eee7368e53f6cb41d17` // gitleaks:allow
|
|
||||||
|
|
||||||
sampleAlphaNumeric14Token = `00000AAAAAbbbb`
|
|
||||||
sampleAlphaNumeric15Token = `00000AAAAAbbbbb`
|
|
||||||
sampleAlphaNumeric16Token = `00000AAAAAbbbbbb`
|
|
||||||
sampleAlphaNumeric20Token = `00000AAAAAbbbbb99999`
|
|
||||||
sampleAlphaNumeric22Token = `00000AAAAAbbbbb99999qq`
|
|
||||||
sampleAlphaNumeric24Token = `00000AAAAAbbbbb99999qqqq`
|
|
||||||
sampleAlphaNumeric25Token = `00000AAAAAbbbbb99999qqqqq`
|
|
||||||
sampleAlphaNumeric27Token = `00000AAAAAbbbbb99999qqqqqqq`
|
|
||||||
sampleAlphaNumeric30Token = `00000AAAAAbbbbb99999aaaaalllll`
|
|
||||||
sampleAlphaNumeric32Token = `00000AAAAAbbbbb99999aaaaalllllzz`
|
|
||||||
sampleAlphaNumeric36Token = `00000AAAAAbbbbb9999900000AAAAAbbbbb9`
|
|
||||||
sampleAlphaNumeric40Token = `000000000AAAAAbbbbb9999900000AAAAAbbbbb9`
|
|
||||||
sampleAlphaNumeric43Token = `00000AAAAAbbbbb99999aaaaallllpppeqaaaa00000`
|
|
||||||
sampleAlphaNumeric54Token = `00000AAAAAbbbbb99999aaaaallllpppeqaaaa00000ttttttttttt`
|
|
||||||
sampleAlphaNumeric64Token = `00000AAAAAbbbbb99999aaaaalllllzz00000AAAAAbbbbb99999aaaaalllllll`
|
|
||||||
|
|
||||||
sampleNumeric16 = `1111222233334444`
|
|
||||||
sampleNumeric18 = `111122223333444422`
|
|
||||||
|
|
||||||
sampleExtendedAlphaNumeric64Token = `00000AAAAAbbbbb99999aaaaalllllzz00000AAAAAbbbbb99999aaaaalllll_-`
|
|
||||||
sampleExtendedAlphaNumeric66Token = `0000000AAAAAbbbbb99999aaaaalllllzz00000AAAAAbbbbb99999aaaaalllll_-`
|
|
||||||
sampleExtendedAlphaNumeric59Token = `AAAAAbbbbb99999aaaaalllllzz00000AAAAAbbbbb99999aaaaalllll_-`
|
|
||||||
sampleExtendedAlphaNumeric60Token = `AAAAAAbbbbb99999aaaaalllllzz00000AAAAAbbbbb99999aaaaalllll_-`
|
|
||||||
sampleExtendedAlphaNumeric40Token = `00AAAAAbbbbb99999aaaaallll_--eq-=aa00000`
|
|
||||||
sampleExtendedAlphaNumeric43Token = `00000AAAAAbbbbb99999aaaaallll_--eq-=aa00000`
|
|
||||||
sampleExtendedAlphaNumeric32Token = `00000AAAAAbbbbb99999aaaaalllll=_`
|
|
||||||
sampleExtendedAlphaNumeric20Token = `bbb99999aaaaalllll=_`
|
|
||||||
sampleAlphaNumeric60Token = `00000AAAAAbbbbb99999aaaaalllllzz00000AAAAAbbbbb99999aaaaalll`
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp {
|
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp {
|
||||||
@@ -120,14 +54,57 @@ func generateSampleSecret(identifier string, secret string) string {
|
|||||||
return fmt.Sprintf("%s_api_token = \"%s\"", identifier, secret)
|
return fmt.Sprintf("%s_api_token = \"%s\"", identifier, secret)
|
||||||
}
|
}
|
||||||
|
|
||||||
func validate(r config.Rule, truePositives []string) *config.Rule {
|
func validate(r config.Rule, truePositives []string, falsePositives []string) *config.Rule {
|
||||||
|
// normalize keywords like in the config package
|
||||||
|
var keywords []string
|
||||||
|
for _, k := range r.Keywords {
|
||||||
|
keywords = append(keywords, strings.ToLower(k))
|
||||||
|
}
|
||||||
|
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,
|
||||||
})
|
})
|
||||||
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 %s", r.RuleID)
|
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 {
|
||||||
|
if len(d.DetectString(fp)) != 0 {
|
||||||
|
log.Fatal().Msgf("Failed to validate (fp) [%s]", r.RuleID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &r
|
return &r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func numeric(size string) string {
|
||||||
|
return fmt.Sprintf(`[0-9]{%s}`, size)
|
||||||
|
}
|
||||||
|
|
||||||
|
func hex(size string) string {
|
||||||
|
return fmt.Sprintf(`[a-f0-9]{%s}`, size)
|
||||||
|
}
|
||||||
|
|
||||||
|
func alphaNumeric(size string) string {
|
||||||
|
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 {
|
||||||
|
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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ func SendGridAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("sengridAPIToken", "SG."+sampleExtendedAlphaNumeric66Token),
|
generateSampleSecret("sengridAPIToken", "SG."+secrets.NewSecret(alphaNumericExtended("66"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ func SendInBlueAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("sendinblue", "xkeysib-"+sampleHex64Token+"-"+sampleHex16Token),
|
generateSampleSecret("sendinblue", "xkeysib-"+secrets.NewSecret(hex("64"))+"-"+secrets.NewSecret(alphaNumeric("16"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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)
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,8 +19,8 @@ func ShippoAPIToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
generateSampleSecret("shippo", "shippo_live_"+sampleHex40Token),
|
generateSampleSecret("shippo", "shippo_live_"+secrets.NewSecret(hex("40"))),
|
||||||
generateSampleSecret("shippo", "shippo_test_"+sampleHex40Token),
|
generateSampleSecret("shippo", "shippo_test_"+secrets.NewSecret(hex("40"))),
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,8 @@ package rules
|
|||||||
import (
|
import (
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
"github.com/zricethezav/gitleaks/v8/detect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func ShopifySharedSecret() *config.Rule {
|
func ShopifySharedSecret() *config.Rule {
|
||||||
@@ -19,16 +17,8 @@ func ShopifySharedSecret() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"shopifySecret := \"shpss_" + sampleHex32Token + "\""}
|
tps := []string{"shopifySecret := \"shpss_" + secrets.NewSecret(hex("32")) + "\""}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate shopify-shared-secret")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ShopifyAccessToken() *config.Rule {
|
func ShopifyAccessToken() *config.Rule {
|
||||||
@@ -41,16 +31,8 @@ func ShopifyAccessToken() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"shopifyToken := \"shpat_" + sampleHex32Token + "\""}
|
tps := []string{"shopifyToken := \"shpat_" + secrets.NewSecret(hex("32")) + "\""}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate shopify-access-token")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ShopifyCustomAccessToken() *config.Rule {
|
func ShopifyCustomAccessToken() *config.Rule {
|
||||||
@@ -63,16 +45,8 @@ func ShopifyCustomAccessToken() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"shopifyToken := \"shpca_" + sampleHex32Token + "\""}
|
tps := []string{"shopifyToken := \"shpca_" + secrets.NewSecret(hex("32")) + "\""}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate shopify-custom-access-token")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ShopifyPrivateAppAccessToken() *config.Rule {
|
func ShopifyPrivateAppAccessToken() *config.Rule {
|
||||||
@@ -85,14 +59,6 @@ func ShopifyPrivateAppAccessToken() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{"shopifyToken := \"shppa_" + sampleHex32Token + "\""}
|
tps := []string{"shopifyToken := \"shppa_" + secrets.NewSecret(hex("32")) + "\""}
|
||||||
d := detect.NewDetector(config.Config{
|
return validate(r, tps, nil)
|
||||||
Rules: []*config.Rule{&r},
|
|
||||||
})
|
|
||||||
for _, tp := range tps {
|
|
||||||
if len(d.DetectString(tp)) != 1 {
|
|
||||||
log.Fatal().Msg("Failed to validate shopify-private-app-access-token")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &r
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package rules
|
||||||
|
|
||||||
|
import (
|
||||||
|
"regexp"
|
||||||
|
|
||||||
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SidekiqSecret() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Sidekiq Secret",
|
||||||
|
RuleID: "sidekiq-secret",
|
||||||
|
SecretGroup: 1,
|
||||||
|
Regex: generateSemiGenericRegex([]string{"BUNDLE_ENTERPRISE__CONTRIBSYS__COM", "BUNDLE_GEMS__CONTRIBSYS__COM"},
|
||||||
|
`[a-f0-9]{8}:[a-f0-9]{8}`),
|
||||||
|
Keywords: []string{"BUNDLE_ENTERPRISE__CONTRIBSYS__COM", "BUNDLE_GEMS__CONTRIBSYS__COM"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
"BUNDLE_ENTERPRISE__CONTRIBSYS__COM: cafebabe:deadbeef",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM = cafebabe:deadbeef",
|
||||||
|
"BUNDLE_GEMS__CONTRIBSYS__COM: \"cafebabe:deadbeef\"",
|
||||||
|
"export BUNDLE_GEMS__CONTRIBSYS__COM=\"cafebabe:deadbeef\"",
|
||||||
|
"export BUNDLE_GEMS__CONTRIBSYS__COM = \"cafebabe:deadbeef\"",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;",
|
||||||
|
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef && echo 'hello world'",
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SidekiqSensitiveUrl() *config.Rule {
|
||||||
|
// define rule
|
||||||
|
r := config.Rule{
|
||||||
|
Description: "Sidekiq Sensitive URL",
|
||||||
|
RuleID: "sidekiq-sensitive-url",
|
||||||
|
SecretGroup: 2,
|
||||||
|
Regex: regexp.MustCompile(`(?i)\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)`),
|
||||||
|
Keywords: []string{"gems.contribsys.com", "enterprise.contribsys.com"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate
|
||||||
|
tps := []string{
|
||||||
|
"https://cafebabe:deadbeef@gems.contribsys.com/",
|
||||||
|
"https://cafebabe:deadbeef@gems.contribsys.com",
|
||||||
|
"https://cafeb4b3:d3adb33f@enterprise.contribsys.com/",
|
||||||
|
"https://cafeb4b3:d3adb33f@enterprise.contribsys.com",
|
||||||
|
"http://cafebabe:deadbeef@gems.contribsys.com/",
|
||||||
|
"http://cafebabe:deadbeef@gems.contribsys.com",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com/",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com#heading1",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com?param1=true¶m2=false",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80",
|
||||||
|
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80/path?param1=true¶m2=false#heading1",
|
||||||
|
}
|
||||||
|
return validate(r, tps, nil)
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -24,9 +25,9 @@ func SlackAccessToken() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"\"slackToken\": \"xoxb-" + sampleHex32Token + "\"",
|
"\"slackToken\": \"xoxb-" + secrets.NewSecret(alphaNumeric("30")) + "\"",
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
return validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SlackWebHook() *config.Rule {
|
func SlackWebHook() *config.Rule {
|
||||||
@@ -35,7 +36,7 @@ func SlackWebHook() *config.Rule {
|
|||||||
Description: "Slack Webhook",
|
Description: "Slack Webhook",
|
||||||
RuleID: "slack-web-hook",
|
RuleID: "slack-web-hook",
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(
|
||||||
`https:\/\/hooks.slack.com\/services\/[A-Za-z0-9+\/]{44,46}`),
|
`https:\/\/hooks.slack.com\/(services|workflows)\/[A-Za-z0-9+\/]{44,46}`),
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"hooks.slack.com",
|
"hooks.slack.com",
|
||||||
},
|
},
|
||||||
@@ -43,7 +44,8 @@ func SlackWebHook() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
"https://hooks.slack.com/services/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", // gitleaks:allow
|
"https://hooks.slack.com/services/" + secrets.NewSecret(alphaNumeric("44")), // gitleaks:allow
|
||||||
|
"https://hooks.slack.com/workflows/" + secrets.NewSecret(alphaNumeric("44")), // gitleaks:allow
|
||||||
}
|
}
|
||||||
return validate(r, tps)
|
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)
|
||||||
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
Loaded 100 of 203 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user