Skip to content
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

Pre-commit hook #65

Open
valayDave opened this issue Mar 8, 2023 · 3 comments
Open

Pre-commit hook #65

valayDave opened this issue Mar 8, 2023 · 3 comments

Comments

@valayDave
Copy link
Owner

We can create a pre-commit hook for this project. Will be very useful to avoid leaking secrets at the time of code commits.

@inverse
Copy link
Collaborator

inverse commented Mar 8, 2023

Sounds like a good idea!

@inverse
Copy link
Collaborator

inverse commented Mar 8, 2023

@valayDave
Copy link
Owner Author

valayDave commented Mar 9, 2023

Here are a few more thoughts about how we will implement a pre-commit hook:

  1. Have a less verbose logging scheme and only show what is causing the issue
  2. Can throw a nonzero exit code so pre-commit can fail when discovering secrets. We already support this
  3. Have a way to dump the findings to JSON
  4. Can point out what is causing the pre-commit fail. For example, if we discover an AWS credential, it would be nice to show what file, pattern, and regex match is causing the issue. Related to Unable to print the finding #61
  5. The PC hook should also allow filtering signatures we need (which we already have) and specifying signatures we want to ignore (which we don't have).

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

No branches or pull requests

2 participants