Skip to content

Pre-commit hook  #65

Open
Open
@valayDave

Description

@valayDave

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

Activity

inverse

inverse commented on Mar 8, 2023

@inverse
Collaborator

Sounds like a good idea!

valayDave

valayDave commented on Mar 9, 2023

@valayDave
OwnerAuthor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @inverse@valayDave

        Issue actions

          Pre-commit hook · Issue #65 · valayDave/tell-me-your-secrets