Find juicy secrets in the repositories
lazyGitleaks is a python script clone and scans the repositories to find hard-coded secrets
Table of Contents
βββ βββ ββββββββββββ βββ βββββ ββββββββββββ βββ ββββββ βββ ββ βββ ββββββ
ββββ ββββββ β β β βββ βββ βββ βββ ββββββββ βββ ββββββ ββ βββββββ βββββ βββ β
ββββ βββ βββ β β ββββ βββ βββ βββββββββββββ ββββ ββββββ ββββ βββ βββ ββββββ β ββββ
ββββ βββββββββ βββ β β βββββ βββ ββββββββ ββββ β ββββ βββ ββββββββββ βββ ββ β βββ
ββββββββββ βββββββββββββ β βββββ ββββββββββββ ββββ β βββββββββββββββββ ββββββββ βββββββββββ
β βββ βββ βββββββ βββββ βββββ ββ β ββ β ββ β βββ βββ ββ βββ βββββ ββ βββ βββ β β
β β β β β ββ ββββ β β β βββ βββ β β β β β β β β β β β β β ββ ββ ββ βββ ββ β β
β β β β β β β β β β β ββ β β β β β β β β β β β β ββ β β β β
β β β β β β β β β β β β β β β ββ β β
β β β
lazyGitleaks ver. 0.1 Beta | Developed by @bassammaged <kemet>
Do you interested in finding secrets? Are you depending on gitleaks tool? Do you usually preform
large scan scale against different repositories? No worries. lazyGitleaks comes to automate the scan
and use custom .toml template to find the juicy secrets are living in repositories.
usage: lazyGitleaks.py [-h] -p PLATFORM -t TARGET [-a] [-o] [-v]
required arguments:
-p PLATFORM, --platform PLATFORM
Specify the version control platform [github, gitlab]
-t TARGET, --target TARGET
Provide the targeted account name
optional arguments:
-h, --help show this help message and exit
-a, --auth By providing the flag the scan will be run with authentication mechanism.
-o, --org By providing the flag the target will classified as organization account.
-v, --verbose Allows the script to print out the message level start with debug.
lazyGitleaks
is in beta version and is supposed to be free of issues but if any issues are encountered, please submit the ticket,lazyGitleaks is coded and published to be used in particular circumstances:
- Engaging in penetration testing activity.
- Carry on a Bug hunting activity.
- Source code review.
- Any other legal activity that is already approved by the owner of the asset.
lazyGitleaks
is created to work with all version control, which means there are many version control that will be supported soon.
-
lazyGitleaks
supports GitHub. -
lazyGitleaks
supports GitLab. -
lazyGitleaks
uses an environment variable for storing Credentials. -
lazyGitleaks
perform GitHub API calls and clone all available repositories. -
lazyGitleaks
supports authenticated [public & private repositories] and non-authenticated [public repositories]. -
lazyGitleaks
monitors the GitHub API limitation and the script detects the required time to postpone the job. -
lazyGitleaks
has its uniquegitleaks.toml
that helps to find more secrets. -
lazyGitleaks
supports pause & continue.
Warning
Authenticated scan it's run without issues when the target account is an organization that you are a member of or the provided github PAT is belong to the same target account.
- Python3
pip
package managerpython3 -m pip install requirements.txt
- Feel Free to use
lazyGitleaks
vialazyGitleaks.py
script
Note
Github credendtial has to provided through enviornment variables as the following:
LG_GITHUB_TOKEN="<github_username>:<github_pat>"
[
{
"Description": "AWS Manager ID",
"StartLine": 139,
"EndLine": 139,
"StartColumn": 21,
"EndColumn": 40,
"Match": "AIPAIK7LV6U6UXJXQQR3",
"Secret": "AIPA",
"File": "README.md",
"Commit": "",
"Entropy": 1.5,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"access-key",
"aws",
"cloud"
],
"RuleID": "aws-manager-id"
}
]
[
{
"Description": "GitHub Personal Access Token",
"StartLine": 50,
"EndLine": 50,
"StartColumn": 150,
"EndColumn": 189,
"Match": "ghp_A5COGOVYUGnhYWILWawMfjpAAeeVeC5no94V",
"Secret": "ghp_A5COGOVYUGnhYWILWawMfjpAAeeVeC5no94V",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 4.5153117,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"pat-key",
"github",
"version-control"
],
"RuleID": "github-pat"
},
{
"Description": "GitHub Personal Access Token",
"StartLine": 59,
"EndLine": 59,
"StartColumn": 147,
"EndColumn": 186,
"Match": "ghp_A5COGOVYUGnhYWILWawMfjpAAeeVeC5no94V",
"Secret": "ghp_A5COGOVYUGnhYWILWawMfjpAAeeVeC5no94V",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 4.5153117,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"pat-key",
"github",
"version-control"
],
"RuleID": "github-pat"
},
{
"Description": "GitHub Personal Access Token",
"StartLine": 59,
"EndLine": 59,
"StartColumn": 224,
"EndColumn": 263,
"Match": "ghp_8zrErw6PvpPWaoPepQLN19sXLeAOSH06Zx1M",
"Secret": "ghp_8zrErw6PvpPWaoPepQLN19sXLeAOSH06Zx1M",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 4.8341837,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"pat-key",
"github",
"version-control"
],
"RuleID": "github-pat"
},
{
"Description": "GitHub Personal Access Token",
"StartLine": 63,
"EndLine": 63,
"StartColumn": 37,
"EndColumn": 76,
"Match": "ghp_8zrErw6PvpPWaoPepQLN19sXLeAOSH06Zx1M",
"Secret": "ghp_8zrErw6PvpPWaoPepQLN19sXLeAOSH06Zx1M",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 4.8341837,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"pat-key",
"github",
"version-control"
],
"RuleID": "github-pat"
},
{
"Description": "AirBrake API",
"StartLine": 98,
"EndLine": 98,
"StartColumn": 13,
"EndColumn": 62,
"Match": "\"AIRBRAKE_KEY: 'cae7f5949eaf243d0cccfa1329f092d8'\"",
"Secret": "\"AIRBRAKE_KEY: 'cae7f5949eaf243d0cccfa1329f092d8'\"",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 4.533661,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"api-key",
"airbrake",
"app monitor"
],
"RuleID": "airbrake-api"
},
{
"Description": "AirBrake API",
"StartLine": 99,
"EndLine": 99,
"StartColumn": 14,
"EndColumn": 63,
"Match": "\"AIRBRAKE_KEY: 'cae7f5949eaf243d0cccfa1329f092d8'\"",
"Secret": "\"AIRBRAKE_KEY: 'cae7f5949eaf243d0cccfa1329f092d8'\"",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 4.533661,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"api-key",
"airbrake",
"app monitor"
],
"RuleID": "airbrake-api"
},
{
"Description": "AirBrake project key",
"StartLine": 120,
"EndLine": 120,
"StartColumn": 13,
"EndColumn": 33,
"Match": "\"AIRBRAKE_ID: 179755\"",
"Secret": "\"AIRBRAKE_ID: 179755\"",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 3.8208888,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"project-id",
"airbrake",
"app monitor"
],
"RuleID": "airbrake-project-key"
},
{
"Description": "AirBrake project key",
"StartLine": 121,
"EndLine": 121,
"StartColumn": 14,
"EndColumn": 34,
"Match": "\"AIRBRAKE_ID: 179755\"",
"Secret": "\"AIRBRAKE_ID: 179755\"",
"File": "apps/third_eye/lazy_gitleaks/README.md",
"Commit": "",
"Entropy": 3.8208888,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"project-id",
"airbrake",
"app monitor"
],
"RuleID": "airbrake-project-key"
},
{
"Description": "GitHub Personal Access Token",
"StartLine": 71,
"EndLine": 71,
"StartColumn": 171,
"EndColumn": 210,
"Match": "ghp_A5COGOVYUGnhYWILWawMfjpAAeeVeC5no94V",
"Secret": "ghp_A5COGOVYUGnhYWILWawMfjpAAeeVeC5no94V",
"File": "apps/third_eye/lazy_gitleaks/run.py",
"Commit": "",
"Entropy": 4.5153117,
"Author": "",
"Email": "",
"Date": "",
"Message": "",
"Tags": [
"pat-key",
"github",
"version-control"
],
"RuleID": "github-pat"
}
]
- Support pause & continue.
- Support gitlab.