-
Notifications
You must be signed in to change notification settings - Fork 33
Adding xGitGuard pre commit hook #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e6885c1
4c9a85f
6708474
7c9b042
5a64889
e1210a1
b68ac29
2760d6e
1e53416
ddfbd89
015c86e
93b88b2
8314aa9
afd7098
326ae63
867e5a0
1576bc9
18134b3
4ca638e
9a1cd52
230e6b6
d91bf86
b2d0346
17d4a95
8c137b9
4ab1f53
5e872da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
keyword | ||
--password | ||
--token | ||
?accesskeyid | ||
?access_token | ||
access_key | ||
access_key_id | ||
access_key_secret | ||
access_secret | ||
access_token | ||
account_sid | ||
agfa | ||
algolia_api_key | ||
amazon_secret_access_key | ||
api_key | ||
api_key_secret | ||
api_key_sid | ||
app_token | ||
artifacts_bucket | ||
artifacts_secret | ||
atoken | ||
auth | ||
auth_token | ||
aws_access_key | ||
aws_access_key_id | ||
aws_secret_access_key | ||
aws_secret_key | ||
bintray_key | ||
cf_password | ||
client_secret | ||
cloudflare_api_key | ||
codecov_token | ||
consumer_secret | ||
coveralls_repo_token | ||
coverity_scan_token | ||
cred | ||
customer_secret | ||
database_password | ||
datadog_api_key | ||
db_password | ||
db_pw | ||
deploy_password | ||
deploy_token | ||
dockerhubpassword | ||
docker_hub_password | ||
docker_key | ||
docker_pass | ||
docker_passwd | ||
docker_password | ||
encryption_password | ||
file_password | ||
firebase_token | ||
ftp_password | ||
ftp_pw | ||
get_token | ||
gh_token | ||
github_access_token | ||
github_api_key | ||
github_auth | ||
github_key | ||
github_oauth_token | ||
github_password | ||
github_pwd | ||
github_token | ||
gpg_passphrase | ||
heroku_api_key | ||
key | ||
keystore_pass | ||
mapbox_access_token | ||
mysql_password | ||
npm_auth_token | ||
npm_token | ||
oauth_token | ||
os_password | ||
pass | ||
passphrase | ||
password | ||
private_key | ||
publish_key | ||
pypi_password | ||
release_token | ||
repotoken | ||
s3_access_key | ||
s3_access_key_id | ||
s3_key | ||
s3_secret_key | ||
sauce_access_key | ||
secret | ||
secret_key_base | ||
signing_key | ||
sonar_token | ||
sonatype_password | ||
sshpass | ||
sshpassword | ||
token | ||
user_secret |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pyinstaller ../git-precommit-hook/xgitguard_precommit_cred_detections.py --hidden-import=sklearn.feature_extraction.text --hidden-import=urlextract --hidden-import=sklearn.model_selection --hidden-import=sklearn.ensemble | ||
|
||
zip -r xgitguard-precommit-hook.zip pre-commit | ||
cd dist/xgitguard_precommit_cred_detections | ||
zip -r ../../xgitguard-precommit-hook.zip xgitguard_precommit_cred_detections | ||
zip -r ../../xgitguard-precommit-hook.zip _internal | ||
chmod 777 ../../xgitguard-precommit-hook.zip | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use chmod 644 unless you have a specific reason for broader access. This is much safer for most cases. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
results=$(~/gitconfig/hooks/xgitguard_precommit_cred_detections) | ||
echo "$results" | ||
if grep -q "no-verify" <<< "$results"; then | ||
exit 1; | ||
else | ||
exit 0; | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
git config --global ~/gitconfig | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update README to setup pre-commit hook in the system |
||
mkdir -p ~/gitconfig | ||
mkdir -p ~/gitconfig/hooks | ||
unzip xgitguard-precommit-hook.zip -d ~/gitconfig/hooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path should be relative