Skip to content

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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

BuiltInParris
Copy link

This allows the functionality exposed in xGitGuard to be used in the form a pre-commit hook instead of as a scan of github.

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ BuiltInParris
❌ Parris, Stephen


Parris, Stephen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

# logger.debug("Dictionary_words file Read")
if not self.dictionary_words.empty:
try:
with open('/Users/sparri919/Documents/GitHub/xGitGuard/xgitguard/config/vectorizer.pkl', 'rb') as file:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path should be relative

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
Copy link
Collaborator

Choose a reason for hiding this comment

The 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.

@@ -0,0 +1,4 @@
git config --global ~/gitconfig
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update README to setup pre-commit hook in the system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants