mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-27 19:54:24 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
No files matched your search
@@ -0,0 +1,13 @@
|
||||
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 }}
|
||||
@@ -19,14 +19,21 @@ jobs:
|
||||
- name: Checkout repository
|
||||
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
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
@@ -41,8 +48,9 @@ jobs:
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
@@ -1,27 +1,11 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
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:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -30,7 +14,13 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
go-version: 1.18
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: make test
|
||||
|
||||
- name: Validate Config
|
||||
run: cd cmd/generate/config && go run main.go
|
||||
+653
@@ -0,0 +1,653 @@
|
||||
8656cc293af402e7ceb6ced7e46e414eaa10580a
|
||||
45b529c43aeb51d2ff6a3f2d41a02f7f198c9596
|
||||
6a9d4871efd8f3f633be13207e106f1eb737d3c8
|
||||
e10031fcb03002201520cf816ca6181e766d4aef
|
||||
ecfa2585fcc57efc6b7fadc79751edf7ce813314
|
||||
f83d359c45ca2ccd505bd849c78ac406a5352548
|
||||
d05ca0b9c00691d20ac898ccfb5f651f369d0e46
|
||||
7599de90a03099fb94725bed3704888eb3410c9b
|
||||
5497f8b33c6de81a8ae6b5f0fc11f06318d4e412
|
||||
eafd668f0b403b85a7fa10ea965971bf92d516e4
|
||||
d2d135e115c346aa8ac995e82855a9a92a89ae0e
|
||||
b23fd6198cd9c60affa7bb51f14f4679815ed286
|
||||
7c075749875143ad5eb162b8c9dd56cf2460d50e
|
||||
89166396f3d6a3c1a7841e7c354c0e9a0b4ea3f0
|
||||
cce986b1baccd43bd30bd92a6cda0ed6982135f1
|
||||
d7f34ff7ef2e878e797526da2159269a4553c872
|
||||
61f3533994a70eff4183343f9b516fb8ef720c93
|
||||
20eadcbf3c32e60875d31ab9125cb4ab72317bef
|
||||
24e720ae74cd710640f1be726cd1965fadcbb359
|
||||
24e720ae74cd710640f1be726cd1965fadcbb359
|
||||
70d7d00365746c6f9081fcb2a382f4b04e3e36e2
|
||||
920e6e754820b0c29b9ac94de567b09988279599
|
||||
59f5b5a3ec2888d7be7d193ee9784175b98926e1
|
||||
656434da2ec14d1f51edc5fa74dc5d2d08706f67
|
||||
837fa0e0d223e7fa1796d31956e652aee935f013
|
||||
f378fe53d5c1688bf32f2a208d4a047808105bed
|
||||
b2eb017e5806e56a645d8c0b1764b21b23d175a7
|
||||
2ba33e2800af6945b5ce648521646277103a0975
|
||||
845a01eda57d9808314db564f880bad2aa633bea
|
||||
66d1439830a50eecae9e28d9652e247f3ac4984c
|
||||
22cdfe655be3e44d85a7fdb638af5ee26ee2422d
|
||||
0f3f4c27c6704694f8f3264de8c65fe4370d53c2
|
||||
4bf2469fb58ad3e8e497bd42767c13d6ad6cd01d
|
||||
1bcd1da32d94b88094269bfc60c4f59d8bdeac1b
|
||||
50340bfd6c5c8d7c58926d33936bac76ea2df9bc
|
||||
878b808b2d4631f5895783529287faf93b2726a7
|
||||
0456c652586bec4dcc1eee5428987cd6d748e896
|
||||
6d223fcac49bd96ed5e2a303fea6be0a04985014
|
||||
b6bf1f2ebe0d6f10a7ec34188e9636052efafc6c
|
||||
3840f62e06d74ff175ea5a8312ad509bd9769351
|
||||
d8f974bbe4ebe23b8f387f8d47d4fc61c75598c2
|
||||
63883ded02136bbefad8edd5336da69f41e0bcb2
|
||||
84402c1d0abdf8ec80ef23f88b1caf5fdf4b1566
|
||||
8500a762bed92fa8ce40486c78ad404fc227067b
|
||||
f9d3a00843fccd9055761aa835631785ef01cfa3
|
||||
4f6792ab2db5f4ccab1f856d49f42f26efe1e89e
|
||||
56492efd6e62cd8bb68b818a611f1ad8991b4153
|
||||
0e8876db1228a44a44b91aceb3e07fb8f58cb0cd
|
||||
6ded6a326a6992a183d1e9de0f93e4ca27e47621
|
||||
f795edeb5dd8ae1467b11f8df7bc8e363ae7166e
|
||||
6131f865b3306a7c56245f84dd71c2c8046ab361
|
||||
29d12c5fb8fac880459c85bb706a0758e86f300a
|
||||
590b619b6c76d4e4188bdc6859d33b7a22c8a616
|
||||
b4debfecf0c0856b5723985a46716e9e49c54b7b
|
||||
19d26c58a914b557057e5bd9e00a487aa5182fdd
|
||||
68de55079e97cf5ff6dc803411f95359feb29c7b
|
||||
2d15093e1d1ea78e60742fa0521e7aeb8d094dc5
|
||||
2a6d2e5b879453b39d6a0ea0e6f51474e5a2fa9a
|
||||
90a904d1f08c9e19324b04aaa2e5ccedaf4cd933
|
||||
d36b9a3a50d2cc8f197b9a7f071f0fabb2996808
|
||||
923919d7658e394e2448216dd97ecb826490a42d
|
||||
105dee3ba3319c012bf15458be218ca6dbd360f1
|
||||
daf6941c98ddc345836f4df9c03fbf6e8371bba0
|
||||
f0f00ddf38946a666805c22ee4bdbdfeb0fdd186
|
||||
9502ce49a6a07515a1c1826342c1fee5d2afeadf
|
||||
3cc64ba8557f6d054f9c63fe225c6d971314c2d8
|
||||
3fb0787f3468a5cd57b75df04634fa7a3a2d2eb3
|
||||
4983563275c91a5ed9a7558b61011d1e106aa47e
|
||||
2994f3863c011cc6874bb656b87a6b793db28213
|
||||
f9d3a00843fccd9055761aa835631785ef01cfa3
|
||||
66337c40e03e2ed82382eb679be1f06912e5c927
|
||||
665f66e005b30d048bc71224a1364e7bdeb66df5
|
||||
bcc0221ce5dbb136567c55ee42acb3e0d313f08b
|
||||
e67945c4c4a0ca3d435eb8caa4a4b349d53fa4a5
|
||||
6cb1f4876acb9b44b2e2f165b453d42afc8e1219
|
||||
6e7c436c45d49b2676a3704e7df95d4ba530c675
|
||||
1b4d1aa84a0264620e12c404699d59bc776d486e
|
||||
7647cf080c6bf681e5b10d23ebbfacbf2c613ef4
|
||||
b2eee866b7c6c76862a9100a44e496ca98558573
|
||||
96ba18cdaa05323ada9ffbd8261b17c1bd9ff00c
|
||||
dceccb04506f7020fe9b67bcfb2d7afa36b7eecf
|
||||
a1b7928343b0477ea2c6b8b2445b262073c4a49e
|
||||
bf462c7b3d9e85102c652dedff15e586dec6f4c1
|
||||
49c9b547afaf145c63fca614f5a3e762495f09b5
|
||||
a1eaad75316bf370083a6bb76f7f35cdaec0c1e5
|
||||
9fbb3bd773b29ae4df2e09b12b9fcc5448fc8360
|
||||
011844370ce89f1973c9d80809b4eb06411f139f
|
||||
1d3b4f7ccedab21f854d8711654cc613831a1118
|
||||
a69862b4e3406570d74ee4e2d7dd863f16b7fb17
|
||||
11848fd18b1772c0584f1590fd80f6ff36a228ae
|
||||
5741f362f3769f10719ab5406afed302b8df1e95
|
||||
efab13882a0c8ae529f8a39458a158505f63ea80
|
||||
101f20cc18ec9cb72d185e47e2da661efab9109f
|
||||
50ca343374c58f57f83da0ebff8445dd390c1733
|
||||
cfde569ad1c4b3edf517a986c1ac96990c258353
|
||||
24e720ae74cd710640f1be726cd1965fadcbb359
|
||||
a1eaad75316bf370083a6bb76f7f35cdaec0c1e5
|
||||
b2780c8889c3825f4f392e80e02c6029ece40b93
|
||||
9fbb3bd773b29ae4df2e09b12b9fcc5448fc8360
|
||||
d7bd4230e4d5f43bb1d5004edafa9835affdae27
|
||||
1c5081ff4518a9ff9b4bc008e70d3da0679b1315
|
||||
fdc7ec908b9709ce61ab123041958987a44595cd
|
||||
5aee1920b415df35f887ce12eae6f2162f488b80
|
||||
1b4d1aa84a0264620e12c404699d59bc776d486e
|
||||
d39ff83940311147d094380ad4cc136e662bf512
|
||||
276ead08acb0953bcdd990e138d01dfcce6c1b55
|
||||
011844370ce89f1973c9d80809b4eb06411f139f
|
||||
bf0e5b0b8458ca5a91da8def5eff2924dc4172f3
|
||||
efab13882a0c8ae529f8a39458a158505f63ea80
|
||||
149c663a7a3611ba9ed15093f0f52e94001a1ee1
|
||||
0064094c34fdb036d15617cded9dadd812327953
|
||||
4af38de80134934c4ca7514c927405367e3f3fee
|
||||
e11e1c812cfcc969d350822046acfb211c0e9164
|
||||
6f63a86cd8190bbe0176afdcabeabbbe14d7b69c
|
||||
5da2d2c9f8b880a6fd5dfd023125eb39b769e7c0
|
||||
695825fa48e0b7fd3e3bf42495e947ca327866cb
|
||||
0547070c24aea64e4a4d394a9133c6fc5b3182c4
|
||||
b2a1eebde836b7ef2dccb9670c4da065d55b39d7
|
||||
6163425830de08fc8b0834d4fa8ca784d79fef69
|
||||
43442bb0fa5fd5309fdc9c297cf042e2ac24e8b8
|
||||
94870c87d178f4150ed3d3f0d8ab50fd53cf759b
|
||||
56801e445479a9985b2a749054ca0bd59689917f
|
||||
9d3497c1a259ca1a180109726f6a0cda12fe1fe8
|
||||
5129f575eca472a2849c329e4ff6d3a79b0316f1
|
||||
0996aaa1d78bfeba6971ffb070e53d624d3db4a5
|
||||
67432867949cc2a42f65ecb24d8da1c2a09e5ce1
|
||||
6cf692a655e1c846f2501a73c87cddb21906bbfb
|
||||
df8e0c0e697206e4392a3996c64d82daa2adda53
|
||||
450e434158643f8585bf7e4bdf192c3694881a96
|
||||
c1236f3c26106e3f798e3f5178a56d81d4e26b56
|
||||
d32c483608ac98220b898ad1beea1d86cfce7ce7
|
||||
58735a17bff3f6543bb3f7524d0dbb7eec3bfb40
|
||||
bbf918e3b32a8492487566ab48cdab4126ac14cf
|
||||
e6b31b51beb35a2fcc26c0f95f4d58f435b29e3d
|
||||
a1da2890efbf003acfeba2dda8280867d2e2d522
|
||||
1b41a3d3b77da3ec2d0258e9785c5f6abbe177d6
|
||||
a761e4447a8eaefbb1f185f7ab0db2a1a608c7a0
|
||||
577580802e7cc47d663e7987b8ac5c0ac01384c5
|
||||
c1f390ed2913853905a6ab32a7e9a0f156fb6420
|
||||
d1d508bd130081bdfc2094791f9e2be432ed8875
|
||||
a665d7534b36bbdbb0a67351bbc20fba5eb8b34e
|
||||
63628bebc1ab0d6778daf29d2fe70afeeaa5986b
|
||||
2e3020fc4d780c45179f3f6c38855dc7fc03ee8f
|
||||
8285db5920b43d767790b452dd7309a49b55c094
|
||||
bb831e30d8d713d4de52ea65f581f0f360fb25f8
|
||||
ea3bc6103c9e881e2b7c00f076c07dee577abc7d
|
||||
b328312c7328508246a2ce0a9f2aa44ee619c87c
|
||||
c024909e43a01473ac6a090159eb49b7eceed939
|
||||
7da51cf58cd6d4ac241c9a2a5ab8ce3f4d7b4055
|
||||
59a78f51b0adf7cda2ded2c06145459c210b24cc
|
||||
8c23f8e87cbfda15af45512cc8c97d0f24ee1708
|
||||
d955f1f8b9636eb0cedbedd73bb829ac278ee76e
|
||||
e51c04ee8e17cfe4fe6369edad2e975736df0497
|
||||
10919239c91e5c696ff7d4f0d48d0eac6a354f55
|
||||
4ea2354ff7786526e42ecf215276a9c89c1dcef8
|
||||
225ef190a71bdb37e7894e5598f8b43e4b9a2aac
|
||||
ff9a3583784717e2ac340beb9b510abf9bc0dbb3
|
||||
efa49ccd7904af825fb5b790c3bd1ae47da867a4
|
||||
9bfe51eaff52f93b2f86c03fc47bc2fa43ed631c
|
||||
ee65ce6f83d3affee8e7cffef9c9af9147920acb
|
||||
f01a37da32d0a4f3069d138c6a8bc27415ac01c5
|
||||
1da23ea0221b5f79cfe22ed5348e35f2a31c2301
|
||||
b2040bdb3ebbdc1cb05f73174a2206cc4c3e0de4
|
||||
9fe2b908f4402097a10fadb64d766221a0302fc5
|
||||
b55919dbb9a7a20167dc2c7f64dfb1186743d954
|
||||
cf22fba89a4e934a4ce812e7e2ffdd0fc00931b7
|
||||
af54c51cdb8fe4c8c1263ebad110ca941a4162eb
|
||||
26215f2ef006c804d2882f26eb5a4d4e8da63fd9
|
||||
861a048729daf36d1371ce7889e46022f1b52666
|
||||
2c29d89dda12713aa423f69be4b56a32c60afece
|
||||
69101efa97fb6a31489099f97ca4b94b524ba98f
|
||||
60a68a6eb7357986fa4e219051580be615a92af7
|
||||
5744d957a3189c0678271de07327e24368cdc388
|
||||
d85cb8c914348f279ad277a51018a13d894cdd5c
|
||||
4242fc70096c44be514b9cb2901dda7c481d004e
|
||||
aa8fc3c7e943fee0de1d827bda60d29e01d41257
|
||||
974339b23f0d1887e99a109605ade66873e03e76
|
||||
667b02a4625a4e887c446c2dfa1ee8fc6ad48e4f
|
||||
1a179404d34790a33968e75d18000051da788ac1
|
||||
7b8d8229ebfe8975bf588daeef23ab028c171c77
|
||||
9ff2611468cb5d69a9f45d0a377383bc431acbce
|
||||
25a983b662281383b467727fbf25ccb2400a3233
|
||||
a370878c45ae17b90ebe32145e45962077431df8
|
||||
20a03c2c8ba119cb7450f628cd91b48ee3fede9d
|
||||
e8d9bd2ccc9cec6ed46ceca4eda813406c7f5c5a
|
||||
6229236a6826f8e80b21e07b89103256addd5606
|
||||
071f1aa1a3ffd3158e9ab7cfa42d3f5fb4659ff7
|
||||
3cd2e47f545fbd0ec1686ba0fb182f2a23538af3
|
||||
e602e4516cd3fc1de82352c251511f10050cb623
|
||||
b18c27d6d8a9b26a1d038774030428d00eb5c078
|
||||
32d690b1493899bcb00d70a6dfecc79cdcb4346c
|
||||
ba2e3efea88a91ac27e1145fa5ba9d47951429df
|
||||
b9d0cccd3fabc9c967974e9aa573704f72c9367d
|
||||
c0ee8bac542325503962d2d5cbe7734fc3d35ffc
|
||||
942deeb6dde57f32928bba86266c6a2cb180b1ae
|
||||
b6eac06026e6c7622dac0ddfd366a4d31913fac4
|
||||
d1b27799601a9cb6bddd79972abe28546a468331
|
||||
e405b9ea7be88bf56ed3d54dececd0d8fdfeae4b
|
||||
b3a4ce34d34940479f10ad283867f8479d160848
|
||||
b721a924696758e3c59fe2526ea64aee7e5a7142
|
||||
301de6402305c92444f72c4100f1cdc6f5a8a80e
|
||||
5e1c236e8fc251fbfb3516a6c67bbae797064350
|
||||
114148673088beb5f2ded0105e960d123f0557e8
|
||||
82aeea0fc1ed0a5a8d64568fc0c4ae2e7baa2137
|
||||
20c160a4cb7b095e310f3b35ce00ca73dafe4503
|
||||
8f7a779692814e022183d0b03107964c6af5726b
|
||||
e8d9bd2ccc9cec6ed46ceca4eda813406c7f5c5a
|
||||
6229236a6826f8e80b21e07b89103256addd5606
|
||||
071f1aa1a3ffd3158e9ab7cfa42d3f5fb4659ff7
|
||||
3cd2e47f545fbd0ec1686ba0fb182f2a23538af3
|
||||
4f3cef974f7059a4a83680d4802ba845f58b97fc
|
||||
7f850a4383e12b63efeaf9c30d9dd70a9a88b3c9
|
||||
e602e4516cd3fc1de82352c251511f10050cb623
|
||||
f0c9acde0360ab4c551e753c281967d61fc12173
|
||||
2ac249303340fba15cfd8bedb6f5c237a5fe0504
|
||||
a71aa259a475041e809d2a1c8ea08d50dbfa4c35
|
||||
4a4df199566ea8107df3032889cdeafc1073bbb1
|
||||
b5f8a3d03fd20f47ae73f8b5f249e90e8aecd91b
|
||||
7d73f7a38c9e10f9436e8bca5f1507855f5cf041
|
||||
43aa054d56f0007af32b9fa0db452bb960d72de3
|
||||
6ddc1b9b3c1c0d34d1e4a317f5bd7e64b85fbf9b
|
||||
17a9d74a79ed8600e071d4442e6a64ec27ce71ae
|
||||
67f2943bd9e41cefaa576efe55fd8d8e4c8a0c46
|
||||
71639222f100f4e30987278bb2cadfde3bf6b010
|
||||
2c91ec521f6e2f5a7ddf924eb659b7a37d1763e3
|
||||
3f2e3e2c4220bf59edf9fd86a43eda065dce783c
|
||||
1a4db18a1ab480487beae644abfbd3bd42bedc28
|
||||
30421bf31225f5f50e93de2691e9fd29da8d353c
|
||||
aed1a4d2c57b84e116e35ab7485b3f1b8e63fd39
|
||||
2e00e84c3dded9ce67d0023b3b59c97e845df6f2
|
||||
77ccd154edd55720317f4035ef3825be13ad9e0f
|
||||
c5c03a40ca63dbde3aa4f07305fa955153db8562
|
||||
e525af918587300d4ae0487b25ee6d61c16a9980
|
||||
0a7cd16c55f06bfbbc1e61dc81ba8f8edca0b6e4
|
||||
07775c76f1def4d155a50a9a2cdbbb0a584fe351
|
||||
b6a619473a893ac0a4836a469fc1d581d3a84474
|
||||
974339b23f0d1887e99a109605ade66873e03e76
|
||||
667b02a4625a4e887c446c2dfa1ee8fc6ad48e4f
|
||||
645791746e79b2f3118a0eca79dbbae6fa6191a4
|
||||
58deb6da6c2bb3a72b9f7154d8f823a4f32e3316
|
||||
d07a2bc0c5d11ddd2edbd6c4fdf3d00969aaba2c
|
||||
dad04a7300d93f04117f7bb51e04a1b8d0a92f53
|
||||
871e4e678f1075f84ad61572f9c984c09e4bcc91
|
||||
02531cfc5ba230d1fd00d879134eeed4443bdf64
|
||||
461f1937da031b6ec9209cdad5c11075d6cd3a38
|
||||
d88b5012fb32111d20a55f6a41f09f2c33da8a12
|
||||
85c863d075bee457f3b79372023b7c334427a4c2
|
||||
c7961c2fc29b29b486c937e67d46cf97023958b7
|
||||
70b2f472080ae66d648553c0f50148a57b65b831
|
||||
588fcd07a724285a1ff89b25635cef743785f557
|
||||
4b9b603f32afdcc8466e0a32302974f77470ef50
|
||||
2f5acfd0b66e07f6b19573d1a2b0d9ba1430d465
|
||||
aded71fb1d6c65e193d12a6232eb2c5664169110
|
||||
61e37793101b8702664dc774c0579173a2f87fab
|
||||
a7ea49b677045512a85e16c53abf74966e6ab734
|
||||
ea8418534a1cc1dd7fe66de51a17a16a740e8222
|
||||
7c9caf8f669303c5e7129fe166b0c59b7df870a6
|
||||
2683e6e53e9f6574c2a6eca41d5d2dde85d55e0b
|
||||
faa6ded5389576b487f0ad085a76fdd7d2372471
|
||||
3c0ad6d68991961e2a72422fa4f69ed70d4ae6ab
|
||||
a64da44ddc1cba77229ba024cac0948cb96a7676
|
||||
9f59d00d9f3f34d0c368a02d6e1cc2cd3e80f4a9
|
||||
4a76088fd649351a870fc49932485df934e98fcb
|
||||
aab08fb22ee1b493cc18a8d1d091d3e4f4b6dcdb
|
||||
b9905c8f06c561e66f14a5f69a8d06c0ad2e8f54
|
||||
742ff4b9312b36d2674eaf6d855e6555bfdd14fc
|
||||
fc5db16160067fc884f5129b53c2c2c30d97dbdf
|
||||
a2807f038ef6628f886fe9b4618b1fea96224ff3
|
||||
0a9d4c144d150fbb78e66050fd9f73f40539eda2
|
||||
655a9afc9a891327cfebe359c66de3e30d9cf360
|
||||
7bcc1f03f75b4036eab05d8d4c7648ab05cf866a
|
||||
43d9e056eb2f07736497d0a0043259af6a367693
|
||||
f5cfbf6a24b4c4ba8af9ae1f1f4ff46aa6ce4552
|
||||
c711733287d3eccee7dd8151b1efd3f990653ee8
|
||||
8bb3878d47836036a2b723edaaae44e6fc621e80
|
||||
8003f8bf07e2e49216ffefc3280b43c572a952d0
|
||||
c39611d5667d66d8d7a8c3b65a655d35a0c26f49
|
||||
83f5021e7cb6ac9cda65ddc009015405c2ba6b91
|
||||
a4bfae8e4411064653404a61aa384ea2f52d4eb3
|
||||
1e4094e0775d11a1dbea00968b083838a3eaa576
|
||||
c84ae49b820ee56263f6448cc5de6ce9c7da2254
|
||||
0203a9795266e20bf32a6be4c44ff14af42a25f6
|
||||
1ba3cddeea3bd00ff4ce337abbb00e289495d473
|
||||
8193e74ff88bbd1a9ee14ca9b9f51fd590e3351f
|
||||
b2e29836799a526c17ae6b1c742ec03f43e5db88
|
||||
ccdfc4b8222abca3af87de4b794f00988e57d7d5
|
||||
ca1ed10fa8fbc1572986d9d9242fe3eee1ad091d
|
||||
bde716a0c9f93b4098ff16c38238c05980ed0eed
|
||||
979efc701912270022dca394c0aff138967caa1e
|
||||
062e5cb286ab289f439d59feffaa519a4b0eb163
|
||||
6edb43c851e0857b37a91a2c33698527cac67c22
|
||||
6b64819c0842cc55a52da26fc2f5efcee3afd450
|
||||
9ee8084745df9b6d47f63f5c55a94cbb008a0a55
|
||||
b489ce43d5f601dfccc462be1bbc5cda68b10b95
|
||||
8ea067ddccc35e2a3d13886a130faf7278463114
|
||||
b0ef9814fec761540d73f6daa7175516573b7af1
|
||||
db5b9885b92887befb0aead9a276891e933b1dab
|
||||
c0c462ee5c33bdb413c97fb80f3b391d6f65b1f5
|
||||
580876152d87fe08f5074027043ddd2c9bf81beb
|
||||
fd81a63a5ceb38379736897482a5da2577554709
|
||||
a51cd91973af710bc8371aedfcf35e56da1ec5cb
|
||||
56ca00299094832de60609416c67a8d9b1bbb4e5
|
||||
417623c1bc2b9830397d29c134c7eb15a4bbbdbb
|
||||
1509c1bbf381516016d0615968479f2d004b643b
|
||||
10733a018a1ea4439d6830d1ffab4b292d64856a
|
||||
00efd58b1ff1a27c5acb2ac973eba5cf94cbd100
|
||||
8d7823d7fdb12fff24600591d8f392b0fae3d8dd
|
||||
b7a8a16fea706aeef2d60f813b9bb247eab0fc84
|
||||
4ace920dc95a09e9fad4b075e51058ebfd3ea4f5
|
||||
6375695fc0c982071740b0e0a9a5b028426e24da
|
||||
6088d3cda293fb3d723078247beaeb38ebf606de
|
||||
961b363d3560726b20af48b298952831619737ab
|
||||
d7144083a4b438e7e23e7669ab8fd72c3cf4da58
|
||||
b1728d32972d82df1d01fdcc4775eeb4d6573a66
|
||||
94574f004b1f1f4e1eb3de340d6d3c5786fce205
|
||||
e734c0bc62caf294cad80336a04ea201494ee749
|
||||
fd1b6917edd6a3d3f6c0f68b5b6cf39cd37d16af
|
||||
c6b163a6b294dfeeac2617ac29e2d8ecfdfeb991
|
||||
6ac1f70c65fe8eb0dddff52247cd1a363c52bec9
|
||||
c94bb96e9f7ce59bc5fefe170b1971ee5d4ead0d
|
||||
6e11f3cd67bb1274308914937edc0835280b2483
|
||||
63e4d5bd72c4cc101b9e733198d2a748e4cd3ed1
|
||||
077283537e93caf2e6bceae59abf607dbfe484dc
|
||||
38416518c8759cfc7846a5cef4f77566d5d9e7fa
|
||||
12195b88459060af3161694f43af8f99c1cd9afc
|
||||
d2a9457c88976dcb594af8ad46f8841160171d7f
|
||||
aaaf6638b7cacfd02fe56fc608103e91d5f9f849
|
||||
97caf9394a5fbba5eda7dc99e528ca32b4e460de
|
||||
dd59e586376628ebd517f26dafbbdbe8d72eab89
|
||||
d8fea4d24eb4278414f03d525f095384a7debaba
|
||||
f7534ac45eda041e4dfccb428f4d81e6e0f5b379
|
||||
947b54abbf33b9dbdb464f83716ddacd7af533f0
|
||||
d5b8755b6c064bb853aa489b6a4e7012c3012249
|
||||
4346fbe81275438f742aded116d0db71ec78094c
|
||||
cce7528acaade5073d058b8eecbdcc0a9a54f818
|
||||
28bfb8cddf97bf58c7038416a7b4454773d60c5c
|
||||
56eaa2e0d4071b067955269d908ff3b17de68957
|
||||
c4e0734961d29bb0671a8140f4c8b9721cee9420
|
||||
3712af28b18579be77414b98447b56e8db13f085
|
||||
2e5bbd0db301b6b7883318b08d779acd755f476c
|
||||
4d05b316c5e25e624558ceda2c2a0aed9428f6ee
|
||||
20d6656c4f77f294b5e9055da6b6aa169673b040
|
||||
a64da44ddc1cba77229ba024cac0948cb96a7676
|
||||
24ce813193ef19d10359b757642fd2dbfc8c48c6
|
||||
7ddbe3902e0dec4d2298b282813c17dd65e6e2ee
|
||||
42c709f52c7f73c3eaf2e9793d1e5fdb84827869
|
||||
52403bd1c6c5c5f0d84869185bbc6964d1db90bb
|
||||
3c0ad6d68991961e2a72422fa4f69ed70d4ae6ab
|
||||
2bd977df8b6d3decfbe33f0c01ebfd5222787d77
|
||||
f46e60b785d2fa28b98438422cef6e89c369e902
|
||||
713ece1808b7762dd4413c871ef0093eba5886c4
|
||||
a860da86a8578ce07ee245c888e9ce90ea911f54
|
||||
b0be9f0d46f0462b66de13e5705330439af9695e
|
||||
aa7a46b0ed6b6b33973157df3aace8257475ac83
|
||||
a6df7be1f065ea92bca2c2898712649061480a44
|
||||
a2f60eb85700f35125d6f6aa0d74d95191ff8cc0
|
||||
037ade5451edd788e9575b1b7555d2d00667c93b
|
||||
a05abacd2f90d290b1f3f15ca200f6652bb393d3
|
||||
6d4b94dc4a9953ed6a7a1986f06a018ba2991b63
|
||||
e6cf8fab16928785e45b3e649645560c9ef58545
|
||||
3bb46478e4271d6327d0acac496324265b6931a7
|
||||
ca3c93a317678f0525f242eda9bba927a93de9b2
|
||||
c76dd4c447a533b624f8829299112af44f52b2c6
|
||||
84d000e07736e4d9c6da40ad6fd04c27f213b74e
|
||||
1a015ee822d287cf564b016fb5fe57487a799f93
|
||||
8f2704aa0ecac935244e2f396474d37865d191a8
|
||||
d69bcaadaa5dffd0c2dd7fd91c933743d7fbbf53
|
||||
2b2c787636cfffd7760710933784be903d171b63
|
||||
4d8b034206326e307d4f4ae1720563effa2cf754
|
||||
4130f1a97b5be548ebad885c71f5fdfbdbe6086f
|
||||
578d35837d7c3b43abd78b2d2d3699741093216c
|
||||
19c11cbfdbff810d0bef2a019a78bf0e6d6b5c2e
|
||||
400d89b7e350a3596b7fd1d6646201f002d7cbc3
|
||||
ea3f62b1dc17c3ddf3fecce1ed3263f19b5072d0
|
||||
90113a109933dd493232a9f30715aa9d944b39c8
|
||||
417623c1bc2b9830397d29c134c7eb15a4bbbdbb
|
||||
1509c1bbf381516016d0615968479f2d004b643b
|
||||
4a4df199566ea8107df3032889cdeafc1073bbb1
|
||||
8e0e25cd3e89c4d39d7c33c9813d5c578af00e98
|
||||
d03552d3ad07faecf8badaedb57a61099129909e
|
||||
35ae5241adb11a210a19875b96127055ffd02330
|
||||
b3405a751674277f60d20393b20f0b096c28367b
|
||||
22c89c9b0f6c205279dd2574b8d033b7ac385166
|
||||
c4d822855c7891414a0d67ea96da1d5b3233c338
|
||||
80f7da0261c6a02a9c4a9b9993834860078fd03e
|
||||
2ed07e123f712b387c3a1dec40827fb0a9603f42
|
||||
eccbb14b7b9b78f9e41208eb749caf10f188a23d
|
||||
cdc969e4d3920382bc124a67fd621c15f2d79e52
|
||||
f1037fc31ecbd1a5c185e8205695c11c1966acf4
|
||||
1fe522cdd333469d01c780508b9846f3a96fc839
|
||||
50621ac24aca1972e57759147e5f0ae963c17e7f
|
||||
8f7b184405405c430314996ef3bf5212ea0fa612
|
||||
c8804e6fb90dc81b31b28d6299e21a3639a31854
|
||||
3368241b6a21495c72f6075cef64f34ef9230079
|
||||
4e6c57f14b0db349269a4f6707a7fb55f11075fe
|
||||
d9ee1591b23e95d4e63436daa2de7556f6e345b9
|
||||
01318e26512002c782b3362cb436a27787749668
|
||||
068a56d79cd17df8e6914c870dfa6d44697cac07
|
||||
58e8241159616601da4f25cb3a84f20a118c5fa3
|
||||
7ff347dfa505f928698404921a3e9a331f883019
|
||||
a8aa822d8544351204a77874996f21f2d6871f8e
|
||||
f269c779e262017846734f7daec144fc6ddc8cbc
|
||||
fe59b380152ce90ef4bd3be75b9bf9b544f742dd
|
||||
8fc6eaac1711a1210b468e72fafef1762166a380
|
||||
5bd2cd690bb6db367d442c2956a6e15092175eb7
|
||||
a05703536c1d6da3cbea8d40b78a1a862adac799
|
||||
118e798e01c89fcd73688d3fab1552475e92222d
|
||||
02b9d7bf8a19a1ebd6ca219e5cff1537841fd155
|
||||
d1684e43cb5409f86119a6f0ba6b5c695e88981c
|
||||
c8c200ffbc20c95e010d8cfc8980a56e7cdbc929
|
||||
499c4e9e00fb890d6178011d91d22383440e1a2d
|
||||
6938fe0f6d3befd155cb05502377c97419103837
|
||||
32118fa2f419c7638544171df456d4edfc4043b7
|
||||
352801449ee088800a22a1d4ed23d1055f509e34
|
||||
baf009604e6998d28860292413a6d4d3106707e4
|
||||
386be16b8ba1e89ca5702880ce52f7990338a51e
|
||||
4f562b0ab9dc44dececc7d6fd9368987f1bcf37d
|
||||
1d6bea453ff09bcafde8258d6ce2c59fc55f9214
|
||||
0d52d545761b90dde29f71062562441f57ba844c
|
||||
cf448184e0207f654868384a06f8e29dab5981f7
|
||||
fa87b0c81f5581f2f2d17a145a42f07227246bd1
|
||||
7be00244368fa71cdd95278ef3ad7a9aa58598cb
|
||||
fd396dc16bcf077d6d3403269475241d2e1d167f
|
||||
2b73326d9685d16167494d7f498c86dfd9cecbcc
|
||||
8cbb116f18a245610a5a881cb36b0c8853b83b8e
|
||||
6dc11202f78f60f213c62956f7949717f6170307
|
||||
d0178b9dd3358cc48c28b747a2e3085acaf0e2dc
|
||||
dfe7b79a94b2018dcf7fb585b72abb1ab13d9688
|
||||
bac436433c8082bad6a032df72eb20251e76aeb8
|
||||
2af5c3ab3dd62cdb761f1ec19053d38eeaabdb12
|
||||
2a745da619c8d1be153aa2ee474f2d84dc8a483c
|
||||
3920be3be6a7b13ffcefea79b89c9f71b76b2c98
|
||||
137537d31ad13efb9060f1ee1b8cf102ab0cfffd
|
||||
66f41772d15b8b012a2d44c46ef105d27bf688e9
|
||||
72276fe228e1160316b32ae0ef4dfbc93607df29
|
||||
99b162a8aafb351393c0e01ae50606afb1cb3484
|
||||
88f944e0ae4d74e82f31116d26826059409da59e
|
||||
9af4ef0f3fdda5da4d9d19ed5321fe0ee69976be
|
||||
3fed1e5b9f07738525ebf88aa824b5e8bbaf77b7
|
||||
a3f1eeee549c9cba193158abb187b779ed193574
|
||||
f7f4790f977922505c437a657c63afff8e553676
|
||||
12291af54893a94909957b6085def5ee326e1071
|
||||
bb830379073fdbdf065a217016a4d6052fbc2d8b
|
||||
75ae7a68c5652cfd678aaced0ee0517ce6cd550c
|
||||
dc2f18d8e6624ebcfd056079d2b9889f66af144a
|
||||
8e318974552e4a472d6d6a2693ff00be696072f0
|
||||
a4e190c237bf382fa5f2a6286222503f86c0df22
|
||||
98f5f8fce21218bad44b81278d5f0aa9fdbdf9f7
|
||||
c7431e4b69c93c13b33b0b4b7a505c70ee0d4455
|
||||
2ed07e123f712b387c3a1dec40827fb0a9603f42
|
||||
eccbb14b7b9b78f9e41208eb749caf10f188a23d
|
||||
47139ebbd74eb8256a9bc59380c3ebbe4b9161a4
|
||||
69ccbbed36adc15861684226dbc3967f02e45a34
|
||||
53652e045227b8843e27c5385645172f5fe70746
|
||||
e17644e7611d45b8c350faa6df8b089d3e7813a8
|
||||
2dcb9f0bda8dcbbb803694e62914438709ca1fb9
|
||||
7e4189ec7661c52d388b60603302e61a5faca0ab
|
||||
57b55e6ef6db2b8afe70df3ec63ef364a6c3b7bb
|
||||
2b96caa8e67119236fe0c274532f1c779e20cd95
|
||||
e78eec0a8b813abdd3bd99ea0bfa914794db4bd3
|
||||
8b93706efedf8777807024482c0e75ae9b0c5a39
|
||||
d32997a4d9b5be6a820579812d6c15efb9f48bf5
|
||||
dfe7b79a94b2018dcf7fb585b72abb1ab13d9688
|
||||
bac436433c8082bad6a032df72eb20251e76aeb8
|
||||
51ca9077f177ce4a45915661e72aab5da90d9b91
|
||||
dae68c562061e6f2a13cdaab4bed9a62c098e143
|
||||
6ef61bf7206818bee8488706353d51a029506022
|
||||
fb436256a285f3e46320ef8724e4fac3823dd8f4
|
||||
feeb17ca0512d8f01e35cd0e7877eb5a7a352978
|
||||
875f7ae0d93a65ff6b2343285b46e61b721af343
|
||||
ca7a9f1bedebcd0161152ec6748807b5f94f14d3
|
||||
24ce813193ef19d10359b757642fd2dbfc8c48c6
|
||||
7ddbe3902e0dec4d2298b282813c17dd65e6e2ee
|
||||
5cfa78ff554305bdcc7df79caa1b17a8e533983b
|
||||
ed2ef8f0174350d384f01cf3d4cbc77de59fdfa9
|
||||
ee493fe283f50992879fe2301700bb362f3bd02f
|
||||
cb32ee79ddc19464401808dbd5e01603fd97d010
|
||||
b9509806b71a5163395065d644717f9e4f2a6528
|
||||
86643e2ccc44b18bca5d57c0be5a2bdc31445c0c
|
||||
c4e0734961d29bb0671a8140f4c8b9721cee9420
|
||||
3712af28b18579be77414b98447b56e8db13f085
|
||||
23c1da39d4f87a2598f2f13e0c10b9cd1f309918
|
||||
0cb4908c7c3642c782566c179cd33f2a4f788678
|
||||
fc869d9fd0e890e3eda0ccd401493b3cfe36a156
|
||||
7fb02652211168c83050fdc54cef8eb3a740e028
|
||||
20d6656c4f77f294b5e9055da6b6aa169673b040
|
||||
a64da44ddc1cba77229ba024cac0948cb96a7676
|
||||
be6a40b53fc142322395bf59f86f6cd046beaba3
|
||||
6fa2431721911edf5ca1f9d50c24cca162668c05
|
||||
b134af6081ac3966912be824aa89df24b688f90c
|
||||
663c1bdec831757ef5bd18e36584f5f922dafbc5
|
||||
5464c6f30f4b9ab4576f17b9f31bffc41dffc22e
|
||||
cf448184e0207f654868384a06f8e29dab5981f7
|
||||
326e268846fbac8e75f84745de805362c2363185
|
||||
a2fd0543fe9cfb63958ca8802bf1cc21e74350aa
|
||||
02f91ca84bd78ea683b52568b0613c58763f134c
|
||||
fa87b0c81f5581f2f2d17a145a42f07227246bd1
|
||||
4da0eb5b608675460a5599de883b51acb945f4bc
|
||||
762478fb0783755523fd35c3e76f2bf71861e578
|
||||
a291334b7d6147a3ad3d54eb2d11965e56d73521
|
||||
d60f213462c55df8cbe8e36acf08ec874560bb73
|
||||
857622c14a39cfa112482e51af3d2b54b553ac64
|
||||
d7075b0fc87f611de635eab40f724e85ad1a9f72
|
||||
bca94187ec887219a0f92360ff9f8b35dd7fb84d
|
||||
a05703536c1d6da3cbea8d40b78a1a862adac799
|
||||
b633f2e0b6bd3c9095097ade003c47994a61553b
|
||||
5517c6426d05a75a2eb0c2bef2c5e84d81de1729
|
||||
24bb959190903a773f8789e575e2d33c879ae085
|
||||
118e798e01c89fcd73688d3fab1552475e92222d
|
||||
8e318974552e4a472d6d6a2693ff00be696072f0
|
||||
a4e190c237bf382fa5f2a6286222503f86c0df22
|
||||
264c801525c2ec8ada0fe4ca701241a015966a7a
|
||||
49601f0ced99dff60b577873323f459f4f5adb27
|
||||
8890f4a77ac26feebbe85fddebe89efefe95411a
|
||||
585946f9ee9ae1116f7435b8bec4c6782112f840
|
||||
127e1c5d5ac9aef9a51c27ff061009dd5cbee356
|
||||
d052fb727b0520288ec6643b161fafeda93209cd
|
||||
4a4df199566ea8107df3032889cdeafc1073bbb1
|
||||
8e0e25cd3e89c4d39d7c33c9813d5c578af00e98
|
||||
7b8a370f0cb359b983fa2ddadbecf9f61aa33146
|
||||
5f0c9b2d721952690f94a2c7c6b986da8ade7952
|
||||
391ff2ac9046ce0aa9ca620f37ced2fb9f65b493
|
||||
ab619037682a8267079770bd0b18e37fce6724c9
|
||||
f269c779e262017846734f7daec144fc6ddc8cbc
|
||||
c4d822855c7891414a0d67ea96da1d5b3233c338
|
||||
80f7da0261c6a02a9c4a9b9993834860078fd03e
|
||||
82f2efaa2e331876de4a74ff53b6de3a276fd6e3
|
||||
cdc969e4d3920382bc124a67fd621c15f2d79e52
|
||||
b15811121f367d04a3ac7a92a09f67e27b6d552d
|
||||
b41bc60c96536846fb077e4b9fe68787d64ca232
|
||||
58deb6da6c2bb3a72b9f7154d8f823a4f32e3316
|
||||
f1037fc31ecbd1a5c185e8205695c11c1966acf4
|
||||
a167a8f6ea9b45bfd48ce8e2bd969b9f48b98bfd
|
||||
2b73326d9685d16167494d7f498c86dfd9cecbcc
|
||||
8cbb116f18a245610a5a881cb36b0c8853b83b8e
|
||||
d9953bd3fc800b1c8971a8aa2ac2f033ee0aa065
|
||||
c809d74c7a80b407f80a0b8d2c939a4027d56efd
|
||||
beb10f6515e6c9b6d6f9a64499da89418b931fa0
|
||||
82bef182db8f84cbe56a1df4efdd3a8debb8d0cf
|
||||
d43692928372badd32c62d4053dd6ee1344bba40
|
||||
801204bfb07fee0c953ba4535abe88091ec47325
|
||||
de93ee5f732774a604f48432261c5dc05a946fc5
|
||||
7caebe0b7176d25393be019169ca84f2fc24b547
|
||||
17148e490ad59206bd052a9c0b4915bcdfec5166
|
||||
e3c31c6f936fc376d017ec1cc2e355613bd7fc5f
|
||||
63a479d2ed1e6e1878edef12a86182d8916d7e12
|
||||
3b0ee00887e57f9e09ba048fbdc8ef7cf09934af
|
||||
c5a302724bd9d34e20d84cbc353980ce128f9351
|
||||
12f2d5a8cf2c7d77443007b978d8a9868d206e5e
|
||||
7f1dd4b383e39eb1d934f75a86bf05a10cd85baa
|
||||
8de2aaa4bea07d8e42c4afa3a9596f620e530acd
|
||||
9dcf2d2a11a11ea2cd0deeaaefadf0f89e11d775
|
||||
746b0d9ce63289c084e15aec92938fe7982f1ad3
|
||||
a79c0293dc63c6c82dfd15a20ee0005d867b2333
|
||||
4d7163b722e05ac266e79fcb1231e05583595a2c
|
||||
ac9a2a597da5fa378a0b0abb4eb77f7a62ebd41b
|
||||
930bbea0f399256f5128eb81092e43d0f897e034
|
||||
645791746e79b2f3118a0eca79dbbae6fa6191a4
|
||||
fb484633d7aba3da1567d717ff4a4dbc79a4eb9e
|
||||
da6244b48f6f1eccc9c21179f61cfd0a244e923f
|
||||
1549f7ae4dd388f58cd0df457fe0d4cbdf371da0
|
||||
1b087654e2239d22e59ceea5b386b34e766e6843
|
||||
5bc1f3aa8f8beb6593a90fdef01a6171a46410f1
|
||||
6827322d9802937defcc8deb55946d0cd1f81874
|
||||
326d45c8eb39455fd22535e046ce93a4df70b6ab
|
||||
3502dc0d2cdedb25940a10ebb6478286db1ceca8
|
||||
5e8892bf53634101c1efe46c9434ff8cdc0be82d
|
||||
69ccbbed36adc15861684226dbc3967f02e45a34
|
||||
165d19806b39d125d5910b4302c4810a86b9416c
|
||||
37c251f941adb5dd40f75bf554773ba23ddc2694
|
||||
0dce73e53721d64fa64f24ad79fbabc7825c4963
|
||||
1c1e8915b173d438f5fae7371bcc7836611307d2
|
||||
826b49d4adc0a57e7a3c9ef11d97198c3b3e15ad
|
||||
e7058e1aa29e3f7937b9f35bf7580bc22622e4ef
|
||||
ddd295f68851cf9e2c433c6f5b07b024f1c669f7
|
||||
0ff12ea0318d083d3a7cde42ce5ce8f416d2fc84
|
||||
7e2e2f2df8c01330f39e6a61f652062cf8e09dff
|
||||
bd78a1058ac9c9b420009a5163cda729b9ce9cfb
|
||||
3f18b7de0d2a27ba5b8b174cb9c8373cbef6053e
|
||||
13c2e41300898027689e574aaf7fede08d8b88fa
|
||||
14aa1ee8561953307b650caaa57eb89aac740c34
|
||||
a92ff82ec95460aef72fb5268430433986c8fc4e
|
||||
a46a8944af0c3d077e66a748a8ceb4dc65ad97ad
|
||||
87a589c2fc505c301766551163adc374d125375f
|
||||
9df681150de94c9413a937874392e1c61ca7fee6
|
||||
912ca4281a44c51a8dca18808c5efd25233493ed
|
||||
89ac7f7ba77fcd2393ac62201c2ef46bd3f6a8d2
|
||||
34c77170c098e829c7a2d1e00e3bbb3f42b47373
|
||||
cf81c3bd7861ca8e3567f0162434a3d7cfa4c059
|
||||
7fd90165e7478b034ddb45aa3db2eb8a00ce4036
|
||||
3226f192eda643b84805e528eaafd71fc89bf6c0
|
||||
8faa17baa69c5e8aa217e572bfc559490f77a113
|
||||
58e8241159616601da4f25cb3a84f20a118c5fa3
|
||||
ab9d521e1d88d656c3b9226f4065217eed9414d3
|
||||
3e4b4acf9f747c10912c1b5731df0b0be05a4b9d
|
||||
1c3407726079190f7b4513ddff854b4110396f36
|
||||
9186a3747ac9150c1f22e309a758eab1e1d4716c
|
||||
074d0881423783677eafb643e5337e856c06f4ca
|
||||
0da2ca590f32f1f8fb4b8dddaa32e3101731bc17
|
||||
e9aa2c103a71b86cb4c902b4ab226cf48b8cce42
|
||||
9206d28d699b093f1f21ec9850d0b5e1c12965ce
|
||||
45003492570044cd7e119d1c3c06345dbf3f47f6
|
||||
3769c7ea810bcb8238b881eecd204c9f71a59502
|
||||
46c2dc39ef7eaea68030a613558635d4bba07eb9
|
||||
f7534ac45eda041e4dfccb428f4d81e6e0f5b379
|
||||
d27da47f05141f358e5b044c9b604ca14250624e
|
||||
66c53697a1c9e56b3899735b1502ec035862d211
|
||||
a43d58594f59ee1bd83040276e9e2d199656fd04
|
||||
a740b28290bd2a2c978cff4844a708334d9a5f68
|
||||
8d458f5a3980431a0428f30cedc34eedcf272ec6
|
||||
3dccb730ee6c6a73f08bb540fbfd5f83d6e0bd39
|
||||
54f2cd35194aac7320aed073362b54ce3535917f
|
||||
1ebae7b1fa10b1e57168c7650099fe6ca85cc536
|
||||
3c834576aa91c21c407b6ac15d762952eaf5ea6e
|
||||
e207071f71b050cb3c1762b93dd4513da8890ed6
|
||||
c7fe2d0e2a8ad7f625c75b3c8c32137107f676bc
|
||||
82aeea0fc1ed0a5a8d64568fc0c4ae2e7baa2137
|
||||
8f249e8e923cbf7d756e0e9f2fd2a994e5a54dd6
|
||||
20c160a4cb7b095e310f3b35ce00ca73dafe4503
|
||||
152b03e5788842393ff89973c42bb820946cdfb5
|
||||
232dbb548fab2844d4e076bb944ec5f2c05044c7
|
||||
a172ed0972964dea6578bb0ac9a1a69ecdf983f3
|
||||
febc302f3f7495c651495fa2b5175d7ac581508e
|
||||
bdaa926f4c084a4dce01a6ec6c1fdfa0718772ea
|
||||
f14a4b2182660ddfa7c22f4698f0d75a19f3ac84
|
||||
634778d63b41a799978e5a34dbdd9fb1bce0a0d5
|
||||
260e07189e327c1a027d35eebf04e6e2623eaf9d
|
||||
6025e6e883bad414ed34f2f71af70b4d72bf3e36
|
||||
3c0ad6d68991961e2a72422fa4f69ed70d4ae6ab
|
||||
2bd977df8b6d3decfbe33f0c01ebfd5222787d77
|
||||
827b6db70630cdc4c6296440faac9d4ca66725e4
|
||||
f7d6bd4b1796b8f01581d84843ecb6849a93ffa5
|
||||
b5f8a3d03fd20f47ae73f8b5f249e90e8aecd91b
|
||||
4ed9706eb17fd600681eede6b2c6dd8a90dda538
|
||||
b18c27d6d8a9b26a1d038774030428d00eb5c078
|
||||
68eb07c273a29bf6bb4babbdc35fb107d5c553a6
|
||||
939cf7e129f56d802ba0efc2f17fa7318ae801f1
|
||||
4d0cb054b355c4d217d31271b12082f49d8ad6d1
|
||||
83057bc03c4b565d6bd2e5ab33cdb984c3b9cd31
|
||||
2162dcc8661b3e3be39e85e2e0e4f0969f20059d
|
||||
ac80debb5e053a31f3898dce585dc118bc6df8d5
|
||||
65616d2c62e13b0e9bda03e41812a00a49936a2d
|
||||
aedd0cb02d12cea2ebe54a7cfff9c53e4ac73c1f
|
||||
8ecb8d3840f6ee3df830e46d1c8c2a27f084edf5
|
||||
8ecb8d3840f6ee3df830e46d1c8c2a27f084edf5
|
||||
d37b857c055ae661e417f282fa97e3bb80063cb0
|
||||
8b054bebe1c61143e224e68f3986b6fca586a5df
|
||||
eca0b96f28afa764abad40d26f322a5748c7ef08
|
||||
02f4e9b5ac7a9a6923c64ae3deee0c7e27f37781
|
||||
0fd5cc3b6fe4992098139b901baf53182a4578b1
|
||||
32cd7b58640e3fc4322ac09435669b16da2a9852
|
||||
dc75e9e2f7955b744e2747e6ff01fe62ff9c87e0
|
||||
a748e6a8c6793d3a127edd892e5d007c848d9fb6
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
# Contribution guidelines
|
||||
|
||||
## General
|
||||
|
||||
### Issues
|
||||
|
||||
If you have a feature or bug fix you would like to contribute please check if
|
||||
there are any open issues describing your proposed addition. If there are open
|
||||
issues, make a comment stating you are working on fixing or implementing said
|
||||
issue. If not, then please open an issue describing your addition. Make sure to
|
||||
link your PR to an issue.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
Fill out the template as best you can. Make sure your tests pass. If you see a
|
||||
PR that isn't one you opened and want it introduced in the next release,
|
||||
give it a :thumbsup: on the PR description.
|
||||
|
||||
## Adding new Gitleaks rules
|
||||
|
||||
If you want to add a new rule to the [default Gitleaks configuration](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) then follow these steps.
|
||||
|
||||
1. Create a `cmd/generate/config/rules/{provider}.go` file.
|
||||
This file is used to generate a new Gitleaks rule.
|
||||
Let's look at `beamer.go` for example. Comments have been added for context.
|
||||
|
||||
```golang
|
||||
func Beamer() *config.Rule {
|
||||
// Define Rule
|
||||
r := config.Rule{
|
||||
// Human redable description of the rule
|
||||
Description: "Beamer API token",
|
||||
|
||||
// Unique ID for the rule
|
||||
RuleID: "beamer-api-token",
|
||||
|
||||
// Regex capture group for the actual secret
|
||||
SecretGroup: 1,
|
||||
|
||||
|
||||
// Regex used for detecting secrets. See regex section below for more details
|
||||
Regex: generateSemiGenericRegex([]string{"beamer"}, `b_[a-z0-9=_\-]{44}`),
|
||||
|
||||
// Keywords used for string matching on fragments (think of this as a prefilter)
|
||||
Keywords: []string{"beamer"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("beamer", "b_"+secrets.NewSecret(alphaNumericExtended("44"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
```
|
||||
|
||||
Feel free to use this example as a template when writing new rules.
|
||||
This file should be fairly self-explanatory except for a few items;
|
||||
regex and secret generation. To help with maintence, _most_ rules should
|
||||
be uniform. The functions,
|
||||
[`generateSemiGenericRegex`](https://github.com/zricethezav/gitleaks/blob/master/cmd/generate/config/rules/rule.go#L31) and [`generateUniqueTokenRegex`](https://github.com/zricethezav/gitleaks/blob/master/cmd/generate/config/rules/rule.go#L44) will generate rules
|
||||
that follow defined patterns.
|
||||
|
||||
The function signatures look like this:
|
||||
|
||||
```golang
|
||||
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp
|
||||
|
||||
func generateUniqueTokenRegex(secretRegex string) *regexp.Regexp
|
||||
```
|
||||
|
||||
`generateSemiGenericRegex` accepts a list of identifiers and a regex.
|
||||
The list of identifiers _should_ match the list of `Keywords` in the rule
|
||||
definition above. Both `identifiers` in the `generateSemiGenericRegex`
|
||||
function _and_ `Keywords` act as filters for Gitleaks telling the program
|
||||
"_at least one of these strings must be present to be considered a leak_"
|
||||
|
||||
`generateUniqueToken` just accepts a regex. If you are writing a rule for a
|
||||
token that is unique enough not to require an identifier then you can use
|
||||
this function. For example, Pulumi's API Token has the prefix `pul-` which is
|
||||
unique enough to use `generateUniqueToken`. But something like Beamer's API
|
||||
token that has a `b_` prefix is not unqiue enough to use `generateUniqueToken`,
|
||||
so instead we use `generateSemiGenericRegex` and require a `beamer`
|
||||
identifier is part of the rule.
|
||||
If a token's prefix has more than `3` characters then you could
|
||||
probably get away with using `generateUniqueToken`.
|
||||
|
||||
Last thing you'll want to hit before we move on from this file is the
|
||||
validation part. You can use `generateSampleSecret` to create a secret for the
|
||||
true positives (`tps` in the example above) used in `validate`.
|
||||
|
||||
1. Update `cmd/generate/config/main.go`. Add a line like
|
||||
`configRules = append(configRules, rules.Beamer())` in `main()`. Try and keep
|
||||
this alphabetically pretty please.
|
||||
|
||||
1. Change directories into `cmd/generate/config` and run `go run main.go`
|
||||
|
||||
```
|
||||
cd cmd/generate/config && go run main.go
|
||||
```
|
||||
|
||||
1. Check out your new rules in `config/gitleaks.toml` and see if everything looks good.
|
||||
|
||||
1. Open a PR
|
||||
+2
-11
@@ -4,21 +4,12 @@ COPY . .
|
||||
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}
|
||||
|
||||
FROM alpine:3.15.4
|
||||
FROM alpine:3.16
|
||||
RUN adduser -D gitleaks && \
|
||||
apk add --no-cache bash git openssh-client
|
||||
COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
|
||||
USER gitleaks
|
||||
|
||||
# default to avoid the follow error:
|
||||
# 11:09PM ERR fatal: unsafe repository ('/path' is owned by someone else)
|
||||
# 11:09PM ERR To add an exception for this directory, call:
|
||||
# 11:09PM ERR
|
||||
# 11:09PM ERR git config --global --add safe.directory /path
|
||||
# This means that when you run gitleaks from docker you must mount to /path
|
||||
# in order to avoid this error.
|
||||
|
||||
# TODO waiting to push this until I've thought a bit more about it
|
||||
# RUN git config --global --add safe.directory /path
|
||||
RUN git config --global --add safe.directory '*'
|
||||
|
||||
ENTRYPOINT ["gitleaks"]
|
||||
@@ -1,4 +1,5 @@
|
||||
# gitleaks
|
||||
|
||||
```
|
||||
┌─○───┐
|
||||
│ │╲ │
|
||||
@@ -7,7 +8,6 @@
|
||||
└─░───┘
|
||||
```
|
||||
|
||||
|
||||
<p align="left">
|
||||
<p align="left">
|
||||
<a href="https://github.com/zricethezav/gitleaks/actions/workflows/test.yml">
|
||||
@@ -16,6 +16,12 @@
|
||||
<a href="https://hub.docker.com/r/zricethezav/gitleaks">
|
||||
<img src="https://img.shields.io/docker/pulls/zricethezav/gitleaks.svg" />
|
||||
</a>
|
||||
<a href="https://www.jit.io/jit-open-source-gitleaks?utm_source=github&utm_medium=badge&utm_campaign=GitleaksReadme&utm_id=oss&items=item-secret-detection">
|
||||
<img src="https://img.shields.io/badge/Secured%20by-Jit-B8287F?style=?style=plastic" />
|
||||
</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">
|
||||
<img src="https://img.shields.io/twitter/follow/zricethezav?label=Follow%20zricethezav&style=social&color=blue" alt="Follow @zricethezav" />
|
||||
</a>
|
||||
@@ -24,10 +30,14 @@
|
||||
|
||||
Gitleaks is a SAST tool for **detecting** and **preventing** hardcoded secrets like passwords, api keys, and tokens in git repos. Gitleaks is an **easy-to-use, all-in-one solution** for detecting secrets, past or present, in your code.
|
||||
|
||||
[](https://asciinema.org/a/455683)
|
||||
| Demos |
|
||||
| ----------- |
|
||||
| CLI [](https://asciinema.org/a/455683)|
|
||||
| [Github-Action](https://github.com/gitleaks/gitleaks-action) |
|
||||
|
||||
## Getting Started
|
||||
Gitleaks can be installed using Homebrew, Docker, or Go. Gitleaks is also available in binary form for many popular platforms and OS types on the [releases page](https://github.com/zricethezav/gitleaks/releases). In addition, Gitleaks can be implemented as a pre-commit hook directly in your repo.
|
||||
|
||||
Gitleaks can be installed using Homebrew, Docker, or Go. Gitleaks is also available in binary form for many popular platforms and OS types on the [releases page](https://github.com/zricethezav/gitleaks/releases). In addition, Gitleaks can be implemented as a pre-commit hook directly in your repo or as a GitHub action using [Gitleaks-Action](https://github.com/gitleaks/gitleaks-action) (see demo above).
|
||||
|
||||
### MacOS
|
||||
|
||||
@@ -36,32 +46,63 @@ brew install gitleaks
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
#### DockerHub
|
||||
|
||||
```bash
|
||||
docker pull zricethezav/gitleaks:latest
|
||||
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
|
||||
|
||||
1. Download and install Go from https://golang.org/dl/
|
||||
2. Clone the repo
|
||||
|
||||
```bash
|
||||
git clone https://github.com/zricethezav/gitleaks.git
|
||||
```
|
||||
|
||||
3. Build the binary
|
||||
|
||||
```bash
|
||||
cd gitleaks
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
repos:
|
||||
- repo: https://github.com/zricethezav/gitleaks
|
||||
@@ -69,22 +110,27 @@ make build
|
||||
hooks:
|
||||
- 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)
|
||||
|
||||
3. Install with `pre-commit install`
|
||||
4. Now you're all set!
|
||||
|
||||
```
|
||||
➜ git commit -m "this commit contains a secret"
|
||||
Detect hardcoded secrets.................................................Failed
|
||||
```
|
||||
|
||||
Note: to disable the gitleaks pre-commit hook you can prepend `SKIP=gitleaks` to the commit command
|
||||
and it will skip running gitleaks
|
||||
|
||||
```
|
||||
➜ SKIP=gitleaks git commit -m "skip gitleaks check"
|
||||
Detect hardcoded secrets................................................Skipped
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
Usage:
|
||||
gitleaks [command]
|
||||
@@ -116,20 +162,24 @@ Use "gitleaks [command] --help" for more information about a command.
|
||||
```
|
||||
|
||||
### Commands
|
||||
|
||||
There are two commands you will use to detect secrets; `detect` and `protect`.
|
||||
|
||||
#### 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
|
||||
[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.
|
||||
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.
|
||||
|
||||
You can scan files and directories by using the `--no-git` option.
|
||||
|
||||
#### Protect
|
||||
|
||||
The `protect` command is used to uncommitted changes in a git repo. This command should be used on developer machines in accordance with
|
||||
[shifting left on security](https://cloud.google.com/architecture/devops/devops-tech-shifting-left-on-security).
|
||||
When running `protect` on a git repository, gitleaks will parse the output of a `git diff` command (you can see how this executed
|
||||
@@ -140,8 +190,10 @@ as a pre-commit.
|
||||
**NOTE**: the `protect` command can only be used on git repos, running `protect` on files or directories will result in an error message.
|
||||
|
||||
### Verify Findings
|
||||
|
||||
You can verify a finding found by gitleaks using a `git log` command.
|
||||
Example output:
|
||||
|
||||
```
|
||||
{
|
||||
"Description": "AWS",
|
||||
@@ -163,15 +215,19 @@ Example output:
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
We can use the following format to verify the leak:
|
||||
|
||||
```
|
||||
git log -L {StartLine,EndLine}:{File} {Commit}
|
||||
```
|
||||
|
||||
So in this example it would look like:
|
||||
|
||||
```
|
||||
git log -L 37,37:checks_test.go ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
|
||||
```
|
||||
|
||||
Which gives us:
|
||||
|
||||
```
|
||||
@@ -190,15 +246,34 @@ diff --git a/checks_test.go b/checks_test.go
|
||||
```
|
||||
|
||||
## Pre-Commit hook
|
||||
|
||||
You can run Gitleaks as a pre-commit hook by copying the example `pre-commit.py` script into
|
||||
your `.git/hooks/` directory.
|
||||
|
||||
## Configuration
|
||||
|
||||
Gitleaks offers a configuration format you can follow to write your own secret detection rules:
|
||||
|
||||
```toml
|
||||
# Title for the gitleaks configuration file.
|
||||
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
|
||||
# on how to detect secrets
|
||||
[[rules]]
|
||||
@@ -281,26 +356,39 @@ stopwords = [
|
||||
'''endpoint''',
|
||||
]
|
||||
```
|
||||
Refer to the default [gitleaks config](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) for examples and advice on writing regular expressions for secret detection.
|
||||
Refer to the default [gitleaks config](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) for examples or follow the [contributing guidelines](https://github.com/zricethezav/gitleaks/blob/master/README.md).
|
||||
|
||||
### Additional Configuration
|
||||
#### gitleaks:allow
|
||||
If you are knowingly committing a test secret that gitleaks will catch you can add a `gitleaks:allow` comment to that line which will instruct gitleaks
|
||||
to ignore that secret. Ex:
|
||||
```
|
||||
class CustomClass:
|
||||
discord_client_secret = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ' #gitleaks:allow
|
||||
|
||||
```
|
||||
|
||||
#### .gitleaksignore
|
||||
You can ignore specific findings by creating a `.gitleaksignore` file at the root of your repo. In release v8.10.0 Gitleaks added a `Fingerprint` value to the Gitleaks report. Each leak, or finding, has a Fingerprint that uniquely identifies a secret. Add this fingerprint to the `.gitleaksignore` file to ignore that specific secret. See Gitleaks' [.gitleaksignore](https://github.com/zricethezav/gitleaks/blob/master/.gitleaksignore) for an example.
|
||||
|
||||
|
||||
|
||||
## Secured by Jit
|
||||
|
||||
We use [Jit](https://www.jit.io/jit-open-source-gitleaks?utm_source=github&utm_medium=readme&utm_campaign=GitleaksReadme&utm_id=oss&items=item-secret-detection) to secure our codebase, to achieve fully automated, full-stack continuous security using the world's best OSS security tools.
|
||||
|
||||
## Sponsorships
|
||||
|
||||
<p align="left">
|
||||
<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>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
|
||||
## Exit Codes
|
||||
|
||||
You can always set the exit code when leaks are encountered with the --exit-code flag. Default exit codes below:
|
||||
|
||||
```
|
||||
0 - no leaks present
|
||||
1 - leaks or error encountered
|
||||
|
||||
@@ -71,6 +71,11 @@ func runDetect(cmd *cobra.Command, args []string) {
|
||||
log.Fatal().Err(err)
|
||||
}
|
||||
|
||||
// check for a .gitleaksignore file
|
||||
if info, err := os.Stat(filepath.Join(source, ".gitleaksignore")); !os.IsNotExist(err) && !info.IsDir() {
|
||||
detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore"))
|
||||
}
|
||||
|
||||
// set exit code
|
||||
exitCode, err := cmd.Flags().GetInt("exit-code")
|
||||
if err != nil {
|
||||
|
||||
+69
-13
@@ -16,9 +16,12 @@ const (
|
||||
|
||||
func main() {
|
||||
configRules := []*config.Rule{}
|
||||
configRules = append(configRules, rules.AdafruitAPIKey())
|
||||
configRules = append(configRules, rules.AdobeClientID())
|
||||
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.AlibabaSecretKey())
|
||||
configRules = append(configRules, rules.AsanaClientID())
|
||||
@@ -27,42 +30,60 @@ func main() {
|
||||
configRules = append(configRules, rules.AWS())
|
||||
configRules = append(configRules, rules.BitBucketClientID())
|
||||
configRules = append(configRules, rules.BitBucketClientSecret())
|
||||
configRules = append(configRules, rules.BittrexAccessKey())
|
||||
configRules = append(configRules, rules.BittrexSecretKey())
|
||||
configRules = append(configRules, rules.Beamer())
|
||||
configRules = append(configRules, rules.CodecovAccessToken())
|
||||
configRules = append(configRules, rules.CoinbaseAccessToken())
|
||||
configRules = append(configRules, rules.Clojars())
|
||||
configRules = append(configRules, rules.ConfluentAccessToken())
|
||||
configRules = append(configRules, rules.ConfluentSecretKey())
|
||||
configRules = append(configRules, rules.Contentful())
|
||||
configRules = append(configRules, rules.Databricks())
|
||||
configRules = append(configRules, rules.DatadogtokenAccessToken())
|
||||
configRules = append(configRules, rules.DiscordAPIToken())
|
||||
configRules = append(configRules, rules.DiscordClientID())
|
||||
configRules = append(configRules, rules.DiscordClientSecret())
|
||||
configRules = append(configRules, rules.Doppler())
|
||||
configRules = append(configRules, rules.DropBoxAPISecret())
|
||||
configRules = append(configRules, rules.DropBoxLongLivedAPIToken())
|
||||
configRules = append(configRules, rules.DropBoxShortLivedAPIToken())
|
||||
configRules = append(configRules, rules.Doppler())
|
||||
configRules = append(configRules, rules.DroneciAccessToken())
|
||||
configRules = append(configRules, rules.Duffel())
|
||||
configRules = append(configRules, rules.Dynatrace())
|
||||
configRules = append(configRules, rules.EasyPost())
|
||||
configRules = append(configRules, rules.EasyPostTestAPI())
|
||||
configRules = append(configRules, rules.EtsyAccessToken())
|
||||
configRules = append(configRules, rules.Facebook())
|
||||
configRules = append(configRules, rules.FastlyAPIToken())
|
||||
configRules = append(configRules, rules.FinicityClientSecret())
|
||||
configRules = append(configRules, rules.FinicityAPIToken())
|
||||
configRules = append(configRules, rules.FlickrAccessToken())
|
||||
configRules = append(configRules, rules.FinnhubAccessToken())
|
||||
configRules = append(configRules, rules.FlutterwavePublicKey())
|
||||
configRules = append(configRules, rules.FlutterwaveSecretKey())
|
||||
configRules = append(configRules, rules.FlutterwaveSecretKey())
|
||||
configRules = append(configRules, rules.FlutterwaveEncKey())
|
||||
configRules = append(configRules, rules.FrameIO())
|
||||
configRules = append(configRules, rules.GenericCredential())
|
||||
configRules = append(configRules, rules.FreshbooksAccessToken())
|
||||
configRules = append(configRules, rules.GoCardless())
|
||||
// TODO figure out what makes sense for GCP
|
||||
// configRules = append(configRules, rules.GCPServiceAccount())
|
||||
configRules = append(configRules, rules.GCPAPIKey())
|
||||
configRules = append(configRules, rules.GitHubPat())
|
||||
configRules = append(configRules, rules.GitHubOauth())
|
||||
configRules = append(configRules, rules.GitHubApp())
|
||||
configRules = append(configRules, rules.GitHubRefresh())
|
||||
configRules = append(configRules, rules.Gitlab())
|
||||
configRules = append(configRules, rules.GitterAccessToken())
|
||||
configRules = append(configRules, rules.Hashicorp())
|
||||
configRules = append(configRules, rules.Heroku())
|
||||
configRules = append(configRules, rules.HubSpot())
|
||||
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.LinearClientSecret())
|
||||
configRules = append(configRules, rules.LinkedinClientID())
|
||||
@@ -74,52 +95,87 @@ func main() {
|
||||
configRules = append(configRules, rules.MailGunPrivateAPIToken())
|
||||
configRules = append(configRules, rules.MailGunSigningKey())
|
||||
configRules = append(configRules, rules.MapBox())
|
||||
configRules = append(configRules, rules.MattermostAccessToken())
|
||||
configRules = append(configRules, rules.MessageBirdAPIToken())
|
||||
configRules = append(configRules, rules.MessageBirdClientID())
|
||||
configRules = append(configRules, rules.NetlifyAccessToken())
|
||||
configRules = append(configRules, rules.NewRelicUserID())
|
||||
configRules = append(configRules, rules.NewRelicUserKey())
|
||||
configRules = append(configRules, rules.NewRelicBrowserAPIKey())
|
||||
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.PlanetScaleToken())
|
||||
configRules = append(configRules, rules.PlanetScaleAPIToken())
|
||||
configRules = append(configRules, rules.PlanetScaleOAuthToken())
|
||||
configRules = append(configRules, rules.PostManAPI())
|
||||
configRules = append(configRules, rules.PrivateKey())
|
||||
configRules = append(configRules, rules.PulumiAPIToken())
|
||||
configRules = append(configRules, rules.PyPiUploadToken())
|
||||
configRules = append(configRules, rules.RubyGemsAPIToken())
|
||||
configRules = append(configRules, rules.RapidAPIAccessToken())
|
||||
configRules = append(configRules, rules.SendbirdAccessID())
|
||||
configRules = append(configRules, rules.SendbirdAccessToken())
|
||||
configRules = append(configRules, rules.SendGridAPIToken())
|
||||
configRules = append(configRules, rules.SendInBlueAPIToken())
|
||||
configRules = append(configRules, rules.SentryAccessToken())
|
||||
configRules = append(configRules, rules.ShippoAPIToken())
|
||||
configRules = append(configRules, rules.ShopifyAccessToken())
|
||||
configRules = append(configRules, rules.ShopifyCustomAccessToken())
|
||||
configRules = append(configRules, rules.ShopifyPrivateAppAccessToken())
|
||||
configRules = append(configRules, rules.ShopifySharedSecret())
|
||||
configRules = append(configRules, rules.SidekiqSecret())
|
||||
configRules = append(configRules, rules.SidekiqSensitiveUrl())
|
||||
configRules = append(configRules, rules.SlackAccessToken())
|
||||
configRules = append(configRules, rules.SlackWebHook())
|
||||
configRules = append(configRules, rules.StripeAccessToken())
|
||||
configRules = append(configRules, rules.SquareAccessToken())
|
||||
configRules = append(configRules, rules.SquareSpaceAccessToken())
|
||||
configRules = append(configRules, rules.SumoLogicAccessID())
|
||||
configRules = append(configRules, rules.SumoLogicAccessToken())
|
||||
configRules = append(configRules, rules.TravisCIAccessToken())
|
||||
configRules = append(configRules, rules.Twilio())
|
||||
configRules = append(configRules, rules.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.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())
|
||||
|
||||
// ensure rules have unique ids
|
||||
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
|
||||
}
|
||||
config := config.Config{
|
||||
Rules: configRules,
|
||||
Allowlist: config.Allowlist{
|
||||
StopWords: rules.DefaultStopWords,
|
||||
},
|
||||
Rules: ruleLookUp,
|
||||
}
|
||||
tmpl, err := template.ParseFiles(templatePath)
|
||||
if err != nil {
|
||||
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 {
|
||||
log.Fatal().Err(err).Msg("Failed to create rules.toml")
|
||||
}
|
||||
tmpl.Execute(f, config)
|
||||
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
func AdobeClientID() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Adobe Client ID (Oauth Web)",
|
||||
Description: "Adobe Client ID (OAuth Web)",
|
||||
RuleID: "adobe-client-id",
|
||||
Regex: generateSemiGenericRegex([]string{"adobe"}, hex("32")),
|
||||
SecretGroup: 1,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func Airtable() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Airtable API Key",
|
||||
RuleID: "airtable-api-key",
|
||||
Regex: generateSemiGenericRegex([]string{"airtable"}, alphaNumeric("17")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"airtable"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("airtable", secrets.NewSecret(alphaNumeric("17"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
@@ -28,6 +28,7 @@ func AsanaClientSecret() *config.Rule {
|
||||
Description: "Asana Client Secret",
|
||||
RuleID: "asana-client-secret",
|
||||
Regex: generateSemiGenericRegex([]string{"asana"}, alphaNumeric("32")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"asana"},
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,10 @@ func Atlassian() *config.Rule {
|
||||
r := config.Rule{
|
||||
Description: "Atlassian API token",
|
||||
RuleID: "atlassian-api-token",
|
||||
Regex: generateSemiGenericRegex([]string{"atlassian", "confluence"}, alphaNumeric("24")),
|
||||
Regex: generateSemiGenericRegex([]string{
|
||||
"atlassian", "confluence", "jira"}, alphaNumeric("24")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"atlassian", "confluence"},
|
||||
Keywords: []string{"atlassian", "confluence", "jira"},
|
||||
}
|
||||
|
||||
// validate
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
func BitBucketClientID() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "BitBucket Client ID",
|
||||
Description: "Bitbucket Client ID",
|
||||
RuleID: "bitbucket-client-id",
|
||||
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumeric("32")),
|
||||
SecretGroup: 1,
|
||||
@@ -25,7 +25,7 @@ func BitBucketClientID() *config.Rule {
|
||||
func BitBucketClientSecret() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "BitBucket Client Secret",
|
||||
Description: "Bitbucket Client Secret",
|
||||
RuleID: "bitbucket-client-secret",
|
||||
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumericExtended("64")),
|
||||
SecretGroup: 1,
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func BittrexAccessKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Bittrex Access Key",
|
||||
RuleID: "bittrex-access-key",
|
||||
Regex: generateSemiGenericRegex([]string{"bittrex"}, alphaNumeric("32")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"bittrex"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("bittrex", secrets.NewSecret(alphaNumeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func BittrexSecretKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Bittrex Secret Key",
|
||||
RuleID: "bittrex-secret-key",
|
||||
Regex: generateSemiGenericRegex([]string{"bittrex"}, alphaNumeric("32")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"bittrex"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("bittrex", secrets.NewSecret(alphaNumeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func CodecovAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "codecov-access-token",
|
||||
Description: "Codecov Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"codecov"}, alphaNumeric("32")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"codecov",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("codecov", secrets.NewSecret(alphaNumeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func CoinbaseAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "coinbase-access-token",
|
||||
Description: "Coinbase Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"coinbase"},
|
||||
alphaNumericExtendedShort("64")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"coinbase",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("coinbase",
|
||||
secrets.NewSecret(alphaNumericExtendedShort("64"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -1,27 +1,39 @@
|
||||
# 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.
|
||||
# Rules and allowlists are defined within this file.
|
||||
# Rules instruct gitleaks on what should be considered a secret.
|
||||
# Allowlists instruct gitleaks on what is allowed, i.e. not a secret.
|
||||
|
||||
title = "gitleaks config"
|
||||
|
||||
[allowlist]
|
||||
description = "global allow lists"
|
||||
regexes = [
|
||||
'''219-09-9999''',
|
||||
'''078-05-1120''',
|
||||
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
|
||||
]
|
||||
paths = [
|
||||
'''gitleaks.toml''',
|
||||
'''(.*?)(jpg|gif|doc|pdf|bin|svg|socket)$''',
|
||||
'''(go.mod|go.sum)$'''
|
||||
]
|
||||
stopwords = [{{ range $i, $stopword := .Allowlist.StopWords }}
|
||||
'''{{ $stopword }}''',{{ end }}
|
||||
'''(.*?)(jpg|gif|doc|docx|zip|xls|pdf|bin|svg|socket)$''',
|
||||
'''(go.mod|go.sum)$''',
|
||||
'''node_modules''',
|
||||
'''vendor''',
|
||||
]
|
||||
|
||||
{{ 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}}"
|
||||
regex = '''{{$rule.Regex}}'''
|
||||
secretGroup = {{ $rule.SecretGroup }}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func ConfluentSecretKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "confluent-secret-key",
|
||||
Description: "Confluent Secret Key",
|
||||
Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("64")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"confluent",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("64"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func ConfluentAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "confluent-access-token",
|
||||
Description: "Confluent Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("16")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"confluent",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("16"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func DatadogtokenAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "datadog-access-token",
|
||||
Description: "Datadog Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"datadog"},
|
||||
alphaNumeric("40")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"datadog",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("datadog", secrets.NewSecret(alphaNumeric("40"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func DroneciAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "droneci-access-token",
|
||||
Description: "Droneci Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"droneci"}, alphaNumeric("32")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"droneci",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("droneci", secrets.NewSecret(alphaNumeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -9,7 +9,7 @@ func DropBoxAPISecret() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Dropbox API secret",
|
||||
RuleID: "doppler-api-token",
|
||||
RuleID: "dropbox-api-token",
|
||||
Regex: generateSemiGenericRegex([]string{"dropbox"}, alphaNumeric("15")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"dropbox"},
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func EtsyAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "etsy-access-token",
|
||||
Description: "Etsy Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"etsy"}, alphaNumeric("24")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"etsy",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("etsy", secrets.NewSecret(alphaNumeric("24"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
func Facebook() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "facebook",
|
||||
Description: "Facebook",
|
||||
RuleID: "facebook",
|
||||
Regex: generateSemiGenericRegex([]string{"facebook"}, hex("32")),
|
||||
SecretGroup: 1,
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func FinnhubAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "finnhub-access-token",
|
||||
Description: "Finnhub Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"finnhub"}, alphaNumeric("20")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"finnhub",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("finnhub", secrets.NewSecret(alphaNumeric("20"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func FlickrAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "flickr-access-token",
|
||||
Description: "Flickr Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"flickr"}, alphaNumeric("32")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"flickr",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("flickr", secrets.NewSecret(alphaNumeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -26,8 +26,8 @@ func FlutterwavePublicKey() *config.Rule {
|
||||
func FlutterwaveSecretKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Finicity Secret Key",
|
||||
RuleID: "flutterwave-public-key",
|
||||
Description: "Flutterwave Secret Key",
|
||||
RuleID: "flutterwave-secret-key",
|
||||
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{32}-X`),
|
||||
Keywords: []string{"FLWSECK_TEST"},
|
||||
}
|
||||
@@ -42,8 +42,8 @@ func FlutterwaveSecretKey() *config.Rule {
|
||||
func FlutterwaveEncKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Finicity Secret Key",
|
||||
RuleID: "flutterwave-public-key",
|
||||
Description: "Flutterwave Encryption Key",
|
||||
RuleID: "flutterwave-encryption-key",
|
||||
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{12}`),
|
||||
Keywords: []string{"FLWSECK_TEST"},
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
"regexp"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
@@ -22,3 +23,22 @@ func GCPServiceAccount() *config.Rule {
|
||||
}
|
||||
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",
|
||||
Regex: generateSemiGenericRegex([]string{
|
||||
"key",
|
||||
"api[^Version]",
|
||||
"api",
|
||||
"token",
|
||||
"pat",
|
||||
"secret",
|
||||
"client",
|
||||
"passwd",
|
||||
"password",
|
||||
"auth",
|
||||
"access",
|
||||
}, `[0-9a-z\-_.=]{10,150}`),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
@@ -26,11 +27,15 @@ func GenericCredential() *config.Rule {
|
||||
"token",
|
||||
"secret",
|
||||
"client",
|
||||
"pat",
|
||||
"passwd",
|
||||
"password",
|
||||
"auth",
|
||||
"access",
|
||||
},
|
||||
Entropy: 3.5,
|
||||
Allowlist: config.Allowlist{
|
||||
StopWords: DefaultStopWords,
|
||||
},
|
||||
Entropy: 3.7,
|
||||
}
|
||||
|
||||
// validate
|
||||
@@ -39,10 +44,12 @@ func GenericCredential() *config.Rule {
|
||||
generateSampleSecret("generic", "Zf3D0LXCM3EIMbgJpUNnkRtOfOueHznB"),
|
||||
`"client_id" : "0afae57f3ccfd9d7f5767067bc48b30f719e271ba470488056e37ab35d4b6506"`,
|
||||
`"client_secret" : "6da89121079f83b2eb6acccf8219ea982c3d79bccc3e9c6a85856480661f8fde",`,
|
||||
// TODO add more
|
||||
}
|
||||
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)
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
func Gitlab() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Gitlab Personal Access Token",
|
||||
Description: "GitLab Personal Access Token",
|
||||
RuleID: "gitlab-pat",
|
||||
Regex: regexp.MustCompile(`glpat-[0-9a-zA-Z\-\_]{20}`),
|
||||
Keywords: []string{"glpat-"},
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func GitterAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "gitter-access-token",
|
||||
Description: "Gitter Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"gitter"},
|
||||
alphaNumericExtendedShort("40")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"gitter",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("gitter",
|
||||
secrets.NewSecret(alphaNumericExtendedShort("40"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -11,6 +11,7 @@ func GoCardless() *config.Rule {
|
||||
RuleID: "gocardless-api-token",
|
||||
Description: "GoCardless API token",
|
||||
Regex: generateSemiGenericRegex([]string{"gocardless"}, `live_(?i)[a-z0-9\-_=]{40}`),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"live_",
|
||||
"gocardless",
|
||||
|
||||
@@ -9,8 +9,7 @@ func Heroku() *config.Rule {
|
||||
r := config.Rule{
|
||||
Description: "Heroku API Key",
|
||||
RuleID: "heroku-api-key",
|
||||
Regex: generateSemiGenericRegex([]string{"heroku"},
|
||||
`[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}`),
|
||||
Regex: generateSemiGenericRegex([]string{"heroku"}, hex8_4_4_4_12()),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"heroku"},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func JWT() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "JSON Web Token",
|
||||
RuleID: "jwt",
|
||||
Regex: generateUniqueTokenRegex(`ey[0-9a-z]{30,34}\.ey[0-9a-z-\/_]{30,500}\.[0-9a-zA-Z-\/_]{10,200}`),
|
||||
Keywords: []string{"ey"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{`eyJhbGciOieeeiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwic3ViZSI6IjEyMzQ1Njc4OTAiLCJuYW1lZWEiOiJKb2huIERvZSIsInN1ZmV3YWZiIjoiMTIzNDU2Nzg5MCIsIm5hbWVmZWF3ZnciOiJKb2huIERvZSIsIm5hbWVhZmV3ZmEiOiJKb2huIERvZSIsInN1ZndhZndlYWIiOiIxMjM0NTY3ODkwIiwibmFtZWZ3YWYiOiJKb2huIERvZSIsInN1YmZ3YWYiOiIxMjM0NTY3ODkwIiwibmFtZndhZSI6IkpvaG4gRG9lIiwiaWZ3YWZhYXQiOjE1MTYyMzkwMjJ9.a_5icKBDo-8EjUlrfvz2k2k-FYaindQ0DEYNrlsnRG0
|
||||
`, // gitleaks:allow
|
||||
`JWT := eyJhbGciOieeeiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwic3ViZSI6IjEyMzQ1Njc4OTAiLCJuYW1lZWEiOiJKb2huIERvZSIsInN1ZmV3YWZiIjoiMTIzNDU2Nzg5MCIsIm5hbWVmZWF3ZnciOiJKb2huIERvZSIsIm5hbWVhZmV3ZmEiOiJKb2huIERvZSIsInN1ZndhZndlYWIiOiIxMjM0NTY3ODkwIiwibmFtZWZ3YWYiOiJKb2huIERvZSIsInN1YmZ3YWYiOiIxMjM0NTY3ODkwIiwibmFtZndhZSI6IkpvaG4gRG9lIiwiaWZ3YWZhYXQiOjE1MTYyMzkwMjJ9.a_5icKBDo-8EjUlrfvz2k2k-FYaindQ0DEYNrlsnRG0`, // gitleaks:allow
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func KrakenAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "kraken-access-token",
|
||||
Description: "Kraken Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"kraken"},
|
||||
alphaNumericExtendedLong("80,90")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"kraken",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("kraken",
|
||||
secrets.NewSecret(alphaNumericExtendedLong("80,90"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func KucoinAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "kucoin-access-token",
|
||||
Description: "Kucoin Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"kucoin"}, hex("24")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"kucoin",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("kucoin", secrets.NewSecret(hex("24"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func KucoinSecretKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "kucoin-secret-key",
|
||||
Description: "Kucoin Secret Key",
|
||||
Regex: generateSemiGenericRegex([]string{"kucoin"}, hex8_4_4_4_12()),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"kucoin",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("kucoin", secrets.NewSecret(hex8_4_4_4_12())),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func LaunchDarklyAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "launchdarkly-access-token",
|
||||
Description: "Launchdarkly Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"launchdarkly"}, alphaNumericExtended("40")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"launchdarkly",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("launchdarkly", secrets.NewSecret(alphaNumericExtended("40"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -30,6 +30,7 @@ func LinearClientSecret() *config.Rule {
|
||||
RuleID: "linear-client-secret",
|
||||
Regex: generateSemiGenericRegex([]string{"linear"}, hex("32")),
|
||||
Keywords: []string{"linear"},
|
||||
SecretGroup: 1,
|
||||
}
|
||||
|
||||
// validate
|
||||
|
||||
@@ -11,6 +11,7 @@ func LobPubAPIToken() *config.Rule {
|
||||
Description: "Lob Publishable API Key",
|
||||
RuleID: "lob-pub-api-key",
|
||||
Regex: generateSemiGenericRegex([]string{"lob"}, `(test|live)_pub_[a-f0-9]{31}`),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"test_pub",
|
||||
"live_pub",
|
||||
@@ -35,6 +36,7 @@ func LobAPIToken() *config.Rule {
|
||||
"test_",
|
||||
"live_",
|
||||
},
|
||||
SecretGroup: 1,
|
||||
}
|
||||
|
||||
// validate
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func MattermostAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "mattermost-access-token",
|
||||
Description: "Mattermost Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"mattermost"}, alphaNumeric("26")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"mattermost",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("mattermost", secrets.NewSecret(alphaNumeric("26"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -41,7 +41,7 @@ func MessageBirdClientID() *config.Rule {
|
||||
"messagebird",
|
||||
"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,
|
||||
Keywords: []string{
|
||||
"messagebird",
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func NetlifyAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "netlify-access-token",
|
||||
Description: "Netlify Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"netlify"},
|
||||
alphaNumericExtended("40,46")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"netlify",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("netlify", secrets.NewSecret(alphaNumericExtended("40,46"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func NytimesAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "nytimes-access-token",
|
||||
Description: "Nytimes Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{
|
||||
"nytimes", "new-york-times,", "newyorktimes"},
|
||||
alphaNumericExtended("32")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"nytimes",
|
||||
"new-york-times",
|
||||
"newyorktimes",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("nytimes", secrets.NewSecret(alphaNumeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func OktaAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "okta-access-token",
|
||||
Description: "Okta Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"okta"},
|
||||
alphaNumericExtended("42")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"okta",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("okta", secrets.NewSecret(alphaNumeric("42"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func PlaidAccessID() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "plaid-client-id",
|
||||
Description: "Plaid Client ID",
|
||||
Regex: generateSemiGenericRegex([]string{"plaid"}, alphaNumeric("24")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"plaid",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("plaid", secrets.NewSecret(alphaNumeric("24"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func PlaidSecretKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "plaid-secret-key",
|
||||
Description: "Plaid Secret key",
|
||||
Regex: generateSemiGenericRegex([]string{"plaid"}, alphaNumeric("30")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"plaid",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("plaid", secrets.NewSecret(alphaNumeric("30"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func PlaidAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "plaid-api-token",
|
||||
Description: "Plaid API Token",
|
||||
Regex: generateSemiGenericRegex([]string{"plaid"},
|
||||
fmt.Sprintf("access-(?:sandbox|development|production)-%s", hex8_4_4_4_12())),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"plaid",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("plaid", secrets.NewSecret(fmt.Sprintf("access-(?:sandbox|development|production)-%s", hex8_4_4_4_12()))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -10,7 +10,7 @@ func PlanetScalePassword() *config.Rule {
|
||||
r := config.Rule{
|
||||
RuleID: "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,
|
||||
Keywords: []string{
|
||||
"pscale_pw_",
|
||||
@@ -19,17 +19,19 @@ func PlanetScalePassword() *config.Rule {
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
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, nil)
|
||||
}
|
||||
|
||||
func PlanetScaleToken() *config.Rule {
|
||||
func PlanetScaleAPIToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "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,
|
||||
Keywords: []string{
|
||||
"pscale_tkn_",
|
||||
@@ -38,7 +40,30 @@ func PlanetScaleToken() *config.Rule {
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
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, 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)
|
||||
}
|
||||
@@ -12,12 +12,17 @@ func PrivateKey() *config.Rule {
|
||||
Description: "Private Key",
|
||||
RuleID: "private-key",
|
||||
Regex: regexp.MustCompile(`(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY-----[\s\S-]*KEY----`),
|
||||
Keywords: []string{"-----BEGIN PRIVATE"},
|
||||
Keywords: []string{"-----BEGIN"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{`-----BEGIN PRIVATE KEY-----
|
||||
anything
|
||||
-----END PRIVATE KEY-----`} // gitleaks:allow
|
||||
-----END PRIVATE KEY-----`,
|
||||
`-----BEGIN RSA PRIVATE KEY-----
|
||||
abcdefghijklmnopqrstuvwxyz
|
||||
-----END RSA PRIVATE KEY-----
|
||||
`,
|
||||
} // 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 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)
|
||||
}
|
||||
@@ -16,7 +16,7 @@ const (
|
||||
|
||||
// identifier prefix (just an ignore group)
|
||||
identifierPrefix = `(?:`
|
||||
identifierSuffix = `)(?:[0-9a-z\-_\s.]{0,20})(?:[\s|']|[\s|"]){0,3}`
|
||||
identifierSuffix = `)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}`
|
||||
|
||||
// commonly used assignment operators or function call
|
||||
operator = `(?:=|>|:=|\|\|:|<=|=>|:)`
|
||||
@@ -25,17 +25,9 @@ const (
|
||||
// \x60 = `
|
||||
secretPrefixUnique = `\b(`
|
||||
secretPrefix = `(?:'|\"|\s|=|\x60){0,5}(`
|
||||
secretSuffix = `)(?:['|\"|\n|\r|\s|\x60]|$)`
|
||||
secretSuffix = `)(?:['|\"|\n|\r|\s|\x60|;]|$)`
|
||||
)
|
||||
|
||||
var DefaultStopWords = []string{
|
||||
"client",
|
||||
"endpoint",
|
||||
"vpn",
|
||||
"_ec2_",
|
||||
"aws_",
|
||||
}
|
||||
|
||||
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp {
|
||||
var sb strings.Builder
|
||||
sb.WriteString(caseInsensitive)
|
||||
@@ -70,21 +62,20 @@ func validate(r config.Rule, truePositives []string, falsePositives []string) *c
|
||||
}
|
||||
r.Keywords = keywords
|
||||
|
||||
rules := make(map[string]config.Rule)
|
||||
rules[r.RuleID] = r
|
||||
d := detect.NewDetector(config.Config{
|
||||
Rules: []*config.Rule{&r},
|
||||
Rules: rules,
|
||||
Keywords: keywords,
|
||||
Allowlist: config.Allowlist{
|
||||
StopWords: DefaultStopWords,
|
||||
},
|
||||
})
|
||||
for _, tp := range truePositives {
|
||||
if len(d.DetectString(tp)) != 1 {
|
||||
log.Fatal().Msgf("Failed to validate (tp) %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)
|
||||
log.Fatal().Msgf("Failed to validate (fp) [%s]", r.RuleID)
|
||||
}
|
||||
}
|
||||
return &r
|
||||
@@ -102,6 +93,18 @@ 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)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func SentryAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "sentry-access-token",
|
||||
Description: "Sentry Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"sentry"}, hex("64")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"sentry",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("sentry", secrets.NewSecret(hex("64"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func SidekiqSecret() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Sidekiq Secret",
|
||||
RuleID: "sidekiq-secret",
|
||||
SecretGroup: 1,
|
||||
Regex: generateSemiGenericRegex([]string{"BUNDLE_ENTERPRISE__CONTRIBSYS__COM", "BUNDLE_GEMS__CONTRIBSYS__COM"},
|
||||
`[a-f0-9]{8}:[a-f0-9]{8}`),
|
||||
Keywords: []string{"BUNDLE_ENTERPRISE__CONTRIBSYS__COM", "BUNDLE_GEMS__CONTRIBSYS__COM"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
"BUNDLE_ENTERPRISE__CONTRIBSYS__COM: cafebabe:deadbeef",
|
||||
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef",
|
||||
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM = cafebabe:deadbeef",
|
||||
"BUNDLE_GEMS__CONTRIBSYS__COM: \"cafebabe:deadbeef\"",
|
||||
"export BUNDLE_GEMS__CONTRIBSYS__COM=\"cafebabe:deadbeef\"",
|
||||
"export BUNDLE_GEMS__CONTRIBSYS__COM = \"cafebabe:deadbeef\"",
|
||||
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;",
|
||||
"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef && echo 'hello world'",
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func SidekiqSensitiveUrl() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Sidekiq Sensitive URL",
|
||||
RuleID: "sidekiq-sensitive-url",
|
||||
SecretGroup: 2,
|
||||
Regex: regexp.MustCompile(`(?i)\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)`),
|
||||
Keywords: []string{"gems.contribsys.com", "enterprise.contribsys.com"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
"https://cafebabe:deadbeef@gems.contribsys.com/",
|
||||
"https://cafebabe:deadbeef@gems.contribsys.com",
|
||||
"https://cafeb4b3:d3adb33f@enterprise.contribsys.com/",
|
||||
"https://cafeb4b3:d3adb33f@enterprise.contribsys.com",
|
||||
"http://cafebabe:deadbeef@gems.contribsys.com/",
|
||||
"http://cafebabe:deadbeef@gems.contribsys.com",
|
||||
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com/",
|
||||
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com",
|
||||
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com#heading1",
|
||||
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com?param1=true¶m2=false",
|
||||
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80",
|
||||
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80/path?param1=true¶m2=false#heading1",
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func SlackWebHook() *config.Rule {
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
"https://hooks.slack.com/services/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", // gitleaks:allow
|
||||
"https://hooks.slack.com/services/" + secrets.NewSecret(alphaNumeric("44")), // gitleaks:allow
|
||||
}
|
||||
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
@@ -0,0 +1,46 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func SumoLogicAccessID() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "sumologic-access-id",
|
||||
Description: "SumoLogic Access ID",
|
||||
Regex: generateSemiGenericRegex([]string{"sumo"},
|
||||
alphaNumeric("14")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"sumo",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("sumo", secrets.NewSecret(alphaNumeric("14"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func SumoLogicAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "sumologic-access-token",
|
||||
Description: "SumoLogic Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"sumo"},
|
||||
alphaNumeric("64")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"sumo",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("sumo", secrets.NewSecret(alphaNumeric("64"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func TravisCIAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "travisci-access-token",
|
||||
Description: "Travis CI Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"travis"}, alphaNumeric("22")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"travis",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("travis", secrets.NewSecret(alphaNumeric("22"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func TrelloAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "trello-access-token",
|
||||
Description: "Trello Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"trello"}, `[a-zA-Z-0-9]{32}`),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"trello",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("trello", secrets.NewSecret(`[a-zA-Z-0-9]{32}`)),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -5,20 +5,87 @@ import (
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func Twitter() *config.Rule {
|
||||
func TwitterAPIKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "twitter",
|
||||
RuleID: "twitter",
|
||||
Regex: generateSemiGenericRegex([]string{"twitter"}, hex("35,44")),
|
||||
Description: "Twitter API Key",
|
||||
RuleID: "twitter-api-key",
|
||||
Regex: generateSemiGenericRegex([]string{"twitter"}, alphaNumeric("25")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"twitter"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
"twitterToken := \"" + secrets.NewSecret(hex("36")) + "aaaa\"",
|
||||
"twitterToken := `" + secrets.NewSecret(hex("36")) + "aaaa`",
|
||||
generateSampleSecret("twitter", secrets.NewSecret(alphaNumeric("25"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func TwitterAPISecret() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Twitter API Secret",
|
||||
RuleID: "twitter-api-secret",
|
||||
Regex: generateSemiGenericRegex([]string{"twitter"}, alphaNumeric("50")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"twitter"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("twitter", secrets.NewSecret(alphaNumeric("50"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func TwitterBearerToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Twitter Bearer Token",
|
||||
RuleID: "twitter-bearer-token",
|
||||
Regex: generateSemiGenericRegex([]string{"twitter"}, "A{22}[a-zA-Z0-9%]{80,100}"),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"twitter"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("twitter", secrets.NewSecret("A{22}[a-zA-Z0-9%]{80,100}")),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func TwitterAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Twitter Access Token",
|
||||
RuleID: "twitter-access-token",
|
||||
Regex: generateSemiGenericRegex([]string{"twitter"}, "[0-9]{15,25}-[a-zA-Z0-9]{20,40}"),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"twitter"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("twitter", secrets.NewSecret("[0-9]{15,25}-[a-zA-Z0-9]{20,40}")),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func TwitterAccessSecret() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Twitter Access Secret",
|
||||
RuleID: "twitter-access-secret",
|
||||
Regex: generateSemiGenericRegex([]string{"twitter"}, alphaNumeric("45")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"twitter"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("twitter", secrets.NewSecret(alphaNumeric("45"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func VaultServiceToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Vault Service Token",
|
||||
RuleID: "vault-service-token",
|
||||
Regex: generateUniqueTokenRegex(`hvs\.[a-z0-9_-]{90,100}`),
|
||||
Keywords: []string{"hvs"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("vault", "hvs."+secrets.NewSecret(alphaNumericExtendedShort("90"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func VaultBatchToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Vault Batch Token",
|
||||
RuleID: "vault-batch-token",
|
||||
Regex: generateUniqueTokenRegex(`hvb\.[a-z0-9_-]{138,212}`),
|
||||
Keywords: []string{"hvb"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("vault", "hvb."+secrets.NewSecret(alphaNumericExtendedShort("138"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func YandexAWSAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "yandex-aws-access-token",
|
||||
Description: "Yandex AWS Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"yandex"},
|
||||
`YC[a-zA-Z0-9_\-]{38}`),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"yandex",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("yandex",
|
||||
secrets.NewSecret(`YC[a-zA-Z0-9_\-]{38}`)),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func YandexAPIKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "yandex-api-key",
|
||||
Description: "Yandex API Key",
|
||||
Regex: generateSemiGenericRegex([]string{"yandex"},
|
||||
`AQVN[A-Za-z0-9_\-]{35,38}`),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"yandex",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("yandex",
|
||||
secrets.NewSecret(`AQVN[A-Za-z0-9_\-]{35,38}`)),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
|
||||
func YandexAccessToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "yandex-access-token",
|
||||
Description: "Yandex Access Token",
|
||||
Regex: generateSemiGenericRegex([]string{"yandex"},
|
||||
`t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2}`),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"yandex",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("yandex",
|
||||
secrets.NewSecret(`t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2}`)),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func ZendeskSecretKey() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
RuleID: "zendesk-secret-key",
|
||||
Description: "Zendesk Secret Key",
|
||||
Regex: generateSemiGenericRegex([]string{"zendesk"}, alphaNumeric("40")),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{
|
||||
"zendesk",
|
||||
},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("zendesk", secrets.NewSecret(alphaNumeric("40"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
+12
-10
@@ -19,13 +19,13 @@ const banner = `
|
||||
│╲
|
||||
│ ○
|
||||
○ ░
|
||||
░ gitleaks
|
||||
░ gitleaks
|
||||
|
||||
`
|
||||
|
||||
const configDescription = `config file path
|
||||
order of precedence:
|
||||
1. --config/-c
|
||||
order of precedence:
|
||||
1. --config/-c
|
||||
2. env var GITLEAKS_CONFIG
|
||||
3. (--source/-s)/.gitleaks.toml
|
||||
If none of the three options are used, then gitleaks will use the default config`
|
||||
@@ -42,7 +42,7 @@ func init() {
|
||||
rootCmd.PersistentFlags().StringP("source", "s", ".", "path to source (default: $PWD)")
|
||||
rootCmd.PersistentFlags().StringP("report-path", "r", "", "report file")
|
||||
rootCmd.PersistentFlags().StringP("report-format", "f", "json", "output format (json, csv, sarif)")
|
||||
rootCmd.PersistentFlags().StringP("log-level", "l", "info", "log level (debug, info, warn, error, fatal)")
|
||||
rootCmd.PersistentFlags().StringP("log-level", "l", "info", "log level (trace, debug, info, warn, error, fatal)")
|
||||
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "show verbose output from scan")
|
||||
rootCmd.PersistentFlags().Bool("redact", false, "redact secrets from logs and stdout")
|
||||
err := viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))
|
||||
@@ -58,6 +58,8 @@ func initLog() {
|
||||
log.Fatal().Msg(err.Error())
|
||||
}
|
||||
switch strings.ToLower(ll) {
|
||||
case "trace":
|
||||
zerolog.SetGlobalLevel(zerolog.TraceLevel)
|
||||
case "debug":
|
||||
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||
case "info":
|
||||
@@ -81,11 +83,11 @@ func initConfig() {
|
||||
}
|
||||
if cfgPath != "" {
|
||||
viper.SetConfigFile(cfgPath)
|
||||
log.Debug().Msgf("Using gitleaks config %s from `--config`", cfgPath)
|
||||
log.Debug().Msgf("using gitleaks config %s from `--config`", cfgPath)
|
||||
} else if os.Getenv("GITLEAKS_CONFIG") != "" {
|
||||
envPath := os.Getenv("GITLEAKS_CONFIG")
|
||||
viper.SetConfigFile(envPath)
|
||||
log.Debug().Msgf("Using gitleaks config from GITLEAKS_CONFIG env var: %s", envPath)
|
||||
log.Debug().Msgf("using gitleaks config from GITLEAKS_CONFIG env var: %s", envPath)
|
||||
} else {
|
||||
source, err := rootCmd.Flags().GetString("source")
|
||||
if err != nil {
|
||||
@@ -97,7 +99,7 @@ func initConfig() {
|
||||
}
|
||||
|
||||
if !fileInfo.IsDir() {
|
||||
log.Debug().Msgf("Unable to load gitleaks config from %s since --source=%s is a file, using default config",
|
||||
log.Debug().Msgf("unable to load gitleaks config from %s since --source=%s is a file, using default config",
|
||||
filepath.Join(source, ".gitleaks.toml"), source)
|
||||
viper.SetConfigType("toml")
|
||||
if err = viper.ReadConfig(strings.NewReader(config.DefaultConfig)); err != nil {
|
||||
@@ -107,14 +109,14 @@ func initConfig() {
|
||||
}
|
||||
|
||||
if _, err := os.Stat(filepath.Join(source, ".gitleaks.toml")); os.IsNotExist(err) {
|
||||
log.Debug().Msgf("No gitleaks config found in path %s, using default gitleaks config", filepath.Join(source, ".gitleaks.toml"))
|
||||
log.Debug().Msgf("no gitleaks config found in path %s, using default gitleaks config", filepath.Join(source, ".gitleaks.toml"))
|
||||
viper.SetConfigType("toml")
|
||||
if err = viper.ReadConfig(strings.NewReader(config.DefaultConfig)); err != nil {
|
||||
log.Fatal().Msgf("err reading default config toml %s", err.Error())
|
||||
}
|
||||
return
|
||||
} else {
|
||||
log.Debug().Msgf("Using existing gitleaks config %s from `(--source)/.gitleaks.toml`", filepath.Join(source, ".gitleaks.toml"))
|
||||
log.Debug().Msgf("using existing gitleaks config %s from `(--source)/.gitleaks.toml`", filepath.Join(source, ".gitleaks.toml"))
|
||||
}
|
||||
|
||||
viper.AddConfigPath(source)
|
||||
@@ -122,7 +124,7 @@ func initConfig() {
|
||||
viper.SetConfigType("toml")
|
||||
}
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
log.Fatal().Msgf("Unable to load gitleaks config, err: %s", err)
|
||||
log.Fatal().Msgf("unable to load gitleaks config, err: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -50,8 +50,9 @@ func (a *Allowlist) RegexAllowed(s string) bool {
|
||||
}
|
||||
|
||||
func (a *Allowlist) ContainsStopWord(s string) bool {
|
||||
s = strings.ToLower(s)
|
||||
for _, stopWord := range a.StopWords {
|
||||
if strings.Contains(s, stopWord) {
|
||||
if strings.Contains(s, strings.ToLower(stopWord)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
+127
-9
@@ -5,16 +5,26 @@ import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
//go:embed gitleaks.toml
|
||||
var DefaultConfig string
|
||||
|
||||
// use to keep track of how many configs we can extend
|
||||
// yea I know, globals bad
|
||||
var extendDepth int
|
||||
|
||||
const maxExtendDepth = 2
|
||||
|
||||
// ViperConfig is the config struct used by the Viper config package
|
||||
// to parse the config file. This struct does not include regular expressions.
|
||||
// It is used as an intermediary to convert the Viper config to the Config struct.
|
||||
type ViperConfig struct {
|
||||
Description string
|
||||
Extend Extend
|
||||
Rules []struct {
|
||||
ID string
|
||||
Description string
|
||||
@@ -42,18 +52,32 @@ type ViperConfig struct {
|
||||
|
||||
// Config is a configuration struct that contains rules and an allowlist if present.
|
||||
type Config struct {
|
||||
Extend Extend
|
||||
Path string
|
||||
Description string
|
||||
Rules []*Rule
|
||||
Rules map[string]Rule
|
||||
Allowlist Allowlist
|
||||
Keywords []string
|
||||
|
||||
// used to keep sarif results consistent
|
||||
orderedRules []string
|
||||
}
|
||||
|
||||
// Extend is a struct that allows users to define how they want their
|
||||
// configuration extended by other configuration files.
|
||||
type Extend struct {
|
||||
Path string
|
||||
URL string
|
||||
UseDefault bool
|
||||
}
|
||||
|
||||
func (vc *ViperConfig) Translate() (Config, error) {
|
||||
var (
|
||||
rules []*Rule
|
||||
keywords []string
|
||||
keywords []string
|
||||
orderedRules []string
|
||||
)
|
||||
rulesMap := make(map[string]Rule)
|
||||
|
||||
for _, r := range vc.Rules {
|
||||
var allowlistRegexes []*regexp.Regexp
|
||||
for _, a := range r.Allowlist.Regexes {
|
||||
@@ -88,7 +112,7 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
||||
} else {
|
||||
configPathRegex = regexp.MustCompile(r.Path)
|
||||
}
|
||||
r := &Rule{
|
||||
r := Rule{
|
||||
Description: r.Description,
|
||||
RuleID: r.ID,
|
||||
Regex: configRegex,
|
||||
@@ -104,10 +128,12 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
||||
StopWords: r.Allowlist.StopWords,
|
||||
},
|
||||
}
|
||||
orderedRules = append(orderedRules, r.RuleID)
|
||||
|
||||
if r.Regex != nil && r.SecretGroup > r.Regex.NumSubexp() {
|
||||
return Config{}, fmt.Errorf("%s invalid regex secret group %d, max regex secret group %d", r.Description, r.SecretGroup, r.Regex.NumSubexp())
|
||||
}
|
||||
rules = append(rules, r)
|
||||
rulesMap[r.RuleID] = r
|
||||
}
|
||||
var allowlistRegexes []*regexp.Regexp
|
||||
for _, a := range vc.Allowlist.Regexes {
|
||||
@@ -117,15 +143,107 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
||||
for _, a := range vc.Allowlist.Paths {
|
||||
allowlistPaths = append(allowlistPaths, regexp.MustCompile(a))
|
||||
}
|
||||
return Config{
|
||||
c := Config{
|
||||
Description: vc.Description,
|
||||
Rules: rules,
|
||||
Extend: vc.Extend,
|
||||
Rules: rulesMap,
|
||||
Allowlist: Allowlist{
|
||||
Regexes: allowlistRegexes,
|
||||
Paths: allowlistPaths,
|
||||
Commits: vc.Allowlist.Commits,
|
||||
StopWords: vc.Allowlist.StopWords,
|
||||
},
|
||||
Keywords: keywords,
|
||||
}, nil
|
||||
Keywords: keywords,
|
||||
orderedRules: orderedRules,
|
||||
}
|
||||
|
||||
if maxExtendDepth != extendDepth {
|
||||
// disallow both usedefault and path from being set
|
||||
if c.Extend.Path != "" && c.Extend.UseDefault {
|
||||
log.Fatal().Msg("unable to load config due to extend.path and extend.useDefault being set")
|
||||
}
|
||||
if c.Extend.UseDefault {
|
||||
c.extendDefault()
|
||||
} else if c.Extend.Path != "" {
|
||||
c.extendPath()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *Config) OrderedRules() []Rule {
|
||||
var orderedRules []Rule
|
||||
for _, id := range c.orderedRules {
|
||||
if _, ok := c.Rules[id]; ok {
|
||||
orderedRules = append(orderedRules, c.Rules[id])
|
||||
}
|
||||
}
|
||||
return orderedRules
|
||||
}
|
||||
|
||||
func (c *Config) extendDefault() {
|
||||
extendDepth++
|
||||
viper.SetConfigType("toml")
|
||||
if err := viper.ReadConfig(strings.NewReader(DefaultConfig)); err != nil {
|
||||
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||
return
|
||||
}
|
||||
defaultViperConfig := ViperConfig{}
|
||||
if err := viper.Unmarshal(&defaultViperConfig); err != nil {
|
||||
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||
return
|
||||
}
|
||||
cfg, err := defaultViperConfig.Translate()
|
||||
if err != nil {
|
||||
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||
return
|
||||
}
|
||||
log.Debug().Msg("extending config with default config")
|
||||
c.extend(cfg)
|
||||
|
||||
}
|
||||
|
||||
func (c *Config) extendPath() {
|
||||
extendDepth++
|
||||
viper.SetConfigFile(c.Extend.Path)
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||
return
|
||||
}
|
||||
extensionViperConfig := ViperConfig{}
|
||||
if err := viper.Unmarshal(&extensionViperConfig); err != nil {
|
||||
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||
return
|
||||
}
|
||||
cfg, err := extensionViperConfig.Translate()
|
||||
if err != nil {
|
||||
log.Fatal().Msgf("failed to load extended config, err: %s", err)
|
||||
return
|
||||
}
|
||||
log.Debug().Msgf("extending config with %s", c.Extend.Path)
|
||||
c.extend(cfg)
|
||||
}
|
||||
|
||||
func (c *Config) extendURL() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
func (c *Config) extend(extensionConfig Config) {
|
||||
for ruleID, rule := range extensionConfig.Rules {
|
||||
if _, ok := c.Rules[ruleID]; !ok {
|
||||
log.Trace().Msgf("adding %s to base config", ruleID)
|
||||
c.Rules[ruleID] = rule
|
||||
c.Keywords = append(c.Keywords, rule.Keywords...)
|
||||
}
|
||||
}
|
||||
|
||||
// append allowlists, not attempting to merge
|
||||
c.Allowlist.Commits = append(c.Allowlist.Commits,
|
||||
extensionConfig.Allowlist.Commits...)
|
||||
c.Allowlist.Paths = append(c.Allowlist.Paths,
|
||||
extensionConfig.Allowlist.Paths...)
|
||||
c.Allowlist.Regexes = append(c.Allowlist.Regexes,
|
||||
extensionConfig.Allowlist.Regexes...)
|
||||
}
|
||||
+67
-43
@@ -20,72 +20,68 @@ func TestTranslate(t *testing.T) {
|
||||
{
|
||||
cfgName: "allow_aws_re",
|
||||
cfg: Config{
|
||||
Rules: []*Rule{
|
||||
{
|
||||
Description: "AWS Access Key",
|
||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-access-key",
|
||||
Allowlist: Allowlist{
|
||||
Regexes: []*regexp.Regexp{
|
||||
regexp.MustCompile("AKIALALEMEL33243OLIA"),
|
||||
},
|
||||
Rules: map[string]Rule{"aws-access-key": {
|
||||
Description: "AWS Access Key",
|
||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-access-key",
|
||||
Allowlist: Allowlist{
|
||||
Regexes: []*regexp.Regexp{
|
||||
regexp.MustCompile("AKIALALEMEL33243OLIA"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cfgName: "allow_commit",
|
||||
cfg: Config{
|
||||
Rules: []*Rule{
|
||||
{
|
||||
Description: "AWS Access Key",
|
||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-access-key",
|
||||
Allowlist: Allowlist{
|
||||
Commits: []string{"allowthiscommit"},
|
||||
},
|
||||
Rules: map[string]Rule{"aws-access-key": {
|
||||
Description: "AWS Access Key",
|
||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-access-key",
|
||||
Allowlist: Allowlist{
|
||||
Commits: []string{"allowthiscommit"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cfgName: "allow_path",
|
||||
cfg: Config{
|
||||
Rules: []*Rule{
|
||||
{
|
||||
Description: "AWS Access Key",
|
||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-access-key",
|
||||
Allowlist: Allowlist{
|
||||
Paths: []*regexp.Regexp{
|
||||
regexp.MustCompile(".go"),
|
||||
},
|
||||
Rules: map[string]Rule{"aws-access-key": {
|
||||
Description: "AWS Access Key",
|
||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-access-key",
|
||||
Allowlist: Allowlist{
|
||||
Paths: []*regexp.Regexp{
|
||||
regexp.MustCompile(".go"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cfgName: "entropy_group",
|
||||
cfg: Config{
|
||||
Rules: []*Rule{
|
||||
{
|
||||
Description: "Discord API key",
|
||||
Regex: regexp.MustCompile(`(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{64})['\"]`),
|
||||
RuleID: "discord-api-key",
|
||||
Allowlist: Allowlist{},
|
||||
Entropy: 3.5,
|
||||
SecretGroup: 3,
|
||||
Tags: []string{},
|
||||
Keywords: []string{},
|
||||
},
|
||||
Rules: map[string]Rule{"discord-api-key": {
|
||||
Description: "Discord API key",
|
||||
Regex: regexp.MustCompile(`(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{64})['\"]`),
|
||||
RuleID: "discord-api-key",
|
||||
Allowlist: Allowlist{},
|
||||
Entropy: 3.5,
|
||||
SecretGroup: 3,
|
||||
Tags: []string{},
|
||||
Keywords: []string{},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -94,6 +90,34 @@ func TestTranslate(t *testing.T) {
|
||||
cfg: Config{},
|
||||
wantError: fmt.Errorf("Discord API key invalid regex secret group 5, max regex secret group 3"),
|
||||
},
|
||||
{
|
||||
cfgName: "base",
|
||||
cfg: Config{
|
||||
Rules: map[string]Rule{
|
||||
"aws-access-key": {
|
||||
Description: "AWS Access Key",
|
||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-access-key",
|
||||
},
|
||||
"aws-secret-key": {
|
||||
Description: "AWS Secret Key",
|
||||
Regex: regexp.MustCompile(`(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}`),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-secret-key",
|
||||
},
|
||||
"aws-secret-key-again": {
|
||||
Description: "AWS Secret Key",
|
||||
Regex: regexp.MustCompile(`(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}`),
|
||||
Tags: []string{"key", "AWS"},
|
||||
Keywords: []string{},
|
||||
RuleID: "aws-secret-key-again",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
+2093
-162
File diff suppressed because it is too large.
Load diff
+36
-7
@@ -1,6 +1,7 @@
|
||||
package detect
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
@@ -64,6 +65,9 @@ type Detector struct {
|
||||
// prefilter is a ahocorasick struct used for doing efficient string
|
||||
// matching given a set of words (keywords from the rules in the config)
|
||||
prefilter ahocorasick.AhoCorasick
|
||||
|
||||
// gitleaksIgnore
|
||||
gitleaksIgnore map[string]bool
|
||||
}
|
||||
|
||||
// Fragment contains the data to be scanned
|
||||
@@ -96,11 +100,12 @@ func NewDetector(cfg config.Config) *Detector {
|
||||
})
|
||||
|
||||
return &Detector{
|
||||
commitMap: make(map[string]bool),
|
||||
findingMutex: &sync.Mutex{},
|
||||
findings: make([]report.Finding, 0),
|
||||
Config: cfg,
|
||||
prefilter: builder.Build(cfg.Keywords),
|
||||
commitMap: make(map[string]bool),
|
||||
gitleaksIgnore: make(map[string]bool),
|
||||
findingMutex: &sync.Mutex{},
|
||||
findings: make([]report.Finding, 0),
|
||||
Config: cfg,
|
||||
prefilter: builder.Build(cfg.Keywords),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +128,23 @@ func NewDetectorDefaultConfig() (*Detector, error) {
|
||||
return NewDetector(cfg), nil
|
||||
}
|
||||
|
||||
func (d *Detector) AddGitleaksIgnore(gitleaksIgnorePath string) error {
|
||||
log.Debug().Msg("found .gitleaksignore file")
|
||||
file, err := os.Open(gitleaksIgnorePath)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer file.Close()
|
||||
scanner := bufio.NewScanner(file)
|
||||
|
||||
for scanner.Scan() {
|
||||
d.gitleaksIgnore[scanner.Text()] = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DetectBytes scans the given bytes and returns a list of findings
|
||||
func (d *Detector) DetectBytes(content []byte) []report.Finding {
|
||||
return d.DetectString(string(content))
|
||||
@@ -136,7 +158,7 @@ func (d *Detector) DetectString(content string) []report.Finding {
|
||||
}
|
||||
|
||||
// detectRule scans the given fragment for the given rule and returns a list of findings
|
||||
func (d *Detector) detectRule(fragment Fragment, rule *config.Rule) []report.Finding {
|
||||
func (d *Detector) detectRule(fragment Fragment, rule config.Rule) []report.Finding {
|
||||
var findings []report.Finding
|
||||
|
||||
// check if filepath or commit is allowed for this rule
|
||||
@@ -335,7 +357,7 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if fInfo.Name() == ".git" {
|
||||
if fInfo.Name() == ".git" && fInfo.IsDir() {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
if fInfo.Mode().IsRegular() {
|
||||
@@ -428,6 +450,13 @@ func (d *Detector) Detect(fragment Fragment) []report.Finding {
|
||||
|
||||
// addFinding synchronously adds a finding to the findings slice
|
||||
func (d *Detector) addFinding(finding report.Finding) {
|
||||
// check if we should ignore this finding
|
||||
if _, ok := d.gitleaksIgnore[finding.Fingerprint]; ok {
|
||||
log.Debug().Msgf("ignoring finding with Fingerprint %s",
|
||||
finding.Fingerprint)
|
||||
return
|
||||
}
|
||||
|
||||
d.findingMutex.Lock()
|
||||
d.findings = append(d.findings, finding)
|
||||
if d.Verbose {
|
||||
|
||||
@@ -114,6 +114,72 @@ func TestDetect(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cfgName: "simple",
|
||||
fragment: Fragment{
|
||||
Raw: `export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;`,
|
||||
FilePath: "tmp.sh",
|
||||
},
|
||||
expectedFindings: []report.Finding{
|
||||
{
|
||||
Description: "Sidekiq Secret",
|
||||
Match: "BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef;",
|
||||
Secret: "cafebabe:deadbeef",
|
||||
File: "tmp.sh",
|
||||
RuleID: "sidekiq-secret",
|
||||
Tags: []string{},
|
||||
Entropy: 2.6098502,
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartColumn: 8,
|
||||
EndColumn: 60,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cfgName: "simple",
|
||||
fragment: Fragment{
|
||||
Raw: `echo hello1; export BUNDLE_ENTERPRISE__CONTRIBSYS__COM="cafebabe:deadbeef" && echo hello2`,
|
||||
FilePath: "tmp.sh",
|
||||
},
|
||||
expectedFindings: []report.Finding{
|
||||
{
|
||||
Description: "Sidekiq Secret",
|
||||
Match: "BUNDLE_ENTERPRISE__CONTRIBSYS__COM=\"cafebabe:deadbeef\"",
|
||||
Secret: "cafebabe:deadbeef",
|
||||
File: "tmp.sh",
|
||||
RuleID: "sidekiq-secret",
|
||||
Tags: []string{},
|
||||
Entropy: 2.6098502,
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartColumn: 21,
|
||||
EndColumn: 74,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cfgName: "simple",
|
||||
fragment: Fragment{
|
||||
Raw: `url = "http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80/path?param1=true¶m2=false#heading1"`,
|
||||
FilePath: "tmp.sh",
|
||||
},
|
||||
expectedFindings: []report.Finding{
|
||||
{
|
||||
Description: "Sidekiq Sensitive URL",
|
||||
Match: "http://cafeb4b3:d3adb33f@enterprise.contribsys.com:",
|
||||
Secret: "cafeb4b3:d3adb33f",
|
||||
File: "tmp.sh",
|
||||
RuleID: "sidekiq-sensitive-url",
|
||||
Tags: []string{},
|
||||
Entropy: 2.984234,
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartColumn: 8,
|
||||
EndColumn: 58,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cfgName: "allow_aws_re",
|
||||
fragment: Fragment{
|
||||
@@ -301,6 +367,7 @@ func TestFromGit(t *testing.T) {
|
||||
RuleID: "aws-access-key",
|
||||
Tags: []string{"key", "AWS"},
|
||||
Entropy: 3.0841837,
|
||||
Fingerprint: "d0ce473c3c9f6934e8d274604cf9ceae63700f03",
|
||||
},
|
||||
{
|
||||
Description: "AWS Access Key",
|
||||
@@ -319,6 +386,7 @@ func TestFromGit(t *testing.T) {
|
||||
RuleID: "aws-access-key",
|
||||
Tags: []string{"key", "AWS"},
|
||||
Entropy: 3.0841837,
|
||||
Fingerprint: "df8d271fa20b928dfb12353cc16ddf9934225cb7",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -344,6 +412,7 @@ func TestFromGit(t *testing.T) {
|
||||
RuleID: "aws-access-key",
|
||||
Tags: []string{"key", "AWS"},
|
||||
Entropy: 3.0841837,
|
||||
Fingerprint: "df8d271fa20b928dfb12353cc16ddf9934225cb7",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+7
-1
@@ -85,18 +85,24 @@ func listenForStdErr(stderr io.ReadCloser) {
|
||||
scanner := bufio.NewScanner(stderr)
|
||||
errEncountered := false
|
||||
for scanner.Scan() {
|
||||
// if git throws the following error:
|
||||
// if git throws one of the following errors:
|
||||
//
|
||||
// exhaustive rename detection was skipped due to too many files.
|
||||
// you may want to set your diff.renameLimit variable to at least
|
||||
// (some large number) and retry the command.
|
||||
//
|
||||
// inexact rename detection was skipped due to too many files.
|
||||
// you may want to set your diff.renameLimit variable to at least
|
||||
// (some large number) and retry the command.
|
||||
//
|
||||
// we skip exiting the program as git log -p/git diff will continue
|
||||
// to send data to stdout and finish executing. This next bit of
|
||||
// code prevents gitleaks from stopping mid scan if this error is
|
||||
// encountered
|
||||
if strings.Contains(scanner.Text(),
|
||||
"exhaustive rename detection was skipped") ||
|
||||
strings.Contains(scanner.Text(),
|
||||
"inexact rename detection was skipped") ||
|
||||
strings.Contains(scanner.Text(),
|
||||
"you may want to set your diff.renameLimit") {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ func location(fragment Fragment, matchIndex []int) Location {
|
||||
end := matchIndex[1]
|
||||
|
||||
for lineNum, pair := range fragment.newlineIndices {
|
||||
_lineNum = lineNum
|
||||
newLineByteIndex := pair[0]
|
||||
if prevNewLine <= start && start < newLineByteIndex {
|
||||
lineSet = true
|
||||
|
||||
+7
-2
@@ -1,6 +1,7 @@
|
||||
package detect
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math"
|
||||
@@ -21,6 +22,11 @@ func augmentGitFinding(finding report.Finding, textFragment *gitdiff.TextFragmen
|
||||
finding.EndLine += int(textFragment.NewPosition)
|
||||
}
|
||||
|
||||
// generate finding hash
|
||||
h := sha1.New()
|
||||
h.Write([]byte(fmt.Sprintf("%s:%s:%s:%d", finding.Commit, finding.File, finding.RuleID, finding.StartLine)))
|
||||
finding.Fingerprint = fmt.Sprintf("%x", h.Sum(nil))
|
||||
|
||||
if f.PatchHeader != nil {
|
||||
finding.Commit = f.PatchHeader.SHA
|
||||
finding.Message = f.PatchHeader.Message()
|
||||
@@ -65,7 +71,6 @@ func filter(findings []report.Finding, redact bool) []report.Finding {
|
||||
if strings.Contains(strings.ToLower(f.RuleID), "generic") {
|
||||
for _, fPrime := range findings {
|
||||
if f.StartLine == fPrime.StartLine &&
|
||||
f.EndLine == fPrime.EndLine &&
|
||||
f.Commit == fPrime.Commit &&
|
||||
f.RuleID != fPrime.RuleID &&
|
||||
strings.Contains(fPrime.Secret, f.Secret) &&
|
||||
@@ -73,7 +78,7 @@ func filter(findings []report.Finding, redact bool) []report.Finding {
|
||||
|
||||
genericMatch := strings.Replace(f.Match, f.Secret, "REDACTED", -1)
|
||||
betterMatch := strings.Replace(fPrime.Match, fPrime.Secret, "REDACTED", -1)
|
||||
log.Debug().Msgf("skipping %s finding (%s), %s rule takes precendence (%s)", f.RuleID, genericMatch, fPrime.RuleID, betterMatch)
|
||||
log.Trace().Msgf("skipping %s finding (%s), %s rule takes precendence (%s)", f.RuleID, genericMatch, fPrime.RuleID, betterMatch)
|
||||
include = false
|
||||
break
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
||||
"Message",
|
||||
"Date",
|
||||
"Email",
|
||||
"Fingerprint",
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -44,6 +45,7 @@ func writeCsv(f []Finding, w io.WriteCloser) error {
|
||||
f.Message,
|
||||
f.Date,
|
||||
f.Email,
|
||||
f.Fingerprint,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -32,6 +32,7 @@ func TestWriteCSV(t *testing.T) {
|
||||
Author: "John Doe",
|
||||
Email: "johndoe@gmail.com",
|
||||
Date: "10-19-2003",
|
||||
Fingerprint: "fingerprint",
|
||||
},
|
||||
}},
|
||||
{
|
||||
|
||||
@@ -35,6 +35,9 @@ type Finding struct {
|
||||
|
||||
// Rule is the name of the rule that was matched
|
||||
RuleID string
|
||||
|
||||
// unique identifer
|
||||
Fingerprint string
|
||||
}
|
||||
|
||||
// Redact removes sensitive information from a finding.
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ func hasEmptyRules(tool Tool) bool {
|
||||
func getRules(cfg config.Config) []Rules {
|
||||
// TODO for _, rule := range cfg.Rules {
|
||||
var rules []Rules
|
||||
for _, rule := range cfg.Rules {
|
||||
for _, rule := range cfg.OrderedRules() {
|
||||
shortDescription := ShortDescription{
|
||||
Text: rule.Description,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package report
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -27,7 +28,7 @@ func TestWriteSarif(t *testing.T) {
|
||||
findings: []Finding{
|
||||
{
|
||||
|
||||
Description: "",
|
||||
Description: "A test rule",
|
||||
RuleID: "test-rule",
|
||||
Match: "line containing secret",
|
||||
Secret: "a secret",
|
||||
@@ -73,6 +74,7 @@ func TestWriteSarif(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
err = writeSarif(cfg, test.findings, tmpfile)
|
||||
fmt.Println(cfg)
|
||||
if err != nil {
|
||||
os.Remove(tmpfile.Name())
|
||||
t.Error(err)
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
import os,sys
|
||||
"""Helper script to be used as a pre-commit hook."""
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def gitleaksEnabled():
|
||||
"""Determine if the pre-commit hook for gitleaks is enabled."""
|
||||
out = subprocess.getoutput("git config --bool hooks.gitleaks")
|
||||
if out == "false":
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
if gitleaksEnabled():
|
||||
exitCode = os.WEXITSTATUS(os.system('gitleaks protect -v --staged'))
|
||||
if exitCode == 1:
|
||||
@@ -18,5 +23,5 @@ To disable the gitleaks precommit hook run the following command:
|
||||
''')
|
||||
sys.exit(1)
|
||||
else:
|
||||
print('gitleaks precommit disabled (enable with `git config hooks.gitleaks true`)')
|
||||
|
||||
print('gitleaks precommit disabled\
|
||||
(enable with `git config hooks.gitleaks true`)')
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
title = "gitleaks config"
|
||||
|
||||
[extend]
|
||||
path="../testdata/config/extend_1.toml"
|
||||
|
||||
[[rules]]
|
||||
description = "AWS Secret Key"
|
||||
id = "aws-secret-key"
|
||||
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||
tags = ["key", "AWS"]
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
title = "gitleaks extended 1"
|
||||
|
||||
[extend]
|
||||
path="../testdata/config/extend_2.toml"
|
||||
|
||||
[[rules]]
|
||||
description = "AWS Access Key"
|
||||
id = "aws-access-key"
|
||||
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
|
||||
tags = ["key", "AWS"]
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
title = "gitleaks extended 2"
|
||||
|
||||
[extend]
|
||||
path="../testdata/config/extend_3.toml"
|
||||
|
||||
[[rules]]
|
||||
description = "AWS Secret Key"
|
||||
id = "aws-secret-key-again"
|
||||
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||
tags = ["key", "AWS"]
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
title = "gitleaks extended 3"
|
||||
|
||||
## This should not be loaded since we can only extend configs to a depth of 3
|
||||
|
||||
[[rules]]
|
||||
description = "AWS Secret Key"
|
||||
id = "aws-secret-key-again-again"
|
||||
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||
tags = ["key", "AWS"]
|
||||
Vendored
+51
@@ -9,162 +9,213 @@ title = "gitleaks config"
|
||||
|
||||
[[rules]]
|
||||
description = "AWS Secret Key"
|
||||
id = "aws-secret-key"
|
||||
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||
tags = ["key", "AWS"]
|
||||
|
||||
[[rules]]
|
||||
description = "AWS MWS key"
|
||||
id = "aws-mws-key"
|
||||
regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
|
||||
tags = ["key", "AWS", "MWS"]
|
||||
|
||||
[[rules]]
|
||||
description = "Facebook Secret Key"
|
||||
id = "facebook-secret-key"
|
||||
regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
|
||||
tags = ["key", "Facebook"]
|
||||
|
||||
[[rules]]
|
||||
description = "Facebook Client ID"
|
||||
id = "facebook-client-id"
|
||||
regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
|
||||
tags = ["key", "Facebook"]
|
||||
|
||||
[[rules]]
|
||||
description = "Twitter Secret Key"
|
||||
id = "twitter-secret-key"
|
||||
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]'''
|
||||
tags = ["key", "Twitter"]
|
||||
|
||||
[[rules]]
|
||||
description = "Twitter Client ID"
|
||||
id = "twitter-client-id"
|
||||
regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]'''
|
||||
tags = ["client", "Twitter"]
|
||||
|
||||
[[rules]]
|
||||
description = "Github Personal Access Token"
|
||||
id = "github-pat"
|
||||
regex = '''ghp_[0-9a-zA-Z]{36}'''
|
||||
tags = ["key", "Github"]
|
||||
[[rules]]
|
||||
description = "Github OAuth Access Token"
|
||||
id = "github-oauth"
|
||||
regex = '''gho_[0-9a-zA-Z]{36}'''
|
||||
tags = ["key", "Github"]
|
||||
[[rules]]
|
||||
id = "github-app"
|
||||
description = "Github App Token"
|
||||
regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
|
||||
tags = ["key", "Github"]
|
||||
[[rules]]
|
||||
id = "github-refresh"
|
||||
description = "Github Refresh Token"
|
||||
regex = '''ghr_[0-9a-zA-Z]{76}'''
|
||||
tags = ["key", "Github"]
|
||||
|
||||
[[rules]]
|
||||
id = "linkedin-client"
|
||||
description = "LinkedIn Client ID"
|
||||
regex = '''(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}'''
|
||||
tags = ["client", "LinkedIn"]
|
||||
|
||||
[[rules]]
|
||||
id = "linkedin-secret"
|
||||
description = "LinkedIn Secret Key"
|
||||
regex = '''(?i)linkedin(.{0,20})?[0-9a-z]{16}'''
|
||||
tags = ["secret", "LinkedIn"]
|
||||
|
||||
[[rules]]
|
||||
id = "slack"
|
||||
description = "Slack"
|
||||
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
|
||||
tags = ["key", "Slack"]
|
||||
|
||||
[[rules]]
|
||||
id = "apkey"
|
||||
description = "Asymmetric Private Key"
|
||||
regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'''
|
||||
tags = ["key", "AsymmetricPrivateKey"]
|
||||
|
||||
[[rules]]
|
||||
id = "google"
|
||||
description = "Google API key"
|
||||
regex = '''AIza[0-9A-Za-z\-_]{35}'''
|
||||
tags = ["key", "Google"]
|
||||
|
||||
[[rules]]
|
||||
id = "google"
|
||||
description = "Google (GCP) Service Account"
|
||||
regex = '''"type": "service_account"'''
|
||||
tags = ["key", "Google"]
|
||||
|
||||
[[rules]]
|
||||
id = "heroku"
|
||||
description = "Heroku API key"
|
||||
regex = '''(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
|
||||
tags = ["key", "Heroku"]
|
||||
|
||||
[[rules]]
|
||||
id = "mailchimp"
|
||||
description = "MailChimp API key"
|
||||
regex = '''(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}'''
|
||||
tags = ["key", "Mailchimp"]
|
||||
|
||||
[[rules]]
|
||||
id = "mailgun"
|
||||
description = "Mailgun API key"
|
||||
regex = '''((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}'''
|
||||
tags = ["key", "Mailgun"]
|
||||
|
||||
[[rules]]
|
||||
id = "paypal"
|
||||
description = "PayPal Braintree access token"
|
||||
regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
|
||||
tags = ["key", "Paypal"]
|
||||
|
||||
[[rules]]
|
||||
id = "piacatic"
|
||||
description = "Picatic API key"
|
||||
regex = '''sk_live_[0-9a-z]{32}'''
|
||||
tags = ["key", "Picatic"]
|
||||
|
||||
[[rules]]
|
||||
id = "sendgrid"
|
||||
description = "SendGrid API Key"
|
||||
regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}'''
|
||||
tags = ["key", "SendGrid"]
|
||||
|
||||
[[rules]]
|
||||
description = "Sidekiq Secret"
|
||||
id = "sidekiq-secret"
|
||||
regex = '''(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||
secretGroup = 1
|
||||
keywords = [
|
||||
"bundle_enterprise__contribsys__com","bundle_gems__contribsys__com",
|
||||
]
|
||||
|
||||
[[rules]]
|
||||
description = "Sidekiq Sensitive URL"
|
||||
id = "sidekiq-sensitive-url"
|
||||
regex = '''(?i)\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)'''
|
||||
secretGroup = 2
|
||||
keywords = [
|
||||
"gems.contribsys.com","enterprise.contribsys.com",
|
||||
]
|
||||
|
||||
[[rules]]
|
||||
id = "slack-webhook"
|
||||
description = "Slack Webhook"
|
||||
regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
|
||||
tags = ["key", "slack"]
|
||||
|
||||
[[rules]]
|
||||
id = "stripe"
|
||||
description = "Stripe API key"
|
||||
regex = '''(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}'''
|
||||
tags = ["key", "Stripe"]
|
||||
|
||||
[[rules]]
|
||||
id = "square"
|
||||
description = "Square access token"
|
||||
regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
|
||||
tags = ["key", "square"]
|
||||
|
||||
[[rules]]
|
||||
id = "square-oauth"
|
||||
description = "Square OAuth secret"
|
||||
regex = '''sq0csp-[0-9A-Za-z\-_]{43}'''
|
||||
tags = ["key", "square"]
|
||||
|
||||
[[rules]]
|
||||
id = "twilio"
|
||||
description = "Twilio API key"
|
||||
regex = '''(?i)twilio(.{0,20})?SK[0-9a-f]{32}'''
|
||||
tags = ["key", "twilio"]
|
||||
|
||||
[[rules]]
|
||||
id = "dynatrace"
|
||||
description = "Dynatrace ttoken"
|
||||
regex = '''dt0[a-zA-Z]{1}[0-9]{2}\.[A-Z0-9]{24}\.[A-Z0-9]{64}'''
|
||||
tags = ["key", "Dynatrace"]
|
||||
|
||||
[[rules]]
|
||||
id = "shopify"
|
||||
description = "Shopify shared secret"
|
||||
regex = '''shpss_[a-fA-F0-9]{32}'''
|
||||
tags = ["key", "Shopify"]
|
||||
|
||||
[[rules]]
|
||||
id = "shopify-access"
|
||||
description = "Shopify access token"
|
||||
regex = '''shpat_[a-fA-F0-9]{32}'''
|
||||
tags = ["key", "Shopify"]
|
||||
|
||||
[[rules]]
|
||||
id = "shopify-custom"
|
||||
description = "Shopify custom app access token"
|
||||
regex = '''shpca_[a-fA-F0-9]{32}'''
|
||||
tags = ["key", "Shopify"]
|
||||
|
||||
[[rules]]
|
||||
id = "shopify-private"
|
||||
description = "Shopify private app access token"
|
||||
regex = '''shppa_[a-fA-F0-9]{32}'''
|
||||
tags = ["key", "Shopify"]
|
||||
|
||||
[[rules]]
|
||||
id = "pypi"
|
||||
description = "PyPI upload token"
|
||||
regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}'''
|
||||
tags = ["key", "pypi"]
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
RuleID,Commit,File,Secret,Match,StartLine,EndLine,StartColumn,EndColumn,Author,Message,Date,Email
|
||||
test-rule,0000000000000000,auth.py,a secret,line containing secret,1,2,1,2,John Doe,opps,10-19-2003,johndoe@gmail.com
|
||||
RuleID,Commit,File,Secret,Match,StartLine,EndLine,StartColumn,EndColumn,Author,Message,Date,Email,Fingerprint
|
||||
test-rule,0000000000000000,auth.py,a secret,line containing secret,1,2,1,2,John Doe,opps,10-19-2003,johndoe@gmail.com,fingerprint
|
||||
|
+2
-1
@@ -15,6 +15,7 @@
|
||||
"Date": "10-19-2003",
|
||||
"Message": "opps",
|
||||
"Tags": [],
|
||||
"RuleID": "test-rule"
|
||||
"RuleID": "test-rule",
|
||||
"Fingerprint": ""
|
||||
}
|
||||
]
|
||||
+53
-39
@@ -16,231 +16,245 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "aws-secret-key",
|
||||
"name": "AWS Secret Key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)aws_(.{0,20})?=?.[\\'\\\"0-9a-zA-Z\\/+]{40}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "aws-mws-key",
|
||||
"name": "AWS MWS key",
|
||||
"shortDescription": {
|
||||
"text": "amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "facebook-secret-key",
|
||||
"name": "Facebook Secret Key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)(facebook|fb)(.{0,20})?(?-i)['\\\"][0-9a-f]{32}['\\\"]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "facebook-client-id",
|
||||
"name": "Facebook Client ID",
|
||||
"shortDescription": {
|
||||
"text": "(?i)(facebook|fb)(.{0,20})?['\\\"][0-9]{13,17}['\\\"]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "twitter-secret-key",
|
||||
"name": "Twitter Secret Key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{35,44}['\\\"]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "twitter-client-id",
|
||||
"name": "Twitter Client ID",
|
||||
"shortDescription": {
|
||||
"text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{18,25}['\\\"]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "github-pat",
|
||||
"name": "Github Personal Access Token",
|
||||
"shortDescription": {
|
||||
"text": "ghp_[0-9a-zA-Z]{36}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "github-oauth",
|
||||
"name": "Github OAuth Access Token",
|
||||
"shortDescription": {
|
||||
"text": "gho_[0-9a-zA-Z]{36}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "github-app",
|
||||
"name": "Github App Token",
|
||||
"shortDescription": {
|
||||
"text": "(ghu|ghs)_[0-9a-zA-Z]{36}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "github-refresh",
|
||||
"name": "Github Refresh Token",
|
||||
"shortDescription": {
|
||||
"text": "ghr_[0-9a-zA-Z]{76}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "linkedin-client",
|
||||
"name": "LinkedIn Client ID",
|
||||
"shortDescription": {
|
||||
"text": "(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "linkedin-secret",
|
||||
"name": "LinkedIn Secret Key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)linkedin(.{0,20})?[0-9a-z]{16}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "slack",
|
||||
"name": "Slack",
|
||||
"shortDescription": {
|
||||
"text": "xox[baprs]-([0-9a-zA-Z]{10,48})?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "apkey",
|
||||
"name": "Asymmetric Private Key",
|
||||
"shortDescription": {
|
||||
"text": "-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"name": "Google API key",
|
||||
"shortDescription": {
|
||||
"text": "AIza[0-9A-Za-z\\-_]{35}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "google",
|
||||
"name": "Google (GCP) Service Account",
|
||||
"shortDescription": {
|
||||
"text": "\"type\": \"service_account\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "google",
|
||||
"name": "Google (GCP) Service Account",
|
||||
"shortDescription": {
|
||||
"text": "\"type\": \"service_account\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "heroku",
|
||||
"name": "Heroku API key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "mailchimp",
|
||||
"name": "MailChimp API key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "mailgun",
|
||||
"name": "Mailgun API key",
|
||||
"shortDescription": {
|
||||
"text": "((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "paypal",
|
||||
"name": "PayPal Braintree access token",
|
||||
"shortDescription": {
|
||||
"text": "access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "piacatic",
|
||||
"name": "Picatic API key",
|
||||
"shortDescription": {
|
||||
"text": "sk_live_[0-9a-z]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "sendgrid",
|
||||
"name": "SendGrid API Key",
|
||||
"shortDescription": {
|
||||
"text": "SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "sidekiq-secret",
|
||||
"name": "Sidekiq Secret",
|
||||
"shortDescription": {
|
||||
"text": "(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\\-_\\t .]{0,20})(?:[\\s|']|[\\s|\"]){0,3}(?:=|\u003e|:=|\\|\\|:|\u003c=|=\u003e|:)(?:'|\\\"|\\s|=|\\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\\\"|\\n|\\r|\\s|\\x60|;]|$)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sidekiq-sensitive-url",
|
||||
"name": "Sidekiq Sensitive URL",
|
||||
"shortDescription": {
|
||||
"text": "(?i)\\b(http(?:s??):\\/\\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "slack-webhook",
|
||||
"name": "Slack Webhook",
|
||||
"shortDescription": {
|
||||
"text": "https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "stripe",
|
||||
"name": "Stripe API key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "square",
|
||||
"name": "Square access token",
|
||||
"shortDescription": {
|
||||
"text": "sq0atp-[0-9A-Za-z\\-_]{22}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "square-oauth",
|
||||
"name": "Square OAuth secret",
|
||||
"shortDescription": {
|
||||
"text": "sq0csp-[0-9A-Za-z\\-_]{43}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "twilio",
|
||||
"name": "Twilio API key",
|
||||
"shortDescription": {
|
||||
"text": "(?i)twilio(.{0,20})?SK[0-9a-f]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "dynatrace",
|
||||
"name": "Dynatrace ttoken",
|
||||
"shortDescription": {
|
||||
"text": "dt0[a-zA-Z]{1}[0-9]{2}\\.[A-Z0-9]{24}\\.[A-Z0-9]{64}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "shopify",
|
||||
"name": "Shopify shared secret",
|
||||
"shortDescription": {
|
||||
"text": "shpss_[a-fA-F0-9]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "shopify-access",
|
||||
"name": "Shopify access token",
|
||||
"shortDescription": {
|
||||
"text": "shpat_[a-fA-F0-9]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "shopify-custom",
|
||||
"name": "Shopify custom app access token",
|
||||
"shortDescription": {
|
||||
"text": "shpca_[a-fA-F0-9]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "shopify-private",
|
||||
"name": "Shopify private app access token",
|
||||
"shortDescription": {
|
||||
"text": "shppa_[a-fA-F0-9]{32}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"id": "pypi",
|
||||
"name": "PyPI upload token",
|
||||
"shortDescription": {
|
||||
"text": "pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}"
|
||||
|
||||
Reference in new issue
Block a user