Compare commits

...
266 Commits
Author SHA1 Message Date
roma8389 c0caab0355 add --max-target-megabytes : maximum size for a file/blob to be scanned (#1003)
* add --max-target-megabytes : maximum size for a file/blob to be scanned

* add --max-target-megabytes : maximum size for a file/blob to be scanned

* add --max-target-megabytes : maximum size for a file/blob to be scanned

* adjust readme comment

* fix on prem
2022-10-10 16:07:06 -05:00
Zachary Rice 81c92c78ca Update USERS.md 2022-10-10 13:37:56 -05:00
Zachary Rice bf031592b8 Update .gitleaksignore 2022-10-10 08:23:17 -05:00
Zachary Rice acce01f233 Update README.md 2022-10-10 08:22:27 -05:00
Michael Henriksen 2678a54290 Add detection rules for DigitalOcean tokens (#1002)
* Add detection rules for DigitalOcean tokens

* go fmt correction
2022-10-06 08:03:46 -05:00
Furkan Türkal 289b757158 docs: add Trendyol to users (#998) 2022-10-04 07:40:44 -05:00
Carlos Alexandro Becker c02d830494 docs: added goreleaser to user list (#997)
Thanks for gitleaks, its amazing to have it in the pipeline so I can have some extra peace of mind!
2022-10-03 14:10:33 -05:00
Zachary Rice 67b0a29ab6 Update USERS.md (#996) 2022-10-03 08:29:30 -05:00
Zachary Rice f710d680dd Create USERS.md 2022-10-02 16:45:51 -05:00
Joost Voskuil eb2bfe5e16 Exclude dacpac refactorlogs (#990)
Dacpac refactorlogs contains Key's that are false positives. This commit excludes those files.
2022-09-30 07:32:50 -05:00
alexgit2k 55d1da131a Output number of commits at info-level. (#991) 2022-09-28 07:32:24 -05:00
Becojo 177e9f4fc2 Detect Slack Workflow Webhook URLs (#989) 2022-09-27 13:56:48 -05:00
naoki kuroda e93d8cb696 Upgrade go version to 1.19 (#987)
* upgrade go version to 1.19

* upgrade go version to 1.19 in dockerfile and test.yml
2022-09-25 09:06:50 -05:00
Michael Jarvis db43f9a342 Minor cleanup to error handling and logging (#985)
* silence warning about unchecked errors

* go-fmt change to add newline

* Zerolog requires you to always call .Msg()

When logging with zerolog, you need to always end with .Msg(), even if
you just pass an empty string.

If you read the README on https://github.com/rs/zerolog, they write:

> It is very important to note that when using the zerolog
> chaining API, as shown above (log.Info().Msg("hello world"), the
> chain must have either the Msg or Msgf method call. If you
> forget to add either of these, the log will not occur and there
> is no compile time error to alert you of this.

* Create empty slice without literal

* Fix variable / package name collision with literal

instead of having a variable named "config", which collides with the
package name "config", just pass a literal config.Config{} struct to the
function

* Replace call to deprecated ioutil.ReadAll()

Use io.ReadAll() instead

* Check error when closing jsonFile

Make it a warning and log error
2022-09-23 08:06:41 -05:00
Zachary Rice 9b15f0d33e Update README.md 2022-09-21 20:00:02 -05:00
Zachary Rice 817aa7b8d0 Update .gitleaksignore 2022-09-21 10:12:48 -05:00
Zachary Rice 33082a9967 Update README.md 2022-09-21 10:04:51 -05:00
Zane Durkin 7dbfe8db2f Adding quiet mode to silence banner (#852)
* Adding quiet mode to silence banner

* Changing flag description. Adding flag to README

* Updating argument name

* updating variable name to aline with argument

* fixing readme spacing

* Fixing variable name
2022-09-17 12:32:52 -04:00
Alex GoncharovandAlex Goncharov fc98cbf159 Issue #980: Add support for Telegram Bot API Token (#981)
* Issue #980: Add support for Telegram Bot API Token

* Replace test with random bot_id length by tests with fixed one.
Add tests for the corner cases.

Co-authored-by: Alex Goncharov <b4bay@users.noreply.github.com>
2022-09-17 11:26:29 -04:00
Malte Morgenstern 3f0293dab0 add rule for microsoft teams webhooks (#970) 2022-09-16 09:19:59 -05:00
Gawan SchroederandZachary Rice 4f6ee2bcf1 Add baseline (#975)
* Add baseline

* Update doc, add error, move baseline to detect namespace, ignore findings instead of reactively filter them out

* Update detect/detect.go

Co-authored-by: Zachary Rice <zricezrice@gmail.com>

* Update IsNew function (no check on tags - omit finger print check)

* Update README.md

Co-authored-by: Zachary Rice <zricezrice@gmail.com>

* Update examples in readme to make it ensure it's clear that a baseline is indeed a gitleaks report

* Fix test - updated tags doesn't make a finding new

* Add missing err assignment

* Allow scanner to continue without baseline if file is malformed

* Fix typo in comment

* Fix control flow err. (Real life testing)

* Fix wording

* Auto-ignore baseline path
2022-09-16 08:18:31 -05:00
Akash Chandwani 62020539f4 Add pre-commit autoupdate command to README.md (#978) 2022-09-07 08:06:31 -05:00
very-doge-wowandFabian F Groß c8681e4858 refactor: more precise rule for private keys (#930)
* refactor: more precise rule for private keys

The current regex didn't match PGP private keys anymore, since they start with `BEGIN PGP PRIVATE KEY BLOCK` and the `BLOCK` never matched for the existing regex. I've made that part optional so that all strings matching for the current regex will still match for the new regex.

* refactor: more precise rule for private keys

Co-authored-by: Fabian F Groß <fabian.f.gross@deutschebahn.com>
2022-09-05 10:18:44 -05:00
Zachary b93459160a update gitleaksignore 2022-09-04 09:07:32 -05:00
Zachary 8622c39e88 add fingerprint to output 2022-09-04 09:04:53 -05:00
Zachary Rice 96eed6aa0f Pretty output (#973)
pretty output
2022-09-04 08:58:57 -05:00
Akash Chandwani 7d9dd260f4 Update version in readme file (#972) 2022-09-03 07:25:45 -05:00
Zachary Rice e47867d802 ignore empty files (#965) 2022-08-26 09:48:33 -05:00
jmatosgrafana adf512e2ac Add grafana tokens rules (#959)
* Add grafana tokens rules

* Adding upper bound limits to Grafana tokens
2022-08-19 10:43:01 -05:00
Zachary Rice e35cb6707a add prefect and readme rules (#961) 2022-08-19 08:24:15 -05:00
Zachary Rice b6b7cfb6d3 draft: bump gitdiff, add git.Err state, better log messages (#954)
* bump gitdiff, add git.Err state, better log messages

* remove cmd.Start

* forgot to start...
2022-08-16 19:36:25 -05:00
Zachary Rice 1b3f10cb79 Feat/add fingerprint no git (#952)
* no-git support fingerprint support

* updating gitleaksignore w/ no-git false positives

* fix test
2022-08-12 08:08:13 -05:00
Zachary Rice 6748a89bf4 safe file checking (#946) 2022-08-08 14:16:50 -05:00
Zachary Rice 6f6e057042 Update README.md 2022-08-08 11:23:52 -05:00
Zachary Rice b8f236c9b3 Explicit fingerprint (#944) 2022-08-08 07:55:57 -05:00
Zachary c5fc080aa0 add two test findings to gitleaksignore 2022-08-07 13:11:04 -05:00
Zachary Rice 3bace4c735 Feat/ignore finding (#938) 2022-08-07 12:53:58 -05:00
Zachary Rice e890a8e809 add jwt rule (#943)
* add jwt support

* ignore sample secrets
2022-08-06 11:23:23 -05:00
Zachary Rice 49b0b097e4 bump golang test version (#942) 2022-08-06 09:16:16 -05:00
Zachary Rice 31a8e9db7a gitleaks allow docs (#941)
* gitleaks allow docs

* reorder
2022-08-06 08:59:51 -05:00
Malte Morgenstern b1853bd032 Add new rules for vault tokens (#919)
* add new rules for vault tokens

* Configure max length for vault rules
2022-08-03 15:46:46 -05:00
AndrewandAndrew Weiner cd52267113 Feature/add sidekiq rules (#933)
* Add sidekiq rules

* Added two new rules for sidekiq
* Other: Add keywords to square rules per Zach's instructions

* Validate now works, but test suite is failing

* Tests are now passing

* Add Sidekiq Rules: Ran go fmt

* * After resolving conflicts, had to rerun the rule generator to add back the semicolon char
* After running tests, had to fix one line in testdata/expected/report/sarif_simple.sarif

* * Added keywords to simple.toml for sidekiq-sensitive-url so that the rule matches what is in gitleaks.toml

Co-authored-by: Andrew Weiner <aweiner@frontrush.com>
2022-08-03 07:31:40 -05:00
Zachary afc89f91c0 update readme 2022-07-27 18:27:04 -05:00
Zachary 5ae1023aa3 add url for config 2022-07-24 11:57:01 -05:00
Zachary Rice 31650f01e7 Feature: Adding the ability to extend configuration files (#926)
* init

* working on default and path config extensions

* adding trace log level, consolidating some code

* cleaning things up, updating generate package

* fix tests

* formatting

* adding tests for extend

* extend not extends

* formatting

* only allow usedefault or path to be set

* update readme

* add note about allowlists

* more readme, expand env var for path

* actually dont support env var. ez attack
2022-07-24 11:51:50 -05:00
anotherbridgeandAndré Breuer 0d471653b5 Add fix for issue #915 (#916)
Co-authored-by: André Breuer <andre.breuer@ndaal.eu>
2022-07-14 07:20:55 -05:00
Zachary Rice f615d0397d Update README.md 2022-07-12 09:23:53 -05:00
Zachary Rice 40e9172ab3 Update README.md 2022-07-08 17:19:12 -05:00
Zachary Rice 9033132143 Update README.md 2022-07-08 17:07:58 -05:00
Zachary 1fc27eebda adding access to generic rule keywords and identifiers 2022-07-05 15:33:06 -05:00
Craig SmithandCraig Smith f4ddeda433 Fix proper names capitalization (#907)
Co-authored-by: Craig Smith <5344211-craigmsmith@users.noreply.gitlab.com>
2022-07-05 08:26:41 -05:00
Romain Barissat 6210a7e832 Add multi platform build (#897)
Signed-off-by: Romain Barissat <romain-noreply@barissat.com>
2022-07-02 15:28:01 -05:00
Zachary e300b31be5 update twitter rule generation description and id 2022-06-28 06:13:07 -05:00
Zachary 3073e45b0a capitilze twitter description 2022-06-28 06:11:10 -05:00
Zachary d401bd337a Merge branch 'master' of github.com:zricethezav/gitleaks 2022-06-28 06:10:14 -05:00
Zachary 1297b41b10 adding travis ci 2022-06-28 06:10:02 -05:00
Craig SmithandCraig Smith d44cb91306 Fix id and description for twitter tokens (#905)
Co-authored-by: Craig Smith <5344211-craigmsmith@users.noreply.gitlab.com>
2022-06-28 06:09:04 -05:00
Zachary Rice efdc7749df Adding okta, codecov, zendesk, and updating Atlassian's rule to include jira keyword (#904)
* okta

* adding codecov

* add jira to atlassians keywords

* adding zendesk
2022-06-27 20:49:08 -05:00
Zachary Rice e78a22e19c Fix Plaid, add Plaid access token (#903)
* adding airtable and adafruit

* Fix plaid, add plaid-access-token
2022-06-27 18:49:32 -05:00
Zachary Rice 9cc19ec0f8 adding airtable and adafruit (#902) 2022-06-27 18:31:06 -05:00
Zachary 05c165deb2 Fixes accidental type typos while translating rules from validation spreadsheet, adds bittrex rule 2022-06-27 17:03:32 -05:00
Zachary Rice f6a87ca58c Remove ssn allowlist (#898)
* Adding a bunch of new rules, update allowlist to include node_modules and vendor folders, extend helper config functions

* remove ssns from allowlist since default config does not detect ssn
2022-06-27 08:58:00 -05:00
Zachary Rice 73a3cf8afb Adding a bunch of new rules, update allowlist to include node_modules… (#896)
* Adding a bunch of new rules, update allowlist to include node_modules and vendor folders, extend helper config functions

* use func instead of function in stopwords
2022-06-25 11:43:51 -05:00
Zachary Rice d196b83ca6 contributing guidelines first draft (#895)
* contributing guidelines first draft

* update links, add readme note
2022-06-23 17:17:39 -05:00
Alex 35f2ea5da2 Lint python commit script to satisfy PEP8 (#893) 2022-06-21 06:55:43 -05:00
Zachary Rice 70028079b4 Update generate (#892)
* maintain parity with recent changes... need to create rule contributing guidelines

* missed on, ensure uniqueness in rule-id
2022-06-20 14:57:48 -05:00
Zachary Rice c14af5ffdf maintain parity with recent changes... need to create rule contributing guidelines (#891) 2022-06-20 14:14:14 -05:00
Craig SmithandCraig Smith 06b1396a2a Fix duplicate TOML Rules and IDs (#889)
* Remove duplicate rule

* Fix duplicate rule IDs

Co-authored-by: Craig Smith <5344211-craigmsmith@users.noreply.gitlab.com>
2022-06-20 08:49:47 -05:00
Zachary Rice 5d3f247d7d Update README.md 2022-06-16 08:11:20 -05:00
Zachary Rice 404dd8e0c0 Update gitleaks.yml 2022-06-15 17:20:08 -05:00
Zachary Rice 3a1ab48818 Update README.md 2022-06-12 13:25:03 -05:00
Zachary Rice f5c2b636f3 user accounts don't need gitleaks license 2022-06-07 11:48:43 -05:00
Zachary Rice b5ed7ff1b2 Update README.md 2022-06-02 17:47:36 -05:00
Zachary Rice 09007da395 Add gitleaks badge 2022-06-02 17:46:47 -05:00
Zachary Rice d51ce47d86 Create gitleaks.yml (#884) 2022-06-02 17:40:57 -05:00
Zachary Rice 6919447094 add link to gitleaks.io 2022-06-02 17:21:08 -05:00
fooliooandx c3b7932544 fix git unsafe directory (#883)
* fix git unsafe directory

fixes https://github.com/zricethezav/gitleaks/issues/846

* Update Dockerfile

Co-authored-by: x <>
2022-06-02 14:22:03 -05:00
Zachary Rice 82e409a434 Limit newlines regex (#881)
* improve regex to reduce fps with newlines

* remove version from regex and rely on stopwords instead

* add false positive for validation
2022-05-30 12:07:06 -05:00
Zachary 0eb57cbe4d add combo to stopwords, update cmd/generate 2022-05-28 11:47:17 -05:00
Don C. Bigler 3531887941 Fix generic-api-key detected erroneously (zricethezav#877) (#878) 2022-05-28 11:44:49 -05:00
Zachary Rice e9ebde73bc ignore end line when comparing generic rules (#879) 2022-05-28 09:49:27 -05:00
Zachary Rice 469cd22f61 updating generic regex and algoia regex (#875) 2022-05-25 08:00:10 -05:00
SimonGurney 93e72c215d feat: add algolia key support (#866)
* feat: add algolia key support

* feat: add algolia key to generator

* chore: update algolia regex to match gen
2022-05-25 07:39:20 -05:00
Dirkjan Bussink 865478bcdc Improve PlanetScale token detection (#874)
This improves the PlanetScale token detection. It add some flexibility
in length. There is no guarantee that the length is always 43 characters
(in fact, it's very likely to change a bit soon).

Additionally, it adds support for detecting oauth tokens as well.
2022-05-24 22:15:36 -05:00
Zachary Rice d6c0de7c85 Update README.md 2022-05-16 19:08:06 -05:00
Zachary Rice 0266ab8958 Adding JIT Security messages 2022-05-10 11:21:04 -05:00
Zachary Rice 6b7ab73a52 Update README.md 2022-05-02 10:21:40 -05:00
Zachary Rice 61ee7c58cc fix no-git bug (#859) 2022-04-27 21:48:56 -05:00
Zachary Rice ad7509e3b4 Removing private keyword from private key rule (#858) 2022-04-27 07:29:09 -05:00
Zachary Rice a62cc52aba nasty little bug (#853) 2022-04-23 11:18:56 -05:00
Zachary Rice f93e5dc844 adding a ton of stopwords to the generic rule only as that is the loudest rule (#851) 2022-04-21 17:01:21 -05:00
Zachary Rice 8481f0e9cd adding stopwords (#849)
* adding stopwords

* format readme, update default config
2022-04-21 08:31:58 -05:00
Zachary Rice 82f7d61593 Update dockerfile (#848)
* bump alpine and add default safe dir for git

* comment out safe dir fix

* update deps
2022-04-20 18:19:33 -05:00
Zachary Rice a42b32bdf1 fix EOL in secret suffix (#847)
* fix EOL in secret suffix

* allow quoted key value syntax
2022-04-20 17:55:07 -05:00
foolioo 79638b080c unpin docker version in pre-commit hook (#832)
eliminating inconsistency. e.g. for version 8.6.1, pre-commit hooks points to outdated version https://github.com/zricethezav/gitleaks/blob/c33ee3f25215635c0afbb210672779e7efb6f1d2/.pre-commit-hooks.yaml#L10
2022-04-19 21:33:23 -05:00
Zachary Rice 3474c58c9e Generate tps (#845)
* WIP

* simplify tp generation
2022-04-18 21:59:38 -05:00
Zachary Rice d8cd93cabe maybe fix out of bounds (#843) 2022-04-18 14:57:40 -05:00
Zachary Rice 48b79facfa optimize keywords (#841)
* optimize keywords

* use defaults for concurrency again
2022-04-16 17:41:40 -05:00
0xn3va e23f7f58f3 Update detect.go (#839) 2022-04-12 21:44:00 -05:00
Zachary Rice 606bb1a13b Standardize/alphabetize rules, add cmd/generate/config package (#840) 2022-04-12 21:40:48 -05:00
aeongdesu e784980515 fix ghcr.io typo in README.md (#835) 2022-04-08 08:05:06 -05:00
Zachary Rice c33ee3f252 normalize keyword check (#830) 2022-04-06 09:55:36 -05:00
Zachary Rice b0a958f55e Keyword (#825)
* wip keywords optimization

* update readme

* limit concurrency to 4

* update readme
2022-04-05 11:50:50 -05:00
foolioo 237b03af18 doc gitleaks-docker pre-commit hook (#819)
relates to #818
2022-03-29 20:05:28 -05:00
Zach Rice f348991d21 Merge branch 'master' of github.com:zricethezav/gitleaks 2022-03-29 11:54:05 -05:00
Zach Rice e0745adbd2 skip content checks for path only rules 2022-03-29 11:53:48 -05:00
foolioo 1ddc924a67 use official docker image as pre-commit hook (#818)
* use official docker image as pre-commit hook

* Update .pre-commit-hooks.yaml

* Update .pre-commit-hooks.yaml

* Update .pre-commit-hooks.yaml

* Update .pre-commit-hooks.yaml

* Update .pre-commit-hooks.yaml
2022-03-28 17:18:12 -05:00
Zach Rice 0b07625567 remove stopwords from global allowlist 2022-03-28 08:03:16 -05:00
Adam Shannon 0cabbf8ca8 detect: skip binary files with --no-git (#810) 2022-03-22 14:32:47 -05:00
Zachary Rice ba9e089e35 fixing a location off by one edge case for --no-git (#812) 2022-03-22 14:22:46 -05:00
Zachary Rice 31ff8677dd Update README.md 2022-03-21 13:36:29 -05:00
Zachary Rice 3e5e63956e Allow tag (#809)
* gitleaks:allow signature

* readd all tests

* fixing tests
2022-03-19 10:32:04 -05:00
Zachary Rice 57f9bc83d1 Stop words (#808)
* use regex for stopwords

* fix up regex

* rm stopwords
2022-03-19 09:31:38 -05:00
Zachary Rice 6e72472b60 Refactor detect, add entropy to all findings (#804)
Refactor `detect`, add `entropy` to all findings
2022-03-12 11:50:01 -06:00
Isaac Dawson 9326f35380 Escape - character in regex character groups (#802)
* fix char escape

* add test

* fix verbosity in make test
2022-03-07 08:33:06 -06:00
jetexe 19555579c8 adding go mod/sum to ignore (#797) 2022-03-01 10:16:17 -06:00
Greg JohnsonandGreg Johnson 60dd607312 GitLab pats may contain underscores as well as dashes (#794)
* gitlab pats may contain underscores as well as dashes

* include testdata index binary

Co-authored-by: Greg Johnson (codeEmitter) <gjohnson@gitlab.com>
2022-02-28 08:03:09 -06:00
Andrzej Amghar c3b799ec63 ignore k8s apiVersion in generic-api-key pattern (#760) 2022-02-22 17:00:20 -06:00
rui 4b6f4d0de5 build: updates for go1.17 (#769)
* build: remove `GO111MODULE` as it turned on by default

Signed-off-by: Rui Chen <rui@chenrui.dev>

* build: update for go1.17

* run test

Signed-off-by: Rui Chen <rui@chenrui.dev>

* lint: remove unused code
2022-02-22 16:49:45 -06:00
Zachary Rice fbfb3f591e allow non-last-element secret groups (#792) 2022-02-22 16:34:56 -06:00
Zachary Rice b91799aa18 fixing segfault when using a rule with only a path (#791)
* fixing segfault when using a rule with only a path

* DRYing
2022-02-22 15:58:03 -06:00
Luca Regne db1b54bf9f Fix: Typo in LinkedIn id (#789) 2022-02-22 09:49:55 -06:00
Ian Mckay e9529744f8 Fix vendor name casing, Flutterwave typo (#785) 2022-02-19 10:24:47 -06:00
Chris Wolf d1f642a9df Sarif results with empty rules now represents as [] instead of null/nil (#786) 2022-02-19 10:20:35 -06:00
Greg Myers 9261f1c47f Fix typos in README.md (#780)
comand ==> command
awsome ==> awesome
precendence ==> precedence
2022-01-29 12:08:55 -06:00
Zachary Rice 991223abab remove godoc text filtering (#763) 2022-01-07 10:59:51 -06:00
Zachary Rice 801d44a6e4 limit number of goroutines for historic scanning as well (#761) 2022-01-07 08:58:47 -06:00
Zach Rice 44d7d89e19 always write sarif results 2021-12-28 19:13:26 -06:00
Zachary Rice aae23acff3 limit goroutines on file scanning to avoid pegging them cores (#759) 2021-12-21 18:10:29 -06:00
Zachary Rice 705595aaf6 Adding Typeform to sponsorships 2021-12-21 08:26:47 -06:00
Zachary Rice 43ec22429f write a report regardless if leaks are present (#758) 2021-12-17 17:26:14 -06:00
Zachary Rice 36779df3bb stricter ionic regex for less fps (#757) 2021-12-17 10:13:44 -06:00
Zachary Rice 3d3d801729 fixing eof location bug (#756) 2021-12-17 09:49:12 -06:00
Zachary Rice 0f2ffee6f9 Adding Tines sponsorship to readme 2021-12-16 10:39:45 -06:00
Andrzej Amghar f4d37a2c0d fix regexp for aws_key and slack_webhook (#754) 2021-12-16 07:48:18 -06:00
Zachary Rice be5596df1d Update README.md 2021-12-12 13:38:43 -06:00
Zachary Rice e97f26bb5f better asciinema 2021-12-12 13:36:57 -06:00
Zachary Rice ae13c96df8 Update README.md 2021-12-12 13:19:58 -06:00
Zachary Rice d15dfdc387 Update README.md 2021-12-12 13:19:06 -06:00
Zach Rice 631d8dcf03 bump go-gitdiff 2021-12-12 12:23:59 -06:00
Zachary Rice 192b96289f do not fail on git rename warning (#750) 2021-12-12 11:43:03 -06:00
Zachary Rice b8141713e8 add pre-commit instructions (#749) 2021-12-10 18:08:31 -06:00
Zachary Rice 3fedf6f8e7 remove writing default config, introduce GITLEAKS_CONFIG (#746)
* remove writing default config, introduce GITLEAKS_CONFIG

* setting report format default to json, update readme
2021-12-09 09:21:17 -06:00
Zach Rice 6f6ebd454f fix off by one line number for --no-git 2021-12-08 15:04:32 -06:00
Zachary Rice ce42947cae fix deduplication issue caused by clobbered findings (#742)
* fix deduplication issue caused by clobbered findings

* fix index

* remove indexing, slow is better than wrong
2021-12-07 19:11:37 -06:00
Zach Rice 84e285e4ce ignore gitleaks.toml by default 2021-12-06 10:43:21 -06:00
Ben Randall 928c6a6043 Update pre-commit step to run gitleaks checks (#729)
* Fix pre-commit config.

* Debug output

* No debug and use redacted.

* Typo

* Add back staged.

* Update .pre-commit-hooks.yaml

* Update .pre-commit-hooks.yaml
2021-12-03 16:09:05 -06:00
Florian Greinacher 106897fdf0 fix: format dates in log in a portable way (#735)
The output of time.String() depends on the runtime environment and should only be used for debugging.

This commit ensures that a well-defined UTC time is written to the report.
2021-12-03 09:34:57 -06:00
Zachary Rice 98d5648f6e introducing secretGroup, the best group (#734)
* working on deduping

* my eyes... oh god my poor eyes

* more readme

* more readme

* more readme

* more readme and formatting
2021-12-02 20:04:36 -06:00
zricethezav 9358e84588 fix typo in readme 2021-12-02 13:55:43 -06:00
zricethezav 958c18f0b7 fix typo in config help 2021-12-02 13:44:39 -06:00
Zachary Rice 089639e9fb bump go-gitdiff (#731) 2021-12-02 08:29:38 -06:00
Zachary Rice 85afd767f7 Update README.md 2021-12-01 18:38:22 -06:00
Zachary Rice 38006fb93b Update README.md 2021-11-30 14:31:08 -06:00
Zachary Rice 9ae1def963 lil hack to avoid scans 'finishing' when git errors are present (#726) 2021-11-30 12:31:25 -06:00
Zachary Rice 6517900e5a Update README.md 2021-11-30 12:24:10 -06:00
Zachary Rice 5e51da600b use exit code 126 on 'unknown-flag' errors (#723) 2021-11-30 09:47:00 -06:00
Zachary Rice f0b8d26c99 Update README.md 2021-11-27 10:40:00 -06:00
Zachary Rice 1724591029 remove generic api key from default gitleaks config (#719) 2021-11-27 10:01:52 -06:00
Zachary Rice 80d29764a0 add global regex check (#717) 2021-11-25 11:17:03 -06:00
Zachary Rice f498b1d308 Commit debug log (#716)
* adding debug log for number of commits scanned

* change debug text

* readd commitsha
2021-11-25 10:46:47 -06:00
Joost Voskuil 8eabfd614e Update sarif.go (#713)
* Update sarif.go

Provide correct version information for Sarif Reports

* Update test

Set version to correct Sarif version
2021-11-25 10:46:31 -06:00
Zachary Rice 4acd7a3c8d adding logic to ignore gitleaks config during scans (#710) 2021-11-24 20:27:19 -06:00
zricethezav a37822dffd remove --show-pulls from git log 2021-11-24 08:06:13 -06:00
Zachary Rice 1c6b28aa61 removing --simplify-merges and --show-pulls (#707) 2021-11-24 07:30:59 -06:00
Zachary Rice f15b4e408b Update README.md 2021-11-22 14:25:42 -06:00
Zachary Rice d5f9d2b5d2 Update README.md 2021-11-22 14:25:06 -06:00
zricethezav 67a7069bb8 trying again 2021-11-22 12:15:31 -06:00
zricethezav fd5d786538 override version in goreleaser 2021-11-22 12:11:02 -06:00
zricethezav c017b763f3 actually we gonna use git describe for docker build 2021-11-22 11:46:24 -06:00
zricethezav e796458763 remove sorting tags 2021-11-22 11:29:31 -06:00
zricethezav 2a9fbbc64d remove git fetch tag from docker build process, already available 2021-11-22 11:21:55 -06:00
zricethezav d6081d0cc4 actually use github.actor 2021-11-22 11:09:08 -06:00
zricethezav e6c3a495ce hardcode username to avoid redaction in action 2021-11-22 11:07:40 -06:00
Zachary Rice 93f292c3df Introducing v8.0.0 changes (#701)
* Introducing v8.0.0 changes
2021-11-22 10:43:51 -06:00
Ramon 780fb4a8f1 Merge pull request #653 from w0rmr1d3r/document_issue_638
Updating documentation on how to build the docker image (issue #638)
2021-10-28 08:50:04 +02:00
Ramon 0d9ab37ba4 Merge pull request #678 from ihassanyousaf/patch-1
fix possible typo in README.md `leaves` had been written instead of `leaks`
2021-10-28 08:48:52 +02:00
Ramon acffe44440 Merge pull request #658 from w0rmr1d3r/update_pre-commit_example
Update readme
2021-10-28 08:48:37 +02:00
M.Hassan Yousaf 178f78fa14 fix possible typo in README.md 2021-10-27 19:07:21 +02:00
Ramon 1ab1ae0e70 Merge pull request #673 from dirkaholic/fix/issue-672
Update regex for AWS secret key (issue #672)
2021-10-26 15:43:47 +02:00
Dirk Pahl 9f8ca91b8b Adjust AWS secret key rule 2021-10-26 15:09:42 +02:00
Dirk Pahl eec6c5a391 Fix tests with existing AWS secret keys 2021-10-26 13:29:36 +02:00
Dirk Pahl 714c0bef1e Update regex for AWS secret key 2021-10-26 12:35:35 +02:00
Ramon e9b699dda1 Merge branch 'master' of https://github.com/w0rmr1d3r/gitleaks into update_pre-commit_example
 Conflicts:
	README.md
2021-10-19 14:57:53 +02:00
Ramon 5afe59d2fa Merge pull request #662 from lucas-apd/patch-1
ADD_installation_from_bin
2021-10-19 14:54:11 +02:00
Lucas Alcântara 8adf27b1ea Update README.md 2021-10-19 09:50:39 -03:00
Ramon aecd32075e Merge pull request #665 from krsche/feature/fix-typo-in-readme
fix: typo in readme
2021-10-19 09:44:36 +02:00
Fabian Kirschner 290118cbbe fix: typo in readme 2021-10-14 22:12:24 +02:00
Lucas Alcântara d2e1e43a25 ADD_installation_from_bin
ADD_installation_from_bin
2021-10-13 16:41:36 -03:00
Ramon 2161ff358b Merge pull request #654 from nickrussler/master
Bump alpine to v3.14.2
2021-10-11 08:19:22 +02:00
Ramon f338bc584f Merge pull request #558 from AmitHofree/fix_default_config
Removed unnecessary backslashes in default config
2021-10-11 08:17:17 +02:00
Ramon e6a132bf4f Merge pull request #660 from GrahlmanMatthew/master
Fixed bug in extractLine function which was returning incorrect line # …
2021-10-11 08:16:57 +02:00
Ramon 8625cc30db Merge pull request #661 from danielorihuela/fix/loading-csv-reports-in-excel-with-commits-with-new-lines-characters
fix: csv report in excel
2021-10-11 08:16:33 +02:00
Matthew E. Grahlman 7cc3d7e467 Fix for Windows OS 2021-10-10 17:27:45 -04:00
Matthew E. Grahlman b8ff5eec73 Had to re-add testdata/ folder to project in order to get scan tests passing on Windows 2021-10-10 16:40:13 -04:00
Matthew E. Grahlman 36a4871585 Made changes to add support for cross-platform (os) testing as tests would pass on MacOS but no Windows 2021-10-10 16:38:24 -04:00
amith-legit c85ebbb2ba Try to revert index file 2021-10-10 22:51:54 +03:00
amith-legit 3a3e13c3b5 Added EOL to sample file 2021-10-10 22:51:44 +03:00
dani 14a00e1ffd chore: lint code 2021-10-10 12:47:46 +02:00
Ramon bd707fa9c4 fix: csv report in excel 2021-10-10 12:45:35 +02:00
Ramon 5e6b1840df Merge pull request #659 from chenrui333/add-apple-m1-support
build: add apple m1 support
2021-10-10 11:41:37 +02:00
Matthew E. Grahlman d8e3a694f2 Fixed bug in extractLine function which was returning incorrect line # when the line contains multiple vuln types 2021-10-09 10:55:39 -04:00
Rui Chen 05e3462025 build: add apple m1 support
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-10-08 16:53:52 -04:00
AmitHofree b83fe80968 Merge branch 'master' into fix_default_config 2021-10-08 22:26:35 +03:00
Ramon 5db0159c52 update readme 2021-10-08 15:05:34 +02:00
Nick Russler 5f87c4137c Bump alpine to v3.14.2
This alpine release includes fixes for openssl CVE-2021-3711 and CVE-2021-3712
2021-10-04 21:51:59 +02:00
Ramon ea94318ba3 updating documentation on how to build the docker image 2021-10-04 12:48:15 +02:00
Dustin Shimonoanddustin 3128789777 Add clarification in README.md that Go 1.16+ required. (#651)
* fix: fix the multiple scan executions from pre-commit hook

* docs: add clarification note about Go version required\

Ref 646

Co-authored-by: dustin <dustinshimono@gmail.com>
2021-09-30 11:00:21 -05:00
Dustin Shimonoanddustin 270207e5eb fix: fix the multiple scan executions from pre-commit hook (#649)
Co-authored-by: dustin <dustinshimono@gmail.com>
2021-09-30 09:49:09 -05:00
Ramon efe96640fc Merge pull request #645 from b-abderrahmane/patch-1
Fixed minor typo in Readme.md
2021-09-26 18:59:43 +02:00
b-abderrahmane 0137637c2c Fixed typo in Readme.md
Fixed description of main example rule
2021-09-25 11:14:52 +02:00
Zachary Rice 6adc045580 Simplify tests and continue on object not found errors (#633)
* adding files

* init better tests

* add basic .git

* more tests and test data

* nogit, unstaged tests

* removing unused testdata

* adding empty testdata

* rm gitmodules

* fixing tests

* remove with config

* adding with_config

* removing old test_data, updating config tests

* removing hooks in testdata repos
2021-09-09 11:46:31 -05:00
amith-legit 45c898c5ea Added a test for fixed Google and Square config 2021-09-09 11:29:34 +03:00
Ramon 95f8bd0daa Merge pull request #631 from EliSchleifer/elischleifer/fix-readme
Fix README link
2021-09-09 09:54:48 +02:00
Eli Schleifer 2cc2519302 Fix README link
Fix up readme link
2021-09-09 00:06:48 -07:00
amith-legit be13bba64c Merge branch 'master' into fix_default_config 2021-09-09 10:02:53 +03:00
Ramon 7111a698c0 Merge pull request #621 from Ido-DY/master
fix(git-symlink-new-repo): fix handling symbolic links in new git repo
2021-09-08 11:00:58 +02:00
Zachary Rice 8b9092a248 Create README.md 2021-09-07 15:29:56 -05:00
Ramon 0aa05133a9 Merge pull request #627 from w0rmr1d3r/update_documentation
Update documentation
2021-09-07 15:32:37 +02:00
Ramon 2952df5432 update documentation 2021-09-07 08:44:46 +02:00
Zachary Rice 541e26b067 Update FUNDING.yml 2021-09-06 16:51:38 -05:00
Eddie Austinandeddie-northcutt-wfp0 6018a6bb70 No longer generate empty reports (#577)
* return nil when no leaks found and lowercase report format option (#3)

* lowercase format options for consistency

* lowercase report format description

Co-authored-by: eddie-northcutt-wfp0 <eddie.northcutt.wfp0@statefarm.com>
2021-09-06 16:39:50 -05:00
Zachary Rice ca987b3842 Update README.md 2021-09-04 19:27:44 -05:00
Ido Markovitz 67f8d28d7f fix(git-symlink-files): fix handling symbolic links in unstaged changes 2021-09-04 11:10:53 +03:00
Ido-DY f88abe99d7 Merge branch 'zricethezav:master' into master 2021-09-04 10:36:26 +03:00
Zachary Rice 6ddf27c5c3 Fix premature exit for nogit scans, limit goroutines (#619)
* fix premature exit on nogit scan, actually limit concurreny for nogit

* removing files scanned log
2021-09-03 19:32:33 -05:00
Zachary Rice aadd9387b2 Create maintenance.md 2021-09-03 11:01:05 -05:00
Zachary Rice 0fd68c901d GitHub test (#617)
* drop travis

* remove travis

* rename, use example

* typo

* different syntax

* rename to test

* split test and build into two jobs

* add gosec job

* drop gosec for now
2021-09-03 08:41:17 -05:00
zricethezav 17a3943afe bump golang docker version 2021-09-02 14:44:58 -05:00
Zachary Rice abc73e2443 use embed pkg for default config, update deps (#616) 2021-09-02 14:42:14 -05:00
Zachary Rice 3c1751e5c4 Update alpine, use gitleaks user instead of root (#615)
* Updating alpine, use gitleaks user instead of root

* remove comments
2021-09-02 10:21:22 -05:00
Ido-DY a32ef6afc4 fix(git-symlink-commits): fix handling symbolic links in a git repository (#612) 2021-09-02 09:35:38 -05:00
rotem-cider 127df8a6f0 Updated RuleId in Sarif (#613) 2021-09-02 09:34:45 -05:00
Ivan Kalita aa91fd3e5e Fix default twitter rules (#614)
Regexps for default Twitter rules ("Twitter Secret Key" and "Twitter Client
ID") have a small flaw that make the default configuration vulnerable to
some false-positives.

I believe these rules should detect the cases like (SOME_CLIENT_ID should
be longer):
```
"twitter_client_id": "SOME_CLIENT_ID"
```

However, currently the twitter rules also detect the false positives for the
cases like:
```
someObj := twitter.NewObjectWithALongName()
config.Twitter.DomainAccessToken
```

I'm trying to address this issue the similar way it's done for facebook client
ids and AWS secret keys, where the secret is expected to be quoted.
2021-09-02 09:26:01 -05:00
Ido Markovitz c8e97d97f9 fix(git-symlink-commits): fix handling symbolic links in a git repository 2021-08-29 15:02:37 +03:00
Emma Sax 67e3603ba4 Remove --commit-from and --commit-to from docs (#605) 2021-08-20 12:18:27 -05:00
Tomasz Wierzchowski f62617d7a6 Update type in config example (#597) 2021-08-13 08:42:31 -05:00
Zachary Rice 9324184c24 Update README.md 2021-08-13 08:29:42 -05:00
Zachary Rice a80ce0d251 Update README.md 2021-07-29 17:40:34 -05:00
Ramon c1c4a93f98 Fix issue #523 (#561)
* updating documentation regarding issue #523

* improving README.md file
2021-05-10 11:39:09 -05:00
Norman Ziegner e74e6292ee Fix example in leaky-repo.toml (#559)
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
2021-05-07 09:08:03 -04:00
Tomy Guichard 25c3e92c2a SSH auth: Add custom username support (#536)
* Add support for custom username when using SSH auth
Previously, the user "git" was hard-coded
This commit also adds support for ssh:// URLs

* Add comment to explain username parsing
2021-05-05 12:30:12 -04:00
Zachary Rice 9ab424172d Update README.md 2021-05-05 09:22:56 -04:00
zricethezav 28fd47e170 Bump version for pre-commit 2021-05-05 09:10:47 -04:00
bplaxco 8250e40a75 Include offenderEntropy in the JSON output (#549)
* Pass the entropy data back to the Leak struct

Do this to make it easier to tune entropy checks and make decisions in
systems consuming the output.

~ B'ezrat Hashem ~

* Return negative number when entropy not checked

That way you can tell the difference between not checking or an
actual entropy level of 0

~ B'ezrat Hashem ~

* Make sure to handle range checks properly

Make sure to show when something had an entropy returned but was outside
range, or didn't have a hit at all, etc...

~ B'zrat Hashem ~

* Add a few doc strings

Follow the project's conventiona add a comment above the methods

~ B'ezrat Hashem ~

* Update tests and get them to pass

~ B'ezrat Hashem ~

* Remove checked in `.got` files

~ B'ezrat Hashem ~

* Add `*.got` to the `.gitignore`

Make sure the test output files aren't checked-in

~ B'ezrat Hashem ~
2021-05-03 20:22:20 -04:00
AmitHofree f735c9a5c9 Removed unnecessary backslashes 2021-05-02 15:47:05 +03:00
Pavel Shklovsky e7553b0168 Add pre-commit support (#552)
* Add pre-commit support

* Update README.md
2021-04-22 18:37:28 -04:00
Zachary Rice 12d276acd7 Bug 553 global allowlist (#554)
* add global file check

* rm whitespace
2021-04-22 18:07:07 -04:00
Pavel Shklovsky e6934bf0a5 Docker-based pre-commit configuration example (#551)
* Docker-based pre-commit configuration example

* Docker-based pre-commit configuration example
2021-04-21 12:58:03 -04:00
Zachary Rice 6f5ad9dc0b Update README.md 2021-04-12 11:07:28 -04:00
Zachary Rice a2019a4782 Update README.md 2021-04-09 14:21:15 -04:00
zricethezav 5d7b7718ec splitting out github rules and retabbing 2021-04-09 14:07:23 -04:00
Zachary Rice 190877a24b Pypi GitHub rules (#546)
* adding pypi and basic azure rules

* Adding new github format
2021-04-08 16:34:08 -04:00
mercurieteandmercuriete 144362b972 docs(Dockerfile): Fix example of usage on Dockerfile (#545)
* Closes #544

Co-authored-by: mercuriete <mercuriete@gmail.com>
2021-04-08 10:23:03 -04:00
Zachary Rice d353ac5108 Update README.md 2021-04-06 14:42:44 -04:00
Zachary Rice a27a08904a Update README.md 2021-03-05 16:40:07 -05:00
Zachary Rice 5ef4e336ce Update README.md 2021-03-05 16:39:23 -05:00
zricethezav 78f2c46517 Consistency in options 2021-03-05 16:19:24 -05:00
Kai bdcb9e33a8 Update SARIF output to return empty array if no results were found (#530) 2021-03-05 16:10:53 -05:00
Zachary Rice 6e4e9df55f stricter regex for github token (#535) 2021-03-05 16:10:04 -05:00
Zachary Rice b3bed5658d adding recover for patch generation (#534) 2021-03-05 16:00:41 -05:00
eddie-northcutt-wfp0 a10ae91ba7 v7.x Update - Add ability to append repo configurations, and user supplied configurations to the specified or default configuration (#487)
* Update merge configuration changes for  Gitleaks 7.x

* Change merge to append, and did some clean up
2021-03-05 15:09:10 -05:00
Zachary Rice a8dbc7f107 Update README.md 2021-02-25 16:33:24 -05:00
erikaweir 4544156b44 Copy edits to Readme.md (#529)
* Update README.md

* Update README.md

* Update README.md
2021-02-19 18:01:31 -05:00
Rahul sharma b52e8c9c7c Slack Webhook Match (#527) 2021-02-19 13:05:25 -05:00
rui 0ce1249b95 chore(deps): bump go to v1.16 (#525)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-02-18 09:14:10 -05:00
675 changed files with 14617 additions and 7338 deletions

No files matched your search

-1
View File
@@ -1,4 +1,3 @@
# These are supported funding model platforms
github: [zricethezav]
custom: ["https://www.paypal.me/zricethezav"]
+16
View File
@@ -0,0 +1,16 @@
---
name: Maintenance request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.
cc @zricethezav
+13
View File
@@ -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 }}
+57
View File
@@ -0,0 +1,57 @@
name: Create and publish a Docker image
on:
release:
types: [published]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- 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@49ed152c8eca782a232dede0303416e8f356c37b
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
zricethezav/gitleaks
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8
with:
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+26
View File
@@ -0,0 +1,26 @@
name: Test
on:
pull_request:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Build
run: go build -v ./...
- name: Test
run: make test
- name: Validate Config
run: cd cmd/generate/config && go run main.go
+7
View File
@@ -6,8 +6,15 @@
*.dylib
*.DS_STORE
*.idea
*.got
gitleaks
build
# configs
.gitleaks.toml
cmd/generate/config/gitleaks.toml
# Test binary
*.out
dist/
+745
View File
@@ -0,0 +1,745 @@
418edf165dbb63d6f46993ae8f8818ffd87ea582:cmd/generate/config/rules/jwt.go:jwt:17
418edf165dbb63d6f46993ae8f8818ffd87ea582:cmd/generate/config/rules/jwt.go:jwt:19
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:46
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:48
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:50
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:52
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:54
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:55
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:56
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:57
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:22
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:24
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:28
525d9792b1e3670b4630b8fcc385ca22e8544f9b:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:29
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-sensitive-url:164
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-sensitive-url:170
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:120
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:126
525d9792b1e3670b4630b8fcc385ca22e8544f9b:detect/detect_test.go:sidekiq-secret:142
31650f01e76858ce7a0490943426e84a0824bbc8:config/config_test.go:aws-access-token:31
5ed010c944ccc715cb9245abafd4e97d98d75e9f:config/config_test.go:aws-access-token:31
ad7509e3b47331ce9586743ace635422843b695b:cmd/generate/config/rules/privatekey.go:private-key:22
717cf1b10be1625875199eca8cdf48883348985f:README.md:aws-access-token:23
3474c58c9e25fe2b1cee855a35bd1bf8a8c0fae8:cmd/generate/config/rules/generic.go:clojars-api-token:38
a42b32bdf11b6f4ea5c32ec76a1731b4b0c5e52a:cmd/generate/config/rules/generic.go:generic-api-key:40
a42b32bdf11b6f4ea5c32ec76a1731b4b0c5e52a:cmd/generate/config/rules/generic.go:generic-api-key:41
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:50
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:60
3e5e63956ea770be734dcb7642cf515910154fb5:detect/detect_test.go:aws-access-token:61
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:pypi-upload-token:29
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:51
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:73
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:81
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:89
33082a996774ba4c8ad4ba26fd219d77497eb960:README.md:sidekiq-secret:43
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:98
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:235
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:236
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:253
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:254
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:278
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:279
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:343
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:344
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:362
57d2d345b6b6ea220be9d99792b21a75359555c0:detect/detect_test.go:aws-access-token:363
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:pypi-upload-token:27
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:49
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:71
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:79
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:87
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:120
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:96
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:128
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:118
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:150
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:126
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:discord-api-token:166
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:175
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:183
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:238
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:239
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:256
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:257
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:281
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:282
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:356
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:357
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:375
6e72472b6019d29eaa4b76b39700cd2418741f0c:detect/detect_test.go:aws-access-token:376
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:148
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:27
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:32
17b5540fb16bd9816d2a3a83f65cedf5918eaf70:detect/detect_test.go:pypi-upload-token:33
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:discord-api-token:164
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:173
c9bc6b46087e700a42eb3492cf2053b7da4a6d9e:detect/detect_test.go:aws-access-token:181
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:43
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:60
ce42947cae32cda8d5d8813c1a8ce82eb06f018e:detect/git_test.go:aws-access-token:85
b8141713e89f5acec500c7a62415f0f1cb7234dc:README.md:discord-client-secret:273
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:aws-access-token:130
b8141713e89f5acec500c7a62415f0f1cb7234dc:README.md:discord-client-secret:289
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:discord-client-secret:251
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:README.md:discord-client-secret:267
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/detect_test.go:aws-access-token:33
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/files_test.go:aws-access-token:32
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:detect/files_test.go:aws-access-token:50
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:config/config_test.go:generic-api-key:133
80d29764a0bc0f269607d3eb7b2774a0f31e5da3:detect/detect_test.go:aws-access-token:123
80d29764a0bc0f269607d3eb7b2774a0f31e5da3:testdata/config/allow_global_aws_re.toml:aws-access-token:8
4acd7a3c8d20b7116a32f9bbade6a3cf15f741e4:detect/detect_test.go:aws-access-token:117
f0b8d26c9988af725132c100dda5051586a3026e:README.md:discord-client-secret:225
98d5648f6e54ea84ca915c73fff88ad3bc5809e0:config/config_test.go:generic-api-key:144
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:121
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:122
93f292c3dfa2649ef91f8925b623e79546fa992e:README.md:aws-access-token:157
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:aws-access-token:31
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:32
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:33
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:50
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/files_test.go:aws-access-token:51
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:42
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:44
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:58
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:60
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:82
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/git_test.go:aws-access-token:83
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:generic-api-key:133
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/config/allow_aws_re.toml:aws-access-token:9
93f292c3dfa2649ef91f8925b623e79546fa992e:config/config_test.go:generic-api-key:144
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small-branch-foo.txt:aws-access-token:15
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/repos/nogit/main.go:aws-access-token:20
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small.txt:aws-access-token:15
93f292c3dfa2649ef91f8925b623e79546fa992e:testdata/expected/git/small.txt:aws-access-token:44
3a3e13c3b5f85b0116cf2a0cd92529baf22d0ac9:testdata/repos/with_square_and_google/env:generic-api-key:3
6adc045580c3911a7a936be7b977979a5519aa29:scan/unstaged_test.go:aws-access-token:38
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_208ae46.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_208ae46.json:aws-access-token:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_ae8db4a2_208ae46.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_ae8db4a2_208ae46.json:aws-access-token:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:20
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results.json:aws-access-token:22
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_depth_1.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_depth_1.json:aws-access-token:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:20
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_files_at_208ae46.json:aws-access-token:22
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:5
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:26
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:31
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:40
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:46
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:aws-access-token:52
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:59
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:74
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:80
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:95
93f292c3dfa2649ef91f8925b623e79546fa992e:detect/detect_test.go:discord-api-token:109
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:20
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_no_git.json:aws-access-token:22
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/basic/results_unstaged.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:generic-api-key:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:generic-api-key:6
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:aws-access-token:9
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/basic/secrets.py:aws-access-token:13
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:54
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:aws-access-token:56
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:20
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:22
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:37
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results.json:generic-api-key:39
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:20
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:generic-api-key:22
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:aws-access-token:37
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_e7c0aff3.json:aws-access-token:39
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:aws-access-token:37
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:aws-access-token:39
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:3
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:20
6adc045580c3911a7a936be7b977979a5519aa29:testdata/expect/with_config/results_ae8db4a_e7c0aff.json:generic-api-key:22
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:generic-api-key:5
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:generic-api-key:6
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:aws-access-token:9
6adc045580c3911a7a936be7b977979a5519aa29:testdata/repos/with_config/secrets.py:aws-access-token:13
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_repos/test_dir_2/env:generic-api-key:1
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_repos/test_dir_2/env:generic-api-key:3
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_dir_one_google_leak_and_square_leak.json:generic-api-key:3
45c898c5ea56ee503a048c1bac1404cf63855edc:test_data/test_dir_one_google_leak_and_square_leak.json:generic-api-key:20
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:35
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:37
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:259
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:261
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:339
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:51
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:83
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:85
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:131
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:133
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:147
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:149
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:179
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:227
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:229
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:323
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:355
65f42020afcc65de3b7dfe5a797b9f6396345250:test_data/test_local_owner_aws_leak.json:aws-access-token:357
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_file1_aws_leak.json:aws-access-token:3
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_file1_aws_leak.json:aws-access-token:5
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:3
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:5
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:17
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_dir1_aws_leak.json:aws-access-token:19
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_repos/test_dir_1/server.test.py:aws-access-token:5
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_repos/test_dir_1/server.test2.py:aws-access-token:5
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:99
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:101
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:115
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:117
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:131
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:133
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:147
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:149
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:163
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:165
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:179
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:181
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:195
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:197
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:211
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:213
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:83
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:85
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:99
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:101
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:115
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:117
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:131
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:133
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:147
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:149
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:163
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:165
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:179
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:259
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:261
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:181
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:195
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:197
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:339
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak.json:aws-access-token:341
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:3
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:5
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:18
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:20
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:33
2acc34dfdfb0e7f1141eadd940ea933c645e0f86:test_data/test_local_repo_three_leaks_with_report_groups.json:aws-access-token:35
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:259
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:261
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_to_from.json:aws-access-token:3
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_to_from.json:aws-access-token:5
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:323
c50906373cc38206f3d41c57e2c413ce400e61e7:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:325
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:18
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:20
fae366a404357fa6c6611756a11e61546ebec4e0:examples/simple_regex_and_allowlist_config.toml:aws-access-token:12
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:3
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:5
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:18
ad505754fc6283523ef8dfa88ecb6559e0268ec3:test_data/test_local_repo_two_leaks_file_commit_range.json:aws-access-token:20
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_configs/aws_key_aws_allowlisted.toml:aws-access-token:7
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak.json:aws-access-token:185
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:185
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_repo_nine_aws_leak.json:aws-access-token:3
fae366a404357fa6c6611756a11e61546ebec4e0:test_data/test_local_repo_nine_aws_leak.json:aws-access-token:5
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:78
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:80
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:138
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:140
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:153
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:155
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:168
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak.json:aws-access-token:170
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:138
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:140
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:153
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:155
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:168
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_owner_aws_leak_allowlist_repo.json:aws-access-token:170
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:3
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:5
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:18
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:20
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:33
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_local_repo_eight.json:aws-access-token:35
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_repos/test_repo_8/dummy.txt:aws-access-token:2
eabc7b5c12cb89b4a828b7aaef00fdfa694a7e0a:test_data/test_repos/test_repo_8/dummy.txt:aws-access-token:6
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:48
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak.json:aws-access-token:48
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:33
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak.json:aws-access-token:93
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:78
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:18
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_three_leaks.json:aws-access-token:48
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:78
6ca7a11d8846af2a3d26f71c4a9083eb0b3deeee:test_data/test_local_repo_two_leaks.json:aws-access-token:33
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:3
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:4
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:16
bdc688dd5351adf1cf5cbf734dfd104ea6bab92b:test_data/test_local_repo_two_whitelist_commits.json:aws-access-token:17
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_since_date.json:aws-access-token:3
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_since_date.json:aws-access-token:4
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_until_date.json:aws-access-token:3
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_six_leaks_until_date.json:aws-access-token:4
0d7c18cb39c60efb62a6c7b351f95d46ebe1f63e:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:172
0d7c18cb39c60efb62a6c7b351f95d46ebe1f63e:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:173
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:3
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:4
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:16
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:17
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:29
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:30
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:42
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:43
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:55
e0f6399d5ccadd44544cdfe5f630de57fced1473:test_data/test_local_repo_four_leaks_commit_timerange.json:aws-access-token:56
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:3
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:4
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:16
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:17
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:29
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:30
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:42
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:43
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:55
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:56
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:68
cfbb600fcb286e1323e2e4d24144eeca163ad396:test_data/test_local_repo_two_leaks_deletion.json:aws-access-token:69
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_local_repo_seven_aws_leak_uncommitted.json:aws-access-token:3
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_local_repo_seven_aws_leak_uncommitted.json:aws-access-token:4
212232f80a22c4c698dd2864006f398ea1f15107:test_data/test_repos/test_repo_7/file:aws-access-token:5
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:55
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:56
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:94
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:95
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:55
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:56
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:134
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:160
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:94
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:133
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:134
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:172
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:173
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:3
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:4
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:16
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:17
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:29
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:30
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:42
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:43
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:55
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:56
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:68
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:69
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:81
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:82
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:94
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:95
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:107
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:108
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:120
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:121
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:133
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:134
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:146
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:147
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:159
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:160
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:172
473d0d55a71097894c5c6b9a2968ad478d2e6edf:test_data/test_local_owner_aws_leak_whitelist_repo.json:aws-access-token:173
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:185
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:186
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:29
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:30
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:42
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:43
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:224
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:225
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:211
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:212
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:263
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:264
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:237
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:238
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:276
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:277
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:316
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:342
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:55
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:56
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:95
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:121
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:3
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:4
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:29
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:30
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:42
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_five_files_at_latest_commit.json:aws-access-token:43
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:43
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:43
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:146
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:147
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:380
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:381
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:406
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:407
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:445
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_owner_aws_leak.json:aws-access-token:446
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:16
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:17
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:68
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:69
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:55
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:56
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:172
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks.json:aws-access-token:173
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:68
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:69
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:95
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_owner_aws_leak.json:aws-access-token:120
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_owner_aws_leak.json:aws-access-token:121
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks.json:aws-access-token:107
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks.json:aws-access-token:108
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:94
c6f15b768e19613228b232a712f53a39cc5120a3:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:95
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_three_leaks.json:aws-access-token:81
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_three_leaks.json:aws-access-token:82
c4b07f5113bf39019374579a64d83959236295e4:audit/util.go:aws-access-token:66
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:55
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:56
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:55
94cae90d1eb208410073669de54a21fb65f23742:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:56
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak.json:aws-access-token:276
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak.json:aws-access-token:277
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:16
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:17
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:146
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:147
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six.json:aws-access-token:31
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six.json:aws-access-token:33
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_filepath.json:aws-access-token:3
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_filepath.json:aws-access-token:4
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_path_globally_whitelisted.json:aws-access-token:3
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_local_repo_six_path_globally_whitelisted.json:aws-access-token:4
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_repos/test_repo_6/server.test.py:aws-access-token:5
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:55
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:56
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:68
10745be661121f2e6577170419cf8ce3308ae311:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:69
c4b07f5113bf39019374579a64d83959236295e4:test_data/test_repos/test_repo_6/config/application.properties:aws-access-token:3
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:133
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:134
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:250
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:251
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:263
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_owner_aws_leak.json:aws-access-token:264
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:3
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:4
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:16
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_local_repo_five_files_at_commit.json:aws-access-token:17
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:3
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:4
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:16
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:17
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:42
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:43
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:68
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:69
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:94
2474c39311296b4d48c284b1ce82e0c270854bde:test_data/test_local_owner_aws_leak_depth_2.json:aws-access-token:95
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_repos/test_repo_5/secrets.py:aws-access-token:1
d13e0fdfde8f5c6261c9e893461f32861e21e8f5:test_data/test_repos/test_repo_5/secrets.py:aws-access-token:4
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:3
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:4
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:16
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:17
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:29
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:30
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:42
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_range.json:aws-access-token:43
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:3
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:4
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:29
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_to.json:aws-access-token:30
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:3
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:4
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:16
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:17
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:29
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:30
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:42
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:43
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:55
a0f72a4e3595ddb382a77804d2674d54b2b0e880:test_data/test_local_repo_two_leaks_commit_from.json:aws-access-token:56
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:68
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:69
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:81
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:82
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:107
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:108
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:94
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_repo_two_leaks.json:aws-access-token:95
6e1c41b536a514e1d17768eb42ebf5d87e61247d:examples/simple_regex_and_whitelist_config.toml:aws-access-token:4
6e1c41b536a514e1d17768eb42ebf5d87e61247d:examples/simple_regex_and_whitelist_config.toml:aws-access-token:12
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:211
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:212
275232f8c8f3ae4936667602a06a46caa156580b:audit/util.go:aws-access-token:90
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:237
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:238
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_configs/aws_key_aws_whitelisted.toml:aws-access-token:6
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_regex_whitelist.json.got:aws-access-token:3
275232f8c8f3ae4936667602a06a46caa156580b:test_data/test_regex_whitelist.json.got:aws-access-token:4
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:315
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:316
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:341
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:342
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:445
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:446
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:471
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:472
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:549
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:550
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:575
4d04ea079fc4e7f46c9f751fccde8f18c33b9e13:test_data/test_local_owner_aws_leak.json:aws-access-token:576
e446ba073804cf714316c5dc00d0ac41917b31f7:test_data/test_regex_entropy.json:aws-access-token:3
e446ba073804cf714316c5dc00d0ac41917b31f7:test_data/test_regex_entropy.json:aws-access-token:4
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:241
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:242
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:255
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:256
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:269
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:270
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:283
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:284
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:297
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:298
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:311
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:312
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:325
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:326
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:339
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:340
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:353
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:354
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:367
2ccd40677db07877be4a5919a16f6a180fc2a7e4:test_data/test_local_owner_aws_leak.json:aws-access-token:368
b55d88dc151f7022901cda41a03d43e0e508f2b7:audit/audit_test.go:aws-access-token:207
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_entropy.json:aws-access-token:3
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak.json:aws-access-token:3
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak.json:aws-access-token:4
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:17
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_and_file_leak.json:aws-access-token:18
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:3
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_commit.json:aws-access-token:4
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:3
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_one_aws_leak_uncommitted.json:aws-access-token:4
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:3
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:4
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:17
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:18
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:31
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:32
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:45
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:46
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:59
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:60
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:73
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:74
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:87
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:88
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:101
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_three_leaks.json:aws-access-token:102
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_repos/test_repo_1/server.test.py:aws-access-token:5
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:3
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:4
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:17
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:18
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:31
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:32
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:45
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:46
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:59
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:60
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:73
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_repo_two_leaks.json:aws-access-token:74
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:3
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:4
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:17
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:18
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:31
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:32
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:45
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:46
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:59
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:60
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:73
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:74
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:87
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:88
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:101
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:102
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:115
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:116
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:129
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:130
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:143
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:144
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:157
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:158
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:171
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:172
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:185
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:186
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:199
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:200
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:213
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:214
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:227
b55d88dc151f7022901cda41a03d43e0e508f2b7:test_data/test_local_owner_aws_leak.json:aws-access-token:228
7bd55e33b504f76fc2aec27f4f479a5fb2606480:src/constants.go:private-key:32
e79ffc6ae8f66931d687407e07bc0632fb262091:src/constants.go:private-key:23
2b995fda446e03b7660c327fec41265f03199c71:config.go:private-key:28
1f80d14f3f069118a2e578d83bbc8440495fc906:main.go:private-key:118
fe977ea8577b739c34a0071ba34e98cf6b6fad38:checks_test.go:aws-access-token:52
4b4fa00b69a9a2e5f7619b1ff1dd6d160f588aec:README.md:aws-access-token:25
4b4fa00b69a9a2e5f7619b1ff1dd6d160f588aec:README.md:aws-access-token:27
2186f2299990290e4e19cf3b28906e2ec369d01e:main.go:private-key:44
9f694531b203663588c68c82dbbfb34d4f71863f:main.go:private-key:44
1e250f1a14eab6f457d61f5d7650b47c6ff43334:checks_test.go:aws-access-token:19
1e250f1a14eab6f457d61f5d7650b47c6ff43334:config.yml:private-key:2
bc26e979c5911cf647c1bede0b3700ebaaa454c8:checks_test.go:aws-access-token:36
8f352bd840f028b481dc725b77d2f4904b77913b:checks_test.go:aws-access-token:34
ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29:checks_test.go:aws-access-token:37
06c9e824d5985c8e8789321ae70de7ace3b093dc:main.go:aws-access-token:15
README.md:aws-access-token:204
README.md:aws-access-token:205
README.md:aws-access-token:244
cmd/generate/config/rules/privatekey.go:private-key:19
cmd/generate/config/rules/generic.go:clojars-api-token:43
cmd/generate/config/rules/generic.go:generic-api-key:45
cmd/generate/config/rules/generic.go:generic-api-key:46
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:22
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:24
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:28
cmd/generate/config/rules/sidekiq.go:sidekiq-secret:29
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:46
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:48
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:50
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:52
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:54
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:55
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:56
cmd/generate/config/rules/sidekiq.go:sidekiq-sensitive-url:57
config/config_test.go:aws-access-token:31
detect/detect_test.go:sidekiq-secret:120
detect/detect_test.go:sidekiq-secret:126
detect/detect_test.go:sidekiq-secret:142
detect/detect_test.go:aws-access-token:50
detect/detect_test.go:aws-access-token:60
detect/detect_test.go:aws-access-token:61
detect/detect_test.go:aws-access-token:98
detect/detect_test.go:aws-access-token:104
detect/detect_test.go:aws-access-token:105
detect/detect_test.go:aws-access-token:186
detect/detect_test.go:aws-access-token:194
detect/detect_test.go:aws-access-token:202
detect/detect_test.go:aws-access-token:288
detect/detect_test.go:aws-access-token:296
detect/detect_test.go:aws-access-token:359
detect/detect_test.go:aws-access-token:360
detect/detect_test.go:aws-access-token:378
detect/detect_test.go:aws-access-token:379
detect/detect_test.go:aws-access-token:404
detect/detect_test.go:aws-access-token:405
detect/detect_test.go:aws-access-token:480
detect/detect_test.go:aws-access-token:481
detect/detect_test.go:aws-access-token:499
detect/detect_test.go:aws-access-token:500
detect/detect_test.go:sidekiq-sensitive-url:164
detect/detect_test.go:sidekiq-sensitive-url:170
detect/detect_test.go:pypi-upload-token:76
detect/detect_test.go:pypi-upload-token:82
detect/detect_test.go:pypi-upload-token:83
detect/detect_test.go:discord-api-token:211
detect/detect_test.go:discord-api-token:233
detect/detect_test.go:discord-api-token:241
detect/detect_test.go:discord-api-token:263
detect/detect_test.go:discord-api-token:279
testdata/config/allow_aws_re.toml:aws-access-token:9
testdata/config/allow_global_aws_re.toml:aws-access-token:8
testdata/expected/git/small-branch-foo.txt:aws-access-token:15
testdata/expected/git/small.txt:aws-access-token:15
testdata/expected/git/small.txt:aws-access-token:44
testdata/repos/nogit/main.go:aws-access-token:20
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:513
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:492
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:414
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:388
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:366
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:discord-api-token:255
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:discord-api-token:224
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-sensitive-url:177
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-secret:154
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:sidekiq-secret:130
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:107
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:pypi-upload-token:84
3df8c3deb7bc1e34210bdbce114f1c6165bc6ac8:detect/detect_test.go:aws-access-token:62
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:62
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:pypi-upload-token:84
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:107
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-secret:130
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-secret:154
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:sidekiq-sensitive-url:177
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:discord-api-token:224
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:discord-api-token:255
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:366
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:388
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:414
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:492
96eed6aa0f507fe0c21bb46bec32637dc4cb1a9f:detect/detect_test.go:aws-access-token:513
bfbc39eb185a217ead81a7174026f1c55f963660:cmd/generate/config/rules/jwt.go:jwt:17
bfbc39eb185a217ead81a7174026f1c55f963660:cmd/generate/config/rules/jwt.go:jwt:19
acce01f2338434a78f6a4a06a097b0fd23280484:README.md:aws-access-token:220
+29
View File
@@ -0,0 +1,29 @@
project_name: gitleaks
builds:
- main: main.go
binary: gitleaks
goos:
- darwin
- linux
- windows
goarch:
- amd64
- "386"
- arm
- arm64
goarm:
- "6"
- "7"
ldflags:
- -s -w -X=github.com/zricethezav/gitleaks/v8/cmd.Version={{.Version}}
archives:
- builds: [gitleaks]
format_overrides:
- goos: windows
format: zip
replacements:
amd64: x64
386: x32
release:
prerelease: true
+11
View File
@@ -0,0 +1,11 @@
- id: gitleaks
name: Detect hardcoded secrets
description: Detect hardcoded secrets using Gitleaks
entry: gitleaks protect --verbose --redact --staged
language: golang
pass_filenames: false
- id: gitleaks-docker
name: Detect hardcoded secrets
description: Detect hardcoded secrets using Gitleaks
entry: zricethezav/gitleaks protect --verbose --redact --staged
language: docker_image
-8
View File
@@ -1,8 +0,0 @@
language: go
go:
- 1.14.x
services:
- docker
script:
- make test
- make security-scan
+103
View File
@@ -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
+10 -12
View File
@@ -1,17 +1,15 @@
FROM golang:1.15.5 AS build
FROM golang:1.19 AS build
WORKDIR /go/src/github.com/zricethezav/gitleaks
ARG ldflags
COPY . .
RUN GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="${ldflags} *.go
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.11
RUN apk add --no-cache bash git openssh
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
RUN git config --global --add safe.directory '*'
ENTRYPOINT ["gitleaks"]
# How to use me :
# docker build -t gitleaks .
# docker run --rm --name=gitleaks gitleaks --repo=https://github.com/zricethezav/gitleaks
# This will check for secrets in https://github.com/zricethezav/gitleaks
+13 -36
View File
@@ -1,49 +1,26 @@
.PHONY: test test-cover build release-builds
.PHONY: test test-cover
VERSION := `git fetch --tags && git tag | sort -V | tail -1`
PKG=github.com/zricethezav/gitleaks
LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks/v7/version.Version=$(VERSION)"
_LDFLAGS="github.com/zricethezav/gitleaks/v7/version.Version=$(VERSION)"
VERSION := `git fetch --tags && git tag | sort -V | tail -1`
LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks/v8/cmd.Version=$(VERSION)"
COVER=--cover --coverprofile=cover.out
test-cover:
go test ./... --race $(COVER) $(PKG) -v
go test -v ./... --race $(COVER) $(PKG)
go tool cover -html=cover.out
test:
go get golang.org/x/lint/golint
format:
go fmt ./...
go vet ./...
golint ./...
go test ./... --race $(PKG) -v
build:
go fmt ./...
golint ./...
test: format
go vet ./...
go test -v ./... --race $(PKG)
build: format
go vet ./...
go mod tidy
go build $(LDFLAGS)
security-scan:
go get github.com/securego/gosec/cmd/gosec
gosec -no-fail ./...
release-builds:
rm -rf build
mkdir build
env GOOS="windows" GOARCH="amd64" go build -o "build/gitleaks-windows-amd64.exe" $(LDFLAGS)
env GOOS="windows" GOARCH="386" go build -o "build/gitleaks-windows-386.exe" $(LDFLAGS)
env GOOS="linux" GOARCH="amd64" go build -o "build/gitleaks-linux-amd64" $(LDFLAGS)
env GOOS="linux" GOARCH="arm" go build -o "build/gitleaks-linux-arm" $(LDFLAGS)
env GOOS="linux" GOARCH="mips" go build -o "build/gitleaks-linux-mips" $(LDFLAGS)
env GOOS="linux" GOARCH="mips" go build -o "build/gitleaks-linux-mips" $(LDFLAGS)
env GOOS="darwin" GOARCH="amd64" go build -o "build/gitleaks-darwin-amd64" $(LDFLAGS)
deploy:
@echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
docker build --build-arg ldflags=$(_LDFLAGS) -f Dockerfile -t zricethezav/gitleaks:latest -t zricethezav/gitleaks:$(VERSION) .
echo "Pushing zricethezav/gitleaks:$(VERSION) and zricethezav/gitleaks:latest"
docker push zricethezav/gitleaks
dockerbuild:
docker build --build-arg ldflags=$(_LDFLAGS) -f Dockerfile -t zricethezav/gitleaks:latest -t zricethezav/gitleaks:$(VERSION) .
clean:
find . -type f -name '*.got.*' -delete
find . -type f -name '*.out' -delete
+348 -203
View File
@@ -1,267 +1,412 @@
<p align="center">
<img alt="gitleaks" src="https://raw.githubusercontent.com/zricethezav/gifs/master/gitleakslogo.png" height="70" />
<p align="center">
<a href="https://travis-ci.org/zricethezav/gitleaks"><img alt="Travis" src="https://img.shields.io/travis/zricethezav/gitleaks/master.svg?style=flat-square"></a>
<a href="https://gitter.im/gitleaks/gitleaks"><img alt="Travis" src="https://badges.gitter.im/gitleaks/gitleaks.svg?style=flat-square"></a>
# Gitleaks
```
┌─○───┐
│ │╲ │
│ │ ○ │
│ ○ ░ │
└─░───┘
```
<p align="left">
<p align="left">
<a href="https://github.com/zricethezav/gitleaks/actions/workflows/test.yml">
<img alt="Github Test" src="https://github.com/zricethezav/gitleaks/actions/workflows/test.yml/badge.svg">
</a>
<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>
</p>
</p>
Gitleaks is a SAST tool for detecting hardcoded secrets like passwords, api keys, and tokens in git repos. Gitleaks aims to be the **easy-to-use, all-in-one solution** for finding secrets, past or present, in your code.
### Features:
- Scan for [commited](https://github.com/zricethezav/gitleaks#Scanning) secrets
- Scan for [unstaged](https://github.com/zricethezav/gitleaks#scan-unstaged-changes) secrets as part of shifting security left
- Scan [directories and files](https://github.com/zricethezav/gitleaks#scan-local-directory)
- Available [Github Action](https://github.com/marketplace/actions/gitleaks)
- [Custom rules](https://github.com/zricethezav/gitleaks#configuration) via toml configuration
- High performance using [go-git](https://github.com/go-git/go-git)
- JSON, SARIF, and CSV reporting
- Private repo scans using key or password based authentication
### Installation
Gitleaks can be installed with Homebrew, Docker, and Go. Gitleaks is also available in binary form for many popular platforms and OS types from the [releases page](https://github.com/zricethezav/gitleaks/releases).
##### MacOS
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.
```
➜ ~/code(master) gitleaks detect --source . -v
○
│╲
│ ○
○ ░
░ gitleaks
Finding: "export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef",
Secret: cafebabe:deadbeef
RuleID: sidekiq-secret
Entropy: 2.609850
File: cmd/generate/config/rules/sidekiq.go
Line: 23
Commit: cd5226711335c68be1e720b318b7bc3135a30eb2
Author: John
Email: john@users.noreply.github.com
Date: 2022-08-03T12:31:40Z
Fingerprint: cd5226711335c68be1e720b318b7bc3135a30eb2:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23
```
## Getting Started
Gitleaks can be installed using Homebrew, Docker, or Go. Gitleaks is also available in binary form for many popular platforms and OS types on the [releases page](https://github.com/zricethezav/gitleaks/releases). In addition, Gitleaks can be implemented as a pre-commit hook directly in your repo or as a GitHub action using [Gitleaks-Action](https://github.com/gitleaks/gitleaks-action).
### Installing
```bash
# MacOS
brew install gitleaks
# Docker (DockerHub)
docker pull zricethezav/gitleaks:latest
docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] --source="/path" [OPTIONS]
# Docker (ghcr.io)
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
git clone https://github.com/zricethezav/gitleaks.git
cd gitleaks
make build
```
##### Docker
### Github Action
```bash
docker pull zricethezav/gitleaks
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.
```
##### Go
```bash
GO111MODULE=on go get github.com/zricethezav/gitleaks/v7
### 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
rev: v8.12.0
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. Auto-update the config to the latest repos' versions by executing `pre-commit autoupdate`
4. Install with `pre-commit install`
5. Now you're all set!
```
➜ git commit -m "this commit contains a secret"
Detect hardcoded secrets.................................................Failed
```
### Usage and Options
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 [OPTIONS]
gitleaks [command]
Application Options:
-v, --verbose Show verbose output from scan
-q, --quiet Sets log level to error and only output leaks, one json object per line
-r, --repo-url= Repository URL
-p, --path= Path to directory (repo if contains .git) or file
-c, --config-path= Path to config
--repo-config-path= Path to gitleaks config relative to repo root
--version Version number
--username= Username for git repo
--password= Password for git repo
--access-token= Access token for git repo
--threads= Maximum number of threads gitleaks spawns
--ssh-key= Path to ssh key used for auth
--unstaged Run gitleaks on unstaged code
--branch= Branch to scan
--redact Redact secrets from log messages and leaks
--debug Log debug messages
--leaks-exit-code= Exit code when leaks have been encountered (default: 1)
--no-git Treat git repos as plain directories and scan those
files
-o, --report= Report output path
-f, --format= JSON, CSV, SARIF (default: json)
--files-at-commit= Sha of commit to scan all files at commit
--commit= Sha of commit to scan or "latest" to scan the last
commit of the repository
--commits= Comma separated list of a commits to scan
--commits-file= Path to file of line separated list of commits to scan
--commit-from= Commit to start scan from
--commit-to= Commit to stop scan
--commit-since= Scan commits more recent than a specific date. Ex:
'2006-01-02' or '2006-01-02T15:04:05-0700' format.
--commit-until= Scan commits older than a specific date. Ex:
'2006-01-02' or '2006-01-02T15:04:05-0700' format.
--depth= Number of commits to scan
Available Commands:
completion generate the autocompletion script for the specified shell
detect Detect secrets in code
help Help about any command
protect Protect secrets in code
version Display gitleaks version
Help Options:
-h, --help Show this help message
Flags:
-c, --config string config file path
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
--exit-code string exit code when leaks have been encountered (default: 1)
-h, --help help for gitleaks
-l, --log-level string log level (debug, info, warn, error, fatal) (default "info")
--no-banner suppress banner
--redact redact secrets from logs and stdout
-f, --report-format string output format (json, csv, sarif)
-r, --report-path string report file
-b, --baseline-path path to a previously generated report with known issues that gitleaks should ignore
-s, --source string path to source (git repo, directory, file)
-v, --verbose show verbose output from scan
--max-target-megabytes files larger than this will be skipped
Use "gitleaks [command] --help" for more information about a command.
```
### Commands
### [Scanning](https://www.youtube.com/watch?v=WUzpRL8mKCk)
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.
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 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
[here](https://github.com/zricethezav/gitleaks/blob/7240e16769b92d2a1b137c17d6bf9d55a8562899/git/git.go#L48-L49)). You can set the
`--staged` flag to check for changes in commits that have been `git add`ed. The `--staged` flag should be used when running Gitleaks
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.
### Creating a baseline
When scanning large repositories or repositories with a long history, it can be convenient to use a baseline. When using a baseline,
gitleaks will ignore any old findings that are present in the baseline. A baseline can be any gitleaks report. To create a gitleaks report, run gitleaks with the `--report-path` parameter.
#### Basic repo-url scan:
This scans the entire history of tests/secrets and logs leaks as they are encountered `-v`/`--verbose` being set.
```
gitleaks --repo-url=https://github.com/my-insecure/repo -v
gitleaks detect --report-path gitleaks-report.json # This will save the report in a file called gitleaks-report.json
```
Once as baseline is created it can be applied when running the detect command again:
#### Basic repo-url scan output to a report:
If we want the report in sarif or csv we can set the `-f/--format` option
```
gitleaks --repo-url=https://github.com/my-insecure/repo -v --report=my-report.json
gitleaks detect --baseline-path gitleaks-report.json --report-path findings.json
```
#### Scan specific commit:
After running the detect command with the --baseline-path parameter, report output (findings.json) will only contain new issues.
### Verify Findings
You can verify a finding found by gitleaks using a `git log` command.
Example output:
```
gitleaks --repo-url=https://github.com/my-insecure/repo --commit=commit-sha -v
Finding: aws_secret="AKIAIMNOJVGFDXXXE4OA"
RuleID: aws-access-token
Secret AKIAIMNOJVGFDXXXE4OA
Entropy: 3.65
File: checks_test.go
Line: 37
Commit: ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
Author: Zachary Rice
Email: z@email.com
Date: 2018-01-28T17:39:00Z
Fingerprint: ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29:checks_test.go:aws-access-token:37
```
#### Scan local repo:
We can use the following format to verify the leak:
```
gitleaks --path=path/to/local/repo -v
git log -L {StartLine,EndLine}:{File} {Commit}
```
#### Scan repos contain in a parent directory:
If we had `repo1`, `repo2`, `repo3` all under `path/to/local`, gitleaks will discover and scan those repos.
So in this example it would look like:
```
gitleaks --path=path/to/local/ -v
git log -L 37,37:checks_test.go ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
```
#### Scan local directory:
You might want to scan the current contents of a repo, ignoring git alltogether. You can use the `--no-git` option to do this.
```
gitleaks --path=path/to/local/repo -v --no-git
```
Which gives us:
#### Scan a file:
Or you might want to scan a single file using gitleaks rules. You can do this by specifying the file in `--path` and including the `--no-git` option.
```
gitleaks --path=path/to/local/repo/main.go -v --no-git
```
commit ec2fc9d6cb0954fb3b57201cf6133c48d8ca0d29
Author: zricethezav <thisispublicanyways@gmail.com>
Date: Sun Jan 28 17:39:00 2018 -0500
#### Scan unstaged changes:
If you have unstaged changes are are currently at the root of the repo, you can run `gitleaks` with no `--path` or `--repo-url` specified which will run a scan on your uncommitted changes. Or if you want to specify a
path, you can run:
```
gitleaks --path=path/to/local/repo -v --unstaged
```
[update] entropy check
### Configuration
Provide your own gitleaks configurations with `--config-path` or `--repo-config-path`. The difference between the two is `--config-path` loads a local gitleaks config whereas `--repo-config-path` will load a configuration present in the repo you want to scan. For example, `gitleaks --repo-config-path=".github/gitleaks.config"`.
The default configuration Gitleaks uses is located [here](https://github.com/zricethezav/gitleaks/blob/master/config/default.go). More configuration examples can be seen [here](https://github.com/zricethezav/gitleaks/tree/master/examples). Configuration files contain a few different toml tables which will be explained below.
### Rules summary
The rules are written in [TOML](https://github.com/toml-lang/toml) as defined in [TomlLoader struct](https://github.com/zricethezav/gitleaks/blob/master/config/config.go#L57-L87), and can be summarized as:
diff --git a/checks_test.go b/checks_test.go
--- a/checks_test.go
+++ b/checks_test.go
@@ -28,0 +37,1 @@
+ "aws_secret= \"AKIAIMNOJVGFDXXXE4OA\"": true,
```
## 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]]
description = "a string describing one of many rule in this config"
regex = '''one-go-style-regex-for-this-rule'''
file = '''a-file-name-regex'''
path = '''a-file-path-regex'''
tags = ["tag","another tag"]
[[rules.entropies]] # note these are strings, not floats
Min = "3.5"
Max = "4.5"
Group = "1"
[rules.allowlist]
description = "a string"
files = ['''one-file-name-regex''']
commits = [ "commit-A", "commit-B"]
paths = ['''one-file-path-regex''']
regexes = ['''one-regex-within-the-already-matched-regex''']
# Unique identifier for this rule
id = "awesome-rule-1"
# Short human readable description of the rule.
description = "awesome rule 1"
# Golang regular expression used to detect secrets. Note Golang's regex engine
# does not support lookaheads.
regex = '''one-go-style-regex-for-this-rule'''
# Golang regular expression used to match paths. This can be used as a standalone rule or it can be used
# in conjunction with a valid `regex` entry.
path = '''a-file-path-regex'''
# Array of strings used for metadata and reporting purposes.
tags = ["tag","another tag"]
# Int used to extract secret from regex match and used as the group that will have
# its entropy checked if `entropy` is set.
secretGroup = 3
# Float representing the minimum shannon entropy a regex group must have to be considered a secret.
entropy = 3.5
# Keywords are used for pre-regex check filtering. Rules that contain
# keywords will perform a quick string compare check to make sure the
# keyword(s) are in the content being scanned. Ideally these values should
# either be part of the idenitifer or unique strings specific to the rule's regex
# (introduced in v8.6.0)
keywords = [
"auth",
"password",
"token",
]
# You can include an allowlist table for a single rule to reduce false positives or ignore commits
# with known/rotated secrets
[rules.allowlist]
description = "ignore commit A"
commits = [ "commit-A", "commit-B"]
paths = [
'''go\.mod''',
'''go\.sum'''
]
regexes = [
'''process''',
'''getenv''',
]
# note: stopwords targets the extracted secret, not the entire regex match
# like 'regexes' does. (stopwords introduced in 8.8.0)
stopwords = [
'''client''',
'''endpoint''',
]
# This is a global allowlist which has a higher order of precedence than rule-specific allowlists.
# If a commit listed in the `commits` field below is encountered then that commit will be skipped and no
# secrets will be detected for said commit. The same logic applies for regexes and paths.
[allowlist]
description = "a description string for a global allowlist config"
commits = [ "commit-A", "commit-B"]
files = [ '''file-regex-a''', '''file-regex-b''']
paths = [ '''path-regex-a''', '''path-regex-b''']
repos = [ '''repo-regex-a''', '''repo-regex-b''']
regexes = ['''one-regex-within-the-already-matched-regex''']
description = "global allow list"
commits = [ "commit-A", "commit-B", "commit-C"]
paths = [
'''gitleaks\.toml''',
'''(.*?)(jpg|gif|doc)'''
]
regexes = [
'''219-09-9999''',
'''078-05-1120''',
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
]
# note: stopwords targets the extracted secret, not the entire regex match
# like 'regexes' does. (stopwords introduced in 8.8.0)
stopwords = [
'''client''',
'''endpoint''',
]
```
Regular expressions are _NOT_ the full Perl set, so there are no look-aheads or look-behinds.
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
### Examples
#### Example 1
The first and most commonly edited array of tables is `[[rules]]`. This is where you can define your own custom rules for Gitleaks to use while scanning repos. Example keys/values within the `[[rules]]` table:
```
[[rules]]
description = "generic secret regex"
regex = '''secret(.{0,20})([0-9a-zA-Z-._{}$\/\+=]{20,120})'''
tags = ["secret", "example"]
```
#### Example 2
We can also **combine** regular expressions AND entropy:
```
[[rules]]
description = "entropy and regex example"
regex = '''secret(.{0,20})['|"]([0-9a-zA-Z-._{}$\/\+=]{20,120})['|"]'''
[[rules.Entropies]]
Min = "4.5"
Max = "4.7"
```
Translating this rule to English, this rule states: "if we encounter a line of code that matches *regex* AND the line falls within the bounds of a [Shannon entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) of 4.5 to 4.7, then the line must be a leak"
#### gitleaks:allow
#### Example 3
Let's compare two lines of code:
```
aws_secret='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE'
```
and
```
aws_secret=os.getenv('AWS_SECRET_ACCESS_KEY')
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:
```
The first line of code is an example of a hardcoded secret being assigned to the variable `aws_secret`. The second line of code is an example of a secret being assigned via env variables to `aws_secret`. Both would be caught by the rule defined in *example 2* but only the first line is actually a leak. Let's define a new rule that will capture only the first line of code. We can do this by combining regular expression **groups** and entropy.
```
[[rules]]
description = "entropy and regex example"
regex = '''secret(.{0,20})['|"]([0-9a-zA-Z-._{}$\/\+=]{20,120})['|"]'''
[[rules.Entropies]]
Min = "4.5"
Max = "4.7"
Group = "2"
```
Notice how we added `Group = "2"` to this rule. We can translate this rule to English: "if we encounter a line of code that matches regex AND the entropy of the *second regex group* falls within the bounds of a [Shannon entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) of 4.5 to 4.7, then the line must be a leak"
class CustomClass:
discord_client_secret = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ' #gitleaks:allow
### Example 4: Using allowlist regex
The proper Perl regex for AWS secret keys is
`(?<![A-Za-z0-9\\+])[A-Za-z0-9\\+=]{40}(?![A-Za-z0-9\\+=])`
but the Go library doesn't do lookahead/lookbehind, so
we'll look for 40 base64 characters, then allowlist
if they're embedded in a string of 41 base64 characters, that is,
without any delimiters. This will make a false negative for, say:
```
foo=+awsSecretAccessKeyisBase64=40characters
```
So you can use the following to effectively create the proper Perl regex:
```
[[rules]]
description = "AWS secret key regardless of labeling"
regex = '''.?[A-Za-z0-9\\+=]{40}.?'''
[rules.allowlist]
description = "41 base64 characters is not an AWS secret key"
regexes = ['''[A-Za-z0-9\\+=]{41}''']
```
#### .gitleaksignore
You can ignore specific findings by creating a `.gitleaksignore` file at the root of your repo. In release v8.10.0 Gitleaks added a `Fingerprint` value to the Gitleaks report. Each leak, or finding, has a Fingerprint that uniquely identifies a secret. Add this fingerprint to the `.gitleaksignore` file to ignore that specific secret. See Gitleaks' [.gitleaksignore](https://github.com/zricethezav/gitleaks/blob/master/.gitleaksignore) for an example. Note: this feature is expirmental and is subject to change in the future.
## Secured by Jit
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>
## Exit Codes
You can always set the exit code when leaks are encountered with the --exit-code flag. Default exit codes below:
### Exit Codes
You can always set the exit code when leaves are encountered with the `--leaks-exit-code` flag. Default exit codes below:
```
0 - no leaks present
1 - leaks or error encountered
126 - unknown flag
```
### Sponsors ❤️
#### Corporate Sponsors
[![gammanet](https://gammanet.com/assets/images/new-design/gamma-logo.png)](https://gammanet.com/?utm_source=gitleaks&utm_medium=homepage&utm_campaign=gitleaks_promotion)
Gamma proactively detects and remediates data leaks across cloud apps. Scan your public repos for secret leaks with [Gamma](https://gammanet.com/github-demo?utm_source=gitleaks&utm_medium=homepage&utm_campaign=gitleaks_promotion)
#### Individual Sponsors
These users are [sponsors](https://github.com/sponsors/zricethezav) of gitleaks:
[![Adam Shannon](https://github.com/adamdecaf.png?size=50)](https://github.com/adamdecaf) |
---|
----
#### Logo Attribution
The Gitleaks logo uses the Git Logo created <a href="https://twitter.com/jasonlong">Jason Long</a> is licensed under the <a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.
+26
View File
@@ -0,0 +1,26 @@
## Who uses Gitleaks?
As the Gitleaks Community grows, we'd like to keep a list of our users.
Here's a running list of some organizations using Gitleaks[^1]:
1. [GitLab](https://docs.gitlab.com/ee/user/application_security/secret_detection/)
1. [Gitleaks](https://gitleaks.io)
1. [GoReleaser](https://goreleaser.com)
2. [Trendyol](https://trendyol.com)
Feel free to [add yours](https://github.com/zricethezav/gitleaks/edit/master/USERS.md)!
<!--
Hey! Thanks for looking into this file!
If you're going to edit it, please:
- keep a-z ordering :)
- edit only the USERS.md file at the repository's root folder
-->
[^1]: Entries were either added by the companies themselves or by the maintainers after seeing it in the wild.
You can see all public repositories using Gitleaks or Gitleaks-Action by [searching on GitHub](https://github.com/search?q=gitleaks).
<!--
Shout out to GoReleaser for this template: https://github.com/goreleaser/goreleaser/blob/main/USERS.md
-->
+184
View File
@@ -0,0 +1,184 @@
package cmd
import (
"os"
"path/filepath"
"time"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/zricethezav/gitleaks/v8/config"
"github.com/zricethezav/gitleaks/v8/detect"
"github.com/zricethezav/gitleaks/v8/report"
)
func init() {
rootCmd.AddCommand(detectCmd)
detectCmd.Flags().String("log-opts", "", "git log options")
detectCmd.Flags().Bool("no-git", false, "treat git repo as a regular directory and scan those files, --log-opts has no effect on the scan when --no-git is set")
}
var detectCmd = &cobra.Command{
Use: "detect",
Short: "detect secrets in code",
Run: runDetect,
}
func runDetect(cmd *cobra.Command, args []string) {
initConfig()
var (
vc config.ViperConfig
findings []report.Finding
err error
)
// Load config
if err = viper.Unmarshal(&vc); err != nil {
log.Fatal().Err(err).Msg("Failed to load config")
}
cfg, err := vc.Translate()
if err != nil {
log.Fatal().Err(err).Msg("Failed to load config")
}
cfg.Path, _ = cmd.Flags().GetString("config")
// start timer
start := time.Now()
// Setup detector
detector := detect.NewDetector(cfg)
detector.Config.Path, err = cmd.Flags().GetString("config")
if err != nil {
log.Fatal().Err(err).Msg("")
}
source, err := cmd.Flags().GetString("source")
if err != nil {
log.Fatal().Err(err).Msg("")
}
// if config path is not set, then use the {source}/.gitleaks.toml path.
// note that there may not be a `{source}/.gitleaks.toml` file, this is ok.
if detector.Config.Path == "" {
detector.Config.Path = filepath.Join(source, ".gitleaks.toml")
}
// set verbose flag
if detector.Verbose, err = cmd.Flags().GetBool("verbose"); err != nil {
log.Fatal().Err(err).Msg("")
}
// set redact flag
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
log.Fatal().Err(err).Msg("")
}
if detector.MaxTargetMegaBytes, err = cmd.Flags().GetInt("max-target-megabytes"); err != nil {
log.Fatal().Err(err).Msg("")
}
if fileExists(filepath.Join(source, ".gitleaksignore")) {
if err = detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore")); err != nil {
log.Fatal().Err(err).Msg("could not call AddGitleaksIgnore")
}
}
// ignore findings from the baseline (an existing report in json format generated earlier)
baselinePath, _ := cmd.Flags().GetString("baseline-path")
if baselinePath != "" {
err = detector.AddBaseline(baselinePath)
if err != nil {
log.Error().Msgf("Could not load baseline. The path must point of a gitleaks report generated using the default format: %s", err)
}
}
// set exit code
exitCode, err := cmd.Flags().GetInt("exit-code")
if err != nil {
log.Fatal().Err(err).Msg("could not get exit code")
}
// determine what type of scan:
// - git: scan the history of the repo
// - no-git: scan files by treating the repo as a plain directory
noGit, err := cmd.Flags().GetBool("no-git")
if err != nil {
log.Fatal().Err(err).Msg("could not call GetBool() for no-git")
}
// start the detector scan
if noGit {
findings, err = detector.DetectFiles(source)
if err != nil {
// don't exit on error, just log it
log.Error().Err(err).Msg("")
}
} else {
var logOpts string
logOpts, err = cmd.Flags().GetString("log-opts")
if err != nil {
log.Fatal().Err(err).Msg("")
}
findings, err = detector.DetectGit(source, logOpts, detect.DetectType)
if err != nil {
// don't exit on error, just log it
log.Error().Err(err).Msg("")
}
}
// log info about the scan
if err == nil {
log.Info().Msgf("scan completed in %s", FormatDuration(time.Since(start)))
if len(findings) != 0 {
log.Warn().Msgf("leaks found: %d", len(findings))
} else {
log.Info().Msg("no leaks found")
}
} else {
log.Warn().Msgf("partial scan completed in %s", FormatDuration(time.Since(start)))
if len(findings) != 0 {
log.Warn().Msgf("%d leaks found in partial scan", len(findings))
} else {
log.Warn().Msg("no leaks found in partial scan")
}
}
// write report if desired
reportPath, _ := cmd.Flags().GetString("report-path")
ext, _ := cmd.Flags().GetString("report-format")
if reportPath != "" {
if err := report.Write(findings, cfg, ext, reportPath); err != nil {
log.Fatal().Err(err).Msg("could not write")
}
}
if err != nil {
os.Exit(1)
}
if len(findings) != 0 {
os.Exit(exitCode)
}
}
func fileExists(fileName string) bool {
// check for a .gitleaksignore file
info, err := os.Stat(fileName)
if err != nil && !os.IsNotExist(err) {
return false
}
if info != nil && err == nil {
if !info.IsDir() {
return true
}
}
return false
}
func FormatDuration(d time.Duration) string {
scale := 100 * time.Second
// look for the max scale that is smaller than d
for scale > d {
scale = scale / 10
}
return d.Round(scale / 100).String()
}
+192
View File
@@ -0,0 +1,192 @@
package main
import (
"os"
"text/template"
"github.com/rs/zerolog/log"
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/rules"
"github.com/zricethezav/gitleaks/v8/config"
)
const (
templatePath = "rules/config.tmpl"
)
func main() {
var 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())
configRules = append(configRules, rules.AsanaClientSecret())
configRules = append(configRules, rules.Atlassian())
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.DigitalOceanPAT())
configRules = append(configRules, rules.DigitalOceanOAuthToken())
configRules = append(configRules, rules.DigitalOceanRefreshToken())
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.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.FlutterwaveEncKey())
configRules = append(configRules, rules.FrameIO())
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.GrafanaApiKey())
configRules = append(configRules, rules.GrafanaCloudApiToken())
configRules = append(configRules, rules.GrafanaServiceAccountToken())
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())
configRules = append(configRules, rules.LinkedinClientSecret())
configRules = append(configRules, rules.LobAPIToken())
configRules = append(configRules, rules.LobPubAPIToken())
configRules = append(configRules, rules.MailChimp())
configRules = append(configRules, rules.MailGunPubAPIToken())
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.PlanetScaleAPIToken())
configRules = append(configRules, rules.PlanetScaleOAuthToken())
configRules = append(configRules, rules.PostManAPI())
configRules = append(configRules, rules.Prefect())
configRules = append(configRules, rules.PrivateKey())
configRules = append(configRules, rules.PulumiAPIToken())
configRules = append(configRules, rules.PyPiUploadToken())
configRules = append(configRules, rules.RapidAPIAccessToken())
configRules = append(configRules, rules.ReadMe())
configRules = append(configRules, rules.RubyGemsAPIToken())
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.TeamsWebhook())
configRules = append(configRules, rules.TelegramBotToken())
configRules = append(configRules, rules.TravisCIAccessToken())
configRules = append(configRules, rules.Twilio())
configRules = append(configRules, rules.TwitchAPIToken())
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
}
tmpl, err := template.ParseFiles(templatePath)
if err != nil {
log.Fatal().Err(err).Msg("Failed to parse template")
}
f, err := os.Create("../../../config/gitleaks.toml")
if err != nil {
log.Fatal().Err(err).Msg("Failed to create rules.toml")
}
if err = tmpl.Execute(f, config.Config{Rules: ruleLookUp}); err != nil {
log.Fatal().Err(err).Msg("could not execute template")
}
}
+23
View File
@@ -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)
}
+39
View File
@@ -0,0 +1,39 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func AdobeClientID() *config.Rule {
// define rule
r := config.Rule{
Description: "Adobe Client ID (OAuth Web)",
RuleID: "adobe-client-id",
Regex: generateSemiGenericRegex([]string{"adobe"}, hex("32")),
SecretGroup: 1,
Keywords: []string{"adobe"},
}
// validate
tps := []string{
generateSampleSecret("adobe", secrets.NewSecret(hex("32"))),
}
return validate(r, tps, nil)
}
func AdobeClientSecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Adobe Client Secret",
RuleID: "adobe-client-secret",
Regex: generateUniqueTokenRegex(`(p8e-)(?i)[a-z0-9]{32}`),
Keywords: []string{"p8e-"},
}
// validate
tps := []string{
"adobeClient := \"p8e-" + secrets.NewSecret(hex("32")) + "\"",
}
return validate(r, tps, nil)
}
+23
View File
@@ -0,0 +1,23 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/config"
)
func AgeSecretKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Age secret key",
RuleID: "age secret key",
Regex: regexp.MustCompile(`AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}`),
Keywords: []string{"AGE-SECRET-KEY-1"},
}
// validate
tps := []string{
`apiKey := "AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ`, // gitleaks:allow
}
return validate(r, tps, nil)
}
+23
View File
@@ -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)
}
+22
View File
@@ -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)
}
+41
View File
@@ -0,0 +1,41 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func AlibabaAccessKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Alibaba AccessKey ID",
RuleID: "alibaba-access-key-id",
Regex: generateUniqueTokenRegex(`(LTAI)(?i)[a-z0-9]{20}`),
Keywords: []string{"LTAI"},
}
// validate
tps := []string{
"alibabaKey := \"LTAI" + secrets.NewSecret(hex("20")) + "\"",
}
return validate(r, tps, nil)
}
// TODO
func AlibabaSecretKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Alibaba Secret Key",
RuleID: "alibaba-secret-key",
Regex: generateSemiGenericRegex([]string{"alibaba"},
alphaNumeric("30")),
SecretGroup: 1,
Keywords: []string{"alibaba"},
}
// validate
tps := []string{
generateSampleSecret("alibaba", secrets.NewSecret(alphaNumeric("30"))),
}
return validate(r, tps, nil)
}
+40
View File
@@ -0,0 +1,40 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func AsanaClientID() *config.Rule {
// define rule
r := config.Rule{
Description: "Asana Client ID",
RuleID: "asana-client-id",
Regex: generateSemiGenericRegex([]string{"asana"}, numeric("16")),
SecretGroup: 1,
Keywords: []string{"asana"},
}
// validate
tps := []string{
generateSampleSecret("asana", secrets.NewSecret(numeric("16"))),
}
return validate(r, tps, nil)
}
func AsanaClientSecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Asana Client Secret",
RuleID: "asana-client-secret",
Regex: generateSemiGenericRegex([]string{"asana"}, alphaNumeric("32")),
SecretGroup: 1,
Keywords: []string{"asana"},
}
// validate
tps := []string{
generateSampleSecret("asana", secrets.NewSecret(alphaNumeric("32"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Atlassian() *config.Rule {
// define rule
r := config.Rule{
Description: "Atlassian API token",
RuleID: "atlassian-api-token",
Regex: generateSemiGenericRegex([]string{
"atlassian", "confluence", "jira"}, alphaNumeric("24")),
SecretGroup: 1,
Keywords: []string{"atlassian", "confluence", "jira"},
}
// validate
tps := []string{
generateSampleSecret("atlassian", secrets.NewSecret(alphaNumeric("24"))),
generateSampleSecret("confluence", secrets.NewSecret(alphaNumeric("24"))),
}
return validate(r, tps, nil)
}
+31
View File
@@ -0,0 +1,31 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/config"
)
func AWS() *config.Rule {
// define rule
r := config.Rule{
Description: "AWS",
RuleID: "aws-access-token",
Regex: regexp.MustCompile(
"(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
Keywords: []string{
"AKIA",
"AGPA",
"AIDA",
"AROA",
"AIPA",
"ANPA",
"ANVA",
"ASIA",
},
}
// validate
tps := []string{generateSampleSecret("AWS", "AKIALALEMEL33243OLIB")} // gitleaks:allow
return validate(r, tps, nil)
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Beamer() *config.Rule {
// define rule
r := config.Rule{
Description: "Beamer API token",
RuleID: "beamer-api-token",
SecretGroup: 1,
Regex: generateSemiGenericRegex([]string{"beamer"},
`b_[a-z0-9=_\-]{44}`),
Keywords: []string{"beamer"},
}
// validate
tps := []string{
generateSampleSecret("beamer", "b_"+secrets.NewSecret(alphaNumericExtended("44"))),
}
return validate(r, tps, nil)
}
+40
View File
@@ -0,0 +1,40 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func BitBucketClientID() *config.Rule {
// define rule
r := config.Rule{
Description: "Bitbucket Client ID",
RuleID: "bitbucket-client-id",
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumeric("32")),
SecretGroup: 1,
Keywords: []string{"bitbucket"},
}
// validate
tps := []string{
generateSampleSecret("bitbucket", secrets.NewSecret(alphaNumeric("32"))),
}
return validate(r, tps, nil)
}
func BitBucketClientSecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Bitbucket Client Secret",
RuleID: "bitbucket-client-secret",
Regex: generateSemiGenericRegex([]string{"bitbucket"}, alphaNumericExtended("64")),
SecretGroup: 1,
Keywords: []string{"bitbucket"},
}
// validate
tps := []string{
generateSampleSecret("bitbucket", secrets.NewSecret(alphaNumeric("64"))),
}
return validate(r, tps, nil)
}
+40
View File
@@ -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)
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Clojars() *config.Rule {
// define rule
r := config.Rule{
Description: "Clojars API token",
RuleID: "clojars-api-token",
Regex: regexp.MustCompile(`(?i)(CLOJARS_)[a-z0-9]{60}`),
Keywords: []string{"clojars"},
}
// validate
tps := []string{
generateSampleSecret("clojars", "CLOJARS_"+secrets.NewSecret(alphaNumeric("60"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -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)
}
+27
View File
@@ -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)
}
+60
View File
@@ -0,0 +1,60 @@
# 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"
paths = [
'''gitleaks.toml''',
'''(.*?)(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 $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 }}
entropy = {{ $rule.Entropy}}
keywords = [
{{ range $j, $keyword := $rule.Keywords }}"{{$keyword}}",{{end}}
]
{{ else if $rule.SecretGroup }}description = "{{$rule.Description}}"
id = "{{$rule.RuleID}}"
regex = '''{{$rule.Regex}}'''
secretGroup = {{ $rule.SecretGroup }}
keywords = [
{{ range $j, $keyword := $rule.Keywords }}"{{$keyword}}",{{end}}
]
{{ else }}description = "{{$rule.Description}}"
id = "{{$rule.RuleID}}"
regex = '''{{$rule.Regex}}'''
keywords = [
{{ range $j, $keyword := $rule.Keywords }}"{{$keyword}}",{{end}}
]
{{end}}{{end}}
+44
View File
@@ -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)
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Contentful() *config.Rule {
// define rule
r := config.Rule{
Description: "Contentful delivery API token",
RuleID: "contentful-delivery-api-token",
Regex: generateSemiGenericRegex([]string{"contentful"},
alphaNumericExtended("43")),
SecretGroup: 1,
Keywords: []string{"contentful"},
}
// validate
tps := []string{
generateSampleSecret("contentful", secrets.NewSecret(alphaNumeric("43"))),
}
return validate(r, tps, nil)
}
+22
View File
@@ -0,0 +1,22 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Databricks() *config.Rule {
// define rule
r := config.Rule{
Description: "Databricks API token",
RuleID: "databricks-api-token",
Regex: generateUniqueTokenRegex(`dapi[a-h0-9]{32}`),
Keywords: []string{"dapi"},
}
// validate
tps := []string{
generateSampleSecret("databricks", "dapi"+secrets.NewSecret(hex("32"))),
}
return validate(r, tps, nil)
}
+26
View File
@@ -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)
}
+51
View File
@@ -0,0 +1,51 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func DigitalOceanPAT() *config.Rule {
r := config.Rule{
Description: "DigitalOcean Personal Access Token",
RuleID: "digitalocean-pat",
SecretGroup: 1,
Regex: generateUniqueTokenRegex(`dop_v1_[a-f0-9]{64}`),
Keywords: []string{"dop_v1_"},
}
tps := []string{
generateSampleSecret("do", "dop_v1_"+secrets.NewSecret(hex("64"))),
}
return validate(r, tps, nil)
}
func DigitalOceanOAuthToken() *config.Rule {
r := config.Rule{
Description: "DigitalOcean OAuth Access Token",
RuleID: "digitalocean-access-token",
SecretGroup: 1,
Regex: generateUniqueTokenRegex(`doo_v1_[a-f0-9]{64}`),
Keywords: []string{"doo_v1_"},
}
tps := []string{
generateSampleSecret("do", "doo_v1_"+secrets.NewSecret(hex("64"))),
}
return validate(r, tps, nil)
}
func DigitalOceanRefreshToken() *config.Rule {
r := config.Rule{
Description: "DigitalOcean OAuth Refresh Token",
RuleID: "digitalocean-refresh-token",
SecretGroup: 1,
Regex: generateUniqueTokenRegex(`dor_v1_[a-f0-9]{64}`),
Keywords: []string{"dor_v1_"},
}
tps := []string{
generateSampleSecret("do", "dor_v1_"+secrets.NewSecret(hex("64"))),
}
return validate(r, tps, nil)
}
+57
View File
@@ -0,0 +1,57 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func DiscordAPIToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Discord API key",
RuleID: "discord-api-token",
Regex: generateSemiGenericRegex([]string{"discord"}, hex("64")),
SecretGroup: 1,
Keywords: []string{"discord"},
}
// validate
tps := []string{
generateSampleSecret("discord", secrets.NewSecret(hex("64"))),
}
return validate(r, tps, nil)
}
func DiscordClientID() *config.Rule {
// define rule
r := config.Rule{
Description: "Discord client ID",
RuleID: "discord-client-id",
Regex: generateSemiGenericRegex([]string{"discord"}, numeric("18")),
SecretGroup: 1,
Keywords: []string{"discord"},
}
// validate
tps := []string{
generateSampleSecret("discord", secrets.NewSecret(numeric("18"))),
}
return validate(r, tps, nil)
}
func DiscordClientSecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Discord client secret",
RuleID: "discord-client-secret",
Regex: generateSemiGenericRegex([]string{"discord"}, alphaNumericExtended("32")),
SecretGroup: 1,
Keywords: []string{"discord"},
}
// validate
tps := []string{
generateSampleSecret("discord", secrets.NewSecret(numeric("32"))),
}
return validate(r, tps, nil)
}
+27
View File
@@ -0,0 +1,27 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Doppler() *config.Rule {
// define rule
r := config.Rule{
Description: "Doppler API token",
RuleID: "doppler-api-token",
Regex: regexp.MustCompile(`(dp\.pt\.)(?i)[a-z0-9]{43}`),
Keywords: []string{"doppler"},
}
// validate
tps := []string{
generateSampleSecret("doppler", "dp.pt."+secrets.NewSecret(alphaNumeric("43"))),
}
return validate(r, tps, nil)
}
// TODO add additional doppler formats:
// https://docs.doppler.com/reference/auth-token-formats
+25
View File
@@ -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)
}
+49
View File
@@ -0,0 +1,49 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func DropBoxAPISecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Dropbox API secret",
RuleID: "dropbox-api-token",
Regex: generateSemiGenericRegex([]string{"dropbox"}, alphaNumeric("15")),
SecretGroup: 1,
Keywords: []string{"dropbox"},
}
// validate
tps := []string{
generateSampleSecret("dropbox", secrets.NewSecret(alphaNumeric("15"))),
}
return validate(r, tps, nil)
}
func DropBoxShortLivedAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "dropbox-short-lived-api-token",
Description: "Dropbox short lived API token",
Regex: generateSemiGenericRegex([]string{"dropbox"}, `sl\.[a-z0-9\-=_]{135}`),
Keywords: []string{"dropbox"},
}
// validate TODO
return &r
}
func DropBoxLongLivedAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "dropbox-long-lived-api-token",
Description: "Dropbox long lived API token",
Regex: generateSemiGenericRegex([]string{"dropbox"}, `[a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43}`),
Keywords: []string{"dropbox"},
}
// validate TODO
return &r
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Duffel() *config.Rule {
// define rule
r := config.Rule{
RuleID: "duffel-api-token",
Description: "Duffel API token",
Regex: regexp.MustCompile(`duffel_(test|live)_(?i)[a-z0-9_\-=]{43}`),
Keywords: []string{"duffel"},
}
// validate
tps := []string{
generateSampleSecret("duffel", "duffel_test_"+secrets.NewSecret(alphaNumericExtended("43"))),
}
return validate(r, tps, nil)
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Dynatrace() *config.Rule {
// define rule
r := config.Rule{
Description: "Dynatrace API token",
RuleID: "dynatrace-api-token",
Regex: regexp.MustCompile(`dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}`),
Keywords: []string{"dynatrace"},
}
// validate
tps := []string{
generateSampleSecret("dynatrace", "dt0c01."+secrets.NewSecret(alphaNumeric("24"))+"."+secrets.NewSecret(alphaNumeric("64"))),
}
return validate(r, tps, nil)
}
+40
View File
@@ -0,0 +1,40 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func EasyPost() *config.Rule {
// define rule
r := config.Rule{
Description: "EasyPost API token",
RuleID: "easypost-api-token",
Regex: regexp.MustCompile(`EZAK(?i)[a-z0-9]{54}`),
Keywords: []string{"EZAK"},
}
// validate
tps := []string{
generateSampleSecret("EZAK", "EZAK"+secrets.NewSecret(alphaNumeric("54"))),
}
return validate(r, tps, nil)
}
func EasyPostTestAPI() *config.Rule {
// define rule
r := config.Rule{
Description: "EasyPost test API token",
RuleID: "easypost-test-api-token",
Regex: regexp.MustCompile(`EZTK(?i)[a-z0-9]{54}`),
Keywords: []string{"EZTK"},
}
// validate
tps := []string{
generateSampleSecret("EZTK", "EZTK"+secrets.NewSecret(alphaNumeric("54"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -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)
}
+23
View File
@@ -0,0 +1,23 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Facebook() *config.Rule {
// define rule
r := config.Rule{
Description: "Facebook",
RuleID: "facebook",
Regex: generateSemiGenericRegex([]string{"facebook"}, hex("32")),
SecretGroup: 1,
Keywords: []string{"facebook"},
}
// validate
tps := []string{
generateSampleSecret("facebook", secrets.NewSecret(hex("32"))),
}
return validate(r, tps, nil)
}
+23
View File
@@ -0,0 +1,23 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func FastlyAPIToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Fastly API key",
RuleID: "fastly-api-token",
Regex: generateSemiGenericRegex([]string{"fastly"}, alphaNumericExtended("32")),
SecretGroup: 1,
Keywords: []string{"fastly"},
}
// validate
tps := []string{
generateSampleSecret("fastly", secrets.NewSecret(alphaNumericExtended("32"))),
}
return validate(r, tps, nil)
}
+40
View File
@@ -0,0 +1,40 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func FinicityClientSecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Finicity Client Secret",
RuleID: "finicity-client-secret",
Regex: generateSemiGenericRegex([]string{"finicity"}, alphaNumeric("20")),
SecretGroup: 1,
Keywords: []string{"finicity"},
}
// validate
tps := []string{
generateSampleSecret("finicity", secrets.NewSecret(alphaNumeric("20"))),
}
return validate(r, tps, nil)
}
func FinicityAPIToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Finicity API token",
RuleID: "finicity-api-token",
Regex: generateSemiGenericRegex([]string{"finicity"}, hex("32")),
SecretGroup: 1,
Keywords: []string{"finicity"},
}
// validate
tps := []string{
generateSampleSecret("finicity", secrets.NewSecret(hex("32"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -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)
}
+25
View File
@@ -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)
}
+56
View File
@@ -0,0 +1,56 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func FlutterwavePublicKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Finicity Public Key",
RuleID: "flutterwave-public-key",
Regex: regexp.MustCompile(`FLWPUBK_TEST-(?i)[a-h0-9]{32}-X`),
Keywords: []string{"FLWPUBK_TEST"},
}
// validate
tps := []string{
generateSampleSecret("flutterwavePubKey", "FLWPUBK_TEST-"+secrets.NewSecret(hex("32"))+"-X"),
}
return validate(r, tps, nil)
}
func FlutterwaveSecretKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Flutterwave Secret Key",
RuleID: "flutterwave-secret-key",
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{32}-X`),
Keywords: []string{"FLWSECK_TEST"},
}
// validate
tps := []string{
generateSampleSecret("flutterwavePubKey", "FLWSECK_TEST-"+secrets.NewSecret(hex("32"))+"-X"),
}
return validate(r, tps, nil)
}
func FlutterwaveEncKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Flutterwave Encryption Key",
RuleID: "flutterwave-encryption-key",
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{12}`),
Keywords: []string{"FLWSECK_TEST"},
}
// validate
tps := []string{
generateSampleSecret("flutterwavePubKey", "FLWSECK_TEST-"+secrets.NewSecret(hex("12"))),
}
return validate(r, tps, nil)
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func FrameIO() *config.Rule {
// define rule
r := config.Rule{
Description: "Frame.io API token",
RuleID: "frameio-api-token",
Regex: regexp.MustCompile(`fio-u-(?i)[a-z0-9\-_=]{64}`),
Keywords: []string{"fio-u-"},
}
// validate
tps := []string{
generateSampleSecret("frameio", "fio-u-"+secrets.NewSecret(alphaNumericExtended("64"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -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)
}
+44
View File
@@ -0,0 +1,44 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
// TODO this one could probably use some work
func GCPServiceAccount() *config.Rule {
// define rule
r := config.Rule{
Description: "Google (GCP) Service-account",
RuleID: "gcp-service-account",
Regex: regexp.MustCompile(`\"type\": \"service_account\"`),
Keywords: []string{`\"type\": \"service_account\"`},
}
// validate
tps := []string{
`"type": "service_account"`,
}
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)
}
+55
View File
@@ -0,0 +1,55 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/config"
)
func GenericCredential() *config.Rule {
// define rule
r := config.Rule{
RuleID: "generic-api-key",
Description: "Generic API Key",
Regex: generateSemiGenericRegex([]string{
"key",
"api",
"token",
"secret",
"client",
"passwd",
"password",
"auth",
"access",
}, `[0-9a-z\-_.=]{10,150}`),
SecretGroup: 1,
Keywords: []string{
"key",
"api",
"token",
"secret",
"client",
"passwd",
"password",
"auth",
"access",
},
Entropy: 3.5,
Allowlist: config.Allowlist{
StopWords: DefaultStopWords,
},
}
// validate
tps := []string{
generateSampleSecret("generic", "CLOJARS_34bf0e88955ff5a1c328d6a7491acc4f48e865a7b8dd4d70a70749037443"),
generateSampleSecret("generic", "Zf3D0LXCM3EIMbgJpUNnkRtOfOueHznB"),
`"client_id" : "0afae57f3ccfd9d7f5767067bc48b30f719e271ba470488056e37ab35d4b6506"`,
`"client_secret" : "6da89121079f83b2eb6acccf8219ea982c3d79bccc3e9c6a85856480661f8fde",`,
}
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)
}
+73
View File
@@ -0,0 +1,73 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func GitHubPat() *config.Rule {
// define rule
r := config.Rule{
Description: "GitHub Personal Access Token",
RuleID: "github-pat",
Regex: regexp.MustCompile(`ghp_[0-9a-zA-Z]{36}`),
Keywords: []string{"ghp_"},
}
// validate
tps := []string{
generateSampleSecret("github", "ghp_"+secrets.NewSecret(alphaNumeric("36"))),
}
return validate(r, tps, nil)
}
func GitHubOauth() *config.Rule {
// define rule
r := config.Rule{
Description: "GitHub OAuth Access Token",
RuleID: "github-oauth",
Regex: regexp.MustCompile(`gho_[0-9a-zA-Z]{36}`),
Keywords: []string{"gho_"},
}
// validate
tps := []string{
generateSampleSecret("github", "gho_"+secrets.NewSecret(alphaNumeric("36"))),
}
return validate(r, tps, nil)
}
func GitHubApp() *config.Rule {
// define rule
r := config.Rule{
Description: "GitHub App Token",
RuleID: "github-app-token",
Regex: regexp.MustCompile(`(ghu|ghs)_[0-9a-zA-Z]{36}`),
Keywords: []string{"ghu_", "ghs_"},
}
// validate
tps := []string{
generateSampleSecret("github", "ghu_"+secrets.NewSecret(alphaNumeric("36"))),
generateSampleSecret("github", "ghs_"+secrets.NewSecret(alphaNumeric("36"))),
}
return validate(r, tps, nil)
}
func GitHubRefresh() *config.Rule {
// define rule
r := config.Rule{
Description: "GitHub Refresh Token",
RuleID: "github-refresh-token",
Regex: regexp.MustCompile(`ghr_[0-9a-zA-Z]{36}`),
Keywords: []string{"ghr_"},
}
// validate
tps := []string{
generateSampleSecret("github", "ghr_"+secrets.NewSecret(alphaNumeric("36"))),
}
return validate(r, tps, nil)
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Gitlab() *config.Rule {
// define rule
r := config.Rule{
Description: "GitLab Personal Access Token",
RuleID: "gitlab-pat",
Regex: regexp.MustCompile(`glpat-[0-9a-zA-Z\-\_]{20}`),
Keywords: []string{"glpat-"},
}
// validate
tps := []string{
generateSampleSecret("gitlab", "glpat-"+secrets.NewSecret(alphaNumeric("20"))),
}
return validate(r, tps, nil)
}
+27
View File
@@ -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)
}
+26
View File
@@ -0,0 +1,26 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func GoCardless() *config.Rule {
// define rule
r := 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",
},
}
// validate
tps := []string{
generateSampleSecret("gocardless", "live_"+secrets.NewSecret(alphaNumericExtended("40"))),
}
return validate(r, tps, nil)
}
+65
View File
@@ -0,0 +1,65 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func GrafanaApiKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Grafana api key (or Grafana cloud api key)",
RuleID: "grafana-api-key",
SecretGroup: 1,
Regex: generateUniqueTokenRegex(`eyJrIjoi[A-Za-z0-9]{70,400}={0,2}`),
Keywords: []string{"eyJrIjoi"},
}
// validate
tps := []string{
generateSampleSecret("grafana-api-key",
"eyJrIjoi"+
secrets.NewSecret(alphaNumeric("70"))),
}
return validate(r, tps, nil)
}
func GrafanaCloudApiToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Grafana cloud api token",
RuleID: "grafana-cloud-api-token",
SecretGroup: 1,
Regex: generateUniqueTokenRegex(`glc_[A-Za-z0-9+/]{32,400}={0,2}`),
Keywords: []string{"glc_"},
}
// validate
tps := []string{
generateSampleSecret("grafana-cloud-api-token",
"glc_"+
secrets.NewSecret(alphaNumeric("32"))),
}
return validate(r, tps, nil)
}
func GrafanaServiceAccountToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Grafana service account token",
RuleID: "grafana-service-account-token",
SecretGroup: 1,
Regex: generateUniqueTokenRegex(`glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8}`),
Keywords: []string{"glsa_"},
}
// validate
tps := []string{
generateSampleSecret("grafana-service-account-token",
"glsa_"+
secrets.NewSecret(alphaNumeric("32"))+
"_"+
secrets.NewSecret((hex("8")))),
}
return validate(r, tps, nil)
}
+24
View File
@@ -0,0 +1,24 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Hashicorp() *config.Rule {
// define rule
r := config.Rule{
Description: "HashiCorp Terraform user/org API token",
RuleID: "hashicorp-tf-api-token",
Regex: regexp.MustCompile(`(?i)[a-z0-9]{14}\.atlasv1\.[a-z0-9\-_=]{60,70}`),
Keywords: []string{"atlasv1"},
}
// validate
tps := []string{
generateSampleSecret("hashicorpToken", secrets.NewSecret(hex("14"))+".atlasv1."+secrets.NewSecret(alphaNumericExtended("60,70"))),
}
return validate(r, tps, nil)
}
+22
View File
@@ -0,0 +1,22 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/config"
)
func Heroku() *config.Rule {
// define rule
r := config.Rule{
Description: "Heroku API Key",
RuleID: "heroku-api-key",
Regex: generateSemiGenericRegex([]string{"heroku"}, hex8_4_4_4_12()),
SecretGroup: 1,
Keywords: []string{"heroku"},
}
// validate
tps := []string{
`const HEROKU_KEY = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
}
return validate(r, tps, nil)
}
+23
View File
@@ -0,0 +1,23 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/config"
)
func HubSpot() *config.Rule {
// define rule
r := config.Rule{
Description: "HubSpot API Token",
RuleID: "hubspot-api-key",
Regex: generateSemiGenericRegex([]string{"hubspot"},
`[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}`),
SecretGroup: 1,
Keywords: []string{"hubspot"},
}
// validate
tps := []string{
`const hubspotKey = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
}
return validate(r, tps, nil)
}
+23
View File
@@ -0,0 +1,23 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Intercom() *config.Rule {
// define rule
r := config.Rule{
Description: "Intercom API Token",
RuleID: "intercom-api-key",
Regex: generateSemiGenericRegex([]string{"intercom"}, alphaNumericExtended("60")),
SecretGroup: 1,
Keywords: []string{"intercom"},
}
// validate
tps := []string{
generateSampleSecret("intercom", secrets.NewSecret(alphaNumericExtended("60"))),
}
return validate(r, tps, nil)
}
+21
View File
@@ -0,0 +1,21 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/config"
)
func JWT() *config.Rule {
// define rule
r := config.Rule{
Description: "JSON Web Token",
RuleID: "jwt",
Regex: generateUniqueTokenRegex(`ey[0-9a-z]{30,34}\.ey[0-9a-z-\/_]{30,500}\.[0-9a-zA-Z-\/_]{10,200}`),
Keywords: []string{"ey"},
}
// validate
tps := []string{`eyJhbGciOieeeiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwic3ViZSI6IjEyMzQ1Njc4OTAiLCJuYW1lZWEiOiJKb2huIERvZSIsInN1ZmV3YWZiIjoiMTIzNDU2Nzg5MCIsIm5hbWVmZWF3ZnciOiJKb2huIERvZSIsIm5hbWVhZmV3ZmEiOiJKb2huIERvZSIsInN1ZndhZndlYWIiOiIxMjM0NTY3ODkwIiwibmFtZWZ3YWYiOiJKb2huIERvZSIsInN1YmZ3YWYiOiIxMjM0NTY3ODkwIiwibmFtZndhZSI6IkpvaG4gRG9lIiwiaWZ3YWZhYXQiOjE1MTYyMzkwMjJ9.a_5icKBDo-8EjUlrfvz2k2k-FYaindQ0DEYNrlsnRG0`, // gitleaks:allow
`JWT := eyJhbGciOieeeiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwic3ViZSI6IjEyMzQ1Njc4OTAiLCJuYW1lZWEiOiJKb2huIERvZSIsInN1ZmV3YWZiIjoiMTIzNDU2Nzg5MCIsIm5hbWVmZWF3ZnciOiJKb2huIERvZSIsIm5hbWVhZmV3ZmEiOiJKb2huIERvZSIsInN1ZndhZndlYWIiOiIxMjM0NTY3ODkwIiwibmFtZWZ3YWYiOiJKb2huIERvZSIsInN1YmZ3YWYiOiIxMjM0NTY3ODkwIiwibmFtZndhZSI6IkpvaG4gRG9lIiwiaWZ3YWZhYXQiOjE1MTYyMzkwMjJ9.a_5icKBDo-8EjUlrfvz2k2k-FYaindQ0DEYNrlsnRG0`, // gitleaks:allow
}
return validate(r, tps, nil)
}
+27
View File
@@ -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)
}
+44
View File
@@ -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)
}
+25
View File
@@ -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)
}
+41
View File
@@ -0,0 +1,41 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func LinearAPIToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Linear API Token",
RuleID: "linear-api-key",
Regex: regexp.MustCompile(`lin_api_(?i)[a-z0-9]{40}`),
Keywords: []string{"lin_api_"},
}
// validate
tps := []string{
generateSampleSecret("linear", "lin_api_"+secrets.NewSecret(alphaNumeric("40"))),
}
return validate(r, tps, nil)
}
func LinearClientSecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Linear Client Secret",
RuleID: "linear-client-secret",
Regex: generateSemiGenericRegex([]string{"linear"}, hex("32")),
Keywords: []string{"linear"},
SecretGroup: 1,
}
// validate
tps := []string{
generateSampleSecret("linear", secrets.NewSecret(hex("32"))),
}
return validate(r, tps, nil)
}
+52
View File
@@ -0,0 +1,52 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func LinkedinClientSecret() *config.Rule {
// define rule
r := config.Rule{
RuleID: "linkedin-client-secret",
Description: "LinkedIn Client secret",
Regex: generateSemiGenericRegex([]string{
"linkedin",
"linked-in",
}, alphaNumeric("16")),
SecretGroup: 1,
Keywords: []string{
"linkedin",
"linked-in",
},
}
// validate
tps := []string{
generateSampleSecret("linkedin", secrets.NewSecret(alphaNumeric("16"))),
}
return validate(r, tps, nil)
}
func LinkedinClientID() *config.Rule {
// define rule
r := config.Rule{
RuleID: "linkedin-client-id",
Description: "LinkedIn Client ID",
Regex: generateSemiGenericRegex([]string{
"linkedin",
"linked-in",
}, alphaNumeric("14")),
SecretGroup: 1,
Keywords: []string{
"linkedin",
"linked-in",
},
}
// validate
tps := []string{
generateSampleSecret("linkedin", secrets.NewSecret(alphaNumeric("14"))),
}
return validate(r, tps, nil)
}
+47
View File
@@ -0,0 +1,47 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func LobPubAPIToken() *config.Rule {
// define rule
r := 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",
"_pub",
},
}
// validate
tps := []string{
generateSampleSecret("lob", "test_pub_"+secrets.NewSecret(hex("31"))),
}
return validate(r, tps, nil)
}
func LobAPIToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Lob API Key",
RuleID: "lob-api-key",
Regex: generateSemiGenericRegex([]string{"lob"}, `(live|test)_[a-f0-9]{35}`),
Keywords: []string{
"test_",
"live_",
},
SecretGroup: 1,
}
// validate
tps := []string{
generateSampleSecret("lob", "test_"+secrets.NewSecret(hex("35"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func MailChimp() *config.Rule {
// define rule
r := config.Rule{
RuleID: "mailchimp-api-key",
Description: "Mailchimp API key",
Regex: generateSemiGenericRegex([]string{"mailchimp"}, `[a-f0-9]{32}-us20`),
SecretGroup: 1,
Keywords: []string{
"mailchimp",
},
}
// validate
tps := []string{
generateSampleSecret("mailchimp", secrets.NewSecret(hex("32"))+"-us20"),
}
return validate(r, tps, nil)
}
+63
View File
@@ -0,0 +1,63 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func MailGunPrivateAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "mailgun-private-api-token",
Description: "Mailgun private API token",
Regex: generateSemiGenericRegex([]string{"mailgun"}, `key-[a-f0-9]{32}`),
SecretGroup: 1,
Keywords: []string{
"mailgun",
},
}
// validate
tps := []string{
generateSampleSecret("mailgun", "key-"+secrets.NewSecret(hex("32"))),
}
return validate(r, tps, nil)
}
func MailGunPubAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "mailgun-pub-key",
Description: "Mailgun public validation key",
Regex: generateSemiGenericRegex([]string{"mailgun"}, `pubkey-[a-f0-9]{32}`),
SecretGroup: 1,
Keywords: []string{
"mailgun",
},
}
// validate
tps := []string{
generateSampleSecret("mailgun", "pubkey-"+secrets.NewSecret(hex("32"))),
}
return validate(r, tps, nil)
}
func MailGunSigningKey() *config.Rule {
// define rule
r := config.Rule{
RuleID: "mailgun-signing-key",
Description: "Mailgun webhook signing key",
Regex: generateSemiGenericRegex([]string{"mailgun"}, `[a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8}`),
SecretGroup: 1,
Keywords: []string{
"mailgun",
},
}
// validate
tps := []string{
generateSampleSecret("mailgun", secrets.NewSecret(hex("32"))+"-00001111-22223333"),
}
return validate(r, tps, nil)
}
+23
View File
@@ -0,0 +1,23 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func MapBox() *config.Rule {
// define rule
r := config.Rule{
Description: "MapBox API token",
RuleID: "mapbox-api-token",
Regex: generateSemiGenericRegex([]string{"mapbox"}, `pk\.[a-z0-9]{60}\.[a-z0-9]{22}`),
SecretGroup: 1,
Keywords: []string{"mapbox"},
}
// validate
tps := []string{
generateSampleSecret("mapbox", "pk."+secrets.NewSecret(alphaNumeric("60"))+"."+secrets.NewSecret(alphaNumeric("22"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -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)
}
+58
View File
@@ -0,0 +1,58 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func MessageBirdAPIToken() *config.Rule {
// define rule
r := config.Rule{
Description: "MessageBird API token",
RuleID: "messagebird-api-token",
Regex: generateSemiGenericRegex([]string{
"messagebird",
"message-bird",
"message_bird",
}, alphaNumeric("25")),
SecretGroup: 1,
Keywords: []string{
"messagebird",
"message-bird",
"message_bird",
},
}
// validate
tps := []string{
generateSampleSecret("messagebird", secrets.NewSecret(alphaNumeric("25"))),
generateSampleSecret("message-bird", secrets.NewSecret(alphaNumeric("25"))),
generateSampleSecret("message_bird", secrets.NewSecret(alphaNumeric("25"))),
}
return validate(r, tps, nil)
}
func MessageBirdClientID() *config.Rule {
// define rule
r := config.Rule{
Description: "MessageBird client ID",
RuleID: "messagebird-client-id",
Regex: generateSemiGenericRegex([]string{
"messagebird",
"message-bird",
"message_bird",
}, hex8_4_4_4_12()),
SecretGroup: 1,
Keywords: []string{
"messagebird",
"message-bird",
"message_bird",
},
}
// validate
tps := []string{
`const MessageBirdClientID = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
}
return validate(r, tps, nil)
}
+26
View File
@@ -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)
}
+77
View File
@@ -0,0 +1,77 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func NewRelicUserID() *config.Rule {
// define rule
r := config.Rule{
RuleID: "new-relic-user-api-key",
Description: "New Relic user API Key",
Regex: generateSemiGenericRegex([]string{
"new-relic",
"newrelic",
"new_relic",
}, `NRAK-[a-z0-9]{27}`),
SecretGroup: 1,
Keywords: []string{
"NRAK",
},
}
// validate
tps := []string{
generateSampleSecret("new-relic", "NRAK-"+secrets.NewSecret(alphaNumeric("27"))),
}
return validate(r, tps, nil)
}
func NewRelicUserKey() *config.Rule {
// define rule
r := config.Rule{
RuleID: "new-relic-user-api-id",
Description: "New Relic user API ID",
Regex: generateSemiGenericRegex([]string{
"new-relic",
"newrelic",
"new_relic",
}, alphaNumeric("64")),
SecretGroup: 1,
Keywords: []string{
"new-relic",
"newrelic",
"new_relic",
},
}
// validate
tps := []string{
generateSampleSecret("new-relic", secrets.NewSecret(alphaNumeric("64"))),
}
return validate(r, tps, nil)
}
func NewRelicBrowserAPIKey() *config.Rule {
// define rule
r := config.Rule{
RuleID: "new-relic-browser-api-token",
Description: "New Relic ingest browser API token",
Regex: generateSemiGenericRegex([]string{
"new-relic",
"newrelic",
"new_relic",
}, `NRJS-[a-f0-9]{19}`),
SecretGroup: 1,
Keywords: []string{
"NRJS-",
},
}
// validate
tps := []string{
generateSampleSecret("new-relic", "NRJS-"+secrets.NewSecret(hex("19"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func NPM() *config.Rule {
// define rule
r := config.Rule{
RuleID: "npm-access-token",
Description: "npm access token",
Regex: generateUniqueTokenRegex(`npm_[a-z0-9]{36}`),
SecretGroup: 1,
Keywords: []string{
"npm_",
},
}
// validate
tps := []string{
generateSampleSecret("npmAccessToken", "npm_"+secrets.NewSecret(alphaNumeric("36"))),
}
return validate(r, tps, nil)
}
+29
View File
@@ -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)
}
+26
View File
@@ -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)
}
+66
View File
@@ -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)
}
+69
View File
@@ -0,0 +1,69 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func PlanetScalePassword() *config.Rule {
// define rule
r := config.Rule{
RuleID: "planetscale-password",
Description: "PlanetScale password",
Regex: generateUniqueTokenRegex(`pscale_pw_(?i)[a-z0-9=\-_\.]{32,64}`),
SecretGroup: 1,
Keywords: []string{
"pscale_pw_",
},
}
// 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 PlanetScaleAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "planetscale-api-token",
Description: "PlanetScale API token",
Regex: generateUniqueTokenRegex(`pscale_tkn_(?i)[a-z0-9=\-_\.]{32,64}`),
SecretGroup: 1,
Keywords: []string{
"pscale_tkn_",
},
}
// 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)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func PostManAPI() *config.Rule {
// define rule
r := config.Rule{
RuleID: "postman-api-token",
Description: "Postman API token",
Regex: generateUniqueTokenRegex(`PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34}`),
SecretGroup: 1,
Keywords: []string{
"PMAK-",
},
}
// validate
tps := []string{
generateSampleSecret("postmanAPItoken", "PMAK-"+secrets.NewSecret(hex("24"))+"-"+secrets.NewSecret(hex("34"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func Prefect() *config.Rule {
// define rule
r := config.Rule{
RuleID: "prefect-api-token",
Description: "Prefect API token",
Regex: generateUniqueTokenRegex(`pnu_[a-z0-9]{36}`),
SecretGroup: 1,
Keywords: []string{
"pnu_",
},
}
// validate
tps := []string{
generateSampleSecret("api-token", "pnu_"+secrets.NewSecret(alphaNumeric("36"))),
}
return validate(r, tps, nil)
}
+28
View File
@@ -0,0 +1,28 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/config"
)
func PrivateKey() *config.Rule {
// define rule
r := config.Rule{
Description: "Private Key",
RuleID: "private-key",
Regex: regexp.MustCompile(`(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY----`),
Keywords: []string{"-----BEGIN"},
}
// validate
tps := []string{`-----BEGIN PRIVATE KEY-----
anything
-----END PRIVATE KEY-----`,
`-----BEGIN RSA PRIVATE KEY-----
abcdefghijklmnopqrstuvwxyz
-----END RSA PRIVATE KEY-----
`,
} // gitleaks:allow
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func PulumiAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "pulumi-api-token",
Description: "Pulumi API token",
Regex: generateUniqueTokenRegex(`pul-[a-f0-9]{40}`),
SecretGroup: 1,
Keywords: []string{
"pul-",
},
}
// validate
tps := []string{
generateSampleSecret("pulumi-api-token", "pul-"+secrets.NewSecret(hex("40"))),
}
return validate(r, tps, nil)
}
+26
View File
@@ -0,0 +1,26 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func PyPiUploadToken() *config.Rule {
// define rule
r := config.Rule{
Description: "PyPI upload token",
RuleID: "pypi-upload-token",
Regex: regexp.MustCompile(
`pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}`),
Keywords: []string{
"pypi-AgEIcHlwaS5vcmc",
},
}
// validate
tps := []string{"pypiToken := \"pypi-AgEIcHlwaS5vcmc" + secrets.NewSecret(hex("32")) +
secrets.NewSecret(hex("32")) + "\""}
return validate(r, tps, nil)
}
+27
View File
@@ -0,0 +1,27 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func RapidAPIAccessToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "rapidapi-access-token",
Description: "RapidAPI Access Token",
Regex: generateSemiGenericRegex([]string{"rapidapi"},
alphaNumericExtendedShort("50")),
SecretGroup: 1,
Keywords: []string{
"rapidapi",
},
}
// validate
tps := []string{
generateSampleSecret("rapidapi",
secrets.NewSecret(alphaNumericExtendedShort("50"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func ReadMe() *config.Rule {
// define rule
r := config.Rule{
RuleID: "readme-api-token",
Description: "Readme API token",
Regex: generateUniqueTokenRegex(`rdme_[a-z0-9]{70}`),
SecretGroup: 1,
Keywords: []string{
"rdme_",
},
}
// validate
tps := []string{
generateSampleSecret("api-token", "rdme_"+secrets.NewSecret(alphaNumeric("70"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func RubyGemsAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "rubygems-api-token",
Description: "Rubygem API token",
Regex: generateUniqueTokenRegex(`rubygems_[a-f0-9]{48}`),
SecretGroup: 1,
Keywords: []string{
"rubygems_",
},
}
// validate
tps := []string{
generateSampleSecret("rubygemsAPIToken", "rubygems_"+secrets.NewSecret(hex("48"))),
}
return validate(r, tps, nil)
}
+110
View File
@@ -0,0 +1,110 @@
package rules
import (
"fmt"
"regexp"
"strings"
"github.com/rs/zerolog/log"
"github.com/zricethezav/gitleaks/v8/config"
"github.com/zricethezav/gitleaks/v8/detect"
)
const (
// case insensitive prefix
caseInsensitive = `(?i)`
// identifier prefix (just an ignore group)
identifierPrefix = `(?:`
identifierSuffix = `)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}`
// commonly used assignment operators or function call
operator = `(?:=|>|:=|\|\|:|<=|=>|:)`
// boundaries for the secret
// \x60 = `
secretPrefixUnique = `\b(`
secretPrefix = `(?:'|\"|\s|=|\x60){0,5}(`
secretSuffix = `)(?:['|\"|\n|\r|\s|\x60|;]|$)`
)
func generateSemiGenericRegex(identifiers []string, secretRegex string) *regexp.Regexp {
var sb strings.Builder
sb.WriteString(caseInsensitive)
sb.WriteString(identifierPrefix)
sb.WriteString(strings.Join(identifiers, "|"))
sb.WriteString(identifierSuffix)
sb.WriteString(operator)
sb.WriteString(secretPrefix)
sb.WriteString(secretRegex)
sb.WriteString(secretSuffix)
return regexp.MustCompile(sb.String())
}
func generateUniqueTokenRegex(secretRegex string) *regexp.Regexp {
var sb strings.Builder
sb.WriteString(caseInsensitive)
sb.WriteString(secretPrefixUnique)
sb.WriteString(secretRegex)
sb.WriteString(secretSuffix)
return regexp.MustCompile(sb.String())
}
func generateSampleSecret(identifier string, secret string) string {
return fmt.Sprintf("%s_api_token = \"%s\"", identifier, secret)
}
func validate(r config.Rule, truePositives []string, falsePositives []string) *config.Rule {
// normalize keywords like in the config package
var keywords []string
for _, k := range r.Keywords {
keywords = append(keywords, strings.ToLower(k))
}
r.Keywords = keywords
rules := make(map[string]config.Rule)
rules[r.RuleID] = r
d := detect.NewDetector(config.Config{
Rules: rules,
Keywords: keywords,
})
for _, tp := range truePositives {
if len(d.DetectString(tp)) != 1 {
log.Fatal().Msgf("Failed to validate. For rule ID [%s], true positive [%s] was not detected by regexp [%s]", r.RuleID, tp, r.Regex)
}
}
for _, fp := range falsePositives {
if len(d.DetectString(fp)) != 0 {
log.Fatal().Msgf("Failed to validate (fp) [%s]", r.RuleID)
}
}
return &r
}
func numeric(size string) string {
return fmt.Sprintf(`[0-9]{%s}`, size)
}
func hex(size string) string {
return fmt.Sprintf(`[a-f0-9]{%s}`, size)
}
func alphaNumeric(size string) string {
return fmt.Sprintf(`[a-z0-9]{%s}`, size)
}
func alphaNumericExtendedShort(size string) string {
return fmt.Sprintf(`[a-z0-9_-]{%s}`, size)
}
func alphaNumericExtended(size string) string {
return fmt.Sprintf(`[a-z0-9=_\-]{%s}`, size)
}
func alphaNumericExtendedLong(size string) string {
return fmt.Sprintf(`[a-z0-9\/=_\+\-]{%s}`, size)
}
func hex8_4_4_4_12() string {
return `[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`
}
+44
View File
@@ -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)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func SendGridAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "sendgrid-api-token",
Description: "SendGrid API token",
Regex: generateUniqueTokenRegex(`SG\.(?i)[a-z0-9=_\-\.]{66}`),
SecretGroup: 1,
Keywords: []string{
"SG.",
},
}
// validate
tps := []string{
generateSampleSecret("sengridAPIToken", "SG."+secrets.NewSecret(alphaNumericExtended("66"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -0,0 +1,25 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func SendInBlueAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "sendinblue-api-token",
Description: "Sendinblue API token",
Regex: generateUniqueTokenRegex(`xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16}`),
SecretGroup: 1,
Keywords: []string{
"xkeysib-",
},
}
// validate
tps := []string{
generateSampleSecret("sendinblue", "xkeysib-"+secrets.NewSecret(hex("64"))+"-"+secrets.NewSecret(alphaNumeric("16"))),
}
return validate(r, tps, nil)
}
+25
View File
@@ -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)
}
+26
View File
@@ -0,0 +1,26 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func ShippoAPIToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "shippo-api-token",
Description: "Shippo API token",
Regex: generateUniqueTokenRegex(`shippo_(live|test)_[a-f0-9]{40}`),
SecretGroup: 1,
Keywords: []string{
"shippo_",
},
}
// validate
tps := []string{
generateSampleSecret("shippo", "shippo_live_"+secrets.NewSecret(hex("40"))),
generateSampleSecret("shippo", "shippo_test_"+secrets.NewSecret(hex("40"))),
}
return validate(r, tps, nil)
}
+64
View File
@@ -0,0 +1,64 @@
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func ShopifySharedSecret() *config.Rule {
// define rule
r := config.Rule{
Description: "Shopify shared secret",
RuleID: "shopify-shared-secret",
Regex: regexp.MustCompile(`shpss_[a-fA-F0-9]{32}`),
Keywords: []string{"shpss_"},
}
// validate
tps := []string{"shopifySecret := \"shpss_" + secrets.NewSecret(hex("32")) + "\""}
return validate(r, tps, nil)
}
func ShopifyAccessToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Shopify access token",
RuleID: "shopify-access-token",
Regex: regexp.MustCompile(`shpat_[a-fA-F0-9]{32}`),
Keywords: []string{"shpat_"},
}
// validate
tps := []string{"shopifyToken := \"shpat_" + secrets.NewSecret(hex("32")) + "\""}
return validate(r, tps, nil)
}
func ShopifyCustomAccessToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Shopify custom access token",
RuleID: "shopify-custom-access-token",
Regex: regexp.MustCompile(`shpca_[a-fA-F0-9]{32}`),
Keywords: []string{"shpca_"},
}
// validate
tps := []string{"shopifyToken := \"shpca_" + secrets.NewSecret(hex("32")) + "\""}
return validate(r, tps, nil)
}
func ShopifyPrivateAppAccessToken() *config.Rule {
// define rule
r := config.Rule{
Description: "Shopify private app access token",
RuleID: "shopify-private-app-access-token",
Regex: regexp.MustCompile(`shppa_[a-fA-F0-9]{32}`),
Keywords: []string{"shppa_"},
}
// validate
tps := []string{"shopifyToken := \"shppa_" + secrets.NewSecret(hex("32")) + "\""}
return validate(r, tps, nil)
}
+60
View File
@@ -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&param2=false",
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80",
"http://cafeb4b3:d3adb33f@enterprise.contribsys.com:80/path?param1=true&param2=false#heading1",
}
return validate(r, tps, nil)
}
Loaded 100 of 675 files, more files were not shown because too many files have changed in this diff. Show more