Skip to content

Instantly share code, notes, and snippets.

View saurabhchandrapatel's full-sized avatar
🏠
Working from home

Saurabh Chandra Patel saurabhchandrapatel

🏠
Working from home
View GitHub Profile

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@saurabhchandrapatel
saurabhchandrapatel / kubectl-shortcuts.sh
Created November 17, 2020 07:38 — forked from tamas-molnar/kubectl-shortcuts.sh
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@saurabhchandrapatel
saurabhchandrapatel / # php71 - 2018-01-29_14-55-41.txt
Created January 29, 2018 15:52
php71 (homebrew/php/php71) on macOS 10.13.3 - Homebrew build logs
Homebrew build logs for homebrew/php/php71 on macOS 10.13.3
Build date: 2018-01-29 14:55:41
@saurabhchandrapatel
saurabhchandrapatel / # php71 - 2018-01-29_14-55-41.txt
Created January 29, 2018 09:29
php71 (homebrew/php/php71) on macOS 10.13.3 - Homebrew build logs
Homebrew build logs for homebrew/php/php71 on macOS 10.13.3
Build date: 2018-01-29 14:55:41
@saurabhchandrapatel
saurabhchandrapatel / gist:a980b44881ca08cc5b9d53b01af83fba
Created January 15, 2018 18:08
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function learndash_woocommerce::add_product_type()
function add_product_type($types, $product_type = null ) {
$types['course'] = __( 'Course', 'learndash');
return $types;
}